diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-02-07 11:16:35 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-18 13:59:40 +0000 |
commit | 8aea79d9087805e14d1d1f13bd60a561abbe9f23 (patch) | |
tree | 566eec529f66dbf7c0f263602be1bf4841692fe2 /src/qml/qml/qqmltype.cpp | |
parent | 43573c8df170c5662b350703a06537c457c2d2fd (diff) |
Move propertyCache-by-minor-version into QQmlMetaTypeData
Ths data structure should only be accessed when protected by the
metatype data lock. In fact we don't access it from anywhere else.
To make that more obvious, move it to the right place.
This allows us to eliminate some const_cast and poking around in
QQmlTypePrivate from the outside.
Change-Id: I16ffd240b9504b9c00010bdb2d17b05c8196fe8a
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltype.cpp')
-rw-r--r-- | src/qml/qml/qqmltype.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/qml/qml/qqmltype.cpp b/src/qml/qml/qqmltype.cpp index 5caeb8c1b0..88eedec061 100644 --- a/src/qml/qml/qqmltype.cpp +++ b/src/qml/qml/qqmltype.cpp @@ -509,25 +509,6 @@ void QQmlTypePrivate::setName(const QString &uri, const QString &element) name = uri.isEmpty() ? element : (uri + QLatin1Char('/') + element); } -QQmlPropertyCache *QQmlTypePrivate::propertyCacheForMinorVersion(int minorVersion) const -{ - for (int i = 0; i < propertyCaches.count(); ++i) - if (propertyCaches.at(i).minorVersion == minorVersion) - return propertyCaches.at(i).cache.data(); - return nullptr; -} - -void QQmlTypePrivate::setPropertyCacheForMinorVersion(int minorVersion, QQmlPropertyCache *cache) -{ - for (int i = 0; i < propertyCaches.count(); ++i) { - if (propertyCaches.at(i).minorVersion == minorVersion) { - propertyCaches[i].cache = cache; - return; - } - } - propertyCaches.append(PropertyCacheByMinorVersion(cache, minorVersion)); -} - QByteArray QQmlType::typeName() const { if (d) { |