summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdialog
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-22 08:55:55 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-22 09:18:47 (GMT)
commit4771c0c950ddca12ebadf69f2baf312609ce18d7 (patch)
tree55b5ff1bbf9cf52fe5d9e3e41546b0eae4b9bf83 /tests/auto/qdialog
parentb7647b38103676c68ad603d1391e62c5d01dc3b2 (diff)
downloadQt-4771c0c950ddca12ebadf69f2baf312609ce18d7.zip
Qt-4771c0c950ddca12ebadf69f2baf312609ce18d7.tar.gz
Qt-4771c0c950ddca12ebadf69f2baf312609ce18d7.tar.bz2
Make QDialog, and QTreeView test more robust
Diffstat (limited to 'tests/auto/qdialog')
-rw-r--r--tests/auto/qdialog/tst_qdialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qdialog/tst_qdialog.cpp b/tests/auto/qdialog/tst_qdialog.cpp
index 5f2ccd3..dc6878d 100644
--- a/tests/auto/qdialog/tst_qdialog.cpp
+++ b/tests/auto/qdialog/tst_qdialog.cpp
@@ -194,7 +194,7 @@ void tst_QDialog::showExtension()
QCOMPARE( testWidget->size(), dlgSize );
QPoint oldPosition = testWidget->pos();
-
+
#ifdef Q_WS_S60
const int htDiff = ext->size().height() - testWidget->size().height();
#endif
@@ -202,7 +202,7 @@ void tst_QDialog::showExtension()
((DummyDialog*)testWidget)->showExtension( TRUE );
// while ( testWidget->size() == dlgSize )
// qApp->processEvents();
-
+
#ifdef Q_WS_S60
QPoint expectedPosition;
if (!horizontal) {
@@ -584,6 +584,7 @@ void tst_QDialog::reject()
{
TestRejectDialog dialog;
dialog.show();
+ QTest::qWaitForWindowShown(&dialog);
QTest::qWait(100);
QVERIFY(dialog.isVisible());
dialog.reject();
@@ -592,7 +593,9 @@ void tst_QDialog::reject()
QCOMPARE(dialog.called, 1);
dialog.show();
+ QTest::qWaitForWindowShown(&dialog);
QTest::qWait(100);
+
QVERIFY(dialog.isVisible());
QVERIFY(dialog.close());
QTest::qWait(100);
@@ -601,6 +604,7 @@ void tst_QDialog::reject()
dialog.cancelReject = true;
dialog.show();
+ QTest::qWaitForWindowShown(&dialog);
QTest::qWait(100);
QVERIFY(dialog.isVisible());
dialog.reject();