diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp index 63add7c50..03a28e5e8 100644 --- a/subsurface-mobile-main.cpp +++ b/subsurface-mobile-main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include int main(int argc, char **argv) @@ -39,7 +40,9 @@ int main(int argc, char **argv) } git_libgit2_init(); setup_system_prefs(); - if (uiLanguage(0).contains("-US")) + if (QLocale().measurementSystem() == QLocale::MetricSystem) + default_prefs.units = SI_units; + else default_prefs.units = IMPERIAL_units; copy_prefs(&default_prefs, &prefs); fill_profile_color();