From efcdadd2bbb272c1998d970206b9c6a4a494c5bb Mon Sep 17 00:00:00 2001
From: Christian Kamm <christian.d.kamm@nokia.com>
Date: Thu, 1 Apr 2010 10:57:26 +0200
Subject: [PATCH] QmlJS: Use the canonical paths for the Documents.

Otherwise the paths may end up with ../ or /./ in them and confuse the
Qml import resolving.

Reviewed-by: Thomas Hartmann
---
 src/libs/qmljs/qmljsdocument.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp
index 88c8caaa51b..9c0890e6c98 100644
--- a/src/libs/qmljs/qmljsdocument.cpp
+++ b/src/libs/qmljs/qmljsdocument.cpp
@@ -47,10 +47,10 @@ Document::Document(const QString &fileName)
     , _isQmlDocument(false)
     , _documentRevision(0)
     , _parsedCorrectly(false)
-    , _fileName(fileName)
 {
     QFileInfo fileInfo(fileName);
-    _path = fileInfo.absolutePath();
+    _path = fileInfo.canonicalPath();
+    _fileName = fileInfo.canonicalFilePath();
 
     // ### Should use mime type
     if (fileInfo.suffix() == QLatin1String("qml")
-- 
GitLab