diff options
author | Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org> | 2020-06-25 14:45:57 +0300 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-06-25 21:33:50 +0200 |
commit | b60c02ce7d2d34eae63c78f77c0e59c09dda2212 (patch) | |
tree | b8b0250bfadd255f8d3dd98bfe2b1be6a9b9f6d2 /tests/auto | |
parent | 6b9b53a84e92f0bac1ceebfaff7cbffa203430bd (diff) |
Update dependencies on 'dev' in qt/qtquickcontrols2
Change-Id: I1f6bf96f30f5dcea4d9838b0638f9412309a069e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/focus/tst_focus.cpp | 28 | ||||
-rw-r--r-- | tests/auto/qquickcontrol/tst_qquickcontrol.cpp | 15 | ||||
-rw-r--r-- | tests/auto/qquickdrawer/tst_qquickdrawer.cpp | 17 | ||||
-rw-r--r-- | tests/auto/qquickpopup/tst_qquickpopup.cpp | 13 |
4 files changed, 9 insertions, 64 deletions
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 <QtQuick/private/qquickitem_p.h> #include <QtQuickTemplates2/private/qquickcontrol_p.h> #include <QtGui/private/qguiapplication_p.h> +#include <QtGui/qpointingdevice.h> #include <QtGui/qstylehints.h> -#include <QtGui/qtouchdevice.h> #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<QTouchDevice, TouchDeviceDeleter> device(new QTouchDevice); - device->setType(QTouchDevice::TouchScreen); - QWindowSystemInterface::registerTouchDevice(device.data()); + QScopedPointer<QPointingDevice> 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<QTouchDevice, TouchDeviceDeleter> device(new QTouchDevice); - device->setType(QTouchDevice::TouchScreen); - QWindowSystemInterface::registerTouchDevice(device.data()); + QScopedPointer<QPointingDevice> 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<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() 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 <QtGui/qpointingdevice.h> #include <QtGui/qstylehints.h> -#include <QtGui/qtouchdevice.h> #include <QtGui/qguiapplication.h> #include <QtGui/qpa/qwindowsysteminterface.h> #include <QtQuick/private/qquickwindow_p.h> @@ -112,16 +112,7 @@ private slots: void topEdgeScreenEdge(); private: - struct TouchDeviceDeleter - { - static inline void cleanup(QTouchDevice *device) - { - QWindowSystemInterface::unregisterTouchDevice(device); - delete device; - } - }; - - QScopedPointer<QTouchDevice, TouchDeviceDeleter> touchDevice; + QScopedPointer<QPointingDevice> 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<QTouchDevice, TouchDeviceDeleter> device(new QTouchDevice); - device->setType(QTouchDevice::TouchScreen); - QWindowSystemInterface::registerTouchDevice(device.data()); + QScopedPointer<QPointingDevice> device(QTest::createTouchDevice()); QTest::touchEvent(window, device.data()).press(0, QPoint(1, 1)); QCOMPARE(overlayPressedSignal.count(), ++overlayPressCount); |