summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs/qfiledialog2
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/qfiledialog2
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/qfiledialog2')
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index 1bf9409584..3506057521 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -1104,14 +1104,14 @@ void tst_QFileDialog2::QTBUG4419_lineEditSelectAll()
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));
- QTest::qWait(250);
QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit");
+ QVERIFY(lineEdit);
- QCOMPARE(tempPath + QChar('/') + lineEdit->text(), t->fileName());
+ QTRY_COMPARE(tempPath + QChar('/') + lineEdit->text(), t->fileName());
QCOMPARE(tempPath + QChar('/') + lineEdit->selectedText(), t->fileName());
}
@@ -1147,9 +1147,9 @@ void tst_QFileDialog2::QTBUG6558_showDirsOnly()
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));
QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model");
QTRY_COMPARE(model->rowCount(model->index(dir.absolutePath())), 2);
@@ -1195,9 +1195,9 @@ void tst_QFileDialog2::QTBUG4842_selectFilterWithHideNameFilterDetails()
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));
QComboBox *filters = qFindChild<QComboBox*>(&fd, "fileTypeCombo");
//We compare the current combobox text with the stripped version
@@ -1211,9 +1211,9 @@ void tst_QFileDialog2::QTBUG4842_selectFilterWithHideNameFilterDetails()
fd2.show();
QApplication::setActiveWindow(&fd2);
- QTest::qWaitForWindowShown(&fd2);
- QTRY_COMPARE(fd2.isVisible(), true);
- QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd2));
+ QVERIFY(QTest::qWaitForWindowActive(&fd2));
+ QCOMPARE(fd2.isVisible(), true);
+ QCOMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd2));
QComboBox *filters2 = qFindChild<QComboBox*>(&fd2, "fileTypeCombo");
//We compare the current combobox text with the non stripped version
@@ -1228,9 +1228,9 @@ void tst_QFileDialog2::dontShowCompleterOnRoot()
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));
fd.setDirectory("");
QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit");