diff options
author | Topi Reinio <topi.reinio@qt.io> | 2017-01-04 15:02:57 +0100 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2017-01-05 10:07:40 +0000 |
commit | 980fbea7adb3d31b8017f844bc8856612d3f7cff (patch) | |
tree | 789b3e8e2b2c94814f0f168a9355946318d051b0 | |
parent | a2770b85b56a5b2954c2d4995408277faaa43070 (diff) | |
download | qttools-980fbea7adb3d31b8017f844bc8856612d3f7cff.tar.gz |
Doc: QDoc manual: Document \badcode
Change-Id: Iffbf809261a2ac572aa83ca5aaddb3d6258221ac
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
-rw-r--r-- | src/qdoc/doc/qdoc-manual-cmdindex.qdoc | 1 | ||||
-rw-r--r-- | src/qdoc/doc/qdoc-manual-markupcmds.qdoc | 25 |
2 files changed, 22 insertions, 4 deletions
diff --git a/src/qdoc/doc/qdoc-manual-cmdindex.qdoc b/src/qdoc/doc/qdoc-manual-cmdindex.qdoc index 5d8c82142..feac8816a 100644 --- a/src/qdoc/doc/qdoc-manual-cmdindex.qdoc +++ b/src/qdoc/doc/qdoc-manual-cmdindex.qdoc @@ -41,6 +41,7 @@ \li \l {abstract-command} {\\abstract} \li \l {annotatedlist-command} {\\annotatedlist} \li \l {b-command} {\\b} + \li \l {badcode-command} {\\badcode} \li \l {b-command} {\\bold} (deprecated, use \\b) \li \l {brief-command} {\\brief} \li \l {c-command} {\\c} diff --git a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc index 55b63fff4..059c59485 100644 --- a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc +++ b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc @@ -40,6 +40,7 @@ \li \l {a-command} {\\a} \li \l {annotatedlist-command} {\\annotatedlist} \li \l {b-command} {\\b} + \li \l {badcode-command} {\\badcode} \li \l {b-command} {\\bold} (deprecated, use \\b) \li \l {brief-command} {\\brief} \li \l {c-command} {\\c} @@ -973,14 +974,18 @@ \note The \l {c-command} {\\c} command can be used for short code fragments within a sentence. The \\code command is for longer code snippets. It renders the code verbatim in a separate paragraph in - the code font. + a html <pre> element, and parses the enclosed snippet, creating links + to any known types in the code. + + For documenting command-line instructions, shell scripts, or any + content that is not in a Qt language recognized by QDoc, use + \l {badcode-command}{\\badcode} instead. When processing any of the \\code, \l {newcode-command} {\\newcode} or \l {oldcode-command} {\\oldcode} commands, QDoc removes all indentation that is common for the verbatim code blocks within a \c{/}\c{*!} ... \c{*}\c{/} comment before it adds the standard - indentation. For that reason the recommended style is to use 8 - spaces for the verbatim code contained within these commands + indentation. \note This doesn't apply to externally quoted code using the \l {quotefromfile-command} {\\quotefromfile} or \l @@ -1022,11 +1027,23 @@ \l{07-0-qdoc-commands-includingexternalcode.html#codeline-command} {\\codeline} commands. - See also \l {c-command} {\\c}, \l + See also \l {c-command} {\\c}, \l {badcode-command} {\\badcode}, \l {07-0-qdoc-commands-includingexternalcode.html#quotefromfile-command} {\\quotefromfile}, \l{newcode-command} {\\newcode}, and \l {oldcode-command} {\\oldcode}. + \target badcode-command + \section1 \\badcode + + Similar to \l {code-command}{\\code}, \\badcode and \\endcode commands + enclose content that is rendered verbatim in a separate paragraph, but no + parsing or automatic link creation is performed. Instead, the content is + treated as plain text. + + Substitute \\code with this command when documenting command-line + instructions, shell scripts or any other content that is not in a Qt + language, but should still be styled similarly to a \\code paragraph. + \target newcode-command \section1 \\newcode |