From 68d528654f0b1e488498b9a44381ff2d809492e3 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 8 Dec 2014 16:07:51 +0100 Subject: [PATCH] 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 Reviewed-by: Shawn Rutledge --- src/gui/kernel/qwindowsysteminterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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