qt5base-lts/tests
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
..
auto tst_qapplication: Prevent desktopaware test from deactivating main test 2021-02-15 14:20:08 +01:00
baselineserver Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
benchmarks Fix compiler warning: initialize variable 2021-02-11 21:05:53 +01:00
global tst_bic: Add linux-gcc-ia32 bic data for QtXml 2013-01-16 08:25:28 +01:00
libfuzzer Fuzzing: Provide link to oss-fuzz 2020-12-11 13:45:25 +00:00
manual Switch QNetworkInformation manual test back to using qDebug 2021-02-07 11:10:31 +00:00
shared Move QEMU emulation detector to QTest 2021-02-13 10:02:51 +02:00
testserver Network self-test: make it work with docker/containers 2020-11-17 19:56:06 +01:00
CMakeLists.txt CMake: Refactor optimization flag handling and add optimize_full 2020-10-06 10:07:05 +02:00
README Doc: Fix references to Qt Test 2013-01-30 01:35:06 +01:00

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.