forked from qt-creator/qt-creator
Fix semantic checks not being applied to the Qml root object.
By always setting the scope object, even if it is identical to the root object. Done-with: Erik Verbruggen
This commit is contained in:
@@ -771,7 +771,7 @@ void ScopeChain::update()
|
||||
foreach (QmlComponentChain *parent, qmlComponentScope.instantiatingComponents)
|
||||
parent->add(&_all);
|
||||
|
||||
if (qmlComponentScope.rootObject)
|
||||
if (qmlComponentScope.rootObject && ! qmlScopeObjects.contains(qmlComponentScope.rootObject))
|
||||
_all += qmlComponentScope.rootObject;
|
||||
_all += qmlScopeObjects;
|
||||
_all += qmlComponentScope.functionScopes;
|
||||
|
||||
@@ -68,8 +68,7 @@ void ScopeBuilder::setQmlScopeObject(Node *node)
|
||||
|
||||
const ObjectValue *scopeObject = _doc->bind()->findQmlObject(node);
|
||||
if (scopeObject) {
|
||||
if (scopeObject != scopeChain.qmlComponentScope.rootObject)
|
||||
scopeChain.qmlScopeObjects += scopeObject;
|
||||
scopeChain.qmlScopeObjects += scopeObject;
|
||||
}
|
||||
|
||||
#ifndef NO_DECLARATIVE_BACKEND
|
||||
|
||||
Reference in New Issue
Block a user