diff options
author | Liang Qi <liang.qi@qt.io> | 2017-06-19 13:25:11 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-06-19 16:12:34 +0200 |
commit | ce09ef431373f45d14ce0a6e7de24aee3666093d (patch) | |
tree | 7c998b21f02db55e233e7eeb1599663f1c6b51ca /tests/auto/corelib/tools/qtimezone | |
parent | 7ad55ca65f42351e231f31f7a9253ae6eaf1ebb3 (diff) | |
parent | 97eec16e4ff6367c233f8ea6c4a343c286c3a514 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/corelib/io/qprocess_unix.cpp
src/corelib/io/qprocess_win.cpp
src/plugins/platforms/android/qandroidplatformintegration.h
src/plugins/platforms/windows/qwindowscontext.cpp
src/plugins/platforms/windows/windows.pri
src/tools/uic/cpp/cppwriteinitialization.cpp
src/widgets/doc/src/widgets-and-layouts/gallery.qdoc
Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
Diffstat (limited to 'tests/auto/corelib/tools/qtimezone')
-rw-r--r-- | tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp index 2cebe1fb6f..714eb8a22a 100644 --- a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp +++ b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp @@ -299,7 +299,7 @@ void tst_QTimeZone::nullTest() void tst_QTimeZone::dataStreamTest() { - // Test the OffsetFromUtc backend serialization + // Test the OffsetFromUtc backend serialization. First with a custom timezone: QTimeZone tz1("QST", 123456, "Qt Standard Time", "QST", QLocale::Norway, "Qt Testing"); QByteArray tmp; { @@ -321,6 +321,20 @@ void tst_QTimeZone::dataStreamTest() QString("Qt Standard Time")); QCOMPARE(tz2.offsetFromUtc(QDateTime::currentDateTime()), 123456); + // And then with a standard IANA timezone (QTBUG-60595): + tz1 = QTimeZone("UTC"); + QCOMPARE(tz1.isValid(), true); + { + QDataStream ds(&tmp, QIODevice::WriteOnly); + ds << tz1; + } + { + QDataStream ds(&tmp, QIODevice::ReadOnly); + ds >> tz2; + } + QCOMPARE(tz2.isValid(), true); + QCOMPARE(tz2.id(), tz1.id()); + // Test the system backend serialization tz1 = QTimeZone("Pacific/Auckland"); |