diff options
| author | Luca Di Sera <luca.disera@qt.io> | 2025-02-19 18:13:43 +0100 |
|---|---|---|
| committer | Luca Di Sera <luca.disera@qt.io> | 2025-02-20 11:43:23 +0100 |
| commit | bb6130b06881f7552c486af322ba83ec3ea2ef61 (patch) | |
| tree | 2ada6722a6dfcd3ad1e0907cef8985734f9336e4 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 4d4067a41a58d1a72c61a63fcd5e0ad15b8088c0 (diff) | |
Doc: Move registration functions away from QQmlEngine reference docs
The registration functions that are generally provided by the `qqml.h`
header file, were currently registered under the `QQmlEngine` class
reference documentation.
While it is true that one can access those functions by including
`QQmlEngine`, due to the header file for the type transitively including
the required header, it is only by indirection.
Reorganize the QML documentation to be more precise, by providing a page
for the `qqml.h` header file and by moving the relevant functions there.
A simple documentation block for the "qqml.h" header file was added to
the existing "qqml.cpp" implementation file.
The documentation for the relevant element was moved from
"src/qml/doc/src/qmlfunctions.qdoc", directly to the implementation file
for "qqml.h".
The moved documentation blocks were positioned at the bottom of the
file.
The blocks that referred to an element whose definition resided in the
implementation file were interleaved with the code itself and allowed to
auto-tie instead of being explicitly tied by an "\fn" command.
The documentation for `qmlExtendedObject` and the implementation
conflicted on the sole parameter name.
While this is allowed when passing by an "\fn" command, it is not doable
when the documentation block is auto-tied.
As the documentation block for `qmlExtendedObject` is now auto tied, the
conflict would produce a new documentation warning.
There is no directly apparent reason for the name to be different, thus
one of the two was changed in accordance with the other.
In particular, the name of the parameter in the code itself was modified
as the one used in the documentation block is possibly, superficially,
more precise.
The documentation for some of the elements had code-blocks that use some
Qt macros such as Q_OBJECT or Q_NAMESPACE.
MOC doesn't respect comment blocks and will produce an error on seeing
those macro usages.
Work around the issue by obfuscating their usages through the text
substitution infrastructure for the "\code" command.
All moved documentation was modified to relate to the "qqml.h" header
file to ensure their correct positioning in the output documentation.
The original file containing the elements was removed as it is now
empty.
Certain links that specifically linked to some of the moved elements as
being under `QQmlEngine` were modified to work with the new positioning.
Pick-to: 6.9 6.8
Fixes: QTBUG-132409
Change-Id: I10392174ed635e61947bb6aa729e6786dee8018c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
0 files changed, 0 insertions, 0 deletions
