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
This commit is contained in:
Christian Kamm
2010-04-01 10:57:26 +02:00
parent 97901302b3
commit efcdadd2bb

View File

@@ -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")