Commit 3191cfe8 authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Fix invalid errors inside qmlproject files.

The Document thought it was a JS file as it doesn't have the .qml
extension.
parent d97bdd1a
...@@ -52,7 +52,9 @@ Document::Document(const QString &fileName) ...@@ -52,7 +52,9 @@ Document::Document(const QString &fileName)
QFileInfo fileInfo(fileName); QFileInfo fileInfo(fileName);
_path = fileInfo.absolutePath(); _path = fileInfo.absolutePath();
if (fileInfo.suffix() == QLatin1String("qml")) { // ### Should use mime type
if (fileInfo.suffix() == QLatin1String("qml")
|| fileInfo.suffix() == QLatin1String("qmlproject")) {
_isQmlDocument = true; _isQmlDocument = true;
_componentName = fileInfo.baseName(); _componentName = fileInfo.baseName();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment