qt5base-lts/tests/auto/corelib
Thiago Macieira 4be50ecafd QTemporaryFile: fix issues with removing a file twice
The assertion in isUnnamedFile() we had was incorrect after the file was
removed, since we cleared the name and possibly reset back to the
template. Since ~QTemporaryFile() calls remove(), this was easy to
trigger if you attempted to remove the temp file and leave
QTemporaryFile like that.

Take this opportunity to add to the docs of setAutoRemove() explaining
the possibility of unnamed files.

#7  0x00007f69bcc2b50e in qt_assert (
    assertion=assertion@entry=0x7f69bcf194a0 "unnamedFile == d_func()->fileEntry.isEmpty()",
    file=file@entry=0x7f69bcf19458 "io/qtemporaryfile.cpp",
    line=line@entry=514) at global/qglobal.cpp:3123
#8  0x00007f69bcd672cf in QTemporaryFileEngine::isUnnamedFile (this=this@entry=0x55cd60644df0)
    at io/qtemporaryfile.cpp:514
#9  0x00007f69bcd683f7 in QTemporaryFileEngine::remove (this=0x55cd60644df0)
    at io/qtemporaryfile.cpp:396
#10 0x00007f69bcd48654 in QFile::remove (this=this@entry=0x7fffb393f7e0)
    at io/qfile.cpp:513
#11 0x00007f69bcd6653b in QTemporaryFile::~QTemporaryFile (this=0x7fffb393f7e0, __in_chrg=<optimized out>)
    at io/qtemporaryfile.cpp:719

Change-Id: I57a1bd6e0c194530b732fffd14f4ed28ca8185b2
Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-23 05:27:23 +00:00
..
animation macOS: Blacklist tst_QSequentialAnimationGroup::groupWithZeroDurationAnimations() 2017-11-03 21:15:08 +00:00
codecs QTextCodec: add QStringView overloads 2017-04-06 12:05:33 +00:00
global QRandomGenerator: add more of the std Random Engine API 2017-11-11 08:11:07 +00:00
io QTemporaryFile: fix issues with removing a file twice 2017-11-23 05:27:23 +00:00
itemmodels Ensure result of all QTest::qWaitFor are verified 2017-10-05 15:15:36 +00:00
json Improve symmetry of variant json conversions 2017-07-25 09:00:46 +00:00
kernel Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
mimetypes Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
plugin Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
statemachine Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
thread Merge remote-tracking branch 'origin/5.9.3' into 5.10.0 2017-11-21 10:58:21 +01:00
tools Merge 5.10 into 5.10.0 2017-11-20 13:48:33 +01:00
xml Build examples and tests only if their requirements are met 2017-03-22 15:55:55 +00:00
corelib.pro Add support for Apple tvOS 2016-05-17 16:11:23 +00:00