diff options
Diffstat (limited to 'src/qml/qml/qqmltype.cpp')
-rw-r--r-- | src/qml/qml/qqmltype.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/qml/qml/qqmltype.cpp b/src/qml/qml/qqmltype.cpp index 46ba0b0829..939522e85e 100644 --- a/src/qml/qml/qqmltype.cpp +++ b/src/qml/qml/qqmltype.cpp @@ -68,6 +68,12 @@ QQmlTypePrivate::~QQmlTypePrivate() qDeleteAll(scopedEnums); for (const auto &metaObject : metaObjects) free(metaObject.metaObject); + + if (const auto &iface = typeId.iface()) { + if (iface->metaObjectFn == &dynamicQmlMetaObject) + QQmlMetaType::unregisterInternalCompositeType(typeId, listId); + } + switch (regType) { case QQmlType::CppType: delete extraData.cd->customParser; @@ -404,12 +410,6 @@ void QQmlTypePrivate::insertEnumsFromPropertyCache( insertEnums(cppMetaObject); } -void QQmlTypePrivate::setContainingType(QQmlType *containingType) -{ - Q_ASSERT(regType == QQmlType::InlineComponentType); - extraData.id->containingType = containingType->d.data(); -} - void QQmlTypePrivate::setName(const QString &uri, const QString &element) { module = uri; @@ -928,14 +928,6 @@ int QQmlType::refCount(const QQmlTypePrivate *priv) return -1; } -QQmlType QQmlType::containingType() const -{ - Q_ASSERT(d && d->regType == QQmlType::RegistrationType::InlineComponentType); - auto ret = QQmlType {d->extraData.id->containingType}; - Q_ASSERT(!ret.isInlineComponentType()); - return ret; -} - void QQmlType::createProxy(QObject *instance) const { if (!d->metaObjects.isEmpty()) |