mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-27 06:54:20 +00:00
Merge pull request #9774 from glassez/fix-locale
Consider empty locale setting as not set. Closes #9735
This commit is contained in:
commit
2a67f640f0
@ -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…
x
Reference in New Issue
Block a user