diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2014-12-08 16:07:51 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2014-12-09 16:58:14 +0100 |
commit | 68d528654f0b1e488498b9a44381ff2d809492e3 (patch) | |
tree | 31dabbc775aadcf6b8f882808be3cf612aeb6bfa /src/gui/kernel/qwindowsysteminterface.cpp | |
parent | 0a1d7f615175425aba99fe94af713e3137204b7f (diff) |
Improve TouchPoint debug output
Printing a QWindowSystemInterface::TouchPoint can be misleading if
it only includes the normalized position. Many backends do not provide
such information so it is often 0, 0. Print also the "area" which is
always set, the center of this rect is the actual touch position in screen
coordinates.
Change-Id: I2f3efabf6ced6fae9937518cc39d898e66b7894e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 32040f92e3..236f970c78 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -775,7 +775,8 @@ void QWindowSystemInterface::handleEnterWhatsThisEvent() #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QWindowSystemInterface::TouchPoint &p) { - dbg.nospace() << "TouchPoint(" << p.id << " @" << p.normalPosition << " press " << p.pressure << " vel " << p.velocity << " state " << (int)p.state; + dbg.nospace() << "TouchPoint(" << p.id << " @" << p.area << " normalized " << p.normalPosition + << " press " << p.pressure << " vel " << p.velocity << " state " << (int)p.state; return dbg.space(); } #endif |