aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/util/qqmlpropertymap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/util/qqmlpropertymap.h')
-rw-r--r--src/qml/util/qqmlpropertymap.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/util/qqmlpropertymap.h b/src/qml/util/qqmlpropertymap.h
index bfd11e5c80..f7d69be7fb 100644
--- a/src/qml/util/qqmlpropertymap.h
+++ b/src/qml/util/qqmlpropertymap.h
@@ -82,7 +82,18 @@ Q_SIGNALS:
protected:
virtual QVariant updateValue(const QString &key, const QVariant &input);
+ template<class DerivedType>
+ QQmlPropertyMap(DerivedType *derived, QObject *parent = 0)
+ : QObject(*allocatePrivate(), parent)
+ {
+ Q_UNUSED(derived)
+ init(&DerivedType::staticMetaObject);
+ }
+
private:
+ void init(const QMetaObject *staticMetaObject);
+ static QObjectPrivate *allocatePrivate();
+
Q_DECLARE_PRIVATE(QQmlPropertyMap)
Q_DISABLE_COPY(QQmlPropertyMap)
};