From ee36ee7f7352b08da15d4e4875e93256e4cdc245 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@qt.io> Date: Wed, 6 Feb 2019 09:32:36 +0100 Subject: [PATCH] Tests: Fix warnings about ignored return value Check return value of Test::qWaitForWindowExposed() Change-Id: I21dd077d2610b6a374e2e6ad943ee39e0b6d4e79 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> --- tests/auto/dialogs/tst_dialogs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/dialogs/tst_dialogs.cpp b/tests/auto/dialogs/tst_dialogs.cpp index 8303ff830..58f235341 100644 --- a/tests/auto/dialogs/tst_dialogs.cpp +++ b/tests/auto/dialogs/tst_dialogs.cpp @@ -159,7 +159,7 @@ void tst_dialogs::dialogButtonHandler() root->setProperty("mustBlock", mustBlock); QQuickWindow *window = root->findChild<QQuickWindow*>(); - QTest::qWaitForWindowExposed(window); + QVERIFY(QTest::qWaitForWindowExposed(window)); /* Hack to find the created buttons: since they are created by a * QQuickRepeater, they don't appear on the hierarchy tree; therefore, we @@ -242,7 +242,7 @@ void tst_dialogs::dialogKeyHandler() root->setProperty("mustBlock", mustBlock); QQuickWindow *window = root->findChild<QQuickWindow*>(); - QTest::qWaitForWindowExposed(window); + QVERIFY(QTest::qWaitForWindowExposed(window)); QTest::keyClick(window, Qt::Key(key)); QTRY_VERIFY(root->property("handlerWasCalled").toBool()); -- GitLab