mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-12 05:44:14 +03:00
Consider empty locale setting as not set
This commit is contained in:
parent
b5d253ae66
commit
5712c05e68
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue