aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/util/qqmlpropertymap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/util/qqmlpropertymap.cpp')
-rw-r--r--src/qml/util/qqmlpropertymap.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/qml/util/qqmlpropertymap.cpp b/src/qml/util/qqmlpropertymap.cpp
index 6e6554f2c3..b54e8d901a 100644
--- a/src/qml/util/qqmlpropertymap.cpp
+++ b/src/qml/util/qqmlpropertymap.cpp
@@ -186,9 +186,8 @@ int QQmlPropertyMapMetaObject::createProperty(const char *name, const char *valu
Constructs a bindable map with parent object \a parent.
*/
QQmlPropertyMap::QQmlPropertyMap(QObject *parent)
-: QObject(*allocatePrivate(), parent)
+: QQmlPropertyMap(&staticMetaObject, parent)
{
- init(metaObject());
}
/*!
@@ -339,18 +338,13 @@ QVariant QQmlPropertyMap::updateValue(const QString &key, const QVariant &input)
}
/*! \internal */
-void QQmlPropertyMap::init(const QMetaObject *staticMetaObject)
+QQmlPropertyMap::QQmlPropertyMap(const QMetaObject *staticMetaObject, QObject *parent)
+ : QObject(*(new QQmlPropertyMapPrivate), parent)
{
Q_D(QQmlPropertyMap);
d->mo = new QQmlPropertyMapMetaObject(this, d, staticMetaObject);
}
-/*! \internal */
-QObjectPrivate *QQmlPropertyMap::allocatePrivate()
-{
- return new QQmlPropertyMapPrivate;
-}
-
/*!
\fn void QQmlPropertyMap::valueChanged(const QString &key, const QVariant &value)
This signal is emitted whenever one of the values in the map is changed. \a key