Doc: Add convenience macros for specifying C++ type ordering information

QDoc in Qt 6.7 introduced new commands for C++ type ordering, \compares
and \compareswith .. \endcompareswith. The latter is a block command
that allows defining a comparison category, a list of types the
category applies to, and optional further information inside the
command block.

Introduce convenience macros that allow a single-word/single-line
command to provide the category/types in cases where further information
can be omitted.

Task-number: QTBUG-104110
Change-Id: I850498c79bd6885906fbc58d0517d33f5a13cf4b
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
bb10
Topi Reinio 2023-11-21 14:38:28 +00:00 committed by Topi Reiniö
parent 402a17cfc8
commit 24627d9bce
1 changed files with 14 additions and 0 deletions

View File

@ -18,3 +18,17 @@ excludefiles += \
"*_udev.cpp" \
"*_vxworks.cpp" \
"*_darwin.cpp"
# Convenience macros for specifying C++ type ordering in \class documentation
#
# Usage: \stronglyordered
# \stronglyorderedwith {Type1 [Type2 .. TypeN]}
macro.stronglyordered = "\\compares strong"
macro.stronglyorderedwith = "\\compareswith strong \1\n\\endcompareswith"
macro.weaklyordered = "\\compares weak"
macro.weaklyorderedwith = "\\compareswith weak \1\n\\endcompareswith"
macro.partiallyordered = "\\compares partial"
macro.partiallyorderedwith = "\\compareswith partial \1\n\\endcompareswith"
macro.equalitycomparable = "\\compares equality"
macro.equalitycomparablewith = "\\compareswith equality \1\n\\endcompareswith"