mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
@@ -384,6 +384,18 @@ namespace
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
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*/)
|
||||
@@ -413,6 +425,9 @@ bool upgrade(const bool /*ask*/)
|
||||
migrateMemoryPrioritySettings();
|
||||
#endif
|
||||
|
||||
{
|
||||
migrateChineseLocale();
|
||||
}
|
||||
version = MIGRATION_VERSION;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user