[Interest] QTemporaryFile::open(OpenMode flags) is protected, but not in documentation

Constantin Makshin cmakshin at gmail.com
Thu Sep 26 06:10:38 CEST 2013


According to the Qt 4.8 source code on Gitorious, closing QTemporaryFile
just sets the read-write pointer to the beginning of the file and
[re]opening it enforces QIODevice::ReadWrite mode (line 82 of
"src/corelib/io/qtemporaryfile.h" and line 318 of
"src/corelib/io/qtemporaryfile.cpp") which doesn't truncate the file.

On 09/26/2013 05:39 AM, Thiago Macieira wrote:
> In any case, every time you open a QTemporaryFile, you get a blank file. There 
> is no data on the file, so it makes no sense to open it in read-only mode.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130926/ec812180/attachment.sig>


More information about the Interest mailing list