Doc: 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 it's own file. This also allows
compile-testing it as a bonus point.
Task-number: QTBUG-130799
Pick-to: 6.8
Change-Id: I7b737ec06dc9eb58d5cacb218f039dcc8b871ef8
Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>