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&)),