aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickcontrol
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qquickcontrol')
-rw-r--r--tests/auto/qquickcontrol/CMakeLists.txt1
-rw-r--r--tests/auto/qquickcontrol/data/flickable.qml4
-rw-r--r--tests/auto/qquickcontrol/tst_qquickcontrol.cpp15
3 files changed, 5 insertions, 15 deletions
diff --git a/tests/auto/qquickcontrol/CMakeLists.txt b/tests/auto/qquickcontrol/CMakeLists.txt
index 59e1ccb6..0599ce32 100644
--- a/tests/auto/qquickcontrol/CMakeLists.txt
+++ b/tests/auto/qquickcontrol/CMakeLists.txt
@@ -24,6 +24,7 @@ qt_add_test(tst_qquickcontrol
Qt::GuiPrivate
Qt::QmlPrivate
Qt::QuickControls2
+ Qt::QuickControls2Private
Qt::QuickPrivate
Qt::QuickTemplates2Private
Qt::TestPrivate
diff --git a/tests/auto/qquickcontrol/data/flickable.qml b/tests/auto/qquickcontrol/data/flickable.qml
index f3a1c381..0ac72320 100644
--- a/tests/auto/qquickcontrol/data/flickable.qml
+++ b/tests/auto/qquickcontrol/data/flickable.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.14
-import QtQuick.Controls 2.14
+import QtQuick
+import QtQuick.Controls
ApplicationWindow {
width: 400
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()