mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-24 15:15:24 -07:00
parent
d20633f9cc
commit
cc7f8372a8
1 changed files with 15 additions and 0 deletions
|
@ -384,6 +384,18 @@ namespace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#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*/)
|
bool upgrade(const bool /*ask*/)
|
||||||
|
@ -413,6 +425,9 @@ bool upgrade(const bool /*ask*/)
|
||||||
migrateMemoryPrioritySettings();
|
migrateMemoryPrioritySettings();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{
|
||||||
|
migrateChineseLocale();
|
||||||
|
}
|
||||||
version = MIGRATION_VERSION;
|
version = MIGRATION_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue