Commit 3cff96b7 authored by Laurent Montel's avatar Laurent Montel 😁

test return value from QTest::qWaitForWindowExposed

parent 74f2b94f
......@@ -48,7 +48,7 @@ void ViewerGrantleeThemeSupportTest::shouldUpdateThemeMenu()
MessageViewer::Viewer *viewer = new MessageViewer::Viewer(nullptr, nullptr, new KActionCollection(
this));
viewer->show();
QTest::qWaitForWindowExposed(viewer);
QVERIFY(QTest::qWaitForWindowExposed(viewer));
}
QTEST_MAIN(ViewerGrantleeThemeSupportTest)
......@@ -30,7 +30,7 @@ void ViewerTest::shouldHaveDefaultValuesOnCreation()
MessageViewer::Viewer *viewer = new MessageViewer::Viewer(nullptr, nullptr, new KActionCollection(
this));
viewer->show();
QTest::qWaitForWindowExposed(viewer);
QVERIFY(QTest::qWaitForWindowExposed(viewer));
QWidget *mViewer = viewer->findChild<QWidget *>(QStringLiteral("mViewer"));
QVERIFY(mViewer);
......
......@@ -65,7 +65,7 @@ void FindBarBaseTest::shouldClearLineWhenClose()
bar.show();
QApplication::setActiveWindow(&bar);
QSignalSpy spy(&bar, &WebEngineViewer::FindBarBase::hideFindBar);
QTest::qWaitForWindowExposed(&bar);
QVERIFY(QTest::qWaitForWindowExposed(&bar));
QVERIFY(bar.isVisible());
bar.focusAndSetCursor();
PimCommon::LineEditWithCompleterNg *lineedit = bar.findChild<PimCommon::LineEditWithCompleterNg *>(QStringLiteral("searchline"));
......@@ -83,7 +83,7 @@ void FindBarBaseTest::shouldEnableDisableNextPreviousButton()
WebEngineViewer::FindBarBase bar;
bar.show();
QApplication::setActiveWindow(&bar);
QTest::qWaitForWindowExposed(&bar);
QVERIFY(QTest::qWaitForWindowExposed(&bar));
QPushButton *previous = bar.findChild<QPushButton *>(QStringLiteral("findprevious"));
QPushButton *next = bar.findChild<QPushButton *>(QStringLiteral("findnext"));
......@@ -101,7 +101,7 @@ void FindBarBaseTest::shouldClearAllWhenShowBar()
{
WebEngineViewer::FindBarBase bar;
bar.show();
QTest::qWaitForWindowExposed(&bar);
QVERIFY(QTest::qWaitForWindowExposed(&bar));
QLabel *status = bar.findChild<QLabel *>(QStringLiteral("status"));
status->setText(QStringLiteral("FOO"));
bar.closeBar();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment