diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-01-18 19:00:43 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-01-18 19:00:43 (GMT) |
commit | f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131 (patch) | |
tree | cf7b8d64fbc94504822096314f56a4a16a66bfa1 /src/corelib/io | |
parent | 7dee69caea20b189d5f4f8e27179c5abfd73a815 (diff) | |
parent | a764519a658031ce2fb375b659ff889b5241357f (diff) | |
download | Qt-f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131.zip Qt-f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131.tar.gz Qt-f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131.tar.bz2 |
Merge branch '4.6'
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfile.cpp | 1 | ||||
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 7 |
2 files changed, 6 insertions, 2 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()) { diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index b4437db..e90529e 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -573,10 +573,13 @@ QString QFileInfo::canonicalFilePath() const QString QFileInfo::absolutePath() const { Q_D(const QFileInfo); - if (d->data->fileName.isEmpty()) + + if (!d->data->fileEngine) { + return QLatin1String(""); + } else if (d->data->fileName.isEmpty()) { qWarning("QFileInfo::absolutePath: Constructed with empty filename"); - if(!d->data->fileEngine) return QLatin1String(""); + } return d->getFileName(QAbstractFileEngine::AbsolutePathName); } |