aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-08-09 17:01:38 +0200
committerUlf Hermann <ulf.hermann@qt.io>2024-09-24 13:58:33 +0200
commit815965f8fcb0b9b8bfc6b7591bc2153ec8d8f37b (patch)
tree1ed94431b93a0b9cc213d45dc8df80b1beffd423 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
parentead73cecab89810b27f27d34ab74e280e3614888 (diff)
QtQml: Allow initialization of value types with object types
If the value type has a suitable ctor, we can pass it a pointer to the object just created. Change-Id: I146c7dfc4f879ceb26201511d1c3b4127ad90dbe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 888bb098e5..32c313c2a8 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -3504,7 +3504,8 @@ void tst_QmlCppCodegen::multipleCtors()
QCOMPARE(o->property("wr").value<ValueTypeWithLength>().length(), 3);
QCOMPARE(o->property("wp").value<ValueTypeWithLength>().length(), 11);
QCOMPARE(o->property("wi").value<ValueTypeWithLength>().length(), 17);
- QCOMPARE(o->property("wo").value<ValueTypeWithLength>().length(), -4);
+ QCOMPARE(o->property("wo").value<ValueTypeWithLength>().length(), 5);
+ QCOMPARE(o->property("wz").value<ValueTypeWithLength>().length(), 8);
}
void tst_QmlCppCodegen::namespaceWithEnum()