aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2018-02-21 10:16:14 +0200
committerVille Voutilainen <ville.voutilainen@qt.io>2018-02-23 20:00:11 +0000
commit53d1e9ed21d25e65a2f13606af479838f5f21fe7 (patch)
treeb72d5a22d0f0c3a618b51b7b87cfdb45f2cca81b /tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
parentfd85eaacd9221db3a900fc5ef1364b516ea75d69 (diff)
tests: Wrap qWaitForWindow{Active,Exposed} in QVERIFYv5.11.0-beta1
The functions are marked Q_REQUIRED_RESULT, so they give compilation warnings when not handling the bool return value. Failing the test early at an unexpected event is also better behavior anyway. Task-number: QTBUG-66559 Change-Id: I6c4db29379ec01528208c3e4ee54346b4230616c Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp')
-rw-r--r--tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
index 4fe01787fa..76038d013b 100644
--- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
+++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
@@ -219,7 +219,7 @@ void tst_QQuickMouseArea::dragProperties()
QByteArray errorMessage;
QVERIFY2(initView(window, testFileUrl("dragproperties.qml"), true, &errorMessage), errorMessage.constData());
window.show();
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
QVERIFY(window.rootObject() != 0);
QQuickMouseArea *mouseRegion = window.rootObject()->findChild<QQuickMouseArea*>("mouseregion");
@@ -317,7 +317,7 @@ void tst_QQuickMouseArea::resetDrag()
window.rootContext()->setContextProperty("haveTarget", QVariant(true));
QVERIFY2(initView(window, testFileUrl("dragreset.qml"), true, &errorMessage), errorMessage.constData());
window.show();
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
QVERIFY(window.rootObject() != 0);
QQuickMouseArea *mouseRegion = window.rootObject()->findChild<QQuickMouseArea*>("mouseregion");
@@ -524,7 +524,7 @@ void tst_QQuickMouseArea::invalidDrag()
QByteArray errorMessage;
QVERIFY2(initView(window, testFileUrl("dragging.qml"), true, &errorMessage), errorMessage.constData());
window.show();
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
QVERIFY(window.rootObject() != 0);
QQuickMouseArea *mouseRegion = window.rootObject()->findChild<QQuickMouseArea*>("mouseregion");
@@ -656,7 +656,7 @@ void tst_QQuickMouseArea::setDragOnPressed()
QByteArray errorMessage;
QVERIFY2(initView(window, testFileUrl("setDragOnPressed.qml"), true, &errorMessage), errorMessage.constData());
window.show();
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
QVERIFY(window.rootObject() != 0);
QQuickMouseArea *mouseArea = qobject_cast<QQuickMouseArea *>(window.rootObject());
@@ -908,7 +908,7 @@ void tst_QQuickMouseArea::pressedCanceledOnWindowDeactivate()
QWindow *secondWindow = qvariant_cast<QWindow*>(window.rootObject()->property("secondWindow"));
secondWindow->setProperty("visible", true);
- QTest::qWaitForWindowExposed(secondWindow);
+ QVERIFY(QTest::qWaitForWindowExposed(secondWindow));
QTRY_VERIFY(!window.rootObject()->property("pressed").toBool());
QVERIFY(window.rootObject()->property("canceled").toBool());
@@ -1671,7 +1671,7 @@ void tst_QQuickMouseArea::pressedMultipleButtons()
QByteArray errorMessage;
QVERIFY2(initView(view, testFileUrl("simple.qml"), true, &errorMessage), errorMessage.constData());
view.show();
- QTest::qWaitForWindowExposed(&view);
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(view.rootObject() != 0);
QQuickMouseArea *mouseArea = view.rootObject()->findChild<QQuickMouseArea *>("mousearea");
@@ -2157,7 +2157,7 @@ void tst_QQuickMouseArea::notPressedAfterStolenGrab()
QQuickWindow window;
window.resize(200, 200);
window.show();
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
QQuickMouseArea *ma = new QQuickMouseArea(window.contentItem());
ma->setSize(window.size());