From b60c02ce7d2d34eae63c78f77c0e59c09dda2212 Mon Sep 17 00:00:00 2001 From: Qt Submodule Update Bot Date: Thu, 25 Jun 2020 14:45:57 +0300 Subject: Update dependencies on 'dev' in qt/qtquickcontrols2 Change-Id: I1f6bf96f30f5dcea4d9838b0638f9412309a069e Reviewed-by: Qt CI Bot Reviewed-by: Liang Qi --- tests/auto/focus/tst_focus.cpp | 28 +++----------------------- tests/auto/qquickcontrol/tst_qquickcontrol.cpp | 15 ++------------ tests/auto/qquickdrawer/tst_qquickdrawer.cpp | 17 +++------------- tests/auto/qquickpopup/tst_qquickpopup.cpp | 13 +----------- 4 files changed, 9 insertions(+), 64 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/focus/tst_focus.cpp b/tests/auto/focus/tst_focus.cpp index 8a1b36ad..b1b23244 100644 --- a/tests/auto/focus/tst_focus.cpp +++ b/tests/auto/focus/tst_focus.cpp @@ -43,8 +43,8 @@ #include #include #include +#include #include -#include #include "../shared/util.h" #include "../shared/visualtestutil.h" @@ -159,18 +159,7 @@ void tst_focus::policy() window->requestActivate(); QVERIFY(QTest::qWaitForWindowActive(window.data())); - struct TouchDeviceDeleter - { - static inline void cleanup(QTouchDevice *device) - { - QWindowSystemInterface::unregisterTouchDevice(device); - delete device; - } - }; - - QScopedPointer device(new QTouchDevice); - device->setType(QTouchDevice::TouchScreen); - QWindowSystemInterface::registerTouchDevice(device.data()); + QScopedPointer device(QTest::createTouchDevice()); control->setFocusPolicy(Qt::NoFocus); QCOMPARE(control->focusPolicy(), Qt::NoFocus); @@ -366,18 +355,7 @@ void tst_focus::scope() window->requestActivate(); QVERIFY(QTest::qWaitForWindowActive(window.data())); - struct TouchDeviceDeleter - { - static inline void cleanup(QTouchDevice *device) - { - QWindowSystemInterface::unregisterTouchDevice(device); - delete device; - } - }; - - QScopedPointer device(new QTouchDevice); - device->setType(QTouchDevice::TouchScreen); - QWindowSystemInterface::registerTouchDevice(device.data()); + QScopedPointer device(QTest::createTouchDevice()); child->forceActiveFocus(); QVERIFY(child->hasActiveFocus()); 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 touchDevice; + QScopedPointer 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() diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp index 108cd4a1..c96b156c 100644 --- a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp +++ b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp @@ -40,8 +40,8 @@ #include "../shared/visualtestutil.h" #include "../shared/qtest_quickcontrols.h" +#include #include -#include #include #include #include @@ -112,16 +112,7 @@ private slots: void topEdgeScreenEdge(); private: - struct TouchDeviceDeleter - { - static inline void cleanup(QTouchDevice *device) - { - QWindowSystemInterface::unregisterTouchDevice(device); - delete device; - } - }; - - QScopedPointer touchDevice; + QScopedPointer touchDevice; }; @@ -130,9 +121,7 @@ void tst_QQuickDrawer::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_QQuickDrawer::defaults() diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp index 184d8ad8..30a21b9f 100644 --- a/tests/auto/qquickpopup/tst_qquickpopup.cpp +++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp @@ -303,18 +303,7 @@ void tst_QQuickPopup::overlay() QVERIFY(popup->isVisible()); QVERIFY(overlay->isVisible()); - struct TouchDeviceDeleter - { - static inline void cleanup(QTouchDevice *device) - { - QWindowSystemInterface::unregisterTouchDevice(device); - delete device; - } - }; - - QScopedPointer device(new QTouchDevice); - device->setType(QTouchDevice::TouchScreen); - QWindowSystemInterface::registerTouchDevice(device.data()); + QScopedPointer device(QTest::createTouchDevice()); QTest::touchEvent(window, device.data()).press(0, QPoint(1, 1)); QCOMPARE(overlayPressedSignal.count(), ++overlayPressCount); -- cgit v1.2.3