diff options
author | Andreas Kling <andreas.kling@nokia.com> | 2010-01-12 16:39:25 (GMT) |
---|---|---|
committer | Andreas Kling <andreas.kling@nokia.com> | 2010-01-12 16:39:25 (GMT) |
commit | fdf463ba74b2e00ba5f9db10f43585e8b15054f7 (patch) | |
tree | 74e630c597f2889b2a3bd76069f7f688b77e3e50 | |
parent | 152e4ee249915b15241c5f37830f37bb569151b6 (diff) | |
download | Qt-fdf463ba74b2e00ba5f9db10f43585e8b15054f7.zip Qt-fdf463ba74b2e00ba5f9db10f43585e8b15054f7.tar.gz Qt-fdf463ba74b2e00ba5f9db10f43585e8b15054f7.tar.bz2 |
Remove erroneous warning in QFileInfo::absolutePath()
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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); } |