aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorChristian Kamm <[email protected]>2010-02-23 12:34:52 +0100
committerChristian Kamm <[email protected]>2010-02-23 12:36:48 +0100
commitb1522ba5c8e79bc9c160ad37e461daaf415f6344 (patch)
tree0b919ddcd46901c3b180e504abd390328c461dee /src/libs
parentf45b80060d6e0d307805ae93e9171d795053ef0d (diff)
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
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp2
-rw-r--r--src/libs/qmljs/qmljsscopebuilder.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index 54f68232424..9a287b44e95 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -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;
diff --git a/src/libs/qmljs/qmljsscopebuilder.cpp b/src/libs/qmljs/qmljsscopebuilder.cpp
index 4f3f6fa1233..18c8dcf1b8c 100644
--- a/src/libs/qmljs/qmljsscopebuilder.cpp
+++ b/src/libs/qmljs/qmljsscopebuilder.cpp
@@ -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