diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2018-04-12 11:38:42 +0300 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2018-04-27 07:16:11 +0000 |
commit | b7d810a7ccea3bc75663d5df9410d95834a0b2bf (patch) | |
tree | e6f0892a5da5e6cc336956f33bb8354cc94e69b0 /tests/auto/other | |
parent | 67aa365d41ebfe082b4efcfd725e4d5f08be678c (diff) |
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 <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/other')
-rw-r--r-- | tests/auto/other/qfocusevent/tst_qfocusevent.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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()); |