summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qfocusevent
diff options
context:
space:
mode:
authorJoni Jäntti <joni.jantti@qt.io>2017-07-11 09:19:36 +0300
committerJoni Jäntti <joni.jantti@qt.io>2017-08-03 06:58:19 +0000
commitb091472f44546446b82efe7c9e69de570deeda8d (patch)
treeb8b4162e6f7d642e3e4bfce3739d4ff33f490a8b /tests/auto/other/qfocusevent
parentd61ac601d87b5a207feb67e9749cf8d475357140 (diff)
tst_qfocusevent activateWindow for Win 10
This workaround was created to make tst_qfocusevent test pass on Windows 10 x64 Creators Update. Task-number: QTBUG-61467 Change-Id: I63eb149ae850174fb5de99761a6001e000a151a2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/other/qfocusevent')
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp9
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 5bf39b3953..2e2945ee5d 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);