summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfile.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 33b0b2eb66..3166fa1b83 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -676,8 +676,11 @@ QFile::rename(const QString &newName)
return !error;
}
close();
+ d->setError(QFile::RenameError,
+ tr("Cannot open destination file: %1").arg(out.errorString()));
+ } else {
+ d->setError(QFile::RenameError, errorString());
}
- d->setError(QFile::RenameError, out.isOpen() ? errorString() : out.errorString());
}
return false;
}