From 91f536dd71cd154675264c27273020f4de310ec2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 28 Apr 2016 14:11:28 +0200 Subject: 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 --- tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/widgets/widgets/qmdiarea') diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index aa86e02465..57be110c15 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -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()); -- cgit v1.2.3