aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-08-24 14:10:41 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2020-08-28 13:49:08 +0200
commit8248b5a485a2b8885442d6511906526548d9d07e (patch)
tree07d17281483f54fcbe28ed5a1add80ae0313e381 /src/qml/qml/qqmlengine.cpp
parent43a532deffce7ee8c273dbff19c1b0ca941e636d (diff)
Always group the metaType and listType together
They are always created and destroyed together, so grouping them makes the required memory management of them easier. Change-Id: Ia1980f31f9bdff6a1accd229bc8380ae153edf67 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index d7cca8e3fc..7191da694d 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -651,7 +651,7 @@ QQmlEnginePrivate::~QQmlEnginePrivate()
for (auto iter = m_compositeTypes.cbegin(), end = m_compositeTypes.cend(); iter != end; ++iter) {
iter.value()->isRegisteredWithEngine = false;
- QQmlMetaType::unregisterInternalCompositeType({iter.value()->metaTypeId, iter.value()->listMetaTypeId});
+ QQmlMetaType::unregisterInternalCompositeType(iter.value()->typeIds);
}
#if QT_CONFIG(qml_debug)
delete profiler;
@@ -2248,7 +2248,7 @@ int QQmlEnginePrivate::listType(int t) const
static QQmlPropertyCache *propertyCacheForPotentialInlineComponentType(int t, const QHash<int, QV4::ExecutableCompilationUnit *>::const_iterator &iter) {
- if (t != (*iter)->metaTypeId.id()) {
+ if (t != (*iter)->typeIds.id.id()) {
// this is an inline component, and what we have in the iterator is currently the parent compilation unit
for (auto &&icDatum: (*iter)->inlineComponentData)
if (icDatum.typeIds.id.id() == t)
@@ -2351,7 +2351,7 @@ void QQmlEnginePrivate::registerInternalCompositeType(QV4::ExecutableCompilation
Locker locker(this);
// The QQmlCompiledData is not referenced here, but it is removed from this
// hash in the QQmlCompiledData destructor
- m_compositeTypes.insert(compilationUnit->metaTypeId.id(), compilationUnit);
+ m_compositeTypes.insert(compilationUnit->typeIds.id.id(), compilationUnit);
for (auto &&data: compilationUnit->inlineComponentData)
m_compositeTypes.insert(data.typeIds.id.id(), compilationUnit);
}
@@ -2361,7 +2361,7 @@ void QQmlEnginePrivate::unregisterInternalCompositeType(QV4::ExecutableCompilati
compilationUnit->isRegisteredWithEngine = false;
Locker locker(this);
- m_compositeTypes.remove(compilationUnit->metaTypeId.id());
+ m_compositeTypes.remove(compilationUnit->typeIds.id.id());
for (auto&& icDatum: compilationUnit->inlineComponentData)
m_compositeTypes.remove(icDatum.typeIds.id.id());
}