aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 92b8efc203..e5e7597cb6 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -176,6 +176,7 @@ private slots:
void multipleCtors();
void boolCoercions();
void ambiguousAs();
+ void boolPointerMerge();
};
void tst_QmlCppCodegen::initTestCase()
@@ -3545,6 +3546,18 @@ void tst_QmlCppCodegen::ambiguousAs()
QCOMPARE(o->property("other").value<QObject *>(), nullptr);
}
+void tst_QmlCppCodegen::boolPointerMerge()
+{
+ QQmlEngine e;
+ QQmlComponent c(&e, QUrl(u"qrc:/qt/qml/TestTypes/boolPointerMerge.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+ QObject *item = o->property("item").value<QObject *>();
+ QVERIFY(item);
+ QCOMPARE(item->property("ppp").toInt(), -99);
+}
+
QTEST_MAIN(tst_QmlCppCodegen)
#include "tst_qmlcppcodegen.moc"