QDoc: Preserve \brief casing when nothing is stripped
A brief's leading words are often filler that restates its context —
"The", the class name, "is", "a", and similar words that add nothing
once a brief appears next to the name it describes. QDoc strips those
words and then capitalizes the first surviving word so the shortened
brief still reads as a proper sentence. This is done unconditionally,
even if there are no leading words to remove. This may mangle briefs
that begin with e.g. a function name.
QDoc now capitalizes the first word only if actually trimming the
brief. A brief that deliberately opens in lowercase keeps its original
casing, while briefs that lose their filler words still gain a proper
sentence start.
Fixes: QTBUG-147652
Change-Id: I9c515d4b857dd959921e858a14c6500598899e1b
Reviewed-by: David Boddie <david.boddie@qt.io>
| commit | 20b942e3f1dad4fbb55870a5445fac6d88e718ea |
| parent | e1a743bebb583127c83d0d58e03e2ee8cc9f0eed |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Wed, 22 Jul 2026 10:29:22 +0000 |
- M src/qdoc/qdoc/src/qdoc/doc.cpp
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/expected/docbook/e.xml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/expected/docbook/lists.xml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/expected/html/customsortedlists.index
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/expected/html/e.html
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/expected/html/lists.html
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/expected/webxml/c.webxml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/expected/webxml/d.webxml
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/expected/webxml/e.webxml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/expected/webxml/lists.webxml
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/customsortedlists/src/test.qdoc
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/multisignal/expected/webxml/testaction.webxml
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cppref_validation/expected/qtcoaptest.index