aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/scenegraph
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/scenegraph
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/scenegraph')
-rw-r--r--tests/auto/quick/scenegraph/tst_scenegraph.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/quick/scenegraph/tst_scenegraph.cpp b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
index d8d9cd26e0..f62fdd09a2 100644
--- a/tests/auto/quick/scenegraph/tst_scenegraph.cpp
+++ b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
@@ -269,7 +269,7 @@ void tst_SceneGraph::manyWindows()
}
for (int i=0; i<COUNT; ++i) {
QQuickView *view = views.at(i);
- QTest::qWaitForWindowExposed(view);
+ QVERIFY(QTest::qWaitForWindowExposed(view));
QImage content = view->grabWindow();
if (i == 0) {
baseLine = content;
@@ -282,7 +282,7 @@ void tst_SceneGraph::manyWindows()
// Wipe and recreate one (scope pointer delets it...)
delete views.takeLast();
QQuickView *last = createView(file, parent.data(), 100, 100, 100, 100);
- QTest::qWaitForWindowExposed(last);
+ QVERIFY(QTest::qWaitForWindowExposed(last));
views << last;
QVERIFY(compareImages(baseLine, last->grabWindow()));
@@ -295,7 +295,7 @@ void tst_SceneGraph::manyWindows()
}
for (int i=0; i<COUNT; ++i) {
QQuickView *view = views.at(i);
- QTest::qWaitForWindowExposed(view);
+ QVERIFY(QTest::qWaitForWindowExposed(view));
QImage content = view->grabWindow();
QVERIFY(compareImages(content, baseLine));
}
@@ -548,7 +548,7 @@ void tst_SceneGraph::createTextureFromImage()
QQuickView view;
view.show();
- QTest::qWaitForWindowExposed(&view);
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
QTRY_VERIFY(view.isSceneGraphInitialized());
QScopedPointer<QSGTexture> texture(view.createTextureFromImage(image, (QQuickWindow::CreateTextureOptions) flags));