QDoc: Strip baked anchors before recomputing hrefs


Index-loaded URLs for non-page nodes can include an anchor, such as
`qwindow.html#devicePixelRatio`. When HrefResolver derives the file
segment from that URL, it preserves the baked anchor and then appends
`anchorForNode()` again for the target member.

Strip any anchor from explicit URLs before appending the canonical anchor,
so cross-tree member links do not produce duplicated fragments such as
`qwindow.html#devicePixelRatio#devicePixelRatio`.

Fixes: QTBUG-146864
Change-Id: I9c866db68900dbda697cda33858910ca6fa04e4d
Reviewed-by: David Boddie <david.boddie@qt.io>
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commit6bd25f0ba774ad93984aaf19e9881548f505e2a2
parent7fd0820e6dd35031993f664da9243155f5f8d926
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeWed, 20 May 2026 14:27:17 +0000