qt5base-lts/tests/auto
Edward Welbourne cb505bedde Actually truncate when asked to
On Unix, we wouldn't even *try* to truncate if the file was open for
appending.  The combination may be an eccentric choice but - at least
when it's combined with reading - I can imagine use-cases for it; and
we should (at least try to) deliver what we're asked for, even if we
can't think why anyone would want it.  So actually enable truncation
when asked to.

Amended some tests to check this works and corrected the QIODevice
documentation of mode flags (which misdescribed the special case that
implies Truncate).  Removed special-case code, to apply truncate when
writing but not reading, since it's been made redundant by the
pre-processing of mode done in QFSFileEngine::processOpenModeFlags().

[ChangeLog][QtCore][QFile] When opening a file, if Truncate is asked
for, or implied by other flags, it shall be attempted, regardless of
what other options are selected.  We previously did this on Windows;
now we do so also on Unix (even when appending).

Task-number: QTBUG-13470
Change-Id: I1e08d02cfbae102725fccbbc3aab5c7bf8830687
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-30 15:04:31 +00:00
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Add binary compatibility files for 5.11 for QtBase 2018-06-05 06:00:28 +00:00
cmake CMake: Restore qt5_use_modules() function 2018-06-15 07:29:09 +00:00
concurrent Merge remote-tracking branch 'origin/5.11' into dev 2018-02-16 08:54:58 +01:00
corelib Actually truncate when asked to 2018-07-30 15:04:31 +00:00
dbus Fix wrong relative path to qdbus_symbols.cpp 2018-07-24 04:24:31 +00:00
gui Add API for reading and decoding graphical texture files 2018-07-24 16:46:05 +00:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake
network Rework QNetworkReply tests to use docker-based test servers 2018-07-27 17:40:27 +00:00
opengl tst_QGL: Use qWaitForWindowExposed() 2018-04-11 06:05:46 +00:00
other Blacklist tst_Gestures::graphicsView on Ubuntu 18.04 2018-07-24 15:32:20 +00:00
printsupport Merge remote-tracking branch 'origin/5.11' into dev 2018-05-03 14:50:22 +02:00
shared Remove workaround for potentially unavailable pasteboard in macOS 2017-03-07 01:04:46 +00:00
sql prune cargo-culted and obsolete winsock deps from autotests 2018-07-19 13:31:08 +00:00
testlib Merge remote-tracking branch 'origin/5.11' into dev 2018-07-02 11:23:45 +02:00
tools Fix moc'ing of enum class flags 2018-07-26 22:14:56 +00:00
widgets Fix compilation of tst_QGraphicsItem in Visual Studio 2018-07-26 06:45:49 +00:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h Rework QNetworkReply tests to use docker-based test servers 2018-07-27 17:40:27 +00:00
testserver.pri Enable mDNS service discovery in Docker-based test servers 2018-07-10 15:25:14 +00:00