Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.1.1, 5.2.0
-
None
-
Windows 32-bit, VS 2012, MingW32
-
81e69ffdbac1e6f2066c2de3e5cfecbb923f2b15
Description
When opening a file with QIODevice::WriteOnly, it gets truncated.
The documentation for OpenModeFlag doesn't mention this and the presence of QIODevice::Truncate implies that WriteOnly alone does not truncate the file.
Attached is a file that reproduces the issue. The expected contents of test_file.txt after running the program are "testtest", but it ends up empty.
The docs need to be clearer.