aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproxymetaobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-09-10 14:29:28 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-09-25 18:53:13 +0000
commit10a712eb980f32492c65dcb8441f6c5d29192a82 (patch)
tree3eacea58472a7a275bd171382b406d8d0fae4e6c /src/qml/qml/qqmlproxymetaobject.cpp
parent9d58167d352b2f860f473fd74b63541d7659b811 (diff)
Reimplement the right metaCall() method
The goal should be to make these dynamic metaobjects independent of the concrete QObject instance. Change-Id: I13448420d15792918cc30e994a8d6d83216a0a1a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlproxymetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlproxymetaobject.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlproxymetaobject.cpp b/src/qml/qml/qqmlproxymetaobject.cpp
index bf735a9f0c..ba5215b831 100644
--- a/src/qml/qml/qqmlproxymetaobject.cpp
+++ b/src/qml/qml/qqmlproxymetaobject.cpp
@@ -59,8 +59,10 @@ QQmlProxyMetaObject::~QQmlProxyMetaObject()
proxies = 0;
}
-int QQmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
+int QQmlProxyMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void **a)
{
+ Q_ASSERT(object == o);
+
if ((c == QMetaObject::ReadProperty ||
c == QMetaObject::WriteProperty) &&
id >= metaObjects->last().propertyOffset) {
@@ -108,7 +110,7 @@ int QQmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
}
if (parent)
- return parent->metaCall(c, id, a);
+ return parent->metaCall(o, c, id, a);
else
return object->qt_metacall(c, id, a);
}