qt5base-lts/tests/auto/corelib/io
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
..
largefile Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
qabstractfileengine Filesystem: Use "birth time" to avoid confusion with Unix ctime 2017-08-05 16:41:38 +00:00
qbuffer Updated license headers 2016-01-21 18:55:18 +00:00
qdatastream Use QSharedPointer::create() more 2017-07-19 13:40:42 +00:00
qdataurl Updated license headers 2016-01-21 18:55:18 +00:00
qdebug QDebug: add op<<(QStringView) 2017-03-24 20:43:03 +00:00
qdir Remove unnecessary VxWorks ifdef 2017-09-18 21:06:25 +00:00
qdiriterator Merge remote-tracking branch 'origin/5.7' into dev 2016-06-13 12:46:46 +02:00
qfile Merge remote-tracking branch 'origin/5.9' into 5.10 2017-11-09 11:47:57 +01:00
qfileinfo Clean dynamic function resolving done for XP in QFileInfo tests 2017-10-19 10:59:04 +00:00
qfileselector Remove duplicate qnx from the platform file selector names 2017-10-24 16:43:39 +00:00
qfilesystementry Updated license headers 2016-01-21 18:55:18 +00:00
qfilesystemmetadata Filesystem: Use "birth time" to avoid confusion with Unix ctime 2017-08-05 16:41:38 +00:00
qfilesystemwatcher QFileSystemWatcher/Windows: Recreate handle for files 2017-07-07 07:02:45 +00:00
qiodevice Introduce QIODevice::skip() 2017-08-27 06:17:09 +00:00
qipaddress Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-13 06:55:37 +02:00
qlockfile Autotest: use _exit() instead of exit() to simulate an unclean exit 2017-10-08 06:41:05 +00:00
qloggingcategory Updated license headers 2016-01-21 18:55:18 +00:00
qloggingregistry QLoggingRegistry: remove rules vector 2017-04-21 07:16:33 +00:00
qnodebug QDate/Time: add toString(QStringView) overloads 2017-04-12 11:12:09 +00:00
qprocess Merge remote-tracking branch 'origin/5.9' into dev 2017-07-13 16:36:10 -07:00
qprocess-noapplication macOS: Don't build auto-tests as application bundles unless explicitly requested 2016-10-23 10:39:56 +00:00
qprocessenvironment QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qresourceengine unbreak tst_qresourceengine for prefix builds 2017-08-03 04:54:56 +00:00
qsavefile Support Alternate Data Streams in QSaveFile 2017-08-04 17:30:13 +00:00
qsettings Allow QSettings to synchronize non-atomically 2017-08-04 17:30:16 +00:00
qstandardpaths Blacklist tst_qstandardpaths::testFindExecutable for b2qt/arm64 2017-11-12 15:35:21 +00:00
qstorageinfo Merge remote-tracking branch 'origin/5.7' into dev 2016-05-23 21:09:46 +02:00
qtemporarydir Merge remote-tracking branch 'origin/5.9' into 5.10 2017-11-09 11:47:57 +01:00
qtemporaryfile QTemporaryFile: fix issues with removing a file twice 2017-11-23 05:27:23 +00:00
qtextstream winrt: Fix tst_qtextstream 2017-06-19 07:06:01 +00:00
qurl Merge remote-tracking branch 'origin/5.9' into 5.10 2017-10-30 08:54:05 +01:00
qurlinternal QUrl: fix IDN conversion when the ACE form is invalid 2017-04-25 00:51:43 +00:00
qurlquery Updated license headers 2016-01-21 18:55:18 +00:00
io.pro Remove QWinOverlappedIoNotifier 2017-06-02 20:01:43 +00:00