Fix QTemporaryFile::open() failing after remove().
authorMitch Curtis <mitch.curtis@nokia.com>
Wed, 30 May 2012 09:55:28 +0000 (11:55 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 5 Jun 2012 04:15:06 +0000 (06:15 +0200)
commitf3f648f920a9f4676a5cde98806fc7735119984c
treea0deb0ffd433a8dc8606bb50e6adfde454969131
parent872f0b94ac7a863c59bf1175b94cca3b3636cf13
Fix QTemporaryFile::open() failing after remove().

If a QTemporaryFile is constructed using a template file path,
the path is generated in QTemporaryFileEngine::open() and then
filePathIsTemplate is set to false. If remove() and then open()
are called on the same QTemporaryFile, the path is not regenerated.
This change ensures that if the file path was generated, it will be
generated again in the scenario above.

Task-number: QTBUG-2557
Change-Id: I718ceb89daa9a9d46fdbe811fecc3d57d6dc08c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/io/qtemporaryfile.cpp
tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp