From edb8c91d66bbf1776db3416c770a02acdb5d2e14 Mon Sep 17 00:00:00 2001 From: Marco Mattiolo Date: Mon, 12 Aug 2024 14:16:12 +0200 Subject: [PATCH] Fix deprecated declarations from QLocale --- kcms/cellularnetwork/mobileproviders.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kcms/cellularnetwork/mobileproviders.cpp b/kcms/cellularnetwork/mobileproviders.cpp index 82e4332b..233af985 100644 --- a/kcms/cellularnetwork/mobileproviders.cpp +++ b/kcms/cellularnetwork/mobileproviders.cpp @@ -25,16 +25,16 @@ bool localeAwareCompare(const QString &one, const QString &two) MobileProviders::MobileProviders() { for (int c = 1; c <= QLocale::LastCountry; c++) { - const auto country = static_cast(c); + const auto country = static_cast(c); QLocale locale(QLocale::AnyLanguage, country); - if (locale.country() == country) { + if (locale.territory() == country) { const QString localeName = locale.name(); const auto idx = localeName.indexOf(QLatin1Char('_')); if (idx != -1) { const QString countryCode = localeName.mid(idx + 1); - QString countryName = locale.nativeCountryName(); + QString countryName = locale.nativeTerritoryName(); if (countryName.isEmpty()) { - countryName = QLocale::countryToString(country); + countryName = QLocale::territoryToString(country); } mCountries.insert(countryCode, countryName); }