From 982b70d37db337b2c57a3cfce0f24c3d00a598d6 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 3 May 2016 18:27:12 +0200 Subject: autotests: use QTest::createTouchDevice() Task-number: QTBUG-44030 Change-Id: I514c1294a0ff6587b825982a8bb354104c214120 Reviewed-by: Laszlo Agocs --- tests/auto/other/gestures/gestures.pro | 2 +- tests/auto/other/gestures/tst_gestures.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/auto/other') diff --git a/tests/auto/other/gestures/gestures.pro b/tests/auto/other/gestures/gestures.pro index 3d0ef7c745..0ec0435f62 100644 --- a/tests/auto/other/gestures/gestures.pro +++ b/tests/auto/other/gestures/gestures.pro @@ -1,4 +1,4 @@ CONFIG += testcase TARGET = tst_gestures -QT += widgets testlib gui-private +QT += widgets testlib SOURCES += tst_gestures.cpp diff --git a/tests/auto/other/gestures/tst_gestures.cpp b/tests/auto/other/gestures/tst_gestures.cpp index 59b285b032..d153146574 100644 --- a/tests/auto/other/gestures/tst_gestures.cpp +++ b/tests/auto/other/gestures/tst_gestures.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include @@ -2318,9 +2317,7 @@ void tst_Gestures::bug_13501_gesture_not_accepted() w.show(); QVERIFY(waitForWindowExposed(&w)); //QTest::mousePress(&ignoreEvent, Qt::LeftButton); - QTouchDevice *device = new QTouchDevice; - device->setType(QTouchDevice::TouchScreen); - QWindowSystemInterface::registerTouchDevice(device); + QTouchDevice *device = QTest::createTouchDevice(); QTest::touchEvent(&w, device).press(0, QPoint(10, 10), &w); } -- cgit v1.2.3