diff options
author | John Layt <jlayt@kde.org> | 2013-02-25 13:36:29 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-28 19:08:14 +0200 |
commit | 13c16bbd06e0034210ba2164f1be208c49a6e3a7 (patch) | |
tree | 2ab887adab4ad7f38b60ff7c903e55623dd6aa72 /src/corelib/io | |
parent | 80cb575953e3a282593570e1583938b6475bc0d3 (diff) |
QDateTime - Improve and expose Qt::OffsetFromUtc
The Qt::OffsetFromUtc TimeSpec was made public in Qt 4.4 but the access
methods were never made public in the apidox effectively meaning the
feature was never used. The implementation was also incomplete and
inconsistent.
This change cleans up the implementation and exports new public API for
using the TimeSpec using new method names consistent with the new
QTimeZone support.
This change increases the QDataStream Version number for Qt 5.2 to 15.
The behavior of one constructor has changed slightly to be consistent
with the rest of the feature, but this behavior was never documented.
[ChangeLog][QtCore][QDateTime] Fully implement support for Qt::TimeSpec
of Qt::OffsetFromUTC, added new methods for offsetFromUTC(),
toTimeSpec(), and toOffsetFromUTC().
Task-number: QTBUG-26161
Task-number: QTBUG-29666
Change-Id: If3cc7fc9778ca2b831644408ae749448d5975a3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qdatastream.cpp | 5 | ||||
-rw-r--r-- | src/corelib/io/qdatastream.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index 52b80badb8..008460df5d 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -539,8 +539,8 @@ void QDataStream::setByteOrder(ByteOrder bo) \value Qt_4_8 Same as Qt_4_6. \value Qt_4_9 Same as Qt_4_6. \value Qt_5_0 Version 13 (Qt 5.0) - \value Qt_5_1 Version 14 (Qt 5.1, Qt 5.2) - \value Qt_5_2 Same as Qt_5_1. + \value Qt_5_1 Version 14 (Qt 5.1) + \value Qt_5_2 Version 15 (Qt 5.2) \sa setVersion(), version() */ @@ -572,6 +572,7 @@ void QDataStream::setByteOrder(ByteOrder bo) \table \header \li Qt Version \li QDataStream Version + \row \li Qt 5.2 \li 15 \row \li Qt 5.1 \li 14 \row \li Qt 5.0 \li 13 \row \li Qt 4.6 \li 12 diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index eb064b3fe2..f107e801b6 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -87,7 +87,7 @@ public: Qt_4_9 = Qt_4_8, Qt_5_0 = 13, Qt_5_1 = 14, - Qt_5_2 = Qt_5_1 + Qt_5_2 = 15 #if QT_VERSION >= 0x050300 #error Add the datastream version for this Qt version #endif |