tst_QMdiArea::subWindowActivated2(): Add activateWindow().

The widget is hidden, reshown and tested for active window, which
is flaky. Add a call to activateWindow() which increases
the chances of it becoming the active window should another window
appear.

Change-Id: Ibbecdbc43e2ac9638aec497c47fffaaffa1855af
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
bb10
Friedemann Kleint 2016-04-28 14:11:28 +02:00
parent 3da965ccd9
commit 91f536dd71
1 changed files with 1 additions and 0 deletions

View File

@ -497,6 +497,7 @@ void tst_QMdiArea::subWindowActivated2()
spy.clear();
mdiArea.show();
mdiArea.activateWindow();
QVERIFY(QTest::qWaitForWindowActive(&mdiArea));
QTRY_COMPARE(spy.count(), 1);
QVERIFY(mdiArea.currentSubWindow());