forked from qt-creator/qt-creator
QmlJS: Fix highlighting and completion for property declarations.
When property declarations use a custom type such as property Foo bar we now * highlight Foo as a QML type if it's found * complete bar. as a Foo Change-Id: I82c249646af19bfeb9f5a7a7692f0dc10b009835 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -305,6 +305,10 @@ protected:
|
||||
|
||||
bool visit(UiPublicMember *ast)
|
||||
{
|
||||
if (ast->typeToken.isValid() && !ast->memberType.isEmpty()) {
|
||||
if (m_scopeChain.context()->lookupType(m_scopeChain.document().data(), QStringList(ast->memberType.toString())))
|
||||
addUse(ast->typeToken, SemanticHighlighter::QmlTypeType);
|
||||
}
|
||||
if (ast->identifierToken.isValid())
|
||||
addUse(ast->identifierToken, SemanticHighlighter::BindingNameType);
|
||||
scopedAccept(ast, ast->statement);
|
||||
|
||||
Reference in New Issue
Block a user