qt6-bb10/tests/auto/gui/kernel
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
..
noqteventloop Allow QWindowsPipe{Reader|Writer} to work with foreign event loops, take 2 2021-03-02 22:53:06 +02: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
qaddpostroutine Remove the qmake project files 2021-01-07 15:32:28 +01:00
qbackingstore Expand tst_QBackingStore auto test 2022-01-12 18:13:51 +01:00
qclipboard Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qcursor Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdrag Remove the qmake project files 2021-01-07 15:32:28 +01:00
qevent Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfileopenevent Fix a few compiler warnings in tests 2021-02-02 12:06:05 +01:00
qguiapplication QGuiApplication: use translation-based layout direction unless explicitly set 2022-02-24 19:46:01 +01:00
qguieventdispatcher Remove the qmake project files 2021-01-07 15:32:28 +01:00
qguieventloop Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
qguimetatype Remove the qmake project files 2021-01-07 15:32:28 +01:00
qguitimer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qguivariant CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test 2022-02-11 21:54:44 +01:00
qhighdpi QJsonObject: use QJsonValueConstRef 2022-02-15 17:00:03 -08:00
qinputdevice tests: XFAIL tst_QInputDevice::multiSeatDevices() on Wayland 2022-02-17 00:34:50 +01:00
qinputmethod Remove the qmake project files 2021-01-07 15:32:28 +01:00
qkeyevent Android: unblock passing tests 2021-04-27 21:12:50 +03:00
qkeysequence CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test 2022-02-11 21:54:44 +01:00
qmouseevent Revert "Add grabber context pointers" 2021-04-29 16:49:57 +02:00
qmouseevent_modal Remove the qmake project files 2021-01-07 15:32:28 +01:00
qopenglwindow Remove the qmake project files 2021-01-07 15:32:28 +01:00
qpalette Don't change resolve mask when setting brush doesn't change palette 2021-12-03 21:07:09 +01:00
qpixelformat Remove the qmake project files 2021-01-07 15:32:28 +01:00
qrasterwindow Remove the qmake project files 2021-01-07 15:32:28 +01:00
qscreen Blacklist tst_qscreen::grabWindow for all Windows versions 2022-02-24 13:34:33 +00:00
qshortcut Make tst_shortcut pass on Wayland 2021-03-11 11:59:14 +01:00
qsurfaceformat Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtouchevent tests: port to new QMutableEventPoint static API 2022-01-15 12:29:27 +01:00
qwindow tests: XFAIL 4 tests in tst_QWindow on Wayland 2022-02-17 00:34:50 +01:00
CMakeLists.txt CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test 2022-02-11 21:54:44 +01:00