Replace unusable \Q_OBJECT macro in documentation


moc/AUTOMOC will detect Q_OBJECT macros in code, regardless of whether
it is in a comment or not. This is why originally a qdoc macro Q_OBJECT
was introduced.

Anyhow, due to the underscore, qdoc never did treat \Q_OBJECT as a macro
invocation of this, resulting in \Q_OBJECT being verbally printed in the
generated documentation.

Fix this by moving the snippet into its own file. This also allows
compile-testing it as a bonus point.

Pick-to: 6.8
Task-number: QTBUG-130799
Change-Id: Ic586dcf6b403ff3d3be513b6cc95bed191862ef4
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
commitcd3f8fba7355a25e709bb945db852a65e4131aa8
parent52a7673d498b1b9761807ebd27d5cf3c0463eece
authorKai Köhne <kai.koehne@qt.io>
committerKai Köhne <kai.koehne@qt.io>
commit timeMon, 25 Nov 2024 08:33:37 +0000