summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2017-07-18 10:41:20 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2017-07-26 08:22:51 +0000
commitaf7e756155cf44e05816cf91be04e13d9e7ca084 (patch)
tree2324f56c52cce53e15886704c048d7551c6c24d0 /tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
parent2031196ad12ae7a641fc00c0990072f5fb3a7172 (diff)
Return "en" for QLocale::c().bcp47Name()
Currently QLocale::c().bcp47Name() returns "C" which, according to [BCP47], is not a valid language tag. In particular it does not conform to the ABNF grammar in section 2.1 which specifies a minimum length of 2 characters for all language tags. [BCP47]: https://tools.ietf.org/html/bcp47 This patch changes the return value to "en" seeing as the documentation for QLocale::Language states that the C language is identical in behavior to English. Task-number: QTBUG-61949 Change-Id: I2a381def8fb7156467e01d105da92bb1f4821204 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/qlocale/tst_qlocale.cpp')
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index d08e5dc289..10d78b1f2f 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -2529,7 +2529,7 @@ void tst_QLocale::textDirection()
void tst_QLocale::bcp47Name()
{
- QCOMPARE(QLocale("C").bcp47Name(), QStringLiteral("C"));
+ QCOMPARE(QLocale("C").bcp47Name(), QStringLiteral("en"));
QCOMPARE(QLocale("en").bcp47Name(), QStringLiteral("en"));
QCOMPARE(QLocale("en_US").bcp47Name(), QStringLiteral("en"));
QCOMPARE(QLocale("en_GB").bcp47Name(), QStringLiteral("en-GB"));