summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/cpp/cppwriteinitialization.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-08-17 17:40:59 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-07 13:29:39 +0000
commit753bfdf6a1336cc296e5fc8175aedd000c2cc013 (patch)
treea0769eca2cc99f7d39f5a2d1e9f5b680f9638098 /src/tools/uic/cpp/cppwriteinitialization.cpp
parentf94f1653368bf8c499fa9a6eeba81736bb2a7710 (diff)
Work round macOS's omission of en_DE from its own uiLanguages()
When the system locale is en_DE, macOS seems to think we should use en_GB as the right translation. While that probably is a sensible choice in the absence of an en_DE translation, we should definitely use the en_DE translation if available, especially if en_GB isn't available (which lead to a fall-back to de_DE, given later entries in macOS's list). So prepend the system locale's own pcp47Name() if it (isn't the C locale and) is missing from what we would otherwise have used for uiLanguages(), after likely sub-tag perturbations. Add a test simulating (some approximation to) what macOS was doing that would have caught this case; and add a scope-guard reporter to the test to report what shows up when lists don't match. Fixes: QTBUG-104930 Pick-to: 6.4 6.4.0 6.3 6.2 5.15 Change-Id: I116234708067e1717d9157aebc84da76e04a9f38 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/tools/uic/cpp/cppwriteinitialization.cpp')
0 files changed, 0 insertions, 0 deletions