Commit d518fe9f authored by Laurent Montel's avatar Laurent Montel 😁

test return value from QTest::qWaitForWindowExposed

parent 1916f8ef
......@@ -31,7 +31,7 @@ void CryptoStateIndicatorWidgetTest::shouldHaveDefaultValue()
{
CryptoStateIndicatorWidget w;
w.show();
QTest::qWaitForWindowExposed(&w);
QVERIFY(QTest::qWaitForWindowExposed(&w));
QLabel *signature = w.findChild<QLabel *>(QStringLiteral("signatureindicator"));
QVERIFY(signature);
QLabel *encryption = w.findChild<QLabel *>(QStringLiteral("encryptionindicator"));
......@@ -45,7 +45,7 @@ void CryptoStateIndicatorWidgetTest::shouldBeNotVisibleWhenShowAlwaysIsFalse()
CryptoStateIndicatorWidget w;
w.setShowAlwaysIndicator(false);
w.show();
QTest::qWaitForWindowExposed(&w);
QVERIFY(QTest::qWaitForWindowExposed(&w));
QLabel *signature = w.findChild<QLabel *>(QStringLiteral("signatureindicator"));
QLabel *encryption = w.findChild<QLabel *>(QStringLiteral("encryptionindicator"));
QVERIFY(!signature->isVisible());
......@@ -61,7 +61,7 @@ void CryptoStateIndicatorWidgetTest::shouldVisibleWhenChangeStatus()
CryptoStateIndicatorWidget w;
w.setShowAlwaysIndicator(true);
w.show();
QTest::qWaitForWindowExposed(&w);
QVERIFY(QTest::qWaitForWindowExposed(&w));
QLabel *signature = w.findChild<QLabel *>(QStringLiteral("signatureindicator"));
QLabel *encryption = w.findChild<QLabel *>(QStringLiteral("encryptionindicator"));
w.updateSignatureAndEncrypionStateIndicators(true, false);
......
......@@ -85,7 +85,7 @@ void StatusBarLabelToggledStateTest::shouldEmitSignalWhenClickOnLabel()
widget.setStateString(QStringLiteral("toggle"), QStringLiteral("untoggle"));
QSignalSpy spy(&widget, SIGNAL(toggleModeChanged(bool)));
widget.show();
QTest::qWaitForWindowExposed(&widget);
QVERIFY(QTest::qWaitForWindowExposed(&widget));
QTest::mouseClick(&widget, Qt::LeftButton);
QCOMPARE(spy.count(), 1);
......
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