diff options
author | Edward Welbourne <[email protected]> | 2024-01-17 18:45:07 +0100 |
---|---|---|
committer | Edward Welbourne <[email protected]> | 2024-01-19 15:38:25 +0100 |
commit | fcd2a219c4c222309152f1ea2a3124ddc17d4ea5 (patch) | |
tree | 5004cd0541294a6af6046acc7cf8e4df8d009ea3 /examples/sql/sqlbrowser/qsqlconnectiondialog.h | |
parent | cfc385ce3fc674d48ea2bfbaac6d3f907795b1a5 (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 <[email protected]>
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-120961
Change-Id: Ie706c7089bd2b3757a3eab627723ec34a5e2b07f
Reviewed-by: Ivan Solovev <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'examples/sql/sqlbrowser/qsqlconnectiondialog.h')
0 files changed, 0 insertions, 0 deletions