summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2023-12-14 14:59:29 +0000
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-12-18 18:41:34 +0000
commit2cb9c1de0f1e0887bbee71158219c7daabce0d26 (patch)
tree0946fcce47c4566f408b525d231a37453b06761d
parent0b62a2a86a635130df9feff3537407ada757a8a0 (diff)
Doc: Improve \class command description in QDoc manual
Fix language issues in \class command documentation, and mention the requirement to use \inmodule, without which QDoc outputs a warning. Remove errant \target command. C/C++ structs/unions can be also documented using \class; mention them in the \class command description. Remove broken links to undocumented \struct and \union commands. Task-number: QTBUG-120136 Change-Id: I6e09cfce636ec048eb4dded4e58c6ef97dce6e07 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> (cherry picked from commit 4d2d1e6f670f09a90fd8dbb74a4c49b2daa35ec0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qdoc/qdoc/doc/qdoc-manual-contextcmds.qdoc3
-rw-r--r--src/qdoc/qdoc/doc/qdoc-manual-topiccmds.qdoc22
2 files changed, 12 insertions, 13 deletions
diff --git a/src/qdoc/qdoc/doc/qdoc-manual-contextcmds.qdoc b/src/qdoc/qdoc/doc/qdoc-manual-contextcmds.qdoc
index efd1e5c13..7745129f9 100644
--- a/src/qdoc/qdoc/doc/qdoc-manual-contextcmds.qdoc
+++ b/src/qdoc/qdoc/doc/qdoc-manual-contextcmds.qdoc
@@ -182,8 +182,7 @@
Use the \c {\compares} command to describe the comparison results for the
documented C++ type when compared to itself. You must use this command in
- conjunction with either the \l {class-command}{\\class},
- \l {struct-command}{\\struct}, or \l {union-command}{\\union} command.
+ conjunction with the \l {class-command}{\\class} command.
\c {\compares} takes one of the following arguments:
diff --git a/src/qdoc/qdoc/doc/qdoc-manual-topiccmds.qdoc b/src/qdoc/qdoc/doc/qdoc-manual-topiccmds.qdoc
index 7607d7236..e03ea7b28 100644
--- a/src/qdoc/qdoc/doc/qdoc-manual-topiccmds.qdoc
+++ b/src/qdoc/qdoc/doc/qdoc-manual-topiccmds.qdoc
@@ -143,14 +143,15 @@
\target class-command
\section1 \\class
- The \\class command is for documenting a C++ class. The argument
- is the complete name of the class. The command tells QDoc that a
- class is part of the public API, and lets you enter a detailed
- description.
+ The \\class command is for documenting a C++ \e class, a C/C++
+ \e struct, or a \e union. The argument is the complete, qualified
+ name of the class. The command tells QDoc that a class is part of
+ the public API, and lets you enter a detailed description.
\badcode *
/\1!
\class QMap::iterator
+ \inmodule QtCore
\brief The QMap::iterator class provides an STL-style
non-const iterator for QMap and QMultiMap.
@@ -162,25 +163,24 @@
The HTML documentation for the named class is written to a
\c{.html} file named from the class name, in lower case, and with
- the double colon qualifier(s) replaced with '-'. For example, the
- documentation for the \c QMap::Iterator class is written to \c
+ the double colon qualifiers replaced with '-'. For example, the
+ documentation for the \c QMap::iterator class is written to \c
qmap-iterator.html.
- \target framework
-
The file contains the class description from the \\class comment,
plus the documentation generated from QDoc comments for all the
class members: a list of the class's types, properties,
functions, signals, and slots.
In addition to the detailed description of the class, the \\class
- comment typically contains a \l {brief-command} {\\brief} command
- and one or more \l{Markup Commands}. See the \\class command for
- any of the Qt class for examples. Here is a very simple example:
+ comment typically contains an \l {inmodule-command} {\\inmodule}
+ command, as well as a \l {brief-command} {\\brief} description.
+ Here is a very simple example:
\badcode *
/\1!
\class PreviewWindow
+ \inmodule CustomWidgets
\brief The PreviewWindow class is a custom widget.
displaying the names of its currently set
window flags in a read-only text editor.