aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmltyperegistrar
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-04-28 16:55:22 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-05-18 18:57:56 +0200
commit79b742fb84abe699ff726eec548793880cfa7527 (patch)
tree2947c614ac2453e44cbc3a6f45dca438d6486e8b /tests/auto/qml/qmltyperegistrar
parent1e30ec77aaedcc29ba7ac1c3ec3937ee0b8287e9 (diff)
Preserve access semantics in qmltypes
gadget types are accessed with value semantics, object types are accessed with reference semantics, and namespaces are not accessed. Change-Id: I5eb8f132d729416f28bf94e651f877fc4a9a5c77 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmltyperegistrar')
-rw-r--r--tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp6
-rw-r--r--tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp
index 1cfcd689c6..bf71835e43 100644
--- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp
+++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp
@@ -75,4 +75,10 @@ void tst_qmltyperegistrar::superAndForeignTypes()
QVERIFY(qmltypesData.contains("Method { name: \"sizeToString\"; type: \"string\" }"));
}
+void tst_qmltyperegistrar::accessSemantics()
+{
+ QVERIFY(qmltypesData.contains("accessSemantics: \"reference\""));
+ QVERIFY(qmltypesData.contains("accessSemantics: \"value\""));
+}
+
QTEST_MAIN(tst_qmltyperegistrar)
diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
index 09485ab0b6..c8d6e04f0a 100644
--- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
+++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
@@ -88,6 +88,7 @@ private slots:
void qmltypesHasFileNames();
void qmltypesHasFlags();
void superAndForeignTypes();
+ void accessSemantics();
private:
QByteArray qmltypesData;