forked from qt-creator/qt-creator
QmlJS: Add UiScriptBinding range if it has a script block.
Makes completion in code bindings have the right scope. Change-Id: Ib76840cf7be5ab0a3c573e9ad087359816a9ced6 Reviewed-on: http://codereview.qt.nokia.com/1046 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -407,6 +407,14 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiScriptBinding *ast)
|
||||
{
|
||||
if (AST::Block *block = AST::cast<AST::Block *>(ast->statement)) {
|
||||
_ranges.append(createRange(ast, block));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Range createRange(AST::UiObjectMember *member, AST::UiObjectInitializer *ast)
|
||||
{
|
||||
return createRange(member, member->firstSourceLocation(), ast->rbraceToken);
|
||||
|
||||
Reference in New Issue
Block a user