From cca07aa78841f2d743f0b4d933abb0dd66f0b948 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 28 Aug 2025 17:07:48 +0200 Subject: QmlCompiler: Fix access to optional QVariantMap Without this, it tries to resolve the metaObject of QVariantMap, which crashes. Fixes: QTBUG-139626 Pick-to: 6.10 6.9 6.8 Change-Id: I9248f57c428810024f9983df959f475e6557576c Reviewed-by: Sami Shalayel --- tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 1 + 1 file changed, 1 insertion(+) (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 df26b97488..8bddd2cca0 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -5828,6 +5828,7 @@ void tst_QmlCppCodegen::variantMapLookup() QScopedPointer o(c.create()); QVERIFY(!o.isNull()); QCOMPARE(o->property("i"), 42); + QCOMPARE(o->property("j"), 42); } void tst_QmlCppCodegen::variantReturn() -- cgit v1.2.3