summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorJoão Abecasis <joao@trolltech.com>2010-01-12 18:14:56 (GMT)
committerJoão Abecasis <joao@trolltech.com>2010-01-14 17:48:55 (GMT)
commit2d0bd1a13328d5a5ed6c4d1e768937a6627f1086 (patch)
tree7b9be549e8e6fec944d0519779eb7b4b529b6a5f /src/corelib/io
parent88a07b4c0a3a87eeb47750640cb71a5a64e0573c (diff)
downloadQt-2d0bd1a13328d5a5ed6c4d1e768937a6627f1086.zip
Qt-2d0bd1a13328d5a5ed6c4d1e768937a6627f1086.tar.gz
Qt-2d0bd1a13328d5a5ed6c4d1e768937a6627f1086.tar.bz2
QFile::remove: don't fail for unrelated errors
remove was checking for errors from close, but without clearing the error state beforehand it ended picking unrelated errors. Task-number: QTBUG-7285 Reviewed-by: qCaro
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfile.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 6395cc7..4c7f3f0 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -643,6 +643,7 @@ QFile::remove()
qWarning("QFile::remove: Empty or null file name");
return false;
}
+ unsetError();
close();
if(error() == QFile::NoError) {
if(fileEngine()->remove()) {