summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-08-26 08:39:52 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2011-08-26 12:10:20 (GMT)
commit07afddbf4bc029f776810381c7317fffa100eb60 (patch)
tree9c9cbce28cd24788f07b9732f52311fbb0ab3951
parent664abe11efdbf582a5433abccf0d8c6fdbe2b040 (diff)
downloadQt-07afddbf4bc029f776810381c7317fffa100eb60.zip
Qt-07afddbf4bc029f776810381c7317fffa100eb60.tar.gz
Qt-07afddbf4bc029f776810381c7317fffa100eb60.tar.bz2
Don't second-guess the "engine"; call cleanPath on absolutePaths
This ensures there is a single definition of what constitutes an absolute path in Qt. Task-number: QTBUG-19995 Reviewed-by: Prasanth Ullattil
-rw-r--r--src/corelib/io/qdir.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index c0c62e1..cbe635f 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -197,16 +197,10 @@ inline void QDirPrivate::resolveAbsoluteEntry() const
return;
QString absoluteName;
- if (fileEngine.isNull()) {
- if (!dirEntry.isRelative()) {
- absoluteDirEntry = dirEntry;
- return;
- }
-
+ if (fileEngine.isNull())
absoluteName = QFileSystemEngine::absoluteName(dirEntry).filePath();
- } else {
+ else
absoluteName = fileEngine->fileName(QAbstractFileEngine::AbsoluteName);
- }
absoluteDirEntry = QFileSystemEntry(QDir::cleanPath(absoluteName), QFileSystemEntry::FromInternalPath());
}