summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfileinfo.cpp7
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);
}