Clean up test files


The modules's auto tests contained unused defines in CMakeList and
in source files. Moreover, test files included a whole Qt module.
Instead, use the required headers and get rid of clazy's warning
no-module-include.

Pick-to: 6.11
Change-Id: I18a1044394147913b747f9bb0fd3e6939c6dbd83
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
commitf8ce213cb90d5d736fb9c288c1845c9500fce201
parent3ef2ac34c63112271d1170b7fe255d8e6944ad45
authorHatem ElKharashy <hatem.elkharashy@qt.io>
committerHatem ElKharashy <hatem.elkharashy@qt.io>
commit timeThu, 19 Mar 2026 04:43:29 +0200