diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-13 12:39:44 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-13 14:32:40 +0100 |
commit | f1410debc7905e704b6ed16ae345e43765ef8ef5 (patch) | |
tree | 56c0acf733fff7bc08362b753bd7729421169709 /src/qml/util/qqmlpropertymap.h | |
parent | cfe0b08b5439a27b4fdd14c29620e0492543f506 (diff) | |
download | qtdeclarative-f1410debc7905e704b6ed16ae345e43765ef8ef5.tar.gz |
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/util/qqmlpropertymap.h')
-rw-r--r-- | src/qml/util/qqmlpropertymap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/util/qqmlpropertymap.h b/src/qml/util/qqmlpropertymap.h index 556754c021..de070673d7 100644 --- a/src/qml/util/qqmlpropertymap.h +++ b/src/qml/util/qqmlpropertymap.h @@ -62,6 +62,7 @@ public: void insert(const QString &key, const QVariant &value); void insert(const QVariantHash &values); void clear(const QString &key); + void freeze(); Q_INVOKABLE QStringList keys() const; |