From 2afb055609dedb79f232b32f704cce33ffd5778d Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Fri, 5 Mar 2021 13:20:05 +0100 Subject: QQmlMetaType: Remove qmlLists member Instead of using a hashmap which maps a QML lists metatype to its list element's metatype, we can just store a pointer in the list metatype to the element metatype. Moreover, listType now returns a metatype. This is a preparation for converting enginePriv->rawMetaObjectForType(typeId) to metaType.metaObject() calls once we can actually retrieve the metaobject from QML metatypes. The QML metatype interface classes are moved into a header, so that Qt for Python can use the same classes. This does not affect types registered from C++, as those use a different mechanism. Task-number: QTBUG-88766 Task-number: QTBUG-82931 Task-number: QTBUG-87134 Change-Id: I330c2bbe4ac92072a333c001750f7504b56df478 Reviewed-by: Ulf Hermann Reviewed-by: Qt CI Bot --- src/qml/jsruntime/qv4qmlcontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4qmlcontext.cpp') diff --git a/src/qml/jsruntime/qv4qmlcontext.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp index 5581ea9a53..18d611f2c3 100644 --- a/src/qml/jsruntime/qv4qmlcontext.cpp +++ b/src/qml/jsruntime/qv4qmlcontext.cpp @@ -126,7 +126,7 @@ static OptionalReturnedValue searchContextProperties( QQmlListProperty prop(context->asQQmlContext(), (void*) qintptr(propertyIdx), QQmlContextPrivate::context_count, QQmlContextPrivate::context_at); - return OptionalReturnedValue(QmlListWrapper::create(v4, prop, qMetaTypeId >())); + return OptionalReturnedValue(QmlListWrapper::create(v4, prop, QMetaType::fromType >())); } return OptionalReturnedValue(v4->fromVariant(cp->propertyValue(propertyIdx))); } -- cgit v1.2.3