From b7d810a7ccea3bc75663d5df9410d95834a0b2bf Mon Sep 17 00:00:00 2001 From: Kari Oikarinen Date: Thu, 12 Apr 2018 11:38:42 +0300 Subject: tst_QFocusEvent: Add qWaitForWindowActive() to checkReason_focusWidget() checkReason_ActiveWindow() started failing on Windows when run together with other tests, but still passed on its own. The offending tests was checkReason_focusWidget(), which showed a window but did not wait for it to be active. After adding this wait the whole test executable passes on Windows as well. Amends fd87c8da82b4bf52d395a5f9a2687e4eb7a22221. Change-Id: I384bc45176fcd7bf6f491a4f39b46464ba45693b Reviewed-by: Friedemann Kleint --- tests/auto/other/qfocusevent/tst_qfocusevent.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/other/qfocusevent/tst_qfocusevent.cpp') diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp index 37521a64aa..e82327bbb1 100644 --- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp +++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp @@ -304,6 +304,7 @@ void tst_QFocusEvent::checkReason_focusWidget() frame1.setLayout(&leftLayout); frame2.setLayout(&rightLayout); window1.show(); + QVERIFY(QTest::qWaitForWindowActive(&window1)); edit1.setFocus(); QTRY_VERIFY(edit1.hasFocus()); -- cgit v1.2.3