diff options
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r-- | qt-gui.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp index b3dff800b..a65621314 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -87,8 +87,12 @@ void init_ui(int *argcp, char ***argvp) QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()); xslt_path = strdup(getSubsurfaceDataPath("xslt").toAscii().data()); - QLocale loc; + QSettings s; + s.beginGroup("Language"); + QLocale loc(s.value("UiLanguage", QLocale().uiLanguages().first()).toString()); QString uiLang = loc.uiLanguages().first(); + s.endGroup(); + // there's a stupid Qt bug on MacOS where uiLanguages doesn't give us the country info if (!uiLang.contains('-') && uiLang != loc.bcp47Name()) { QLocale loc2(loc.bcp47Name()); @@ -117,7 +121,6 @@ void init_ui(int *argcp, char ***argvp) } } - QSettings s; s.beginGroup("DiveComputer"); default_dive_computer_vendor = getSetting(s, "dive_computer_vendor"); default_dive_computer_product = getSetting(s,"dive_computer_product"); |