summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdatastream_p.h
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2015-03-05 10:52:17 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2016-01-13 16:31:33 +0000
commit184d66caa5f7f93b7383319c5c8985524e0dc824 (patch)
tree272ce3f066d3c80f77dfca50fd0914b341c2f9da /src/corelib/io/qdatastream_p.h
parentca6f11dcf207aa51ce32c9813ad1ab3790bb31ee (diff)
QDataStream: handle incomplete reads from QIODevice
This adds a way to resume reading from a stream after a ReadPastEnd error. This is done by introducing a stream read transaction mechanism that keeps read data in an internal buffer and rolls it back on failure. [ChangeLog][QtCore] Added QDataStream startTransaction(), commitTransaction(), rollbackTransaction(), abortTransaction() functions to support read transactions. Task-number: QTBUG-44418 Change-Id: Ibf946e1939a5573c4182fea7e26608947218c2d9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/io/qdatastream_p.h')
-rw-r--r--src/corelib/io/qdatastream_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/io/qdatastream_p.h b/src/corelib/io/qdatastream_p.h
index 82c8fe251f..677a53f90a 100644
--- a/src/corelib/io/qdatastream_p.h
+++ b/src/corelib/io/qdatastream_p.h
@@ -53,9 +53,11 @@ QT_BEGIN_NAMESPACE
class QDataStreamPrivate
{
public:
- QDataStreamPrivate() : floatingPointPrecision(QDataStream::DoublePrecision) { }
+ QDataStreamPrivate() : floatingPointPrecision(QDataStream::DoublePrecision),
+ transactionDepth(0) { }
QDataStream::FloatingPointPrecision floatingPointPrecision;
+ int transactionDepth;
};
#endif