Skip to content
Snippets Groups Projects
Commit efcdadd2 authored by Christian Kamm's avatar Christian Kamm
Browse files

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
parent 97901302
No related branches found
No related tags found
No related merge requests found
...@@ -47,10 +47,10 @@ Document::Document(const QString &fileName) ...@@ -47,10 +47,10 @@ Document::Document(const QString &fileName)
, _isQmlDocument(false) , _isQmlDocument(false)
, _documentRevision(0) , _documentRevision(0)
, _parsedCorrectly(false) , _parsedCorrectly(false)
, _fileName(fileName)
{ {
QFileInfo fileInfo(fileName); QFileInfo fileInfo(fileName);
_path = fileInfo.absolutePath(); _path = fileInfo.canonicalPath();
_fileName = fileInfo.canonicalFilePath();
// ### Should use mime type // ### Should use mime type
if (fileInfo.suffix() == QLatin1String("qml") if (fileInfo.suffix() == QLatin1String("qml")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment