diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2020-04-23 17:11:40 +0300 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2020-05-11 14:42:00 +0300 |
commit | b428e98052aa1b97a42f31ed52b1266d17e186ee (patch) | |
tree | d6ce2fefdef8279b986239b2f09a5c3fa36da473 /tests/auto/corelib/text/qlocale/tst_qlocale.cpp | |
parent | 255cc55d74b55dfbecd9af0ea8d39aaf181da4ce (diff) |
Make qtbase compile without QT_CONFIG(timezone)
Fixes: QTBUG-83795
Pick-to: 5.15
Change-Id: I05eaaf57d87a9111d3609ebab81bc707f8af98f0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/corelib/text/qlocale/tst_qlocale.cpp')
-rw-r--r-- | tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp index 570a1db9b3..29fa3cc075 100644 --- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp @@ -1787,6 +1787,7 @@ void tst_QLocale::formatTimeZone() const QString cest(QStringLiteral("CEST")); #endif +#if QT_CONFIG(timezone) QDateTime dt6(QDate(2013, 1, 1), QTime(0, 0, 0), QTimeZone("Europe/Berlin")); #ifdef Q_OS_WIN QEXPECT_FAIL("", "QTimeZone windows backend only returns long name", Continue); @@ -1798,6 +1799,7 @@ void tst_QLocale::formatTimeZone() QEXPECT_FAIL("", "QTimeZone windows backend only returns long name", Continue); #endif QCOMPARE(enUS.toString(dt7, "t"), cest); +#endif // Current datetime should return current abbreviation QCOMPARE(enUS.toString(QDateTime::currentDateTime(), "t"), |