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>
This commit is contained in:
parent
961c3f958f
commit
443fd332f9
@ -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&)),
|
||||
|
Loading…
Reference in New Issue
Block a user