aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlopenmetaobject_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-01-13 12:39:44 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-01-13 14:32:40 +0100
commitf1410debc7905e704b6ed16ae345e43765ef8ef5 (patch)
tree56c0acf733fff7bc08362b753bd7729421169709 /src/qml/qml/qqmlopenmetaobject_p.h
parentcfe0b08b5439a27b4fdd14c29620e0492543f506 (diff)
Add a freeze() method to QQmlPropertyMap
After freezing a QQmlPropertyMap you cannot add any more properties, but in turn the property access is cached, and therefore faster. Task-number: QTBUG-57792 Change-Id: I2c6d768039c3b59eb2411194e463ee0de55f8bed Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlopenmetaobject_p.h')
-rw-r--r--src/qml/qml/qqmlopenmetaobject_p.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h
index f6397c8c59..47bba085b5 100644
--- a/src/qml/qml/qqmlopenmetaobject_p.h
+++ b/src/qml/qml/qqmlopenmetaobject_p.h
@@ -93,8 +93,8 @@ class QQmlOpenMetaObjectPrivate;
class Q_QML_PRIVATE_EXPORT QQmlOpenMetaObject : public QAbstractDynamicMetaObject
{
public:
- QQmlOpenMetaObject(QObject *, const QMetaObject * = nullptr, bool = true);
- QQmlOpenMetaObject(QObject *, QQmlOpenMetaObjectType *, bool = true);
+ QQmlOpenMetaObject(QObject *, const QMetaObject * = nullptr);
+ QQmlOpenMetaObject(QObject *, QQmlOpenMetaObjectType *);
~QQmlOpenMetaObject() override;
QVariant value(const QByteArray &) const;
@@ -115,6 +115,9 @@ public:
// longer automatically called for new properties.
void setCached(bool);
+ bool autoCreatesProperties() const;
+ void setAutoCreatesProperties(bool autoCreate);
+
QQmlOpenMetaObjectType *type() const;
void emitPropertyNotification(const QByteArray &propertyName);