From 2e35e9c1eabe667798572457c61e1d1d1f373317 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 15 Oct 2010 12:12:49 +0100 Subject: Document behaviour of QFile::seek when seeking beyond EOF Reviewed-By: joao --- src/corelib/io/qfile.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 50e9a8f..a0bc68e 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -1477,7 +1477,17 @@ bool QFile::atEnd() const } /*! - \reimp + For random-access devices, this function sets the current position + to \a pos, returning true on success, or false if an error occurred. + For sequential devices, the default behavior is to do nothing and + return false. + + Seeking beyond the end of a file: + If the position is beyond the end of a file, then seek() shall not + immediately extend the file. If a write is performed at this position, + then the file shall be extended. The content of the file between the + previous end of file and the newly written data is UNDEFINED and + varies between platforms and file systems. */ bool QFile::seek(qint64 off) -- cgit v0.12