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>bb10
parent
0a1d7f6151
commit
68d528654f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue