summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/other/qfocusevent/tst_qfocusevent.cpp')
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
index 5137ba0c57..5bf39b3953 100644
--- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
@@ -340,6 +340,14 @@ void tst_QFocusEvent::checkReason_ActiveWindow()
#if defined(Q_OS_IRIX)
QEXPECT_FAIL("", "IRIX requires explicit activateWindow(), so this test does not make any sense.", Abort);
#endif
+
+ if (!QGuiApplication::platformName().compare(QLatin1String("offscreen"), Qt::CaseInsensitive)
+ || !QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive)) {
+ // Activate window of testFocusWidget, focus in that window goes to childFocusWidgetOne
+ QWARN("Platforms offscreen and minimal require explicit activateWindow()");
+ testFocusWidget->activateWindow();
+ }
+
QTRY_VERIFY(childFocusWidgetOne->focusInEventRecieved);
QVERIFY(childFocusWidgetOne->focusInEventGotFocus);