From 8de8800670d2881c6dfe957d6a1c5d925417b85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 13 Jan 2025 14:07:38 +0100 Subject: [PATCH] tst_Q*Application::runHelperTest(): Run test without activating app on macOS As that will steal focus from tst_QApplication, which is needed for subsequent tests. Pick-to: 6.8 6.9 Change-Id: I5720c4a2bb45f98894616e01da10b9c40a2b6735 Reviewed-by: Thiago Macieira --- tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp b/tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp index 73aa1d29ab2..946116167ea 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp +++ b/tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp @@ -131,6 +131,9 @@ int main(int argc, char **argv) // "+[IMKClient subclass]: chose IMKClient_Legacy" if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSSequoia) qputenv("CFLOG_FORCE_DISABLE_STDERR", "1"); + + // Don't steal app focus from main test + qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "1"); # endif std::string_view subtest(argv[1]);