diff options
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 00b8e05f30..2cb9b8053f 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -469,7 +469,10 @@ QList<QTouchEvent::TouchPoint> QList<QWindowSystemInterface::TouchPoint>::const_iterator end = points.constEnd(); while (point != end) { p.setId(point->id); + if (point->uniqueId >= 0) + p.setUniqueId(point->uniqueId); p.setPressure(point->pressure); + p.setRotation(point->rotation); states |= point->state; p.setState(point->state); @@ -917,6 +920,17 @@ Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int #endif } +namespace QTest +{ + Q_GUI_EXPORT QTouchDevice * createTouchDevice(QTouchDevice::DeviceType devType = QTouchDevice::TouchScreen) + { + QTouchDevice *ret = new QTouchDevice(); + ret->setType(devType); + QWindowSystemInterface::registerTouchDevice(ret); + return ret; + } +} + Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *w, QTouchDevice *device, const QList<QTouchEvent::TouchPoint> &points, Qt::KeyboardModifiers mods = Qt::NoModifier) |