QDoc: Ignore //! comments after \list


Authors sometimes leave a //! comment on the line right after \list,
before the first \li. QDoc reads the next token following \list as an
optional list-style argument, and the comment slips through: the // is
taken as the list style, producing a spurious "Unrecognized list style"
warning, and the leftover comment text renders as an ordinary paragraph.
A blank line after \list sidesteps the problem, but authors reasonably
expect //! comments to be invisible everywhere.

QDoc now treats a //! comment following \list the same way it treats a
following command: it is not consumed as the optional list-style
argument, so the normal comment handler strips it on the next pass. The
list renders as a clean bullet list with no warning and no leaked text,
matching the behavior of leaving a blank line after \list.

Pick-to: 6.12
Fixes: QTBUG-121925
Change-Id: If052d34219241ef5dbf252baeeb99f8aeb625d8f
Reviewed-by: David Boddie <david.boddie@qt.io>
commit9d5d05b4181131e470a2a4d39a2cb002853969b5
parentc3cd6fe385599b61db2c33c2ef3f8b389a2b3da3
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeWed, 29 Jul 2026 12:39:03 +0000