summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2012-01-27 20:21:21 +0000
committerQt by Nokia <qt-info@nokia.com>2012-02-05 17:50:04 +0100
commit23457bd6d9d54df2cab505e581e72f9942b0fdbb (patch)
treebecbdb0cce5277c0c1e7d87dfd3efa69347f1986 /tests/auto
parent29c4a27a94d6f0dc9d91227d99bab7c2f55710db (diff)
SIC: QLocale: Make QSystemLocale a private class
As discussed on list and approved by Lars and Thiago. Make QSystemLocale private to give us time and space to change it to a better implementation. Change-Id: Ifd806972f3996c43a876f544f78c6557ad71cd75 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 52f01e8754..5544c0fd71 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -123,9 +123,6 @@ private slots:
void monthName();
void standaloneMonthName();
- // QSystemLocale tests
- void queryDateTime();
-
void ampm();
void currency();
void quoteString();
@@ -1778,43 +1775,6 @@ a(QLatin1String("0.0000000000000000000000000000000000000000000000000000000000000
QVERIFY(!ok);
}
-class SystemLocale : public QSystemLocale
-{
-public:
- virtual QVariant query(QueryType type, QVariant in) const
- {
- switch (type) {
- case DateTimeFormatLong: return QLatin1String("dddd ddd dd d MMMM MMM MM M yyyy hh:mm:ss.zzz");
- case DateTimeFormatShort: return QLatin1String("d M yy h:m");
- case DateTimeToStringLong:
- case DateTimeToStringShort:
- return in.toDateTime().toString(type == DateTimeToStringShort
- ? QLatin1String("dMyyhm")
- : QLatin1String("ddMMyyyyhhmmsszzz"));
- default:
- break;
- }
- return QSystemLocale::query(type, in);
- }
-};
-
-
-
-void tst_QLocale::queryDateTime()
-{
- SystemLocale loc;
- QCOMPARE(QLocale::system().dateTimeFormat(QLocale::LongFormat),
- loc.query(QSystemLocale::DateTimeFormatLong, QVariant()).toString());
- QCOMPARE(QLocale::system().dateTimeFormat(QLocale::ShortFormat),
- loc.query(QSystemLocale::DateTimeFormatShort, QVariant()).toString());
- QCOMPARE(QLocale::system().toString(QDateTime(QDate(1974, 12, 1), QTime(1, 2, 3, 4)), QLocale::ShortFormat),
- QString("1127412"));
- QCOMPARE(QLocale::system().toString(QDateTime(QDate(1974, 12, 1), QTime(1, 2, 3, 4)), QLocale::NarrowFormat),
- QLocale::system().toString(QDateTime(QDate(1974, 12, 1), QTime(1, 2, 3, 4)), QLocale::ShortFormat));
- QCOMPARE(QLocale::system().toString(QDateTime(QDate(1974, 12, 1), QTime(1, 2, 3, 4)), QLocale::LongFormat),
- QString("01121974010203004"));
-}
-
void tst_QLocale::ampm()
{
QLocale c(QLocale::C);