QmlCompiler: Wrap sequences with unknown elemnts in QVariantList
Otherwise we later try to perform value type lookups on them. That won't
work.
Task-number: QTBUG-110438
Change-Id: I1690a3375841ba5a1ff1a471a7f88bd2023ab4c4
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c9b8b06117
)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
ebbbe3ce0e
commit
b3f81380bd
|
@ -733,6 +733,7 @@ QQmlJSScope::ConstPtr QQmlJSTypeResolver::genericType(
|
|||
break;
|
||||
}
|
||||
}
|
||||
return m_variantListType;
|
||||
}
|
||||
|
||||
return m_varType;
|
||||
|
|
|
@ -3,4 +3,5 @@ import TestTypes
|
|||
Person {
|
||||
property Person other: Person { id: oo }
|
||||
barzles: oo.barzles
|
||||
property int l: oo.barzles.length
|
||||
}
|
||||
|
|
|
@ -2473,6 +2473,7 @@ void tst_QmlCppCodegen::badSequence()
|
|||
|
||||
other->setBarzles(barzles);
|
||||
QCOMPARE(self->barzles(), barzles);
|
||||
QCOMPARE(self->property("l").toInt(), 2);
|
||||
}
|
||||
|
||||
void tst_QmlCppCodegen::enumLookup()
|
||||
|
|
Loading…
Reference in New Issue