summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2023-01-30 09:33:56 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-01-30 16:23:02 +0000
commit62cb212fb3916a9bf077003f905e65d981bad448 (patch)
tree359397669396dab8350f747c8b2594f71d2921fe /tests
parentb199fe557218e51bdd3038127d1f7e7f9e051bb5 (diff)
Make tst_QFocusEvent::checkReason_ActiveWindow pass on macOS
It seems that on macOS 13.2 and newer, it requires explicit activation, just as on the offscreen and minimal platforms. Task-number: QTBUG-110703 Change-Id: I519eec872505ea3673111ae300c2494113f85c36 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 78ba5056e63c4fc6f61346807197920fb5049924) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
index 92ab429d4a..1408993cea 100644
--- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
@@ -357,9 +357,10 @@ void tst_QFocusEvent::checkReason_ActiveWindow()
d->hide();
if (!QGuiApplication::platformName().compare(QLatin1String("offscreen"), Qt::CaseInsensitive)
- || !QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive)) {
+ || !QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive)
+ || !QGuiApplication::platformName().compare(QLatin1String("cocoa"), Qt::CaseInsensitive)) {
// Activate window of testFocusWidget, focus in that window goes to childFocusWidgetOne
- qWarning("Platforms offscreen and minimal require explicit activateWindow()");
+ qWarning("Platforms offscreen, minimal and macOS require explicit activateWindow()");
testFocusWidget->activateWindow();
}