From 07afddbf4bc029f776810381c7317fffa100eb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Fri, 26 Aug 2011 10:39:52 +0200 Subject: 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 --- src/corelib/io/qdir.cpp | 10 ++-------- 1 file 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()); } -- cgit v0.12