Browse Source

Consider empty locale setting as not set

adaptive-webui-19844
Vladimir Golovnev (Glassez) 6 years ago
parent
commit
5712c05e68
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 3
      src/base/preferences.cpp

3
src/base/preferences.cpp

@ -91,7 +91,8 @@ void Preferences::setValue(const QString &key, const QVariant &value)
// General options // General options
QString Preferences::getLocale() const 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) void Preferences::setLocale(const QString &locale)

Loading…
Cancel
Save