From 56b8f923f98fa1eb3ace4f18a5f6fde8920d2155 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 17 Mar 2021 22:10:25 +0100 Subject: Don't discard return values from no-discard functions The tests are very likely to fail if window exposure fails, so verify that it doesn't. Change-Id: I484d10e6bf8fdf5199bef070198f5405ab8f249b Reviewed-by: Shawn Rutledge (cherry picked from commit 80ee53c07c425f3d469dab5824572031fde6405e) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/quick/qquickitem/tst_qquickitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/quick') diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp index 3d6044ee9b..8f8ae396e3 100644 --- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp @@ -1600,7 +1600,7 @@ void tst_qquickitem::hoverEvent() QQuickWindow *window = new QQuickWindow(); window->resize(200, 200); window->show(); - QTest::qWaitForWindowExposed(window); + QVERIFY(QTest::qWaitForWindowExposed(window)); #if QT_CONFIG(cursor) // Get the cursor out of the way. QCursor::setPos(window->geometry().topRight() + QPoint(100, 100)); #endif @@ -1645,7 +1645,7 @@ void tst_qquickitem::hoverEventInParent() QQuickWindow window; window.resize(200, 200); window.show(); - QTest::qWaitForWindowExposed(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); #if QT_CONFIG(cursor) // Get the cursor out of the way. QCursor::setPos(window.geometry().topRight() + QPoint(100, 100)); #endif -- cgit v1.2.3