From ffee7c0b497bccbc68bf4eb95813cc162a48fc24 Mon Sep 17 00:00:00 2001 From: Christian Kamm <christian.d.kamm@nokia.com> Date: Tue, 9 Aug 2011 10:40:39 +0200 Subject: [PATCH] QmlJS: Clean up ScopeAstPath visitor. Change-Id: If983e9c9bee2d0396d7cc00973ee3885a3736d8a Reviewed-on: http://codereview.qt.nokia.com/2767 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com> --- src/libs/qmljs/qmljsscopeastpath.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/libs/qmljs/qmljsscopeastpath.cpp b/src/libs/qmljs/qmljsscopeastpath.cpp index 2672b56a9bc..ec3d427523c 100644 --- a/src/libs/qmljs/qmljsscopeastpath.cpp +++ b/src/libs/qmljs/qmljsscopeastpath.cpp @@ -47,12 +47,14 @@ QList<Node *> ScopeAstPath::operator()(quint32 offset) _result.clear(); _offset = offset; if (_doc) - Node::accept(_doc->ast(), this); + accept(_doc->ast()); return _result; } void ScopeAstPath::accept(Node *node) -{ Node::acceptChild(node, this); } +{ + Node::accept(node, this); +} bool ScopeAstPath::preVisit(Node *node) { @@ -72,7 +74,7 @@ bool ScopeAstPath::visit(UiPublicMember *node) && containsOffset(node->statement->firstSourceLocation(), node->statement->lastSourceLocation())) { _result.append(node); - Node::accept(node->statement, this); + accept(node->statement); return false; } return true; @@ -85,7 +87,7 @@ bool ScopeAstPath::visit(UiScriptBinding *node) node->statement->lastSourceLocation())) { _result.append(node); - Node::accept(node->statement, this); + accept(node->statement); return false; } return true; @@ -94,14 +96,14 @@ bool ScopeAstPath::visit(UiScriptBinding *node) bool ScopeAstPath::visit(UiObjectDefinition *node) { _result.append(node); - Node::accept(node->initializer, this); + accept(node->initializer); return false; } bool ScopeAstPath::visit(UiObjectBinding *node) { _result.append(node); - Node::accept(node->initializer, this); + accept(node->initializer); return false; } @@ -112,9 +114,9 @@ bool ScopeAstPath::visit(FunctionDeclaration *node) bool ScopeAstPath::visit(FunctionExpression *node) { - Node::accept(node->formals, this); + accept(node->formals); _result.append(node); - Node::accept(node->body, this); + accept(node->body); return false; } -- GitLab