mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
parent
771c58d000
commit
051bac5e59
@ -395,6 +395,18 @@ namespace
|
||||
settingsStorage->storeValue(u"GUI/StartUpWindowState"_qs, windowState);
|
||||
}
|
||||
}
|
||||
|
||||
void migrateChineseLocale()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
const auto key = u"Preferences/General/Locale"_qs;
|
||||
if (settingsStorage->hasKey(key))
|
||||
{
|
||||
const auto locale = settingsStorage->loadValue<QString>(key);
|
||||
if (locale.compare(u"zh"_qs, Qt::CaseInsensitive) == 0)
|
||||
settingsStorage->storeValue(key, u"zh_CN"_qs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool upgrade(const bool /*ask*/)
|
||||
@ -425,7 +437,10 @@ bool upgrade(const bool /*ask*/)
|
||||
#endif
|
||||
|
||||
if (version < 5)
|
||||
{
|
||||
migrateStartupWindowState();
|
||||
migrateChineseLocale();
|
||||
}
|
||||
|
||||
version = MIGRATION_VERSION;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user