diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-05-19 17:51:15 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-07-15 04:53:30 +0000 |
commit | 02418d1aaa6760e08d55f0f6213d02d56b057fd2 (patch) | |
tree | 77afef448cb1e1c8bdbafe8b23ec07b373533863 /tests | |
parent | ca60311a60677f1133b0d4c50343f1644e184fa5 (diff) |
Set the state of QTemporaryFileEngine properly prior to reopening
QTemporaryFileEngine does not store the pattern, so it needs to get it
again from QTemporaryFilePrivate prior to reopening the file. It's
possible to lose the pattern when remove() is called on the object.
Task-number: QTBUG-46156
Change-Id: I66a35ce5f88941f29aa6ffff13dfc7f83d4fa3a2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index e7325d2b8e..94e6bbaade 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -353,6 +353,7 @@ void tst_QTemporaryFile::removeAndReOpen() QVERIFY(!QFile::exists(fileName)); QVERIFY(file.open()); + QCOMPARE(QFileInfo(file.fileName()).path(), QFileInfo(fileName).path()); fileName = file.fileName(); QVERIFY(QFile::exists(fileName)); } |