diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-01-25 16:17:09 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-01-25 16:33:01 +0100 |
commit | be26ca6bcaaf0ddd7337cb8ff856a2e97866278a (patch) | |
tree | 03861d9dae6d855e6aa41e3f03e1c67b7aa2b1d0 /src/qml | |
parent | 0472ee85ec25ca14a96d61fb051fa189674605a9 (diff) |
QQmlPropertyCache: use more efficient addProperty overload
As we already have the metatype of the property, we can use the more
efficient QMetaObjectBuilder::addProperty method which avoids a
name to metatype lookup.
Task-number: QTBUG-88766
Change-Id: Iab8c22556cb15d35337f266e533cb0d907232421
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index ddd49a601d..114c5fec10 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -1051,7 +1051,8 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) notifierId = data->notifyIndex() - signalHandlerIndexCacheStart; QMetaPropertyBuilder property = builder.addProperty(properties.at(ii).first.toUtf8(), - QMetaType(data->propType()).name(), + data->propType().name(), + data->propType(), notifierId); property.setReadable(true); |