summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-05-09 10:32:37 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-05-09 08:40:00 +0000
commit9f6f06c31906c5261e578d742c48f39c0d867f37 (patch)
treeba4b8c0ab7a701428467dadd1a88e703844ae857
parentc0425f39d12a63238532e6e9c6634628bf1ed2de (diff)
tst_QMdiArea::subWindowActivated2(): Allow for several activated events.
On some X11 window managers, 2 events are received when hiding/reshowing and activating the window, which became apparent after 91f536dd71cd154675264c27273020f4de310ec2. Change-Id: I66fdc4f69d87ac898b18d5dfddc957617bb8f916 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index 57be110c15..f832ebfee0 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -499,7 +499,7 @@ void tst_QMdiArea::subWindowActivated2()
mdiArea.show();
mdiArea.activateWindow();
QVERIFY(QTest::qWaitForWindowActive(&mdiArea));
- QTRY_COMPARE(spy.count(), 1);
+ QTRY_VERIFY(!spy.isEmpty()); // Normally 1, but 2 events might be received on some X11 window managers
QVERIFY(mdiArea.currentSubWindow());
QTRY_COMPARE(mdiArea.activeSubWindow(), activeSubWindow);
spy.clear();