From 24627d9bce444cee6bc593680c494d58ec241171 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 21 Nov 2023 14:38:28 +0000 Subject: [PATCH] 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 Reviewed-by: Marc Mutz --- doc/global/qt-cpp-defines.qdocconf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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"