Don't ignore return value of QFile::open


Fixes warnings after QFile::open has become [[nodiscard]].

In one case, replace the check for file existence with the check for the
file's opening success. That's the whole reason we added the
[[nodiscard]] for.

Pick-to: 6.9 6.8
Change-Id: Ib6fe8c2ac3b9306bbe74bc70ba36f19efbdcbe7d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
commit226f350db5ca563ab039e98162818c8563d5049b
parent4e4619ae3999eb88875d8dbdd4aad6e27c2f863d
authorThiago Macieira <thiago.macieira@intel.com>
committerThiago Macieira <thiago.macieira@intel.com>
commit timeTue, 7 Jan 2025 10:17:33 -0300