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.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 4acc200249..f96efacd3f 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -129,6 +129,7 @@ private slots:
void unstoredUndefined();
void registerPropagation();
void argumentConversion();
+ void badSequence();
};
void tst_QmlCppCodegen::simpleBinding()
@@ -2378,6 +2379,29 @@ void tst_QmlCppCodegen::argumentConversion()
QCOMPARE(o->property("f").toDouble(), 10.0);
}
+void tst_QmlCppCodegen::badSequence()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/badSequence.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+
+ Person *self = qobject_cast<Person *>(o.data());
+ QVERIFY(self); QVERIFY(self->barzles().isEmpty());
+
+ Person *other = o->property("other").value<Person *>();
+ QVERIFY(other);
+
+ QVERIFY(other->barzles().isEmpty());
+
+ Barzle f1;
+ Barzle f2;
+ const QList<Barzle *> barzles { &f1, &f2 };
+
+ other->setBarzles(barzles);
+ QCOMPARE(self->barzles(), barzles);
+}
+
void tst_QmlCppCodegen::runInterpreted()
{
#ifdef Q_OS_ANDROID