QDoc: Route HrefResolver through OutputContext


The template generator's HrefResolver has carried its own
configuration struct since it was extracted from Generator. Five of
that struct's fields — project name, file extension, subdir usage,
link-error gating, and the output-prefix and -suffix callbacks —
duplicate state the template generator already maintains in its
OutputContext. The resolver copies those values out at construction
time, so the generator and the resolver end up with separate
snapshots of the same configuration, and any future change to
output layout has to be synchronized across both. The prefix and
suffix lookups take a string key like "QML" or "CPP", pushing a
string that only OutputContext understands out to every caller that
wants to ask "what prefix belongs to this page?".

The resolver now holds a non-owning pointer to the generator's
OutputContext and reads every layout-dependent value through it.
OutputContext's prefix and suffix lookups take a Genus instead of a
string, which removes the near-identical node-to-key helper that had
appeared in both the template generator and the resolver. The
resolver configuration keeps only what OutputContext doesn't cover:
the inclusion policy, the anchor-cleanup callback, and the QML-type
context callback. OutputContext becomes the single source of truth
for output layout across the template pipeline, which is the
foundation the next commit needs to compute cross-module hrefs from
actual output paths rather than a hardcoded relative prefix.

Task-number: QTBUG-143488
Change-Id: Ic5eec081f365bc064128f0af48c5748b1c759172
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commita6d81dd0eb2ec7e9c6cb7fa1f10e3e7f8393d681
parentfe2d400e47806d7988bb87aec8d60ae20dd729da
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeFri, 24 Apr 2026 13:43:00 +0000