Browse Source

Merge pull request #9774 from glassez/fix-locale

Consider empty locale  setting as not set. Closes #9735
adaptive-webui-19844
Vladimir Golovnev 6 years ago committed by GitHub
parent
commit
2a67f640f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/base/preferences.cpp

3
src/base/preferences.cpp

@ -91,7 +91,8 @@ void Preferences::setValue(const QString &key, const QVariant &value) @@ -91,7 +91,8 @@ void Preferences::setValue(const QString &key, const QVariant &value)
// General options
QString Preferences::getLocale() const
{
return value("Preferences/General/Locale", QLocale::system().name()).toString();
const QString localeName = value("Preferences/General/Locale").toString();
return (localeName.isEmpty() ? QLocale::system().name() : localeName);
}
void Preferences::setLocale(const QString &locale)

Loading…
Cancel
Save