qt5base-lts/doc/global
Paul Wicking 2f35879649 Doc: Add \examplecategory macro
Examples in Qt's codebase must be tagged with specific categories
such that Qt Creator can group them thematically. This can be done
by way of using the `\meta category` construct in QDoc.

At the same time, we want the generated documentation to group the
examples by the same logic as in Qt Creator. Hence, QDoc was modified
to implicitly add a group for each category that is used in a
`meta category` invocation.

By design, QDoc exposes ways to list groups to users, but no way to list
the \meta command invocations. Letting QDoc implicitly add a group for
categories passed to the \meta command as a side-effect, therefore breaks
with the principle of least surprise and the single responsibility
principle.

An alternative solution makes use of QDoc's existing support for code
generation through macros. This patch introduces the macro
`\examplecategory` as a global macro throughout Qt to achieve the same
effect as the aforementioned change to QDoc. The macro takes an argument
enclosed in curly braces. This argument is the example category name. It's
used as meta information in the manifest files consumed by Qt Creator, and
added as the category group name for the QDoc side at the same time.

The introduction of this macro allows reverting the change to QDoc
itself, while maintaining feature parity for both Qt Creator and the
generated content.

Task-number: QTBUG-111891
Pick-to: 6.5
Change-Id: I311b98168253b45ac456ff3c1824db3d835191a9
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
2023-04-03 21:37:12 +02:00
..
externalsites Doc: Change links from froglogic to qt domain 2022-12-09 11:40:49 +01:00
includes Doc: explicitly mention C++ when discussing linking to C++ libraries 2023-01-31 09:46:49 +00:00
includes-online Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
snippets/code Move the docs for porting to QRegularExpression to a common place 2022-07-20 13:15:59 +02:00
template Doc: Add margins to all anchors in a translated page 2022-12-12 14:14:22 +00:00
compat.qdocconf Doc: Ignore QML/JavaScript parsing errors 2017-02-07 08:34:39 +00:00
config.qdocconf Doc: Update copyright year in the template 2023-02-07 18:04:11 +00:00
externalsites.qdocconf Doc: Do not include the external sites by default 2014-09-03 09:40:59 +02:00
fileextensions.qdocconf qdoc: Add *.webp as an default image suffix 2023-02-21 18:56:07 +00:00
html-config.qdocconf Adapt qdoc macros and documentation for DocBook 2022-11-04 18:39:03 +01:00
html-footer-online.qdocconf Doc: Update copyright year in the template 2023-02-07 18:04:11 +00:00
html-footer.qdocconf Doc: Update copyright year in the template 2023-02-07 18:04:11 +00:00
html-header-offline.qdocconf Doc: Add a dark offline CSS 2022-11-11 18:48:50 +02:00
html-header-online.qdocconf doc: Update online navigation header to match http://doc.qt.io/ 2018-10-17 16:16:28 +00:00
htmltabs.qdocconf Doc: Fix syntax in \tab macro example 2022-05-09 19:12:14 +02:00
macros-online.qdocconf Doc: Add qdoc macro for tabbed content 2022-04-05 10:30:00 +02:00
macros.qdocconf Doc: Add \examplecategory macro 2023-04-03 21:37:12 +02:00
manifest-meta.qdocconf Remove loopback network example 2023-03-23 16:02:28 +01:00
qt-cpp-defines.qdocconf Clean up qt-cpp-defines.qdocconf 2022-07-20 13:15:56 +02:00
qt-html-templates-offline-simple.qdocconf Fix typos in docs and comments 2022-06-15 21:31:02 +02:00
qt-html-templates-offline.qdocconf Doc: Add a dark offline CSS 2022-11-11 18:48:50 +02:00
qt-html-templates-online.qdocconf Merge remote-tracking branch 'origin/5.12' into 5.13 2019-05-09 13:06:11 +00:00
qt-module-defaults-offline.qdocconf doc/global: Remove references to Qt 5 in comments 2020-11-19 17:27:30 +01:00
qt-module-defaults-online-commercial.qdocconf Doc: Fix online macros for commercial template 2022-06-21 22:08:34 +00:00
qt-module-defaults-online.qdocconf Doc: Update copyright year in the template 2023-02-07 18:04:11 +00:00
qt-module-defaults.qdocconf doc/global: Remove references to Qt 5 in comments 2020-11-19 17:27:30 +01:00