diff options
author | Andreas Kling <info@andreaskling.com> | 2009-12-21 13:58:28 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-12-21 13:58:54 (GMT) |
commit | 032036bfb3e69c41b9a3c557d4c9322d55154e25 (patch) | |
tree | f76395369950c593fa4582c18afa625883d60a74 | |
parent | ddf34f39efcbe679f1a8216df58da0c61e98ec79 (diff) | |
download | Qt-032036bfb3e69c41b9a3c557d4c9322d55154e25.zip Qt-032036bfb3e69c41b9a3c557d4c9322d55154e25.tar.gz Qt-032036bfb3e69c41b9a3c557d4c9322d55154e25.tar.bz2 |
Warn when calling QFileInfo::absolutePath() on an improper object.
Merge-request: 1821
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index 61081a1..0a435b9 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -573,6 +573,8 @@ QString QFileInfo::canonicalFilePath() const QString QFileInfo::absolutePath() const { Q_D(const QFileInfo); + if (d->data->fileName.isEmpty()) + qWarning("QFileInfo::absolutePath: Constructed with empty filename"); if(!d->data->fileEngine) return QLatin1String(""); return d->getFileName(QAbstractFileEngine::AbsolutePathName); |