From eb002cf0f5a8f3b98de1317575eb77e3380797e5 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 24 Nov 2015 11:50:52 +0100 Subject: 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 --- src/qdoc/doc/qdoc-manual-qdocconf.qdoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/qdoc/doc/qdoc-manual-qdocconf.qdoc') 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 -- cgit v1.2.1