From 3179d424b8d3a3453bc946a69d37c05c2e55ff60 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 3 Nov 2025 12:47:32 +0100 Subject: QtQml: Fix marking of values on AOT stack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to pop the value that's being processed before we push further values. Amends commit 2d016a2653c59f10a57dc1903b817f71d16d0622. Fixes: QTBUG-141646 Pick-to: 6.10 6.8 Change-Id: I92c69d612891d4360d83348c4df707389dda582a Reviewed-by: Olivier De Cannière Reviewed-by: Sami Shalayel --- tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (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 e970679c51..d4dc441a0e 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -1165,6 +1165,13 @@ void tst_QmlCppCodegen::collectGarbageDuringAotCode() QCOMPARE(inner->objectName(), u"dynamic"_s); QCOMPARE(o->property("gcRun").toInt(), 1); + + QQmlComponent c2(&engine, QUrl(u"qrc:/qt/qml/TestTypes/markRecursive.qml"_s)); + QVERIFY2(c2.isReady(), qPrintable(c2.errorString())); + QScopedPointer o2(c2.create()); + QVERIFY(!o2.isNull()); + + QTRY_COMPARE_GT(o2->objectName().toInt(), 10); } void tst_QmlCppCodegen::colorAsVariant() -- cgit v1.2.3