qt5base-lts/tests/auto/widgets/kernel
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
..
qaction Remove the qmake project files 2021-01-07 15:32:28 +01:00
qactiongroup Remove the qmake project files 2021-01-07 15:32:28 +01:00
qapplication tst_qapplication: Prevent desktopaware test from deactivating main test 2021-02-15 14:20:08 +01:00
qboxlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qformlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qgesturerecognizer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qgridlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qshortcut Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsizepolicy Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstackedlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtooltip Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwidget Replace QScopedPointer with std::unique_ptr 2021-02-12 00:13:11 +01:00
qwidget_window Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwidgetaction Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwidgetmetatype Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwidgetsvariant Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwindowcontainer Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00