QDoc: Show concept names in template parameters
The class synopsis for a template parameterized by a
concept renders the parameter as the bare typename
keyword, even when the source spells out the constraint
as template <Integral T>. The reader following the
documentation has no way to see that the parameter must
satisfy the concept; the direct-constraint syntax the
author wrote erases at the rendering boundary. The
parser captures the concept reference, but the
information never reaches the rendering site that needs
it per parameter.
The rendering pipelines surface the concept name where
the author wrote it: function synopses, class subtitles,
and template-generator output show the constraining
concept in place of the bare keyword. Function synopses
and the template generator also hyperlink it to its
reference page. A class subtitle hyperlinks a concept
written without namespace qualification; a qualified
concept appears there as plain text, which the subtitle's
autolink mechanism cannot resolve.
Task-number: QTBUG-145046
Pick-to: 6.12
Change-Id: I6233ed1e04f2d621d5c2c1914977978138d16847
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
| commit | 5087d098d34e0fc4ab67681d4fad566fe8b6bedf |
| parent | d526fbb7de4ccc7c85c2aa08665fd3abef915a37 |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Fri, 5 Jun 2026 06:03:54 +0000 |
- M src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
- M src/qdoc/qdoc/src/qdoc/cppcodemarker.cpp
- M src/qdoc/qdoc/src/qdoc/htmlgenerator.cpp
- M src/qdoc/qdoc/src/qdoc/nodeextractor.cpp
- M src/qdoc/qdoc/src/qdoc/template_declaration.h
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/docbook/cpp20concepts-cpp20concepts-proxy.xml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/docbook/cpp20concepts-module.xml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/docbook/integralbox.xml
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/docbook/sortablebox.xml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/html/cpp20concepts-cpp20concepts-proxy.html
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/html/cpp20concepts-module.html
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/html/cpp20concepts.index
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/html/integralbox.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/html/sortablebox.html
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/html/traits-sortable.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/expected/webxml/sortablebox.webxml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/cpp20_concepts/src/concepts.h
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/cpp20concepts.index
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/template-html/cpp20concepts-module.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/template-html/integralbox.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/template-html/integralcalculator.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/template-html/sortablebox.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/template-html/traits-sortable.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/template-md/cpp20concepts-module.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/template-md/integralbox.md
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/template-md/sortablebox.md
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/expected/template-md/traits-sortable.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cpp20_concepts/src/concepts.h