summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qfile.cpp4
-rw-r--r--src/corelib/io/qfiledevice.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index f7e711a7cf..64d34aec59 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -1038,11 +1038,13 @@ bool QFile::resize(qint64 sz)
/*!
\overload
- Sets \a fileName to size (in bytes) \a sz. Returns \c true if the file if
+ Sets \a fileName to size (in bytes) \a sz. Returns \c true if
the resize succeeds; false otherwise. If \a sz is larger than \a
fileName currently is the new bytes will be set to 0, if \a sz is
smaller the file is simply truncated.
+ \warning This function can fail if the file doesn't exist.
+
\sa resize()
*/
diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp
index 715dc7293a..f50949e6c1 100644
--- a/src/corelib/io/qfiledevice.cpp
+++ b/src/corelib/io/qfiledevice.cpp
@@ -615,6 +615,8 @@ qint64 QFileDevice::size() const
currently is, the new bytes will be set to 0; if \a sz is smaller, the
file is simply truncated.
+ \warning This function can fail if the file doesn't exist.
+
\sa size()
*/
bool QFileDevice::resize(qint64 sz)