Adjust test to behavior change of QTemporaryFile::fileName()
(cherry picked from commit da4a16bf14c759e56ae46a7530c349c0161d500b)