From ec79af7396fd695b25f8f7dba66e8048d54b953b Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 28 Mar 2022 10:44:48 +0200 Subject: 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 --- tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp') diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 0a2cbe1478..d9b51fb67c 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -793,7 +793,7 @@ void tst_QmlCppCodegen::failures() = QmlCacheGeneratedCode::_0x5f_TestTypes_failures_qml::aotBuiltFunctions[0]; QVERIFY(aotFailure.argumentTypes.isEmpty()); QVERIFY(!aotFailure.functionPtr); - QCOMPARE(aotFailure.index, 0); + QCOMPARE(aotFailure.extraData, 0); } void tst_QmlCppCodegen::enumScope() -- cgit v1.2.1