forked from qt-creator/qt-creator
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:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user