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 3c5cb9f792..60ed501364 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -127,6 +127,7 @@ private slots:
void stringArg();
void conversionDecrement();
void unstoredUndefined();
+ void registerPropagation();
};
void tst_QmlCppCodegen::simpleBinding()
@@ -2318,6 +2319,18 @@ void tst_QmlCppCodegen::unstoredUndefined()
QCOMPARE(o->objectName(), u"NaN"_s);
}
+void tst_QmlCppCodegen::registerPropagation()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/registerPropagation.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+
+ int result = 0;
+ QMetaObject::invokeMethod(o.data(), "test", Q_RETURN_ARG(int, result));
+ QCOMPARE(result, 1);
+}
+
void tst_QmlCppCodegen::runInterpreted()
{
#ifdef Q_OS_ANDROID