summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-28 00:21:01 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-28 00:21:01 (GMT)
commit01885076b037bdd6624744fe67b7de849f26fef3 (patch)
tree9f78647a3e07c31c3dca359472e59fce50c387cf /src/declarative/qml
parentd72970e54390f00be28efaac148b55f027a1eb69 (diff)
parent5f9091771eaa26db5ad35e4788c13ac011512b61 (diff)
downloadQt-01885076b037bdd6624744fe67b7de849f26fef3.zip
Qt-01885076b037bdd6624744fe67b7de849f26fef3.tar.gz
Qt-01885076b037bdd6624744fe67b7de849f26fef3.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp1
-rw-r--r--src/declarative/qml/qmlvmemetaobject.cpp6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 60282dc..ad74446 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -2234,6 +2234,7 @@ bool QmlCompiler::buildDynamicMeta(QmlParser::Object *obj, DynamicMetaMode mode)
}
sig.append(")");
QMetaMethodBuilder b = builder.addSlot(sig);
+ b.setReturnType("QVariant");
b.setParameterNames(s.parameterNames);
((QmlVMEMetaData *)dynamicData.data())->methodCount++;
diff --git a/src/declarative/qml/qmlvmemetaobject.cpp b/src/declarative/qml/qmlvmemetaobject.cpp
index 3e1d931..83f904b 100644
--- a/src/declarative/qml/qmlvmemetaobject.cpp
+++ b/src/declarative/qml/qmlvmemetaobject.cpp
@@ -269,10 +269,11 @@ int QmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
QString code = QString::fromRawData(body, data->bodyLength);
+ QVariant rv;
if (0 == (metaData->methodData() + id)->parameterCount) {
QmlExpression expr(ctxt, code, object);
expr.setTrackChange(false);
- expr.value();
+ rv = expr.value();
} else {
QmlContext newCtxt(ctxt);
QMetaMethod m = method(_id);
@@ -281,8 +282,9 @@ int QmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
newCtxt.setContextProperty(QString::fromLatin1(names.at(ii)), *(QVariant *)a[ii + 1]);
QmlExpression expr(&newCtxt, code, object);
expr.setTrackChange(false);
- expr.value();
+ rv = expr.value();
}
+ if (a[0]) *reinterpret_cast<QVariant *>(a[0]) = rv;
}
return -1;
}