From 8c8f5270c2e7a53f78eb36e9b1390dedd16f0969 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 30 Sep 2011 15:04:45 +0200 Subject: [PATCH] QmlJS highlighter: Highlight name after 'as' in imports. Also fix a problem with the scope not being updated after initial construction. Change-Id: If5cf70bb029857b317ebbee3a6c4ee421213f24c Reviewed-on: http://codereview.qt-project.org/6115 Sanity-Review: Qt Sanity Bot Reviewed-by: Christian Kamm --- src/plugins/qmljseditor/qmljssemantichighlighter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp index 229ecc0eb21..2cc91662907 100644 --- a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp +++ b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp @@ -265,6 +265,12 @@ protected: addUse(fullLocationForQualifiedId(localId), SemanticHighlighter::BindingNameType); } + bool visit(UiImport *ast) + { + processName(ast->importId, ast->importIdToken); + return true; + } + bool visit(UiObjectDefinition *ast) { if (m_scopeChain.document()->bind()->isGroupedPropertyBinding(ast)) {