Fixing warnings/errors about QFile::open() return value not being
checked, and print the name of the file and the error message that
occurred.
Task-number: QTBUG-132902
Change-Id: I099b300b5fd4563334fa547ffa365ec3f68e08cf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit e99d5c6268862e5773056a008c273e18bf5b4ef7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>