aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickcontrol/tst_qquickcontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qquickcontrol/tst_qquickcontrol.cpp')
-rw-r--r--tests/auto/qquickcontrol/tst_qquickcontrol.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/auto/qquickcontrol/tst_qquickcontrol.cpp b/tests/auto/qquickcontrol/tst_qquickcontrol.cpp
index c8d34756..6acb192f 100644
--- a/tests/auto/qquickcontrol/tst_qquickcontrol.cpp
+++ b/tests/auto/qquickcontrol/tst_qquickcontrol.cpp
@@ -53,16 +53,7 @@ private slots:
void flickable();
private:
- struct TouchDeviceDeleter
- {
- static inline void cleanup(QTouchDevice *device)
- {
- QWindowSystemInterface::unregisterTouchDevice(device);
- delete device;
- }
- };
-
- QScopedPointer<QTouchDevice, TouchDeviceDeleter> touchDevice;
+ QScopedPointer<QPointingDevice> touchDevice;
};
@@ -71,9 +62,7 @@ void tst_QQuickControl::initTestCase()
QQmlDataTest::initTestCase();
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
- touchDevice.reset(new QTouchDevice);
- touchDevice->setType(QTouchDevice::TouchScreen);
- QWindowSystemInterface::registerTouchDevice(touchDevice.data());
+ touchDevice.reset(QTest::createTouchDevice());
}
void tst_QQuickControl::flickable()