Skip to content

Commit

Permalink
BUG: Fix locale getter when the language setting is not set. #3013
Browse files Browse the repository at this point in the history
The default locale for QLocale is set at the beginning of the programs,
thus this will always return one of the expected values.
  • Loading branch information
Woundorf committed Jul 29, 2022
1 parent d27ec66 commit d3ce5f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions starviewer/src/interface/qapplicationmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,7 @@ namespace {

QString getLocalePrefix()
{
Settings settings;
QString defaultLocale = settings.getValue(CoreSettings::LanguageLocale).toString();
QString defaultLocale = QLocale().name();
return "[" + defaultLocale.left(2).toLower() + "] ";
}

Expand Down

0 comments on commit d3ce5f9

Please sign in to comment.