diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-04-28 16:55:22 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-05-18 18:57:56 +0200 |
commit | 79b742fb84abe699ff726eec548793880cfa7527 (patch) | |
tree | 2947c614ac2453e44cbc3a6f45dca438d6486e8b /src/qmltyperegistrar/qmltypescreator.cpp | |
parent | 1e30ec77aaedcc29ba7ac1c3ec3937ee0b8287e9 (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 'src/qmltyperegistrar/qmltypescreator.cpp')
-rw-r--r-- | src/qmltyperegistrar/qmltypescreator.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qmltyperegistrar/qmltypescreator.cpp b/src/qmltyperegistrar/qmltypescreator.cpp index a9885b03fa..d74d59062f 100644 --- a/src/qmltyperegistrar/qmltypescreator.cpp +++ b/src/qmltyperegistrar/qmltypescreator.cpp @@ -50,6 +50,9 @@ void QmlTypesCreator::writeClassProperties(const QmlTypesClassDescription &colle m_qml.writeScriptBinding(QLatin1String("file"), enquote(collector.file)); m_qml.writeScriptBinding(QLatin1String("name"), enquote(collector.className)); + if (!collector.accessSemantics.isEmpty()) + m_qml.writeScriptBinding(QLatin1String("accessSemantics"), enquote(collector.accessSemantics)); + if (!collector.defaultProp.isEmpty()) m_qml.writeScriptBinding(QLatin1String("defaultProperty"), enquote(collector.defaultProp)); |