QDoc: Degrade unresolved autolinks to plain text
QDoc's autolink heuristic speculatively creates links for bare
identifiers such as macro names. When these can't be resolved,
the legacy HtmlGenerator silently falls back to plain text. The
template pipeline instead rendered them as broken anchor tags
with the raw identifier as the href.
Unresolved autolinks now degrade to plain text, matching the
legacy generator's behavior. Explicit links created with \l
continue to warn on resolution failure, preserving the
diagnostic distinction between intentional and speculative links.
Fixes: QTBUG-145113
Change-Id: I64872fa30a3b9a25ff7fc099fec64809bdec0cbf
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
| commit | 7a1ab2f3cf3e5b9332c44b8c39fcd33d7fc44737 |
| parent | eb54247ce5359431e8c5b025e77144730d8ffcdc |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Mon, 23 Mar 2026 18:43:39 +0100 |
- M src/qdoc/qdoc/src/qdoc/linkresolver.cpp
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/dual_format_output/expected/html/readme.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/dual_format_output/expected/markdown/readme.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/markdown_output/expected/template/readme.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/minimal_configuration_template/expected/template/readme.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/html/lottietoqml.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/html/qml-qt-labs-lottieqt-lottieanimation.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/html/qt-target-qml-from-lottie.html
- 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/qtlottieanimation-index.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/markdown/lottietoqml.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/markdown/qml-qt-labs-lottieqt-lottieanimation.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/qtlottie_validation/expected/markdown/qt-target-qml-from-lottie.md
- 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/qtlottieanimation-index.md