qt5base-lts/tests/auto/corelib/io/qiodevice
Alex Trotsenko 7d257aab81 QIODevice: handle incomplete reads
Introduce a transaction mechanism that gives the ability to read the
data atomically. Current implementation supports transactions for both
types of devices. For sequential devices, it records the whole input
stream during transaction. For random-access devices, device position
is saved when transaction starts. If an error occurs, the application
may be able to recover the input stream by rolling back to the start
point.

Also, QIODevice::peek() was rewritten to make use of transactions
internally. The replacement of QIODevicePrivateLinearBuffer by
QRingBuffer is closely entangled with that, which makes it unfeasible
to do separately.

Bump the TypeInformationVersion field in qtHookData, to notify the
Qt Creator developers that the offset of QFilePrivate::fileName was
changed and dumpers should be adapted.

[ChangeLog][QtCore] Added QIODevice's startTransaction(),
commitTransaction(), rollbackTransaction(), isTransactionStarted()
functions to support the read transactions.

Task-number: QTBUG-44418
Change-Id: I3564b343ebeeaaf7c48a1dcdb7ef0a7ffec550f2
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-12 18:00:58 +00:00
..
.gitignore Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
android_testdata.qrc Android: Fix QIODevice tests 2014-12-22 09:27:44 +01:00
BLACKLIST Blacklist and skip various tests that are flakey 2015-06-14 10:50:45 +00:00
qiodevice.pro Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API. 2015-09-01 16:57:46 +00:00
tst_qiodevice.cpp QIODevice: handle incomplete reads 2016-01-12 18:00:58 +00:00