QDoc: Extract shared anchor ID computation utility


Both XmlGenerator::refForNode() and HrefResolver::anchorForNode()
implement identical node-type dispatch logic to compute anchor
fragment identifiers for documentation members. When extracting
member detail data into the IR pipeline, the same computation is
needed from NodeExtractor without depending on either generator.

A new anchorid.h header declares computeAnchorId() as a standalone
internal utility for the shared node-type dispatch. Each caller
applies its own cleanup afterward: HrefResolver uses cleanRefFn
from its configuration, XmlGenerator runs registerRef() for
collision handling. This keeps the helper generator-agnostic and
preserves HrefResolver's caller-provided normalization strategy.

Fixes: QTBUG-145126
Change-Id: I4820c25b33be119d1bb2c53d25ef6246a1344b38
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commit0d2029604e95096647b2aafeee0d401083c67b95
parent7a1ab2f3cf3e5b9332c44b8c39fcd33d7fc44737
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeMon, 23 Mar 2026 18:43:40 +0100