summaryrefslogtreecommitdiffstats
path: root/examples/sql/sqlbrowser/browser.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2024-01-17 18:45:07 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2024-01-19 15:38:25 +0100
commitfcd2a219c4c222309152f1ea2a3124ddc17d4ea5 (patch)
tree5004cd0541294a6af6046acc7cf8e4df8d009ea3 /examples/sql/sqlbrowser/browser.cpp
parentcfc385ce3fc674d48ea2bfbaac6d3f907795b1a5 (diff)
Make QLocale self-consistent on Windows
The constructor and update() method for the system locale were using GetUserDefaultLCID(), where query() and the fallback locale first checked the LANG environment variable, leading to inconsistent results if the user set the environment variable to something different from the system's configured locale. Break out the logic of parsing %LANG% into a static helper, replace the existing parsing with a call to this and add a helper to get the right ID to use, possibly via it, using GetUserDefaultLCID() as fall-back. Drive-by: initialize substititionType in its declaration. Also look up %LANG% each time we want it; it's not that expensive, given how rarely this code is called, and client code could change its value at runtime. Partially inspired by a patch from Wladimir Leuschner <wladimir.leuschner@qt.io> Pick-to: 6.5 6.6 6.7 Fixes: QTBUG-120961 Change-Id: Ie706c7089bd2b3757a3eab627723ec34a5e2b07f Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'examples/sql/sqlbrowser/browser.cpp')
0 files changed, 0 insertions, 0 deletions