diff options
-rw-r--r-- | tests/auto/other/qfocusevent/tst_qfocusevent.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp index 7cb6e67cbb..c7955ffed2 100644 --- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp +++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp @@ -41,6 +41,7 @@ #include <qevent.h> #include <qlineedit.h> #include <QBoxLayout> +#include <QSysInfo> QT_FORWARD_DECLARE_CLASS(QWidget) @@ -353,6 +354,14 @@ void tst_QFocusEvent::checkReason_ActiveWindow() QTRY_VERIFY(childFocusWidgetOne->focusOutEventRecieved); QVERIFY(childFocusWidgetOne->focusOutEventLostFocus); +#if defined(Q_OS_WIN) + if (QSysInfo::kernelVersion() == "10.0.15063") { + // Activate window of testFocusWidget, focus in that window goes to childFocusWidgetOne + QWARN("Windows 10 Creators Update (10.0.15063) requires explicit activateWindow()"); + testFocusWidget->activateWindow(); + } +#endif + QVERIFY( !childFocusWidgetOne->focusInEventRecieved ); QVERIFY( childFocusWidgetOne->focusOutEventRecieved ); QCOMPARE( childFocusWidgetOne->focusOutEventReason, (int)Qt::ActiveWindowFocusReason); |