qt6-bb10/tests/auto
Friedemann Kleint ecb6327762 QTestLib: Introduce initMain() to run in main before qApp exists
When running Qt autotests on a developer machine with a high
resolution, failures occur due to either some widget becoming too
small, some rounding fuzz appearing when Qt High DPI scaling is active,
or some test taking screenshots failing to deal with device pixel
ratios != 1 in the obtained pixmaps.

It is not feasible to adapt all tests to pass on high resolution
monitors in both modes (Qt High DPI scaling enabled/disabled). It
should be possible to specify the High DPI setting per test.

Previously, it was not possible to set the Qt High DPI scaling
attributes since they must be applied before QApplication
instantiation.

Enable this by checking for the presence of a static void initMain()
function on the test object and invoking it before QApplication
instantiation.

Prototypically use it in tst_qtimer and to turn off High DPI scaling for
tst_QGL.

[ChangeLog][QtTestLib] It is now possible to perform static
initialization before QApplication instantiation by implementing a
initMain() function in the test class.

Change-Id: Idec0134b189710a14c41a451fa8445bc0c5b1cf3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-13 19:07:05 +02:00
..
bic/data Add binary compatibility files for 5.12 for QtBase 2018-12-21 19:42:57 +00:00
cmake CMake: Add support for auto-importing plugins in CMake 2019-08-12 18:23:58 +02:00
concurrent Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
corelib QTestLib: Introduce initMain() to run in main before qApp exists 2019-08-13 19:07:05 +02:00
dbus unblacklist passing tests 2019-07-08 11:01:42 +00:00
gui Fix tst_QImageReader::saveColorSpace 2019-08-13 17:26:15 +02:00
guiapplauncher
installed_cmake
network Merge remote-tracking branch 'origin/5.13' into dev 2019-08-13 09:46:17 +02:00
opengl QTestLib: Introduce initMain() to run in main before qApp exists 2019-08-13 19:07:05 +02:00
other Don't insert items into the wrong row 2019-08-13 07:34:00 +01:00
printsupport Remove the remaining usages of deprecated APIs of qtbase 2019-08-01 06:48:27 +02:00
shared Make tst_qwidget pass on High-DPI screens (Windows) 2019-06-03 10:41:08 +02:00
sql test: migrate QSqlDatabase test to QRegularExpression 2019-07-29 20:01:24 +02:00
testlib QTestLib: Introduce initMain() to run in main before qApp exists 2019-08-13 19:07:05 +02:00
tools Determine dependencies of Windows resource files 2019-08-13 09:38:46 +02:00
widgets tst_QFormLayout: use QAutoPointer to simplify test and avoid leak 2019-08-13 17:26:11 +02:00
xml Convert uses of QTime as a timer to QElapsedTimer 2019-06-14 10:42:33 +02:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h test: migrate QNetworkReply test to QRegularExpression 2019-06-10 16:49:19 +02:00