QDoc: Apply heading level offset in template generator content


Section headings in documentation body content use QDoc's numbering
where \section1 is the top level. The legacy generators shift these
levels by an offset derived from the page type so that headings nest
correctly under the page title and major section headings. The
template generator's ContentBuilder was emitting the raw QDoc level,
causing \section1 headings like "Example Usage" to render as <h1>
alongside the page title instead of the expected <h2>.

ContentBuilder now accepts an optional heading offset that callers
supply based on the page type, matching the same mapping the legacy
generators use. This keeps ContentBuilder free of Node dependencies
while producing correct heading hierarchies in the output.

Task-number: QTBUG-145173
Change-Id: I3448f4d7afde060a87c998c4202ae88668496a31
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commit773ae70475c1af292c5936976d57a3de9d335889
parenta339c272404f02e105dc49344adcd32a20372a8a
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeTue, 24 Mar 2026 15:43:28 +0100