summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r--src/corelib/io/qdir.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 1dedc7c5c8..23bf3c5f4b 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -1741,11 +1741,16 @@ bool QDir::remove(const QString &fileName)
true if successful; otherwise returns false.
On most file systems, rename() fails only if \a oldName does not
- exist, if \a newName and \a oldName are not on the same
- partition or if a file with the new name already exists.
+ exist, or if a file with the new name already exists.
However, there are also other reasons why rename() can
fail. For example, on at least one file system rename() fails if
\a newName points to an open file.
+
+ If \a oldName is a file (not a directory) that can't be renamed
+ right away, Qt will try to copy \a oldName to \a newName and remove
+ \a oldName.
+
+ \sa QFile::rename()
*/
bool QDir::rename(const QString &oldName, const QString &newName)
{