summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-07-20 16:18:29 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-24 00:08:28 +0200
commit607c37befb145c3aa1b9d29365ac682a2bd3a55f (patch)
treedf5203032be7ee9ef22558185a88b763ae00cdb5 /tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
parentd38fb0b535f3144dee4aa33c321e88d07f01add6 (diff)
Remove usage of deprecated qWaitForWindowShown in dialog tests.
Change-Id: Id3ebe202d65ee682e8e2e3ae107808e9abb6cc15 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp')
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index 98ea8f4ac7..b50e32c8ea 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -286,7 +286,7 @@ void tst_QFiledialog::filesSelectedSignal()
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &)));
fd.show();
- QTest::qWait(500);
+ QVERIFY(QTest::qWaitForWindowExposed(&fd));
QListView *listView = qFindChild<QListView*>(&fd, "listView");
QVERIFY(listView);
@@ -938,7 +938,7 @@ void tst_QFiledialog::selectFiles()
QString temporary = QDir::tempPath() + QLatin1String("/blah");
dialog->selectFile(temporary);
dialog->show();
- QTest::qWait(500);
+ QVERIFY(QTest::qWaitForWindowExposed(dialog));
QLineEdit *lineEdit = qFindChild<QLineEdit*>(dialog, "fileNameEdit");
QVERIFY(lineEdit);
QCOMPARE(lineEdit->text(),QLatin1String("blah"));
@@ -1012,9 +1012,9 @@ void tst_QFiledialog::focus()
fd.setDirectory(QDir::currentPath());
fd.show();
QApplication::setActiveWindow(&fd);
- QTest::qWaitForWindowShown(&fd);
- QTRY_COMPARE(fd.isVisible(), true);
- QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd));
+ QVERIFY(QTest::qWaitForWindowActive(&fd));
+ QCOMPARE(fd.isVisible(), true);
+ QCOMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd));
qApp->processEvents();
// make sure the tests work with focus follows mouse