summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlobjectscriptclass.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-11-30 09:14:24 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-11-30 09:14:24 (GMT)
commite927cdd850053bd59c57056b72607853783bf35f (patch)
tree168df2ed5706db8e5871d7ff01870754be248603 /src/declarative/qml/qmlobjectscriptclass.cpp
parentbd2ba54d85415047a581b7b441309572a756dcc5 (diff)
downloadQt-e927cdd850053bd59c57056b72607853783bf35f.zip
Qt-e927cdd850053bd59c57056b72607853783bf35f.tar.gz
Qt-e927cdd850053bd59c57056b72607853783bf35f.tar.bz2
Two way WorkerScript communications
Diffstat (limited to 'src/declarative/qml/qmlobjectscriptclass.cpp')
-rw-r--r--src/declarative/qml/qmlobjectscriptclass.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlobjectscriptclass.cpp b/src/declarative/qml/qmlobjectscriptclass.cpp
index 1a6f724..f78a12a 100644
--- a/src/declarative/qml/qmlobjectscriptclass.cpp
+++ b/src/declarative/qml/qmlobjectscriptclass.cpp
@@ -229,12 +229,16 @@ QScriptValue QmlObjectScriptClass::property(QObject *obj, const Identifier &name
} else if (lastData->flags & QmlPropertyCache::Data::IsQmlList) {
return enginePriv->listClass->newList(obj, lastData->coreIndex,
QmlListScriptClass::QmlListPtr);
- } if (lastData->flags & QmlPropertyCache::Data::IsQObjectDerived) {
+ } else if (lastData->flags & QmlPropertyCache::Data::IsQObjectDerived) {
QObject *rv = 0;
void *args[] = { &rv, 0 };
QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
-
return newQObject(rv, lastData->propType);
+ } else if (lastData->flags & QmlPropertyCache::Data::IsQScriptValue) {
+ QScriptValue rv = scriptEngine->nullValue();
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return rv;
} else {
QVariant var = obj->metaObject()->property(lastData->coreIndex).read(obj);
return enginePriv->scriptValueFromVariant(var);