QDoc: Track atom chain traversal state with AtomContext


When converting atom chains to structured content blocks,
i`ContentBuilder` must know where it is in the document tree: inside
a list, a code block, an admonition, or any nested combination. The
existing `HtmlGenerator` solves this with scattered boolean flags that
break down for arbitrarily nested structures.

`AtomContext` replaces those flags with an explicit stack of typed
frames. Each frame records the context type and optional attributes,
and ancestor queries let `ContentBuilder` ask "am I inside a list?"
regardless of nesting depth. The stack naturally tracks correct
closing order for arbitrarily deep nesting.

Fixes: QTBUG-144239
Change-Id: I2ad84f5fe97a7623201712d3fce2bcad530158b9
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commit32352b42bd0feab330412eed6a8afc03a844df5e
parent54d8d8384d29318de5f5fd9f651500dd01e49f2e
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeWed, 18 Feb 2026 08:20:17 +0000