summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qnoncontiguousbytedevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qnoncontiguousbytedevice.cpp')
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp
index c0fbbaf103..253aa2aafb 100644
--- a/src/corelib/io/qnoncontiguousbytedevice.cpp
+++ b/src/corelib/io/qnoncontiguousbytedevice.cpp
@@ -391,6 +391,13 @@ bool QNonContiguousByteDeviceIoDeviceImpl::reset()
bool reset = (initialPosition == 0) ? device->reset() : device->seek(initialPosition);
if (reset) {
eof = false; // assume eof is false, it will be true after a read has been attempted
+ totalAdvancements = 0; //reset the progress counter
+ if (currentReadBuffer) {
+ delete currentReadBuffer;
+ currentReadBuffer = 0;
+ }
+ currentReadBufferAmount = 0;
+ currentReadBufferPosition = 0;
return true;
}