aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib/quicktestevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/testlib/quicktestevent.cpp')
-rw-r--r--src/imports/testlib/quicktestevent.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/imports/testlib/quicktestevent.cpp b/src/imports/testlib/quicktestevent.cpp
index f2d7f93d26..b2693de234 100644
--- a/src/imports/testlib/quicktestevent.cpp
+++ b/src/imports/testlib/quicktestevent.cpp
@@ -443,14 +443,15 @@ QObject *QQuickTouchEventSequence::commit()
\internal
*/
-QTouchDevice *QuickTestEvent::touchDevice()
+QPointingDevice *QuickTestEvent::touchDevice()
{
- static QTouchDevice *device(nullptr);
+ static QPointingDevice *device(nullptr);
if (!device) {
- device = new QTouchDevice;
- device->setType(QTouchDevice::TouchScreen);
- QWindowSystemInterface::registerTouchDevice(device);
+ device = new QPointingDevice(QLatin1String("test touchscreen"), 42,
+ QInputDevice::DeviceType::TouchScreen, QPointingDevice::PointerType::Finger,
+ QInputDevice::Capability::Position, 10, 0);
+ QWindowSystemInterface::registerInputDevice(device);
}
return device;
}