summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2012-03-06 09:54:55 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-06 01:34:53 +0100
commit443fd332f941f8c30074390ddd9e00ee40cd584d (patch)
tree73864595168a4784986d0fafc36fe20074bdc207 /tests/auto
parent961c3f958f2cd4c993fc384c6e50e25e080c7585 (diff)
Stabilize tst_QShortcut
show() on a window is asynchronous. Wait for it to complete before continuing with the test. Note the test already contained code for this, but it was inside of a Q_WS_X11 block, making it dead code in Qt 5. Change-Id: I06f892eea86278c56b1773a7e968bbe065f86260 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp
index 97c749e5ba..7a87266b8b 100644
--- a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp
+++ b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp
@@ -221,9 +221,7 @@ void tst_QShortcut::initTestCase()
mainW->setFixedSize( 100, 100 );
mainW->setCentralWidget( edit );
mainW->show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(mainW);
-#endif
+ QTest::qWaitForWindowShown(mainW);
mainW->activateWindow();
QTest::qWait(100);
connect( mainW->statusBar(), SIGNAL(messageChanged(const QString&)),