QDoc: Unit test Text's atom copying


Text copies atoms by rebuilding them from their base-class parts. This
stems from a distant past when atoms held at most two strings, and there
was no subclass of Atom. These assumptions have changed:

  - LinkAtom added derived state in 2014.
  - Atom::append() made three-string atoms constructible in 2024.

Each time, the copy became increasingly lossy. Qualified links lost
their genus and domain whenever documentation moved between Text
objects, and nothing anywhere states which parts of an atom a copy must
preserve.

This change adds new unit tests to formalize that contract. This ensures
that future refactoring preserves the behavior, and deliberate behavior
changes to the copy's string semantics become explicit, not a silent
side-effect.

Testing Text and Atom in isolation is made possible by a small link
seam that stands in for the QDoc database used by LinkAtom's ctor. This
test double resolves every lookup against an empty forest.

Task-number: QTBUG-150798
Change-Id: Ie74627a4935c6abc5970f2834c8c3142b760991a
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commit77676a15eaadab816f841d7f1f11e9e953b7b77f
parent3d8a80e352114e5802e83de6df79029ffeefa5e8
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeFri, 25 Sep 2026 15:41:45 +0000