qt5base-lts/tests/auto/corelib
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
..
animation Extend blacklisting of tst_qparallelanimationgroup tests to macOS 10.13 2018-09-24 21:13:30 +00:00
codecs Add tests for decoding too-short UTF-8 sequences 2018-09-25 22:14:07 +00:00
global Avoid signed/unsigned warning in template 2018-08-16 10:10:22 +00:00
io Merge remote-tracking branch 'origin/5.11' into 5.12 2018-09-30 01:00:19 +02:00
itemmodels QSFPM: don't let setFilterRegExp(QString) overwrite CaseSensitivity 2018-10-03 11:45:50 +00:00
kernel Rename QTimer::connectTo() to QTimer::callOnTimeout() 2018-09-03 08:43:39 +00:00
mimetypes QMimeDatabase: Fix MIME detection issues with magics in MIME hierarchies 2018-08-20 07:32:58 +00:00
plugin moc: Fix compilation of text strings containing non-ASCII 2018-09-10 04:17:03 +00:00
serialization Improve support for QImages in QDataStream read transactions 2018-10-15 07:18:57 +00:00
statemachine tst_QStateMachine: Don't use unconditional waits 2018-04-04 07:07:40 +00:00
thread Re-enable thread autotests 2018-09-25 22:35:40 +00:00
tools Merge remote-tracking branch 'origin/5.11' into 5.12 2018-10-08 10:00:49 +02:00
corelib.pro Create corelib/serialization and move existing file formats into it 2018-01-26 20:59:50 +00:00