From 347124812ef314fc4e6f402859d768e7e8757328 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 27 Oct 2023 05:06:34 +0800 Subject: [PATCH] Migrate away from deprecated functions --- src/base/utils/misc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/base/utils/misc.cpp b/src/base/utils/misc.cpp index b0ccf2c87..c7ec9b8d5 100644 --- a/src/base/utils/misc.cpp +++ b/src/base/utils/misc.cpp @@ -451,7 +451,7 @@ QString Utils::Misc::languageToLocalizedString(const QString &localeStr) case QLocale::Byelorussian: return C_LOCALE_BYELORUSSIAN; case QLocale::Catalan: return C_LOCALE_CATALAN; case QLocale::Chinese: - switch (locale.country()) + switch (locale.territory()) { case QLocale::China: return C_LOCALE_CHINESE_SIMPLIFIED; case QLocale::HongKong: return C_LOCALE_CHINESE_TRADITIONAL_HK; @@ -462,7 +462,7 @@ QString Utils::Misc::languageToLocalizedString(const QString &localeStr) case QLocale::Danish: return C_LOCALE_DANISH; case QLocale::Dutch: return C_LOCALE_DUTCH; case QLocale::English: - switch (locale.country()) + switch (locale.territory()) { case QLocale::Australia: return C_LOCALE_ENGLISH_AUSTRALIA; case QLocale::UnitedKingdom: return C_LOCALE_ENGLISH_UNITEDKINGDOM; @@ -492,7 +492,7 @@ QString Utils::Misc::languageToLocalizedString(const QString &localeStr) case QLocale::Persian: return C_LOCALE_PERSIAN; case QLocale::Polish: return C_LOCALE_POLISH; case QLocale::Portuguese: - if (locale.country() == QLocale::Brazil) + if (locale.territory() == QLocale::Brazil) return C_LOCALE_PORTUGUESE_BRAZIL; return C_LOCALE_PORTUGUESE; case QLocale::Romanian: return C_LOCALE_ROMANIAN;