mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-21 08:09:35 +08:00
Consider empty locale setting as not set
This commit is contained in:
parent
b5d253ae66
commit
5712c05e68
@ -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…
Reference in New Issue
Block a user