summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-05-24 16:27:08 +0200
committerLiang Qi <liang.qi@qt.io>2018-05-24 16:29:14 +0200
commitf82e5085169876e0ec7c1b744d021b068c281cfe (patch)
treea870e1f68ce62818a0793c4c78a67971e841e676 /tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
parentf74d4fb1dacc682e2e6f4a44e4240f642a2c3b70 (diff)
parentee47999333dde1d38b73d04e142e05f06f8c56ed (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
Diffstat (limited to 'tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp')
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index e39110bb50..eee227fc2f 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -494,9 +494,6 @@ void tst_QFiledialog::completer()
QAbstractItemModel *cModel = completer->completionModel();
QVERIFY(cModel);
- //wait a bit
- QTest::qWait(500);
-
// path C:\depot\qt\examples\dialogs\standarddialogs
// files
// [debug] [release] [tmp] dialog dialog main makefile makefile.debug makefile.release standarddialgos
@@ -509,7 +506,7 @@ void tst_QFiledialog::completer()
// \ -> \_viminfo
// c:\depot -> 'nothing'
// c:\depot\ -> C:\depot\devtools, C:\depot\dteske
- QCOMPARE(model->index(fd.directory().path()), model->index(startPath));
+ QTRY_COMPARE(model->index(fd.directory().path()), model->index(startPath));
if (input.isEmpty()) {
// Try to find a suitable directory under root that does not
@@ -1330,7 +1327,6 @@ void tst_QFiledialog::clearLineEdit()
// saving a file the text shouldn't be cleared
fd.setDirectory(QDir::home());
- QTest::qWait(1000);
#ifdef QT_KEYPAD_NAVIGATION
list->setEditFocus(true);
#endif
@@ -1341,8 +1337,7 @@ void tst_QFiledialog::clearLineEdit()
QTest::keyClick(list, Qt::Key_O, Qt::ControlModifier);
#endif
- QTest::qWait(2000);
- QVERIFY(fd.directory().absolutePath() != QDir::home().absolutePath());
+ QTRY_VERIFY(fd.directory().absolutePath() != QDir::home().absolutePath());
QVERIFY(!lineEdit->text().isEmpty());
// selecting a dir the text should be cleared so one can just hit ok
@@ -1350,7 +1345,6 @@ void tst_QFiledialog::clearLineEdit()
fd.setFileMode(QFileDialog::Directory);
fd.setDirectory(QDir::home());
- QTest::qWait(1000);
QTest::keyClick(list, Qt::Key_Down);
#ifndef Q_OS_MAC
QTest::keyClick(list, Qt::Key_Return);
@@ -1358,8 +1352,7 @@ void tst_QFiledialog::clearLineEdit()
QTest::keyClick(list, Qt::Key_O, Qt::ControlModifier);
#endif
- QTest::qWait(2000);
- QVERIFY(fd.directory().absolutePath() != QDir::home().absolutePath());
+ QTRY_VERIFY(fd.directory().absolutePath() != QDir::home().absolutePath());
QVERIFY(lineEdit->text().isEmpty());
//remove the dir