From 5ba66c5622e9e0da87a5037399b375d7e8cee554 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 14 Feb 2020 18:20:40 +0100 Subject: Remove all locale-dependence from Q(Date|Time)+ [ChangeLog][Important Behavior Changes][QDateTime] Removed all locale-dependence from QDate, QTime and QDateTime, including the Qt::DateFormat members that select the formats of the default and system locales and the toString(Qt::DateFormat, QCalendar) overload, which only used its calendar for these formats. All toString() methods now use, and all fromString() methods only recognize, the C locale's names for days and months. Use QLocale's methods if you need to take locale into account. Fixes: QTBUG-80441 Change-Id: I3a8968438741afb00f44262f79659c51e9b06c35 Reviewed-by: Thiago Macieira --- tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'tests/auto/corelib/time/qdatetime') diff --git a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp index 7afb625fc8..2e45460544 100644 --- a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp @@ -1022,16 +1022,6 @@ void tst_QDateTime::toString_enumformat() QString str2 = dt1.toString(Qt::ISODate); QCOMPARE(str2, QString("1995-05-20T12:34:56")); - - QString str3 = dt1.toString(Qt::LocalDate); - QVERIFY(!str3.isEmpty()); - //check for date/time components in any order - //year may be 2 or 4 digits - QVERIFY(str3.contains("95")); - //day and month may be in numeric or word form - QVERIFY(str3.contains("12")); - QVERIFY(str3.contains("34")); - //seconds may be absent } void tst_QDateTime::addDays() -- cgit v1.2.3