QDoc: Build link containers from atom chain


Documentation links come in two forms: auto-links where the type name
itself is the display text, and explicit links where a separate display
text follows the link target atom. Both need to produce structured
Link inlines in the content model, with display text as children.

Explicit links use a state machine to track when the builder is inside
a link container. The Link atom opens the container and consumes the
trailing FormattingLeft("link") atom that QDoc's parser always emits.
The matching FormattingRight("link") closes the container and resets
the link state. Block closure also cleans up orphaned link state as
a safety measure against malformed atom chains.

Task-number: QTBUG-144240
Change-Id: I3fade0a5d1ca81edcd34b8478dd92da5d72335f5
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commitdd095617b4344015849c388b7d179faa0f57e2d9
parent4d0f718b2c036fd544d5b5aecbe15341d7cf2718
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeFri, 20 Feb 2026 13:54:17 +0100