diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-10-15 11:12:49 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-10-19 08:35:30 (GMT) |
commit | 2e35e9c1eabe667798572457c61e1d1d1f373317 (patch) | |
tree | 6a9f9ae73a1f7f449cee741b67641f856af17653 /src/corelib/io | |
parent | a2a748f59a14f71c7f7cd5762ae9d358af2518c3 (diff) | |
download | Qt-2e35e9c1eabe667798572457c61e1d1d1f373317.zip Qt-2e35e9c1eabe667798572457c61e1d1d1f373317.tar.gz Qt-2e35e9c1eabe667798572457c61e1d1d1f373317.tar.bz2 |
Document behaviour of QFile::seek when seeking beyond EOF
Reviewed-By: joao
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfile.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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) |