qt5base-lts/tests/auto/corelib/io
Alex Trotsenko 3c93286f08 QDataStream: unify deserialization of containers
Serialization of the Qt container classes is accomplished by breaking
up the data into primitive units. On the receiver side, these units
should be read atomically to guarantee integrity of the container.

Deserialization procedures for QHash and QMap were already implemented
in accordance with this strategy and have the following behavior:

 - a previously latched error status is saved for the caller. This
   overrides possible different errors in the current read. This
   is consistent with the treatment of primitive types.
 - if an error occurs during the deserialization, the container is
   cleared.

To make the API consistent, this patch adjusts the behavior of QList,
QLinkedList, QVector, and QSet deserialization. On the implementation
side we accomplish this with a private StreamStateSaver RAII class that
consolidates the handling of the stream status for all containers.

[ChangeLog][Important Behavior Changes][QtCore][QDataStream] Incomplete
reads of Qt containers are now handled same way as for primitive types,
meaning that previous errors are latched.

Task-number: QTBUG-54022
Change-Id: I5c77257fe2a4637e8a7e6cf3cd43091c8469340e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-01 16:08:41 +00:00
..
largefile Merge remote-tracking branch 'origin/5.6' into dev 2016-01-26 16:27:28 +01:00
qabstractfileengine Merge remote-tracking branch 'origin/5.6' into dev 2016-01-26 16:27:28 +01:00
qbuffer Updated license headers 2016-01-21 18:55:18 +00:00
qdatastream QDataStream: unify deserialization of containers 2016-07-01 16:08:41 +00:00
qdataurl Updated license headers 2016-01-21 18:55:18 +00:00
qdebug Merge remote-tracking branch 'origin/5.6' into 5.7 2016-06-10 23:27:10 +02:00
qdir Merge remote-tracking branch 'origin/5.6' into 5.7 2016-06-10 23:27:10 +02:00
qdiriterator Merge remote-tracking branch 'origin/5.6' into 5.7 2016-06-10 23:27:10 +02:00
qfile Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-13 06:55:37 +02:00
qfileinfo Merge remote-tracking branch 'origin/5.6' into 5.7 2016-06-10 23:27:10 +02:00
qfileselector Fix QFileSelectorPrivate::addStatics() 2016-02-12 14:10:29 +00:00
qfilesystementry Updated license headers 2016-01-21 18:55:18 +00:00
qfilesystemwatcher Remove the traces of the discontinued android-no-sdk platform 2016-03-30 10:12:34 +00:00
qiodevice Remove the traces of the discontinued android-no-sdk platform 2016-03-30 10:12:34 +00:00
qipaddress Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-13 06:55:37 +02:00
qlockfile Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-13 06:55:37 +02:00
qloggingcategory Updated license headers 2016-01-21 18:55:18 +00:00
qloggingregistry Merge remote-tracking branch 'origin/5.6' into 5.7 2016-05-06 15:36:44 +02:00
qnodebug Updated license headers 2016-01-21 18:55:18 +00:00
qprocess Merge remote-tracking branch 'origin/5.6' into 5.7 2016-03-23 08:29:43 +01:00
qprocess-noapplication Updated license headers 2016-01-21 18:55:18 +00:00
qprocessenvironment Updated license headers 2016-01-21 18:55:18 +00:00
qresourceengine Remove the traces of the discontinued android-no-sdk platform 2016-03-30 10:12:34 +00:00
qsavefile Updated license headers 2016-01-21 18:55:18 +00:00
qsettings Updated license headers 2016-01-21 18:55:18 +00:00
qstandardpaths Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-04 08:59:18 +02:00
qstorageinfo Merge remote-tracking branch 'origin/5.6' into 5.7 2016-05-19 12:55:27 +02:00
qtemporarydir Remove the traces of the discontinued android-no-sdk platform 2016-03-30 10:12:34 +00:00
qtemporaryfile Merge remote-tracking branch 'origin/5.6' into 5.7 2016-06-06 09:04:55 +02:00
qtextstream Merge remote-tracking branch 'origin/5.6' into 5.7 2016-03-21 09:02:57 +01:00
qurl Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-25 14:03:45 +02:00
qurlinternal Disallow non-character Unicode codepoints in QUrl/QUrlQuery 2016-04-26 23:08:11 +00:00
qurlquery Updated license headers 2016-01-21 18:55:18 +00:00
qwinoverlappedionotifier Updated license headers 2016-01-21 18:55:18 +00:00
io.pro winrt: msvc2015: refactor file handling 2016-01-21 05:53:17 +00:00