Details
Description
There is a serious regression in QFile/QTemporaryFile between Qt 5.9.5 (and all earlier versions) and Qt 5.11.1.
Here is what I do:
- Open a QTemporaryFile and write some data to it.
- Call size() on that file.
- Open same file using QFile and write more data to it (using Append flag).
- Copy the temp file to some other place.
Result:
Copied file contains only data written in 1. - all subsequent writes are lost when using Qt 5.11.1. On older versions (tested with 5.9.5 and 5.5.1) all data is copied correctly.
If I don't call size() (point 2), code works correctly and I see all the data on Qt 5.11.1.
I am not sure if QTemporaryFile has anything to do with the issue
Attached:
- main.cpp contains a minimal example
- destination_good_595.txt contains data written by example when run with Qt 5.9.5
- destination_bad_5111.txt contains data written by example when run with Qt 5.11.1