summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-18 10:23:16 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-18 22:53:22 +0000
commit5d2068b91256465f417548b9b4d7f027296355cf (patch)
tree240e6449aafe45896a0d8ee0813db2efda33efdb /tests/auto/widgets
parent78ad8f208d8dbe3575194bb9b97d4e42efdc32d5 (diff)
Prospective fix to stabilize tst_QMdiArea::subWindowActivated2()/xcb.
Ensure that the window is active (as otherwise QMdiArea::activeSubWindow() returns 0) and add a QTRY_COMPARE. Change-Id: I7edb01d43fd2635864266614ef9a0e844f76edbf Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index e23634c515..aa86e02465 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -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())