The X11 specific tests need to run on QT_QPA_PLATFORM xcb otherwise they will crash. To enforce this without having to replace QTEST_MAIN a Q_CONSTRUCTOR_FUNCTION is used to invoke a function which does nothing except setting the env variable.
Let's have all autotests in autotests subdirectory instead of spread out over the source tree.