diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-01-08 13:45:44 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-01-13 12:37:56 +0000 |
commit | 8c89a8b1ef3e4ce549a5d0bbc4168c199e44f8cf (patch) | |
tree | 77caa5066583e0e535e4a402855eb5269bcf676e /src | |
parent | e770728a336d3218ad8b13c04bbea3324d241b48 (diff) |
[Android]: Java uses some deprecated locale codes so account for these
There are three deprecated language codes that Java still uses for the
locale so we need to account for these inside QLocale by mapping them to
the right language.
Task-number: QTBUG-49632
Change-Id: Ib66b3f2763e085f7384228f2490b048bb56be259
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index b1f53dc7a2..890a8fb95d 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -116,6 +116,13 @@ QLocale::Language QLocalePrivate::codeToLanguage(const QString &code) Q_STATIC_ASSERT(QLocale::Moldavian == QLocale::Romanian); return QLocale::Moldavian; } + // Android uses the following deprecated codes + if (uc1 == 'i' && uc2 == 'w' && uc3 == 0) // iw -> he + return QLocale::Hebrew; + if (uc1 == 'i' && uc2 == 'n' && uc3 == 0) // in -> id + return QLocale::Indonesian; + if (uc1 == 'j' && uc2 == 'i' && uc3 == 0) // ji -> yi + return QLocale::Yiddish; return QLocale::C; } |