summaryrefslogtreecommitdiff
path: root/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@theqtcompany.com>2015-11-24 11:50:52 +0100
committerTopi Reiniƶ <topi.reinio@theqtcompany.com>2015-11-24 11:45:05 +0000
commiteb002cf0f5a8f3b98de1317575eb77e3380797e5 (patch)
treee9a291da2002375588f79f0907acd17e909a736d /src/qdoc/doc/qdoc-manual-qdocconf.qdoc
parent06dc01046aaaaa9f4d99c8e6664398f1195b4210 (diff)
downloadqttools-eb002cf0f5a8f3b98de1317575eb77e3380797e5.tar.gz
qdoc: Fix crash with multiple macro parameters
When the number of parameters expected by a macro definition does not match what's passed to the macro invocation, store the number of parameters read so far. This prevents a crash by out-of-range index reference. Also, improve the documentation on macro parameters. Change-Id: I75716f5b53f394664bb509c96aa4b53b4efba222 Task-number: QTBUG-49608 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Diffstat (limited to 'src/qdoc/doc/qdoc-manual-qdocconf.qdoc')
-rw-r--r--src/qdoc/doc/qdoc-manual-qdocconf.qdoc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/qdoc/doc/qdoc-manual-qdocconf.qdoc b/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
index 69980c1e1..045be3b33 100644
--- a/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
+++ b/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
@@ -737,7 +737,7 @@
A macro can also take up to seven parameters:
\badcode
- macro.hello = "Hello \1!"
+ macro.hello = "Hello \1!"
\endcode
Parameters are passed to macros the same way as to other commands:
@@ -746,6 +746,17 @@
\hello World
\endcode
+ When using more than one parameter, or when an argument
+ contains whitespace, enclose each argument in braces:
+
+ \badcode
+ macro.verinfo = "\1 (version \2)"
+ \endcode
+
+ \badcode
+ \verinfo {QFooBar} {1.0 beta}
+ \endcode
+
See also \l {alias-variable} {alias}.
\target manifestmeta-variable