forked from qt-creator/qt-creator
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.
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user