forked from qt-creator/qt-creator
QmlJS: Fix invalid errors inside qmlproject files.
The Document thought it was a JS file as it doesn't have the .qml extension.
This commit is contained in:
@@ -52,7 +52,9 @@ Document::Document(const QString &fileName)
|
||||
QFileInfo fileInfo(fileName);
|
||||
_path = fileInfo.absolutePath();
|
||||
|
||||
if (fileInfo.suffix() == QLatin1String("qml")) {
|
||||
// ### Should use mime type
|
||||
if (fileInfo.suffix() == QLatin1String("qml")
|
||||
|| fileInfo.suffix() == QLatin1String("qmlproject")) {
|
||||
_isQmlDocument = true;
|
||||
_componentName = fileInfo.baseName();
|
||||
|
||||
|
Reference in New Issue
Block a user