summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/gestures
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-05-03 18:27:12 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-06-10 13:07:17 +0000
commit982b70d37db337b2c57a3cfce0f24c3d00a598d6 (patch)
treef86dd50fa2cef003b32b77bbe8eab7cbfac2251e /tests/auto/other/gestures
parente73e2264ded27ceb9f3af5b548036d33effa0797 (diff)
autotests: use QTest::createTouchDevice()
Task-number: QTBUG-44030 Change-Id: I514c1294a0ff6587b825982a8bb354104c214120 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'tests/auto/other/gestures')
-rw-r--r--tests/auto/other/gestures/gestures.pro2
-rw-r--r--tests/auto/other/gestures/tst_gestures.cpp5
2 files changed, 2 insertions, 5 deletions
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 <qgraphicswidget.h>
#include <qgraphicsview.h>
#include <qmainwindow.h>
-#include <qpa/qwindowsysteminterface.h>
#include <qdebug.h>
@@ -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);
}