diff options
| author | Luca Di Sera <luca.disera@qt.io> | 2025-02-19 13:18:23 +0100 |
|---|---|---|
| committer | Luca Di Sera <luca.disera@qt.io> | 2025-02-20 11:43:15 +0100 |
| commit | 4d4067a41a58d1a72c61a63fcd5e0ad15b8088c0 (patch) | |
| tree | 08c83f14cb08f26e3973c7f8277892279b1d15d5 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 7da85b0bdb6a909cc679f365f30df5e9afc2ca52 (diff) | |
Doc: Move integration macros away from QQmlEngine reference docs
The `QtQmlIntegration` module provides the `qqmlintegration.h` header
that expose a series of macros that simplify the integration and
registration of C++ types to QML.
In the documentation, those macros are currently documented as being
provided by the `QQmlEngine` type in the `QtQml` module.
While it is true that one can access the macros by including
`QQmlEngine`, due to the header file for the type transitively including
the required header, it is only by indirection.
Furthermore, there is no real connection between a `QQmlEngine` and the
integration macros. Indeed you can use a `QQmlEngine` without
integrating any type and you can integrate types without even linking to
the `QtQml` module that provides `QtQmlEngine`.
Thus, slitghly re-organize the QML documentation to move the macros
documentation outside of the `QQmlEngine` reference documentation.
A new file, "macros.qdoc", was created under the general folder that
collects documentation related to the integration of C++ types in QML.
This new file provides a dummy documentation for the `qqmlintegration.h`
header file.
The documentation for the macros that are provided by
`qqmlintegration.h` were moved from "src/qml/doc/src/qmlfunction.qdoc"
to this new file.
Furthermore, the documentation body for each macro was modified to
"relate" to the newly documented header file, allowing them to be
positioned in under the correct element in the output documentation.
Certain links in the qmllint documentation were modified to be adapted
to the new documentation structure, as they were linking to some of the
macros by specifying their position to be under the `QQmlEngine`
documentation specifically.
A small note in the cmake documentation that mentioned the now
documented header file was modified to link to the header file
documentation itself.
In the same note, a non-linking mention to the `QML_ELEMENT`
macro was modified to link to the available documentation for the macro.
The documentation related to the definition of QML types from C++
mentioned `qqmlregistration.h` as the required header to access the
registration macros.
While this is potentially true, as the header will include
`qqmlregistration.h`, it requires linking to the fatter `QtQml` module.
As there might be cases where it is not required to link to `QtQml`
itself, mention that the macros resides in the `qqmlintegration.h`
header.
Pick-to: 6.9 6.8
Task-number: QTBUG-132409
Change-Id: I2ff9c1aa40b6d3cd6f451a4d2a7c2c10a9566f35
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
0 files changed, 0 insertions, 0 deletions
