Fix documentation snippets


Fix errors in the snippets source code. Add the snippet C++ sources to
he CI build to avoid future regressions.

Pick-to: 6.12
Change-Id: I66b15fe2b73179820b447960e3a7d518bb6c0dd8
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
commit5546d94fb9f6d9650f8f608019cebae6df8dd72d
parent360f4de680969bebf21c678e6bfb7612cea10b28
authorKai Koehne <kai.koehne@qt.io>
committerKai Koehne <kai.koehne@qt.io>
commit timeThu, 25 Jun 2026 13:25:35 +0000