summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-10-25 20:54:21 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-28 23:16:34 (GMT)
commita53312dad1fbb454f32f1481b8c79351fe6ea512 (patch)
tree0abd4cbda8f2ad5740a0771c85ae3264e6039035 /tests
parent76101d520bf658e24c9d96a1f65173e7adf19513 (diff)
downloadQt-a53312dad1fbb454f32f1481b8c79351fe6ea512.zip
Qt-a53312dad1fbb454f32f1481b8c79351fe6ea512.tar.gz
Qt-a53312dad1fbb454f32f1481b8c79351fe6ea512.tar.bz2
QLocale - Fix Mac date format code translation
Mac uses the CLDR format codes which need to be translated into their Qt equivalent. The existing code mistranslates the year code, is outdated for a number of new codes introduced in recent versions of CLDR, and by default accepted any codes it didn't recognize. This change updates support to the latest version of CLDR, fixes the treatment of years, and defaults to ignoring any new format codes added in the future. Back-ported from qtbase/77dc33dcdbe0eec8ddc9059c4e0ff9dde264c5fa Task-number: QTBUG-25057 Change-Id: Ide040eca467cfada46fb0e2010db179a76b3096a Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp
index 8e299b1..9cac40f 100644
--- a/tests/auto/qlocale/tst_qlocale.cpp
+++ b/tests/auto/qlocale/tst_qlocale.cpp
@@ -1132,10 +1132,7 @@ void tst_QLocale::macDefaultLocale()
QCOMPARE(locale.decimalPoint(), QChar('.'));
QCOMPARE(locale.groupSeparator(), QChar(','));
QCOMPARE(locale.dateFormat(QLocale::ShortFormat), QString("M/d/yy"));
- if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_6)
- QCOMPARE(locale.dateFormat(QLocale::LongFormat), QString("MMMM d, y"));
- else
- QCOMPARE(locale.dateFormat(QLocale::LongFormat), QString("MMMM d, yyyy"));
+ QCOMPARE(locale.dateFormat(QLocale::LongFormat), QString("MMMM d, yyyy"));
QCOMPARE(locale.timeFormat(QLocale::ShortFormat), QString("h:mm AP"));
QCOMPARE(locale.timeFormat(QLocale::LongFormat), QString("h:mm:ss AP t"));