Commit 4722c6cf authored by Christian Kamm's avatar Christian Kamm
Browse files

Fix the scope chain not being set up correctly for the outermost scope.

This bug manifested itself as not getting a tooltip and correct context
help for the type of the root object in a Qml file.
parent e861161a
......@@ -73,9 +73,13 @@ void Link::scopeChainAt(Document::Ptr doc, const QList<Node *> &astPath)
scopeChain.jsScopes += bind->rootObjectValue();
}
ScopeBuilder scopeBuilder(doc, _context);
foreach (Node *node, astPath)
scopeBuilder.push(node);
if (astPath.isEmpty()) {
scopeChain.update();
} else {
ScopeBuilder scopeBuilder(doc, _context);
foreach (Node *node, astPath)
scopeBuilder.push(node);
}
}
void Link::makeComponentChain(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment