Fix -Wunused-result warnings in tests


Existing ones, as well as the newly-popping up ones from QFile::open().

Pick-to: 6.9 6.8
Change-Id: I580f3a022c18bc9026e47df10da8cc7b78296366
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
commit7b56c28e391ec91b407ced734e8f748040e4c62c
parent4f7595e2b05698da6f9cc21d70bf331638d7edc8
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeSun, 29 Dec 2024 22:10:58 +0100