aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-05-18 11:44:55 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-05-18 18:44:40 +0200
commit53c7211a24f0c5f06d2ed18de10e04bd68fc3d72 (patch)
treece3c5d79c0f32a0f4da371d24825df2c89a05470
parentbb6f9c502d6ed57f2f634c2775011dba40981c63 (diff)
Accept any QQmlListProperty in place of another as AOT lookup result
We often use QQmlListProperty<QObject> as generic type for any list property. This is somewhat dangerous, but unavoidable for now. Change-Id: I9eba2829eaa84aaffe193365f46f406c30fdbf69 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/qml/qml/qqml.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp
index 2e1a535217..fd20b43acf 100644
--- a/src/qml/qml/qqml.cpp
+++ b/src/qml/qml/qqml.cpp
@@ -786,7 +786,10 @@ static bool initObjectLookup(
return false;
const QMetaType propType = property->propType();
- if (type.flags() & QMetaType::PointerToQObject) {
+ if ((type.flags() & QMetaType::IsQmlList) && (propType.flags() & QMetaType::IsQmlList)) {
+ // We want to check the value types here, but we cannot easily do it.
+ // Internally those are all QObject* lists, though.
+ } else if (type.flags() & QMetaType::PointerToQObject) {
// We accept any base class as type, too
const QMetaObject *typeMetaObject = type.metaObject();