From 94324bd93fe9f4f61346b8f9e934c01279cb700e Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 2 May 2016 11:08:13 +0200 Subject: tst_touchmouse: make use of new QTest::createTouchDevice function So gui-private API isn't necessary anymore. Task-number: QTBUG-44030 Change-Id: If4e77fc99e9f6373b8dd0303c9ac52e71ed43cf7 Reviewed-by: Laszlo Agocs Reviewed-by: Frederik Gladhorn --- tests/auto/quick/touchmouse/touchmouse.pro | 2 +- tests/auto/quick/touchmouse/tst_touchmouse.cpp | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/auto/quick/touchmouse') diff --git a/tests/auto/quick/touchmouse/touchmouse.pro b/tests/auto/quick/touchmouse/touchmouse.pro index 0df9bc53d3..49818bb399 100644 --- a/tests/auto/quick/touchmouse/touchmouse.pro +++ b/tests/auto/quick/touchmouse/touchmouse.pro @@ -1,7 +1,7 @@ CONFIG += testcase TARGET = tst_touchmouse -QT += core-private gui-private qml-private quick-private testlib +QT += core-private qml-private quick-private testlib macx:CONFIG -= app_bundle diff --git a/tests/auto/quick/touchmouse/tst_touchmouse.cpp b/tests/auto/quick/touchmouse/tst_touchmouse.cpp index 15d7ffd9d9..d831889a1e 100644 --- a/tests/auto/quick/touchmouse/tst_touchmouse.cpp +++ b/tests/auto/quick/touchmouse/tst_touchmouse.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include @@ -132,7 +131,7 @@ class tst_TouchMouse : public QQmlDataTest Q_OBJECT public: tst_TouchMouse() - :device(0) + :device(QTest::createTouchDevice()) {} private slots: @@ -191,11 +190,6 @@ void tst_TouchMouse::initTestCase() QQmlDataTest::initTestCase(); qmlRegisterType("Qt.test", 1, 0, "EventItem"); - if (!device) { - device = new QTouchDevice; - device->setType(QTouchDevice::TouchScreen); - QWindowSystemInterface::registerTouchDevice(device); - } } void tst_TouchMouse::simpleTouchEvent() -- cgit v1.2.3