Skip to content

Commit

Permalink
Prospective fix to stabilize tst_QMdiArea::subWindowActivated2()/xcb.
Browse files Browse the repository at this point in the history
Ensure that the window is active (as otherwise
QMdiArea::activeSubWindow() returns 0) and add a QTRY_COMPARE.

Change-Id: I7edb01d43fd2635864266614ef9a0e844f76edbf
Reviewed-by: Frederik Gladhorn <[email protected]>
  • Loading branch information
Friedemann Kleint authored and Friedemann Kleint committed Feb 18, 2016
1 parent 78ad8f2 commit 5d2068b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,10 @@ void tst_QMdiArea::subWindowActivated2()
spy.clear();

mdiArea.show();
QVERIFY(QTest::qWaitForWindowExposed(&mdiArea));
QVERIFY(QTest::qWaitForWindowActive(&mdiArea));
QTRY_COMPARE(spy.count(), 1);
QCOMPARE(mdiArea.activeSubWindow(), activeSubWindow);
QVERIFY(mdiArea.currentSubWindow());
QTRY_COMPARE(mdiArea.activeSubWindow(), activeSubWindow);
spy.clear();

if (qGuiApp->styleHints()->showIsFullScreen())
Expand Down

0 comments on commit 5d2068b

Please sign in to comment.