QDoc: Display images in template generator output
When documentation uses \image or \inlineimage commands, the template
generator silently drops them. Both atom types fall through
ContentBuilder's default case, so readers see pages with missing
illustrations and no indication that images were intended.
ContentBuilder now dispatches image atoms into the IR's existing
InlineType::Image representation. Block-level images are represented
as paragraph-wrapped image content in the IR, while inline images
flow naturally within surrounding text. The following ImageText atom
is consumed via look-ahead so alt text doesn't leak as orphaned
content. Images without alt text omit the alt attribute entirely
rather than producing alt="" which would incorrectly mark the image
as decorative for screen readers.
Task-number: QTBUG-145122
Change-Id: Ifc46da7686b3220c430a3173bb21fada7a6cbc78
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
| commit | 57cbddc90539bdfb776451695734b14a14e94314 |
| parent | a196901451b5de28cf38b2cd46d7839637d7f210 |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Wed, 25 Mar 2026 13:20:02 +0100 |
- 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/html/member_detail.html
- M src/qdoc/qdoc/tests/qdoc/ir/catch_contentbuilder.cpp
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/html/qtlottie-lottietoqml-example.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/html/qtlottie-qtlottieviewer-example.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/markdown/qtlottie-lottietoqml-example.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/markdown/qtlottie-qtlottieviewer-example.md