aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2024-04-24 13:20:36 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2024-04-25 09:21:46 +0200
commitabd985021abca808c583ddc3dbbf7492599395a1 (patch)
tree4a68897487359b4a4c086e6721ceb9a4233c7755
parent75bcaf70e5c871a15abb54f4e4eed06419f33379 (diff)
Correct am/pm indicators for en_AU to lowercase
Previously QLocale's digested form of CLDR-derived data for AM/PM indicators was processed through a mapping that always selected the upper-case form, the AP format. Since 6.3, the formatting (and parsing) code has understood an Ap format to select the locale-appropriate case, rather than obliging client code to pick the case regardless of the user's locale. However QLocale's data still selected the upper-case version instead of the "locale-appropriate" form for time and datetime formats. I recently fixed this in qtbase; it's now time for QML's Locale's test-cases to catch up. The en_AU locale inherits lower-case am/pm markers from en_001 ("world" English, rather than plain "en" USAish), so correct the tests that expected upper-case markers. Change-Id: Ie05f5e39278758ea8d9e3ea556c133a143070ab8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--tests/auto/qml/qqmllocale/tst_qqmllocale.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
index dbab663b22..a7ddf79ad5 100644
--- a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
+++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
@@ -478,10 +478,12 @@ void tst_qqmllocale::toString_data()
QTest::newRow(qPrintable(functionCallScript)) << "ar" << functionCallScript << "١٦" << QString();
functionCallScript = "locale.toString(new Date(2022, 7, 16), Locale.ShortFormat)";
- QTest::newRow(qPrintable(functionCallScript)) << "en_AU" << functionCallScript << "16/8/22 12:00 AM" << QString();
+ QTest::newRow(qPrintable(functionCallScript))
+ << "en_AU" << functionCallScript << "16/8/22 12:00 am" << QString();
functionCallScript = "locale.toString(new Date(2022, 7, 16, 1, 23, 4), Locale.ShortFormat)";
- QTest::newRow(qPrintable(functionCallScript)) << "en_AU" << functionCallScript << "16/8/22 1:23 AM" << QString();
+ QTest::newRow(qPrintable(functionCallScript))
+ << "en_AU" << functionCallScript << "16/8/22 1:23 am" << QString();
}
void tst_qqmllocale::toString()