summaryrefslogtreecommitdiff
path: root/src/quick
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-11 10:19:37 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-08-19 11:38:27 +0000
commitef4ad30e7f16185b9bd299457836a27b56ce1fa5 (patch)
tree88e78ee469778b654a276e40cfc544114be3bdf5 /src/quick
parent8fe2e6795d9030a7c6f660a0e57b0d85fc36a1f1 (diff)
downloadqtdeclarative-ef4ad30e7f16185b9bd299457836a27b56ce1fa5.tar.gz
qtdeclarative-ef4ad30e7f16185b9bd299457836a27b56ce1fa5.tar.bz2
qtdeclarative-ef4ad30e7f16185b9bd299457836a27b56ce1fa5.zip
Switch to the non compat metacall overload
This one passes in the qobject that the metacall is being applied to. The long term goal is to make the vme meta object independent of the QObject instance. Change-Id: Ide34b8637b9963bdb5e87e4aa6e9c2ee825293f7 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/designer/qqmldesignermetaobject.cpp12
-rw-r--r--src/quick/designer/qqmldesignermetaobject_p.h4
2 files changed, 9 insertions, 7 deletions
diff --git a/src/quick/designer/qqmldesignermetaobject.cpp b/src/quick/designer/qqmldesignermetaobject.cpp
index e80012ba3..76c94b242 100644
--- a/src/quick/designer/qqmldesignermetaobject.cpp
+++ b/src/quick/designer/qqmldesignermetaobject.cpp
@@ -226,7 +226,7 @@ int QQmlDesignerMetaObject::propertyOffset() const
return cache->propertyOffset();
}
-int QQmlDesignerMetaObject::openMetaCall(QMetaObject::Call call, int id, void **a)
+int QQmlDesignerMetaObject::openMetaCall(QObject *o, QMetaObject::Call call, int id, void **a)
{
if ((call == QMetaObject::ReadProperty || call == QMetaObject::WriteProperty)
&& id >= m_type->propertyOffset()) {
@@ -248,14 +248,16 @@ int QQmlDesignerMetaObject::openMetaCall(QMetaObject::Call call, int id, void **
} else {
QAbstractDynamicMetaObject *directParent = parent();
if (directParent)
- return directParent->metaCall(call, id, a);
+ return directParent->metaCall(o, call, id, a);
else
return myObject()->qt_metacall(call, id, a);
}
}
-int QQmlDesignerMetaObject::metaCall(QMetaObject::Call call, int id, void **a)
+int QQmlDesignerMetaObject::metaCall(QObject *o, QMetaObject::Call call, int id, void **a)
{
+ Q_ASSERT(myObject() == o);
+
int metaCallReturnValue = -1;
const QMetaProperty propertyById = QQmlVMEMetaObject::property(id);
@@ -288,9 +290,9 @@ int QQmlDesignerMetaObject::metaCall(QMetaObject::Call call, int id, void **a)
QAbstractDynamicMetaObject *directParent = parent();
if (directParent && id < directParent->propertyOffset()) {
- metaCallReturnValue = directParent->metaCall(call, id, a);
+ metaCallReturnValue = directParent->metaCall(o, call, id, a);
} else {
- openMetaCall(call, id, a);
+ openMetaCall(o, call, id, a);
}
diff --git a/src/quick/designer/qqmldesignermetaobject_p.h b/src/quick/designer/qqmldesignermetaobject_p.h
index eca4fb6a9..47f4baad2 100644
--- a/src/quick/designer/qqmldesignermetaobject_p.h
+++ b/src/quick/designer/qqmldesignermetaobject_p.h
@@ -68,8 +68,8 @@ protected:
static QQmlDesignerMetaObject* getNodeInstanceMetaObject(QObject *object, QQmlEngine *engine);
void createNewDynamicProperty(const QString &name);
- int openMetaCall(QMetaObject::Call _c, int _id, void **_a);
- int metaCall(QMetaObject::Call _c, int _id, void **_a);
+ int openMetaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a);
+ int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a);
void notifyPropertyChange(int id);
void setValue(int id, const QVariant &value);
QVariant propertyWriteValue(int, const QVariant &);