qt5base-lts/tests/auto/corelib
Mitch Curtis 718a2251be Serialise QDateTime as UTC and timeSpec() instead of private spec.
QDateTime currently serialises its private Spec enum. If a user was to
deserialise the individual components of a QDateTime separately, the
resulting timeSpec may be invalid when cast to the Qt::TimeSpec enum.

E.g.:

QDateTime dateTime(QDate(2012, 8, 14), QTime(8, 0, 0), Qt::UTC);
// ... serialise
// ... deserialise date, time, spec separately.
// spec == 2, the value of QDateTimePrivate::UTC.
// spec != UTC, will be set to LocalUnknown.
QDateTime deserialised(date, time, spec);

This patch serialises QDateTime objects in UTC and the value of
timeSpec() as opposed to QDateTimePrivate's spec. This changes the
serialisation behaviour of QDateTime for version 13 of QDataStream.

Task-number: QTBUG-4057
Change-Id: If650e7960dca7b6ab44b8233410a6369c41df73a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-21 11:05:20 +02:00
..
animation Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
codecs Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
global QtGlobal: (new) qEnvironmentVariableIs{Set,Empty}() 2012-08-09 21:27:09 +02:00
io Fix decoding of QByteArray in the deprecated "encoded" setters in QUrl 2012-08-20 21:59:32 +02:00
itemmodels Emit layoutChange signals when changing QPersistentModelIndexes. 2012-08-18 08:34:53 +02:00
json Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
kernel Remove QWidgetStar. 2012-08-18 10:55:47 +02:00
mimetypes Remove more -Werror from any test other than headersclean. 2012-08-07 23:27:17 +02:00
plugin Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
statemachine statemachine: Really fix signal transition handling in multi-threaded setup 2012-08-08 14:13:53 +02:00
thread Enable QAtomicInteger for char16_t and char32_t 2012-08-18 18:35:50 +02:00
tools Serialise QDateTime as UTC and timeSpec() instead of private spec. 2012-08-21 11:05:20 +02:00
xml Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00