QDoc: Preserve LinkAtom when copied into Text
`Text` has separate `operator<<` overloads for `Atom` and
`LinkAtom`. The latter preserves `LinkAtom`-specific state when making a
copy. This relies on the expression at the call site having static type
`LinkAtom`. Appending the same object through `Atom` instead selects the
generic overload and reconstructs it as a plain `Atom`.
`Text::operator<<(const Text&)` compensates for this by checking for
`LinkAtom` and downcasting before appending. `DocParser` similarly has a
`LinkAtom`-specific `appendAtom()` overload to retain the static type
required to select the correct `Text` overload.
This change moves the `LinkAtom` check into
`Text::operator<<(const Atom&)`. This makes `Text` preserve `LinkAtom`
regardless of the static type at the call site, and allows for the
removal of the compensating logic in `Text::operator<<(const Text&)`
and `DocParser`.
Task-number: QTBUG-150798
Change-Id: I720188bd8207f9b2dfc8c719f7eae7d44488c8b6
Reviewed-by: Topi Reinio <topi.reinio@qt.io>