Go to file
Edward Welbourne 1b5e13c8d9 Fix QMimeType::comment()'s use of UI languages and default
The MIME database appears to use underscore to join its locale tags,
where QLocale::uiLanguages() uses dashes. This meant that lookups by
anything but the raw language were failing even when there was an
entry in the MIME database for the desired locale. Also, since 6.5,
the uiLanguages() list always does contain the locale's own name, so
don't add it to the list again.

At the same time, the search was putting the "default" key (used by
the MIME database parser for the entry with no locale specified) at
the end of the list but macOS (at least) uses that for the "en_US"
version, omitting "en_US" itself from the locale-specific data, with
the result that those using en_US as locale, but with some other
languages later in the list, got the translation for one of those
languages instead of the en_US one, since they were found before
"default" was reached.  So insert "default" after the first block of
en-entries in which en_US appears, if it does, rather than at the end.

As a drive-by, amend a comment about using "pt" as fall-back for
"pt_BR"; as it happens, for pt_BR, uiLanguages() will contain "pt" in
any case, as pt_BR is the default for "pt". (Like en, pt anomalously
defaults to a territory other than the one the language is named
after.) So use de_CH -> de as example, instead (and place the comment
where the decision is taken).

Fixes: QTBUG-105007
Pick-to: 6.6 6.5
Change-Id: I1f4835190748256ce53a51321a94ae450ab7f61e
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-09 15:53:07 +02:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin Add simple project generation based on existing source files 2023-02-08 12:59:19 +01:00
cmake Use QT_USE_QSTRINGBUILDER by default for all internal plugin targets 2023-08-08 09:47:33 +02:00
coin COIN/Android: Move android_emulator_launcher.sh to qt5.git 2023-07-25 23:07:45 +03:00
config.tests Remove the mandatory x86-64 features from its feature list 2023-05-31 14:55:37 -07:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Docs: Add a macro for documenting something as a technical preview 2023-08-02 12:47:15 +00:00
examples XBEL stream reader: rework documentation 2023-08-03 19:16:27 +02:00
lib
libexec Remove syncqt.pl 2023-06-30 13:23:46 +02:00
LICENSES Clarify license of SHA-1 algorithm 2023-04-26 16:36:18 +02:00
mkspecs Support PRELOAD var substitution for WASM main html with qmake 2023-07-27 22:16:21 +02:00
qmake Allow to override build date with SOURCE_DATE_EPOCH 2023-08-09 10:02:06 +02:00
src Fix QMimeType::comment()'s use of UI languages and default 2023-08-09 15:53:07 +02:00
tests tst_QImageReader: fix missing checks for "newly"-added ImageOptions 2023-08-09 08:02:56 +00:00
util Wrap CLDR-derived time-zone ID tables to within a 100-column margin 2023-08-07 19:51:09 +02:00
.cmake.conf CMake: Require CMake 3.21 when building/using Qt on Apple platforms 2023-06-28 22:09:20 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Add CMakeUserPresets.json to .gitignore 2023-06-23 12:13:08 +02:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt Consider BUILD_SHARED_LIBS when adding libraries using _qt_internal_add_library 2023-08-04 14:36:50 +02:00
config_help.txt Correct the default value of unity-build-batch-size in the help message 2023-07-19 22:50:32 +02:00
configure Retrieve an old -redo behavior 2023-02-07 18:51:58 +00:00
configure.bat Retrieve an old -redo behavior 2023-02-07 18:51:58 +00:00
configure.cmake Update the implementation of -unity-build 2023-06-29 10:20:25 +02:00
dependencies.yaml
qt_cmdline.cmake Update the implementation of -unity-build 2023-06-29 10:20:25 +02:00