From: Christian Kamm Date: Wed, 14 Sep 2011 07:59:05 +0000 (+0200) Subject: QmlJS highlighting: Fix external object property highlight. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=bbc48690e85adbe5ea8a5ffe14d5ba26fc7a3b7c;p=qt-creator-jp%2Fqt-creator-jp.git QmlJS highlighting: Fix external object property highlight. Change-Id: Ie9fa9aceb72c40ca2f991f48f70f89e5ab342436 Reviewed-on: http://codereview.qt-project.org/4870 Reviewed-by: Thomas Hartmann --- diff --git a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp index dab142f85c..f3928ee9c4 100644 --- a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp +++ b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp @@ -240,12 +240,13 @@ protected: type = SemanticHighlighter::ExternalIdType; } else if (scope == chain->rootObjectScope()) { type = SemanticHighlighter::RootObjectPropertyType; + } else { // check for this? + type = SemanticHighlighter::ExternalObjectPropertyType; } - } else { // check for this? - type = SemanticHighlighter::ExternalObjectPropertyType; } - addUse(location, type); + if (type != SemanticHighlighter::UnknownType) + addUse(location, type); } bool visit(UiObjectDefinition *ast)