diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-15 04:22:43 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-15 04:22:43 (GMT) |
commit | c5be2898cac41cf18ab14c3ee42d4d8c879c3e55 (patch) | |
tree | 962215b6af2d8908a8f0f33d4f127cebd02d8adf /src/declarative/qml/qmlcontextscriptclass.cpp | |
parent | bd3caa48edf2cd53e561cec7ee7ccec6748a4843 (diff) | |
download | Qt-c5be2898cac41cf18ab14c3ee42d4d8c879c3e55.zip Qt-c5be2898cac41cf18ab14c3ee42d4d8c879c3e55.tar.gz Qt-c5be2898cac41cf18ab14c3ee42d4d8c879c3e55.tar.bz2 |
Update QML following bd3caa48edf2cd53e561cec7ee7ccec6748a4843
Diffstat (limited to 'src/declarative/qml/qmlcontextscriptclass.cpp')
-rw-r--r-- | src/declarative/qml/qmlcontextscriptclass.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/qml/qmlcontextscriptclass.cpp b/src/declarative/qml/qmlcontextscriptclass.cpp index 8ab3f8d..71b77d5 100644 --- a/src/declarative/qml/qmlcontextscriptclass.cpp +++ b/src/declarative/qml/qmlcontextscriptclass.cpp @@ -206,6 +206,7 @@ QmlContextScriptClass::property(Object *object, const Identifier &name) QmlEnginePrivate *ep = QmlEnginePrivate::get(engine); QmlContextPrivate *cp = QmlContextPrivate::get(bindContext); + QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine); if (lastScopeObject) { @@ -214,9 +215,9 @@ QmlContextScriptClass::property(Object *object, const Identifier &name) } else if (lastData) { if (lastData->type) - return ep->typeNameClass->newObject(cp->defaultObjects.at(0), lastData->type); + return Value(scriptEngine, ep->typeNameClass->newObject(cp->defaultObjects.at(0), lastData->type)); else - return ep->typeNameClass->newObject(cp->defaultObjects.at(0), lastData->typeNamespace); + return Value(scriptEngine, ep->typeNameClass->newObject(cp->defaultObjects.at(0), lastData->typeNamespace)); } else if (lastPropertyIndex != -1) { @@ -231,7 +232,7 @@ QmlContextScriptClass::property(Object *object, const Identifier &name) ep->capturedProperties << QmlEnginePrivate::CapturedProperty(bindContext, -1, lastPropertyIndex + cp->notifyIndex); - return rv; + return Value(scriptEngine, rv); } else if(lastDefaultObject != -1) { // Default object property @@ -239,7 +240,7 @@ QmlContextScriptClass::property(Object *object, const Identifier &name) } else { - return lastFunction; + return Value(scriptEngine, lastFunction); } } |