qt5base-lts/tests
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
..
auto QTemporaryFile: fix issues with removing a file twice 2017-11-23 05:27:23 +00:00
baselineserver Allow QImage with more than 2GByte of image data 2017-07-08 08:17:13 +00:00
benchmarks Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
global
manual Merge remote-tracking branch 'origin/5.9' into 5.10 2017-11-09 11:47:57 +01:00
shared Fix largefile tests on ARM and QEMU targets 2017-03-28 06:55:32 +00:00
README
tests.pro Build examples and tests only if their requirements are met 2017-03-22 15:55:55 +00:00

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.