qt5base-lts/tests/auto
Volker Hilsheimer 4cca8ee527 QGuiApplication: use translation-based layout direction unless explicitly set
The stored layout direction used to get changed during initialization
to what was auto-detected based on the translation. Changing the
translation then overwrote that stored value, even if an explicit call
to setLayoutDirection was made by the application.

Calling QGuiApplication::setLayoutDirection(Auto) has so far been a
no-op.

Change this logic so that the stored layout direction continues to be
LayoutDirectionAuto also if it's set based on auto-detection, and only
overwrite it when explicitly called with a non-Auto value. This way,
applications can set a layout direction that stays unchanged even when
translators are installed.

Add test coverage that uses a QTranslator.

In practice, this is not a change of behavior, unless applications called
setLayoutDirection(Auto) (which is no longer a no-op), or called
setLayoutDirection() and then installed a translator and expected the
translator's layout direction to come into effect in spite of the explicit
setting.

[ChangeLog][Gui][QGuiApplication] Calling setLayoutDirection with a non-
auto value now disables the auto-detection based on installed
translators. Applications that explicitly set a layout direction and also
want translators installed afterwards to take effect should reset the
layout direction to Auto, which is now no longer a no-op.

Fixes: QTBUG-100632
Pick-to: 6.3
Change-Id: I1fdcebd43a9b1b468ff95bf15f53f441bb214e08
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-02-24 19:46:01 +01:00
..
bic/data Add BC files for 6.2.0 2022-01-07 13:31:38 +00:00
cmake Bump version from 6.2.0 to 6.4.0 in tests as well 2022-01-31 17:20:06 +02:00
concurrent Fix memory leak in QtConcurrent::run when called with a NULL QThreadPool 2022-01-24 22:40:35 +01:00
corelib Core: Fix tests that did break because QProcess security fix 2022-02-24 09:49:52 +02:00
dbus tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
gui QGuiApplication: use translation-based layout direction unless explicitly set 2022-02-24 19:46:01 +01:00
guiapplauncher
network tst_qnetworkcookiejar: Remove tests that rely on public suffix database format 2022-02-24 19:36:26 +01:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other A11Y tests: wrap memory allocations into smart pointers 2022-02-17 21:42:23 +01:00
printsupport QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql Add spaces round operators and at starts of comment texts 2022-02-17 15:51:31 +01:00
testlib CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test 2022-02-11 21:54:44 +01:00
tools typeNameForCast: use add_pointer instead of string manipulation 2022-02-18 13:44:41 +01:00
widgets Implement QFormLayout::set/isRowVisible 2022-02-24 17:07:43 +01:00
xml Activate tst_qdom for Android 2022-02-22 17:22:58 +01:00
CMakeLists.txt Don't build tests/auto/tools when cross-compiling 2021-10-07 08:03:40 +02:00
network-settings.h Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00