QDoc: Improve parsing of \qmlmethod and \qmlsignal arguments


CppCodeParser used an ad-hoc string parsing logic to extract
information about the argument passed to \qmlmethod and
\qmlsignal QDoc commands. Validating the argument string was
missing key checks; a return type could be omitted and
methods did not require a parameter list enclosed in
paretheses.

Extend QmlPropertyArguments with a feature to parse also
method/signal signatures. Introduce two new warnings for a
\qmlmethod: Missing return type, and a failure to parse
the parameter list.

A valid syntax for a \qmlsignal remains otherwise identical
to a \qmlproperty, with the exception that a type is not
required, and a parameter list can, but is not required to,
appear after the signal name. A valid syntax for \qmlmethod
now always requires both a return type and a parameter list,
same as for an \fn command.

[ChangeLog][QDoc] QDoc now warns if \qmlmethod signatures
do not document the return type.

Fixes: QTBUG-136456
Change-Id: I5abd6f267341a0bb1a015e645a19bbe9048d6702
Reviewed-by: David Boddie <david.boddie@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
commit73438a25fa556df272762fbce119f4972b007450
parent9d84dcccf17699a72b1a0befde54160afdba6228
authorTopi Reinio <topi.reinio@qt.io>
committerTopi Reinio <topi.reinio@qt.io>
commit timeMon, 23 Feb 2026 10:57:49 +0000