mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 17:12:31 -06:00
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user