QDoc: Don't add the obsolete suffix twice to deprecated pages
The HTML file base of a deprecated page already carries the "-obsolete"
suffix, but Generator::fullDocumentLocation() added another one. The
keywords in the .qhp file and the hrefs in the index file therefore
referred to e.g. "page-obsolete-obsolete.html", while the file written
for the page is "page-obsolete.html". The help generator can't find the
file of such a keyword, so it made it point at its "file not found"
entry.
The suffix was also added where the file base doesn't carry it: for
deprecated header files, which are aggregates, and in the WebXML and
DocBook output. The links there referred to files that don't exist.
Add the suffix only for deprecated members, whose documentation lives
on the obsolete sub-page of their aggregate. Pages get the suffix from
their file base, and aggregates never carry it.
Fixes: QTBUG-151680
Pick-to: 6.12
Change-Id: I3b64d5b05b73738f47fff91abeb0d7d872ce6763
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| commit | 293a6d7a69c10aed20ecefec30d2aa30f479f76c |
| parent | 7560707b09a952169aecfd2aa9dab315481e121f |
| author | Jarek Kobus <jaroslaw.kobus@qt.io> |
| committer | Jarek Kobus <jaroslaw.kobus@qt.io> |
| commit time | Mon, 19 Oct 2026 16:53:42 +0000 |
- M src/qdoc/qdoc/src/qdoc/generator.cpp
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/comprehensiveproject/expected/docbook/old-page.xml
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/comprehensiveproject/expected/docbook/oldheader-h.xml
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/comprehensiveproject/expected/html/old-page-obsolete.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/comprehensiveproject/expected/html/oldheader-h.html
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/comprehensiveproject/expected/html/test.index
- M src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/comprehensiveproject/expected/html/test.qhp
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/comprehensiveproject/expected/webxml/old-page.webxml
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/comprehensiveproject/expected/webxml/oldheader-h.webxml
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/comprehensiveproject/src/deprecatedpage.qdoc