QDoc: Fix inside-out declarator syntax in parameter signatures
C++ types such as references to arrays, pointers to functions,
and pointers to members use inside-out declarator syntax where
the parameter name appears inside the type rather than after it.
Clang produces these types without the name, and QDoc appended
the name at the end, producing invalid signatures such as
"const char (&)[Size] data" instead of "const char (&data)[Size]".
Parameter::signature() now detects inside-out declarators and
inserts the name at the correct position within the type. This
fixes signature matching and index generation. The rendered HTML
and DocBook output still assembles type and name separately in
CppCodeMarker::markedUpSynopsis() and isn't addressed here.
Task-number: QTBUG-111970
Change-Id: Ia0ff9713abb2a95b86ef30b39e98398e82ef7130
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
| commit | f0b62b88f8feb994221a89ee25f980fbf395d567 |
| parent | cb63b1c8ee3fd0ce2897cb0a6605668468f2a2e9 |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Tue, 24 Mar 2026 18:35:32 +0100 |
- M src/qdoc/qdoc/src/qdoc/parameters.cpp
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/expected/docbook/templated-callables-h.xml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/expected/html/templated-callables-h.html
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/expected/html/templatedcallables.index
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/expected/webxml/templated-callables-h.webxml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/src/templated_callables.cpp
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/src/templated_callables.h