summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qlocale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qlocale.cpp')
-rw-r--r--src/corelib/text/qlocale.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp
index 01278f343c..260af879db 100644
--- a/src/corelib/text/qlocale.cpp
+++ b/src/corelib/text/qlocale.cpp
@@ -115,22 +115,14 @@ QLocale::Language QLocalePrivate::codeToLanguage(QStringView code) noexcept
if (uc3 == 0) {
// legacy codes
- if (uc1 == 'n' && uc2 == 'o') { // no -> nb
- static_assert(QLocale::Norwegian == QLocale::NorwegianBokmal);
- return QLocale::Norwegian;
- }
- if (uc1 == 't' && uc2 == 'l') { // tl -> fil
- static_assert(QLocale::Tagalog == QLocale::Filipino);
- return QLocale::Tagalog;
- }
- if (uc1 == 's' && uc2 == 'h') { // sh -> sr[_Latn]
- static_assert(QLocale::SerboCroatian == QLocale::Serbian);
- return QLocale::SerboCroatian;
- }
- if (uc1 == 'm' && uc2 == 'o') { // mo -> ro
- static_assert(QLocale::Moldavian == QLocale::Romanian);
- return QLocale::Moldavian;
- }
+ if (uc1 == 'n' && uc2 == 'o') // no -> nb
+ return QLocale::NorwegianBokmal;
+ if (uc1 == 't' && uc2 == 'l') // tl -> fil
+ return QLocale::Filipino;
+ if (uc1 == 's' && uc2 == 'h') // sh -> sr[_Latn]
+ return QLocale::Serbian;
+ if (uc1 == 'm' && uc2 == 'o') // mo -> ro
+ return QLocale::Romanian;
// Android uses the following deprecated codes
if (uc1 == 'i' && uc2 == 'w') // iw -> he
return QLocale::Hebrew;