QDoc: Keep legacy HTML fragment IDs distinct


Class pages can give the same fragment ID to different headings,
targets, or members. Links to that fragment then reach only the first
element, leaving the others inaccessible.

Give colliding elements distinct IDs and keep target indexes and
section links aligned with the emitted anchors. Avoid rendering the
same member twice when a shared comment repeats it.

[ChangeLog][QDoc] HTML pages now use distinct fragment IDs for
colliding headings, targets, and members.

Pick-to: 6.12
Fixes: QTBUG-151300
Change-Id: Iad23da7e28adc741ef96588e9784982410f70218
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commitca1272cf35070bc46ad29efc9d5c131896604532
parentcaf225a90f08d9624d0a086d28e0b95fb4ae6af2
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeFri, 9 Oct 2026 08:02:58 +0000