diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-01-07 11:51:37 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2015-01-07 15:34:19 +0100 |
commit | 05fd01c14a7a4b26f366704fb0b0a4eddaceccf4 (patch) | |
tree | 583f404187502c83721db32e901bb8ed108ab51d /src/qml/qml/qqmlvaluetype.cpp | |
parent | 353e43cb6d73ee97ebff1a8c737b2c133b135ab8 (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/qqmlvaluetype.cpp')
-rw-r--r-- | src/qml/qml/qqmlvaluetype.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvaluetype.cpp b/src/qml/qml/qqmlvaluetype.cpp index e901a9c0d7..7f0e3a3a61 100644 --- a/src/qml/qml/qqmlvaluetype.cpp +++ b/src/qml/qml/qqmlvaluetype.cpp @@ -231,7 +231,9 @@ void QQmlValueType::objectDestroyed(QObject *) int QQmlValueType::metaCall(QObject *, QMetaObject::Call type, int _id, void **argv) { - d.static_metacall(reinterpret_cast<QObject*>(gadgetPtr), type, _id, argv); + const QMetaObject *mo = _metaObject; + QQmlMetaObject::resolveGadgetMethodOrPropertyIndex(type, &mo, &_id); + mo->d.static_metacall(reinterpret_cast<QObject*>(gadgetPtr), type, _id, argv); return _id; } |