aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem/tst_qquickitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickitem/tst_qquickitem.cpp')
-rw-r--r--tests/auto/quick/qquickitem/tst_qquickitem.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
index 77f183ad2a..924a1d2c4e 100644
--- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
@@ -1337,12 +1337,7 @@ void tst_qquickitem::touchEventAcceptIgnore()
item->setParentItem(window.contentItem());
item->acceptIncomingTouchEvents = itemSupportsTouch;
- static QTouchDevice* device = nullptr;
- if (!device) {
- device =new QTouchDevice;
- device->setType(QTouchDevice::TouchScreen);
- QWindowSystemInterface::registerTouchDevice(device);
- }
+ static QPointingDevice* device = QTest::createTouchDevice();
// Send Begin, Update & End touch sequence
{