QDoc: Preserve important admonition content
The Template Generator drops the content of `\important` admonitions.
The parser builds the admonition container around its content. But:
while the IR builder dispatches `\note` and `\warning` admonitions, it
has no dispatch for the `\important` atoms. As a result, the content
never reaches the templates and is discarded with a warning.
This change adds handling of the atoms for this admonition, ensuring
that the block carries its content and the content partials render it
correctly. The output for other admonitions remain unchanged. A new
fixture exercises the `\important` command in all supported places.
Fixes: QTBUG-151169
Pick-to: 6.12
Change-Id: If422d9a39c8e47a91a20ae53832f233b0be42143
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
| commit | f7b399a9472fb86238f9202465ed6d5a6f2d85a1 |
| parent | e075a950eae003de9950bd81413ddc44ad0f1084 |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Tue, 6 Oct 2026 11:55:42 +0000 |
- M src/qdoc/qdoc/src/qdoc/ir/contentbuilder.cpp
- M src/qdoc/qdoc/src/qdoc/templates/partials/html/content_blocks.html
- M src/qdoc/qdoc/src/qdoc/templates/partials/md/content_blocks.md
- M src/qdoc/qdoc/tests/qdoc/ir/catch_contentbuilder.cpp
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/important_admonitions/expected/html/important-admonitions.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/important_admonitions/expected/importantadmonitions.index
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/important_admonitions/expected/markdown/important-admonitions.md
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/important_admonitions/important_admonitions.qdocconf
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/important_admonitions/src/important_admonitions.qdoc