mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 09:13:08 -07: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
|
// 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…
Add table
Add a link
Reference in a new issue