summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwidget
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-23 18:21:17 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-23 20:22:14 (GMT)
commit5c5a6b387319095a2c2a589bb1e1d67b51854fc1 (patch)
treefafd304b0e68355ce8a44a9de788930c53f08442 /tests/auto/qwidget
parentb3f3ab74f07cbadb568a5e8ad4363f1e042ea40c (diff)
downloadQt-5c5a6b387319095a2c2a589bb1e1d67b51854fc1.zip
Qt-5c5a6b387319095a2c2a589bb1e1d67b51854fc1.tar.gz
Qt-5c5a6b387319095a2c2a589bb1e1d67b51854fc1.tar.bz2
Fix tst_QWidget::activateWindow on X11
On X11 one needs to wait logner for the reply for the window mabager All the QWidget tests passes on my X11 in about 30seconds now
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 126d571..d34d3c5 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -9232,9 +9232,10 @@ void tst_QWidget::activateWindow()
mainwindow->setCentralWidget(label);
mainwindow->setVisible(true);
mainwindow->activateWindow();
+ QTest::qWaitForWindowShown(&mainWindow);
qApp->processEvents();
- QVERIFY(mainwindow->isActiveWindow());
+ QTRY_VERIFY(mainwindow->isActiveWindow());
// Create second mainwindow and set it active
QMainWindow* mainwindow2 = new QMainWindow();
@@ -9244,16 +9245,16 @@ void tst_QWidget::activateWindow()
mainwindow2->activateWindow();
qApp->processEvents();
- QVERIFY(!mainwindow->isActiveWindow());
- QVERIFY(mainwindow2->isActiveWindow());
+ QTRY_VERIFY(!mainwindow->isActiveWindow());
+ QTRY_VERIFY(mainwindow2->isActiveWindow());
// Revert first mainwindow back to visible active
mainwindow->setVisible(true);
mainwindow->activateWindow();
qApp->processEvents();
- QVERIFY(mainwindow->isActiveWindow());
- QVERIFY(!mainwindow2->isActiveWindow());
+ QTRY_VERIFY(mainwindow->isActiveWindow());
+ QTRY_VERIFY(!mainwindow2->isActiveWindow());
}
#ifdef Q_OS_SYMBIAN