QDoc: Suppress hollow content sections on pages with no body text
Page templates wrap body content in a section labelled
"Description", and fall back to a flat-text rendering when the
structured content list carries nothing. The flat-text branch is
emitted on every document, even when the underlying body is
empty, so pages with no description — such as group pages whose
documenter omitted a body — render an empty section element
that serves no purpose and reads as a layout glitch in browsers
and Markdown viewers.
Pages whose body is empty now emit no description wrapper at
all. Pages that carry structured blocks render unchanged; pages
that carry plain-text fallbacks render unchanged; pages that
carry neither no longer wrap empty space.
Fixes: QTBUG-146601
Change-Id: I6dc598422da702ec9467b5f620a919b9f2286f2b
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
| commit | 7cdce6b8285e6a633db4ce920ab2cd9c3c3022cc |
| parent | aa004822a3679aa2b12107dd4bdd5b75b5bee7dd |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Thu, 7 May 2026 09:20:49 +0000 |
- M src/qdoc/qdoc/src/qdoc/ir/builder.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/validatetemplategeneratoroutput/testdata/cppref_validation/expected/html/qtcoap.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cppref_validation/expected/markdown/qtcoap.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/navigation/expected/html/testnavigation-module.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/navigation/expected/markdown/testnavigation-module.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/html/qml-item.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/markdown/qml-item.md