aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-07-17 15:40:17 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-07-17 15:40:17 +0200
commit50244fc5d6f0730a447f1ac1ce19827890bc1456 (patch)
treefd937513dc616c270a1b8da23f982c2b9a7b6ac2 /tests/auto/qquickdrawer/tst_qquickdrawer.cpp
parentbf727efa7aa9a4738ae86a2c699832129813c670 (diff)
parent49ffc6e6af83b295c67fd119b79c925879cc292e (diff)
Merge branch 'dev' into nativestyle
Diffstat (limited to 'tests/auto/qquickdrawer/tst_qquickdrawer.cpp')
-rw-r--r--tests/auto/qquickdrawer/tst_qquickdrawer.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
index 7644cacf..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()
@@ -180,6 +169,7 @@ void tst_QQuickDrawer::visible()
{
QFETCH(QString, source);
QQuickApplicationHelper helper(this, source);
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
@@ -220,6 +210,7 @@ void tst_QQuickDrawer::visible()
void tst_QQuickDrawer::state()
{
QQuickApplicationHelper helper(this, "applicationwindow.qml");
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
@@ -340,6 +331,7 @@ void tst_QQuickDrawer::position()
QFETCH(qreal, position);
QQuickApplicationHelper helper(this, QStringLiteral("applicationwindow.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickApplicationWindow *window = helper.appWindow;
window->show();
@@ -387,6 +379,7 @@ void tst_QQuickDrawer::dragMargin()
QFETCH(qreal, dragFromRight);
QQuickApplicationHelper helper(this, QStringLiteral("applicationwindow.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickApplicationWindow *window = helper.appWindow;
window->show();
@@ -433,6 +426,7 @@ static QRectF geometry(const QQuickItem *item)
void tst_QQuickDrawer::reposition()
{
QQuickApplicationHelper helper(this, QStringLiteral("reposition.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickApplicationWindow *window = helper.appWindow;
window->show();
@@ -491,6 +485,7 @@ void tst_QQuickDrawer::reposition()
void tst_QQuickDrawer::header()
{
QQuickApplicationHelper helper(this, QStringLiteral("header.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickApplicationWindow *window = helper.appWindow;
window->show();
@@ -545,6 +540,7 @@ void tst_QQuickDrawer::hover()
QFETCH(bool, modal);
QQuickApplicationHelper helper(this, source);
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
window->requestActivate();
@@ -628,6 +624,7 @@ void tst_QQuickDrawer::wheel()
QFETCH(bool, modal);
QQuickApplicationHelper helper(this, source);
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -690,6 +687,7 @@ void tst_QQuickDrawer::wheel()
void tst_QQuickDrawer::multiple()
{
QQuickApplicationHelper helper(this, QStringLiteral("multiple.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -834,6 +832,7 @@ void tst_QQuickDrawer::touch()
QFETCH(QPoint, to);
QQuickApplicationHelper helper(this, source);
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
@@ -868,6 +867,7 @@ void tst_QQuickDrawer::touch()
void tst_QQuickDrawer::multiTouch()
{
QQuickApplicationHelper helper(this, QStringLiteral("multiTouch.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowActive(window));
@@ -981,6 +981,7 @@ void tst_QQuickDrawer::multiTouch()
void tst_QQuickDrawer::grabber()
{
QQuickApplicationHelper helper(this, QStringLiteral("grabber.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -1025,6 +1026,7 @@ void tst_QQuickDrawer::interactive()
{
QFETCH(QString, source);
QQuickApplicationHelper helper(this, source);
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
@@ -1087,6 +1089,7 @@ void tst_QQuickDrawer::flickable()
QFETCH(QPoint, to);
QQuickApplicationHelper helper(this, QStringLiteral("flickable.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -1143,6 +1146,7 @@ void tst_QQuickDrawer::dragOverModalShadow()
QFETCH(bool, mouse);
QQuickApplicationHelper helper(this, QStringLiteral("dragOverModalShadow.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowActive(window));
@@ -1199,6 +1203,7 @@ void tst_QQuickDrawer::nonModal()
QFETCH(bool, mouse);
QQuickApplicationHelper helper(this, QStringLiteral("window.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowActive(window));
@@ -1282,6 +1287,7 @@ void tst_QQuickDrawer::slider()
QFETCH(int, delta);
QQuickApplicationHelper helper(this, QStringLiteral("slider.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowActive(window));
@@ -1325,6 +1331,7 @@ void tst_QQuickDrawer::slider()
void tst_QQuickDrawer::topEdgeScreenEdge()
{
QQuickApplicationHelper helper(this, QStringLiteral("topEdgeScreenEdge.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
QVERIFY(QTest::qWaitForWindowActive(window));