summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-09-08 18:42:25 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-10-05 15:15:36 +0000
commit08e083e682d92290e36e4fb09abaf0318575dd41 (patch)
tree015d723565961179f8dad65b97ae3919d0158b17 /tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
parent7bbb9a8ce81653b1665c9c942cc707ce98f611c5 (diff)
Ensure result of all QTest::qWaitFor are verified
The qWaitFor functions themselves can not trigger a test failure, as that will not result in the test function exiting early, so every single call to qWaitFor needs to be wrapped in a QVERIFY. Change-Id: Id15a1549f31d06cdbf788e1d84ea431c28636ec8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp')
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index f71947e73b..71969ec695 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -1930,7 +1930,7 @@ void tst_QLineEdit::noCursorBlinkWhenReadOnly()
centerOnScreen(&le);
le.show();
le.setFocus();
- QTest::qWaitForWindowActive(&le);
+ QVERIFY(QTest::qWaitForWindowActive(&le));
le.updates = 0;
QTest::qWait(cursorFlashTime);
QVERIFY(le.updates > 0);
@@ -3368,7 +3368,7 @@ void tst_QLineEdit::inlineCompletion()
completer->setCaseSensitivity(Qt::CaseInsensitive);
centerOnScreen(testWidget);
testWidget->show();
- QTest::qWaitForWindowExposed(testWidget);
+ QVERIFY(QTest::qWaitForWindowExposed(testWidget));
testWidget->setFocus();
QTRY_COMPARE(qApp->activeWindow(), (QWidget*)testWidget);
testWidget->setCompleter(completer);
@@ -3696,7 +3696,7 @@ void tst_QLineEdit::task229938_dontEmitChangedWhenTextIsNotChanged()
QLineEdit lineEdit;
lineEdit.setMaxLength(5);
lineEdit.show();
- QTest::qWaitForWindowExposed(&lineEdit); // to be safe and avoid failing setFocus with window managers
+ QVERIFY(QTest::qWaitForWindowExposed(&lineEdit)); // to be safe and avoid failing setFocus with window managers
lineEdit.setFocus();
QSignalSpy changedSpy(&lineEdit, SIGNAL(textChanged(QString)));
QTest::qWait(200);