aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlopenmetaobject.cpp
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-07-26 14:15:49 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-27 06:09:11 +0200
commit54c2d685512fdeac2d5b6eeaf25ed738c4fd99ba (patch)
tree27acf485b787f825525d20b7a160d45fde678360 /src/qml/qml/qqmlopenmetaobject.cpp
parent73842034aac7b9788add4f1ba6cf7a9ec6057598 (diff)
Allow access to signals and slots in QQmlPropertyMap inheritors
Allow inheritors of QQmlPropertyMap to pass the static meta object information needed to support their signals and slots. If the correct pointer is not provided to the constructor, it is not accessible via the virtual metaObject() function during construction. Task-number: QTBUG-26400 Change-Id: Ide8c6d3568e4abd4c48e0aa60e6fa05a9c2a11cf Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlopenmetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlopenmetaobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlopenmetaobject.cpp b/src/qml/qml/qqmlopenmetaobject.cpp
index 4774f7e126..bd40cc3993 100644
--- a/src/qml/qml/qqmlopenmetaobject.cpp
+++ b/src/qml/qml/qqmlopenmetaobject.cpp
@@ -175,13 +175,13 @@ public:
bool cacheProperties;
};
-QQmlOpenMetaObject::QQmlOpenMetaObject(QObject *obj, bool automatic)
+QQmlOpenMetaObject::QQmlOpenMetaObject(QObject *obj, const QMetaObject *base, bool automatic)
: d(new QQmlOpenMetaObjectPrivate(this))
{
d->autoCreate = automatic;
d->object = obj;
- d->type = new QQmlOpenMetaObjectType(obj->metaObject(), 0);
+ d->type = new QQmlOpenMetaObjectType(base ? base : obj->metaObject(), 0);
d->type->d->referers.insert(this);
QObjectPrivate *op = QObjectPrivate::get(obj);