diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-06 05:31:56 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-06 05:31:56 (GMT) |
commit | 067b419199b369b6c81fa1ae387257aa87cab20c (patch) | |
tree | 20ef3dc7c3def67fd74117f50fdae3be054ee836 /src/declarative/qml/qmlcontext.cpp | |
parent | 9e4b877430a6811079d209656587ea228334ed34 (diff) | |
download | Qt-067b419199b369b6c81fa1ae387257aa87cab20c.zip Qt-067b419199b369b6c81fa1ae387257aa87cab20c.tar.gz Qt-067b419199b369b6c81fa1ae387257aa87cab20c.tar.bz2 |
Improve scope handling
Diffstat (limited to 'src/declarative/qml/qmlcontext.cpp')
-rw-r--r-- | src/declarative/qml/qmlcontext.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index 968597c..a1eb5de 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -103,16 +103,7 @@ void QmlContextPrivate::init() //set scope chain QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine); - QScriptValue scopeObj = QmlEnginePrivate::get(engine)->contextClass->newContext(q); - - //### no longer need to push global object once we switch to JSC (test with objects added to globalObject) - //if (parent) - // scopeChain = parent->d_func()->scopeChain; - if (!parent) - scopeChain.append(scriptEngine->globalObject()); - else - scopeChain = parent->d_func()->scopeChain; - scopeChain.prepend(scopeObj); + scriptValue = QmlEnginePrivate::get(engine)->contextClass->newContext(q); } void QmlContextPrivate::addDefaultObject(QObject *object, Priority priority) |