aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-12-08 19:11:37 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-12-10 02:42:47 +0100
commit25333a6af2647545f770b2df34e4cb4f7f6217bd (patch)
tree184cd13a99e226c67043c9877531cf88b860a5b2 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
parent0ddb0d4b9b0c70c4fd4058ef4660e38fd933523e (diff)
QmlCompiler: Split type name by last "::" rather than first
The outer type name can include namespaces, the inner one cannot. Task-number: QTBUG-99042 Change-Id: Idaa3abbfa7b4ff0c908edd7fdee5c4e2ba0337dc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 68f7102ecb..ae9f1b7600 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -109,6 +109,7 @@ private slots:
void intEnumCompare();
void attachedSelf();
void functionReturningVoid();
+ void functionCallOnNamespaced();
};
void tst_QmlCppCodegen::simpleBinding()
@@ -1630,6 +1631,17 @@ void tst_QmlCppCodegen::functionReturningVoid()
QVERIFY(!o->property("bb").isValid());
}
+void tst_QmlCppCodegen::functionCallOnNamespaced()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/TestTypes/themergood.qml"_qs));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(o);
+
+ QCOMPARE(o->property("i").toInt(), 12);
+}
+
void tst_QmlCppCodegen::runInterpreted()
{
if (qEnvironmentVariableIsSet("QV4_FORCE_INTERPRETER"))