From 6eff3465b5192e40343f0486ef7076da2ed28bed Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 24 Feb 2022 08:57:44 +0100 Subject: QmlCompiler: Implement generate_DefineArray Using the type cloning and adaption mechanism we can now determine what kind of list we have to create in order to avoid a later conversion. We can even propagate the type adjustment into the element types we read. Fixes: QTBUG-100157 Change-Id: Ia2f160ebae56f39ee5946f49d2f8c5b4986a6b77 Reviewed-by: Qt CI Bot Reviewed-by: Fabian Kosmale --- src/qmlcompiler/qqmljsfunctioninitializer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qmlcompiler/qqmljsfunctioninitializer.cpp') diff --git a/src/qmlcompiler/qqmljsfunctioninitializer.cpp b/src/qmlcompiler/qqmljsfunctioninitializer.cpp index c993197399..ce8df3148f 100644 --- a/src/qmlcompiler/qqmljsfunctioninitializer.cpp +++ b/src/qmlcompiler/qqmljsfunctioninitializer.cpp @@ -188,7 +188,7 @@ QQmlJSCompilePass::Function QQmlJSFunctionInitializer::run( const auto property = m_objectType->property(propertyName); function.returnType = property.isList() - ? m_typeResolver->listType(property.type()) + ? m_typeResolver->listType(property.type(), QQmlJSTypeResolver::UseQObjectList) : QQmlJSScope::ConstPtr(property.type()); -- cgit v1.2.3