aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycache_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-01-07 11:51:37 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-07 15:34:19 +0100
commit05fd01c14a7a4b26f366704fb0b0a4eddaceccf4 (patch)
tree583f404187502c83721db32e901bb8ed108ab51d /src/qml/qml/qqmlpropertycache_p.h
parent353e43cb6d73ee97ebff1a8c737b2c133b135ab8 (diff)
Fix property access and method invocation on value types that use inheritance
For gadgets/value types we use moc's static_metacall, which doesn't call the parent class implementation. Therefore before placing a static metacall we must resolve the indicies and find the right meta-object. Change-Id: I258e3d9ecfc704498c68772dc42b16134a3bfd83 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache_p.h')
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 77bbd3dc14..033ff1de31 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -432,6 +432,10 @@ public:
static bool canConvert(const QQmlMetaObject &from, const QQmlMetaObject &to);
+ // static_metacall (on Gadgets) doesn't call the base implementation and therefore
+ // we need a helper to find the correct meta object and property/method index.
+ static void resolveGadgetMethodOrPropertyIndex(QMetaObject::Call type, const QMetaObject **metaObject, int *index);
+
protected:
QBiPointer<QQmlPropertyCache, const QMetaObject> _m;
};