diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-03-28 10:44:48 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-04-11 14:12:09 +0200 |
commit | ec79af7396fd695b25f8f7dba66e8048d54b953b (patch) | |
tree | 68c3d2967228cfc8befecec233c87cec4f039f87 /src/qml/jsruntime/qv4executablecompilationunit.cpp | |
parent | 60d9f0dd737f23ad239bfbdb21573c8a7633a63f (diff) | |
download | qtdeclarative-ec79af7396fd695b25f8f7dba66e8048d54b953b.tar.gz |
DelegateModel: Use actual bindings for required properties
Tracking the change signals is brittle and error prone. We have bindings
for this case. Let's use them. We can construct a synthetic
QV4::Function that contains its own QQmlJSAotFunction. In order to pass
the property index to the function we generalize the "index" property of
QQmlJSAotFunction to contain any extra data the function may want to
use. If there is no compilation unit, we pass that instead.
Fixes: QTBUG-91649
Change-Id: I0758bcc4964a48c6818d18bfb0972e67dbc16a1f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4executablecompilationunit.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4executablecompilationunit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4executablecompilationunit.cpp b/src/qml/jsruntime/qv4executablecompilationunit.cpp index 0a3ceee6c0..1abb24c34e 100644 --- a/src/qml/jsruntime/qv4executablecompilationunit.cpp +++ b/src/qml/jsruntime/qv4executablecompilationunit.cpp @@ -220,7 +220,7 @@ QV4::Function *ExecutableCompilationUnit::linkToEngine(ExecutionEngine *engine) auto advanceAotFunction = [&](int i) -> const QQmlPrivate::AOTCompiledFunction * { if (aotFunction) { if (aotFunction->functionPtr) { - if (aotFunction->index == i) + if (aotFunction->extraData == i) return aotFunction++; } else { aotFunction = nullptr; |