diff options
author | Topi Reinio <topi.reinio@digia.com> | 2014-07-16 14:35:00 +0200 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@digia.com> | 2014-07-18 10:14:31 +0200 |
commit | d15309edeed53da021d058218e4c739e5903d8fd (patch) | |
tree | 7d434354aa17e533021ae5612e9b3656c02bc2a5 /src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc | |
parent | 9c774b7621fdc99c03fad1b424b09b82057dc748 (diff) |
qdoc: Support use of \value command outside \enum topic.
Even though qdoc accepts the \value command(s) anywhere in the
documentation and generates tables for them, the produced output was
invalid for documentation topics other than \enum.
This change fixes the issue by not trying to resolve the enumeration
values and removing the 'Value' column for generated tables when the
\value command is used outside c++ enum documentation topic.
This enables, for example, the use of the \value command for
documenting acceptable values for QML enumeration properties,
without having to use custom lists or tables.
Task-number: QTBUG-35019
Change-Id: I597b2f9d7d03d4ab72f276752ddf53e1c405313c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc')
-rw-r--r-- | src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc index 435e243014..c04cdeca2b 100644 --- a/src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc +++ b/src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc @@ -2543,6 +2543,13 @@ file or namespace documentation. See the \l {enum-command} {\\enum} documentation for an example. + \note Since Qt 5.4, \\value command can also be used outside the + \l {enum-command} {\\enum} topic. In this case, QDoc renders a + two-column table listing the constant name (taken as-is from the + first argument) and its description. This can be used, for + example, in \l {qmlproperty-command}{\\qmlproperty} topic for + documenting acceptable values for a QML enumeration property. + See also \l {enum-command} {\\enum} and \l {omitvalue-command} {\\omitvalue}. \target omitvalue-command |