qt5base-lts/tests/auto/corelib/text
Tor Arne Vestbø d8158c6c93 macOS: Be honest about the system locale
The system locale of a macOS application is not affected by environment
variables like LANG. Yet, we were reporting a name determined from
environment variables as the fallbackUiLocale(), rather than one based
on the language and country of the actual system locale.

This lead, via the usual CLDR likely-subtag fallback, to claiming the
system locale's name, language, script and country were those obtained
from these environment variables, even when they were at odds with the
actual locale being used by the system, which was being used for some
queries.

Worse yet, any data not supplied by these queries was being obtained
from the same CLDR locale as the name, making for an inconsistent mix
of locale data.

While we cannot avoid the likely-subtag fallback step for fallback
data, it is more consistent to use the actual system locale's name
as start-point for that fallback.

At the same time, add support for the language, script and country
queries, so that the QLocale::system() describes itself faithfully,
instead of claiming to be the locale that results from that fallback.

If we want to support LANG or other environment variable overrides,
they should be handled by the layer above the system locale, by
changing the default locale of the Qt application, as if the user
had called QLocale::setDefault().

[ChangeLog][QtCore][QLocale] QLocale::system() on macOS no longer
pretends to support LANG or other environment variables as overrides,
as this is not a feature that the system locale on macOS supports.
To override the locale of an application, use QLocale::setDefault(),
or pass -AppleLocale en_US.

Fixes: QTBUG-90971
Change-Id: Ibdaf5ff9a2050f61233a88eabf3c29094f7757f1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-02-11 15:01:45 +01:00
..
qbytearray Remove the qmake project files 2021-01-07 15:32:28 +01:00
qbytearrayapisymmetry Remove the qmake project files 2021-01-07 15:32:28 +01:00
qbytearraylist Remove the qmake project files 2021-01-07 15:32:28 +01:00
qbytearraymatcher Remove the qmake project files 2021-01-07 15:32:28 +01:00
qbytearrayview Remove the qmake project files 2021-01-07 15:32:28 +01:00
qbytedatabuffer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qchar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcollator Remove the qmake project files 2021-01-07 15:32:28 +01:00
qlatin1string Remove the qmake project files 2021-01-07 15:32:28 +01:00
qlocale macOS: Be honest about the system locale 2021-02-11 15:01:45 +01:00
qregularexpression QRegularExpression: add move constructor 2021-01-26 17:20:01 +01:00
qstring Purge various BLACKLIST entries that are now fixed 2021-02-02 10:40:44 +01:00
qstring_no_cast_from_bytearray Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringapisymmetry Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringbuilder Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringconverter Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringiterator Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringlist Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringmatcher Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringtokenizer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringview Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextboundaryfinder Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00