summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfiledevice.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp
index 20cfa5bdaf..ce9c8275ce 100644
--- a/src/corelib/io/qfiledevice.cpp
+++ b/src/corelib/io/qfiledevice.cpp
@@ -328,6 +328,9 @@ void QFileDevice::close()
d->lastWasWrite = false;
d->writeBuffer.clear();
+ // reset cached size
+ d->cachedSize = 0;
+
// keep earlier error from flush
if (d->fileEngine->close() && flushed)
unsetError();