summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2023-11-21 14:38:28 +0000
committerTopi Reiniƶ <topi.reinio@qt.io>2023-12-01 11:58:36 +0000
commit24627d9bce444cee6bc593680c494d58ec241171 (patch)
tree84fea01021e06fbaf68b9fa588bf17e13d42cc02 /doc
parent402a17cfc8156bf65dfc02a18d68dfc116c90df7 (diff)
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/global/qt-cpp-defines.qdocconf14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/global/qt-cpp-defines.qdocconf b/doc/global/qt-cpp-defines.qdocconf
index 0e841e80c9..2f80ca3a68 100644
--- a/doc/global/qt-cpp-defines.qdocconf
+++ b/doc/global/qt-cpp-defines.qdocconf
@@ -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"