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.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 6b4f604d00..b8364a51b2 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -117,6 +117,7 @@ private slots:
void interceptor();
void interestingFiles();
void interestingFiles_data();
+ void internalConversion();
void invalidPropertyType();
void invisibleBase();
void invisibleListElementType();
@@ -2208,6 +2209,21 @@ void tst_QmlCppCodegen::interestingFiles_data()
QTest::addRow("moveRegVoid") << u"moveRegVoid.qml"_s << true;
}
+void tst_QmlCppCodegen::internalConversion()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/internalConversion.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> obj(c.create());
+ QVERIFY(!obj.isNull());
+
+ QObject *offset = obj->property("offset").value<QObject *>();
+ QVERIFY(offset);
+
+ QCOMPARE(offset->objectName(), "hello"_L1);
+ QCOMPARE(offset->property("mark").toString(), "hello"_L1);
+}
+
void tst_QmlCppCodegen::invalidPropertyType()
{
// Invisible on purpose