aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqml.cpp
diff options
context:
space:
mode:
authorSami Shalayel <sami.shalayel@qt.io>2022-11-09 17:39:23 +0100
committerSami Shalayel <sami.shalayel@qt.io>2022-11-15 11:52:45 +0100
commitd9d247746423f6a9f1f36aa9be14fad1edcd6616 (patch)
tree4ca3b1b519e5957338117ec0bd017be95b963c64 /src/qml/qml/qqml.cpp
parent1fc939a870ce4520688fcf92948851fa06c6926a (diff)
Remove signal index mismatch in aot-compiled code
There are multiple types of signal indexes, one of them belongs to QMetaMethod::signalIndex and another one to QObjectPrivate::signalIndex. Stop mixing them up in aot-compiled code when capturing properties as this leads to weird and hard to debug bugs. Add a smaller version of the drag and drop example as test to make sure that the bug does not appear again, without any visual elements. Fixes: QTBUG-104047 Fixes: QTBUG-104716 Pick-to: 6.4 6.2 Change-Id: I4f64ba237e824ff0ba1624c29ddcf5371d03d69e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqml.cpp')
-rw-r--r--src/qml/qml/qqml.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp
index d5e98f1805..5e99f92bc7 100644
--- a/src/qml/qml/qqml.cpp
+++ b/src/qml/qml/qqml.cpp
@@ -1022,7 +1022,8 @@ static ObjectLookupResult initObjectLookup(
// & 1 to tell the gc that this is not heap allocated; see markObjects in qv4lookup_p.h
l->qobjectFallbackLookup.metaObject = quintptr(metaObject) + 1;
l->qobjectFallbackLookup.coreIndex = coreIndex;
- l->qobjectFallbackLookup.notifyIndex = property.notifySignalIndex();
+ l->qobjectFallbackLookup.notifyIndex =
+ QMetaObjectPrivate::signalIndex(property.notifySignal());
l->qobjectFallbackLookup.isConstant = property.isConstant() ? 1 : 0;
return ObjectLookupResult::Fallback;
}