qt5base-lts/tests/auto/corelib/serialization
Eirik Aavitsland f2f040ae1c Improve support for QImages in QDataStream read transactions
QImage's operator>>(QDataStream&) did not set an error mode on the
stream on read failures. That would break QDataStream transactions.
Since the current QImage serialization cannot differentiate between
truncated and corrupted data, we set the ReadPastEnd error as expected
by the transaction system.

Also specify the expected file format on decoding QImage from stream,
to avoid all the format handlers' canRead() being invoked. This is
necessary since some of them may call ungetChar(), which fails when
the stream is in a transaction.

Also add testing of this feature to the QDataStram transaction
autotest. That required a slight rewrite of the fake sequential
QIODevice subclass. The previous implementation had incorrect
behavior of peek(), which is required by QImage decoders.

Task-number: QTBUG-70875
Change-Id: If3f1ca7186ad1e6ca0e6e8ea81d2b2fbece6ea01
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-15 07:18:57 +00:00
..
json QJsonDocument: Make emptyObject an object 2018-07-31 09:33:42 +00:00
qcborstreamreader QCborStreamReader: use QByteArray directly if possible 2018-06-06 17:48:00 +00:00
qcborstreamwriter Long live QCborStreamWriter! 2018-05-27 22:41:41 +00:00
qcborvalue Support QCborMap::operator[] taking a string literal 2018-10-08 14:11:23 +00:00
qcborvalue_json QCborValue: move the toDiagnosticNotation() function to its own file 2018-07-30 16:21:12 +00:00
qdatastream Improve support for QImages in QDataStream read transactions 2018-10-15 07:18:57 +00:00
qtextstream Add QTextStream operators for QStringView 2018-07-20 20:51:08 +00:00
qxmlstream Fix QXmlStreamWriter xmlns attribute placement 2018-09-28 13:19:48 +00:00
serialization.pro QCborValue: add support for QVariant and JSON conversions 2018-06-08 07:46:41 +00:00