qt5base-lts/tests/auto/widgets/kernel/qapplication
Tor Arne Vestbø 09cc63d425 tst_qapplication: Prevent desktopaware test from deactivating main test
Applications on macOS are automatically activated (put into the foreground),
when launched from the Finder, or via 'open' on the command line. But when
launched from the terminal, e.g. foo.app/Contents/MacOS/foo, the application
will launch in the background (inactive).

In Qt we override this behavior, activating the app even when launched from
the terminal, as a convenience, as long as the application is a GUI application.

Unfortunately this means that when tst_qapplication launches a subprocess that
is a GUI app, it will steal activation from tst_qapplication, which in turn
will break tests that later try to activate a window and check that the window
is then active. The window will not be active until the application is active.

We can work around it by preventing Qt from activating the application, but
ideally we'd find a better solution to this, as we don't want to sprinkle
overrides all over our tests.

Fixes: QTBUG-90699
Pick-to: 6.1 6.0 5.15
Change-Id: If53a86548002b739df0c0a7153d6244924a4a205
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-02-15 14:20:08 +01:00
..
desktopsettingsaware Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
modal Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
test Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
tmp Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
BLACKLIST Android: move blocked tests of qapplication to test folder 2020-11-16 13:35:49 +02:00
CMakeLists.txt Remove winrt 2020-06-06 20:25:49 +02:00
customstyle.json Ensure styles always get to polish the application palette 2020-07-21 13:43:19 +02:00
heart.svg Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
tst_qapplication.cpp tst_qapplication: Prevent desktopaware test from deactivating main test 2021-02-15 14:20:08 +01:00