Commit 9211b2b7 authored by Laurent Montel's avatar Laurent Montel 😁

Check return value from QTest::qWaitForWindowExposed

parent 8049b206
......@@ -192,7 +192,7 @@ private Q_SLOTS:
KFileWidget *fw = findFileWidget();
QVERIFY(fw);
// real show() is delayed to next event.
QTest::qWaitForWindowExposed(fw->window());
QVERIFY(QTest::qWaitForWindowExposed(fw->window()));
KDirOperator *op = fw->dirOperator();
QCOMPARE(fileViewToString(op->viewMode()), fileViewToString(KFile::Tree));
fw->setViewMode(KFile::Simple);
......@@ -222,7 +222,7 @@ private Q_SLOTS:
KFileWidget *fw = findFileWidget();
QVERIFY(fw);
// real show() is delayed to next event.
QTest::qWaitForWindowExposed(fw->window());
QVERIFY(QTest::qWaitForWindowExposed(fw->window()));
QCOMPARE(fw->isVisible(), true);
fw->slotCancel();
}
......@@ -237,7 +237,7 @@ private Q_SLOTS:
KFileWidget *fw = findFileWidget();
QVERIFY(fw);
// real show() is delayed to next event.
QTest::qWaitForWindowExposed(fw->window());
QVERIFY(QTest::qWaitForWindowExposed(fw->window()));
QCOMPARE(fw->isVisible(), true);
fw->slotCancel();
}
......@@ -253,7 +253,7 @@ private Q_SLOTS:
KFileWidget *fw = findFileWidget();
QVERIFY(fw);
// real show() is delayed to next event.
QTest::qWaitForWindowExposed(fw->window());
QVERIFY(QTest::qWaitForWindowExposed(fw->window()));
QCOMPARE(fw->isVisible(), true);
fw->slotCancel();
}
......@@ -268,7 +268,7 @@ private Q_SLOTS:
KFileWidget *fw = findFileWidget();
QVERIFY(fw);
// real show() is delayed to next event.
QTest::qWaitForWindowExposed(fw->window());
QVERIFY(QTest::qWaitForWindowExposed(fw->window()));
QCOMPARE(fw->isVisible(), true);
fw->slotCancel();
}
......@@ -328,7 +328,7 @@ private Q_SLOTS:
KFileWidget *fw = findFileWidget();
QVERIFY(fw);
QTest::qWaitForWindowExposed(fw->window());
QVERIFY(QTest::qWaitForWindowExposed(fw->window()));
QCOMPARE(fw->isVisible(), true);
bool timerRun = false;
......@@ -338,7 +338,7 @@ private Q_SLOTS:
QDialog *msgbox = findMessageBox();
if (msgbox)
{
QTest::qWaitForWindowExposed(msgbox);
QVERIFY(QTest::qWaitForWindowExposed(msgbox));
QCOMPARE(msgbox->isVisible(), true);
msgbox->close();
QVERIFY(messageBoxExpected);
......
......@@ -52,7 +52,7 @@ private Q_SLOTS:
fw = findFileWidget();
QVERIFY(fw);
// real show() is delayed to next event.
QTest::qWaitForWindowExposed(fw->window());
QVERIFY(QTest::qWaitForWindowExposed(fw->window()));
QCOMPARE(fw->isVisible(), true);
fw->slotCancel();
}
......@@ -71,7 +71,7 @@ private Q_SLOTS:
fw = findFileWidget();
QVERIFY(fw);
// real show() is delayed to next event.
QTest::qWaitForWindowExposed(fw->window());
QVERIFY(QTest::qWaitForWindowExposed(fw->window()));
QCOMPARE(fw->isVisible(), true);
fw->slotCancel();
}
......
......@@ -54,7 +54,7 @@ static void prepareEnvironment()
// Run prepareEnvironment before qApp is created! slightly incorrect, QFile::encodeName can be wrong then.
// But we can't use Q_COREAPP_STARTUP_FUNCTION because the platform theme ends up being created
// first, with the wrong environment.
Q_CONSTRUCTOR_FUNCTION(prepareEnvironment);
Q_CONSTRUCTOR_FUNCTION(prepareEnvironment)
class KFontSettingsData_UnitTest : public QWidget
{
......
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