diff options
Diffstat (limited to 'tests/auto/other')
-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 a56caf9844..35441010f7 100644 --- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp +++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp @@ -36,6 +36,7 @@ #include <qevent.h> #include <qlineedit.h> #include <QBoxLayout> +#include <QSysInfo> QT_FORWARD_DECLARE_CLASS(QWidget) @@ -329,6 +330,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); |