diff options
author | Fawzi Mohamed <fawzi.mohamed@digia.com> | 2014-09-03 15:30:39 +0200 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@digia.com> | 2014-09-08 09:47:58 +0200 |
commit | 521052be8673b6f986e630f7b8c627682009bd6f (patch) | |
tree | 87c9dec636c466124aa34316592cefc1d240ae30 | |
parent | 0a611e7ce13e598114497520af6f45e14fea4b27 (diff) | |
download | qt-creator-521052be8673b6f986e630f7b8c627682009bd6f.tar.gz |
qmljs: highlight properties with inline qml components
Task-number: QTCREATORBUG-10892
Change-Id: Ifbf5675ab53de54f6f38c07726f5ad400f6ee9d6
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
-rw-r--r-- | src/plugins/qmljseditor/qmljssemantichighlighter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp index 4d76c94eae..5ae278c134 100644 --- a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp +++ b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp @@ -317,7 +317,12 @@ protected: } if (ast->identifierToken.isValid()) addUse(ast->identifierToken, SemanticHighlighter::BindingNameType); - scopedAccept(ast, ast->statement); + if (ast->statement) + scopedAccept(ast, ast->statement); + if (ast->binding) + // this is not strictly correct for Components, as their context depends from where they + // are instantiated, but normally not too bad as approximation + scopedAccept(ast, ast->binding); return false; } |