diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-18 10:23:16 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-18 22:53:22 +0000 |
commit | 5d2068b91256465f417548b9b4d7f027296355cf (patch) | |
tree | 240e6449aafe45896a0d8ee0813db2efda33efdb /tests/auto | |
parent | 78ad8f208d8dbe3575194bb9b97d4e42efdc32d5 (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')
-rw-r--r-- | tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp | 5 |
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()) |