aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-10-20 11:14:52 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2021-11-16 09:02:57 +0100
commit6ec7953257ef1155aef8a0a4b8379205ee850283 (patch)
tree1dac0463d8500bb3a90c37095a09890607423ec7 /src/qml/doc
parent88dfbe0deaa780f1cb5793d644341367d02e3073 (diff)
qmltc: support user-specified namespaces in the generated code
Already during the prototyping phase, conflicts in class names were encountered within Qt code base. Those could be avoided by namespaces. Initial qmltc logic was using meaningless "q_qmltc" namespace, so let's improve that by allowing user-specified namespaces + making Qt's own QML files (compiled to C++) being available under QT_NAMESPACE. The latter is achieved by providing (and using) the internal version of a qmltc-invoking function Task-number: QTBUG-84368 Task-number: QTBUG-96040 Change-Id: I99cdf1baba8838c093b6b469f6744869f72af093 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/doc')
-rw-r--r--src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc b/src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc
index 99c64e74ab..f6c56a94af 100644
--- a/src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc
+++ b/src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc
@@ -40,6 +40,7 @@
qt_target_compile_qml_to_cpp(
target
FILES ...
+ [NAMESPACE namespace]
)
\endcode
@@ -67,6 +68,10 @@ most cases, all the target's QML files would be specified in the FILES. This
way, FILES argument is equivalent to QML_FILES argument of the
qt_add_qml_module() command.
+\c NAMESPACE argument defines a namespace, in which the generated C++ code
+resides. By default, no namespace is specified for user projects. The code
+generated from Qt's own sources is put under a QT_NAMESPACE namespace.
+
While processing FILES, the following source file properties are respected:
\list
\li \c{QT_QMLTC_FILE_BASENAME}: use this source file property to specify a