QmlJS: Use mime types to distinguish qml and js files.

This allows adding patterns to the qml mime type in the options dialog.
Previously they were always parsed as js.

Change-Id: Ifa344fb6ab8cbcda02becef991cf6807615a1caa
Reviewed-on: http://codereview.qt-project.org/4515
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
Christian Kamm
2011-09-09 10:55:11 +02:00
parent 509eb894dd
commit 903c6b60cd
14 changed files with 115 additions and 58 deletions

View File

@@ -136,7 +136,7 @@ QmlJS::AST::ExpressionNode *QmlExpressionUnderCursor::operator()(const QTextCurs
ExpressionUnderCursor expressionUnderCursor;
_text = expressionUnderCursor(cursor);
exprDoc = Document::create(QLatin1String("<expression>"));
exprDoc = Document::create(QLatin1String("<expression>"), Document::JavaScriptLanguage);
exprDoc->setSource(_text);
exprDoc->parseExpression();