Unsolved QTemporaryFile: file not being created in Qt 5.11/5.12
-
The support for O_TMPFILE was added in 5.10 and there was even a big changelog entry for this: https://code.qt.io/cgit/qt/qtbase.git/tree/dist/changes-5.10.0/?h=v5.10.0
-
@Christian-Ehrlicher said in QTemporaryFile: file not being created in Qt 5.11/5.12:
The support for O_TMPFILE was added in 5.10 and there was even a big changelog entry for this: https://code.qt.io/cgit/qt/qtbase.git/tree/dist/changes-5.10.0/?h=v5.10.0
Great, thanks for the link.
I'd still say there should be a note about this in Qt docs for Qt >5.10. Many other such OS "curiosities" are mentioned in the docs.
-
@sierdzio said in QTemporaryFile: file not being created in Qt 5.11/5.12:
I'd still say there should be a note about this in Qt docs
Feel free to provide a patch ;)
-
@Christian-Ehrlicher said in QTemporaryFile: file not being created in Qt 5.11/5.12:
@sierdzio said in QTemporaryFile: file not being created in Qt 5.11/5.12:
I'd still say there should be a note about this in Qt docs
Feel free to provide a patch ;)
Oh I wish, but no time right now.
I'll bookmark this, though and hopefully come back with a patch some day.
-
I'll bookmark this, though and hopefully come back with a patch some day.
Too late :) But you can review the patch: https://codereview.qt-project.org/c/qt/qtbase/+/282081
-
Great, thanks! Looks good. I may be lacking some powers as I don't see any +1 button I can click.
-
It's in the dialog you get when you hit the Reply button.
-
Ah OK found it under
REPLY
. That gerrit UI... -
@aha_1980
Whoever made that doc change (you? some bot?!), it's perfect! -
@JonB It was me. I copied the text from the 5.10 changelog :)
-
Thanks to all being involved in the discussion.
When answering with 1st and 2nd post I did not expect to create so much fuzz around this issue. With the mass of comments and different references. Therefore, I miss a crucial point here.I am happy with the functionality, since there are good reasons as I expect with the summarized expertize being involved in the discussion. After a couple of trials I was also able to review @aha_1980 's addition to the documentation, which clarifies things generally.
I guess there is still a different behaviour of exist() after the 2 versions of open to be callable. Since the second says that the file is definitely created, it has to be the first open() as used by @Aritz
Personally I would add a short reference to the detailed information section on linux for the first open() version. Something like:
See note on Linux aboveIf my assumption is wrong and the issue with exists() is for both open versions the same, we have a different ambiguity in the documentation respectively a bug in the description for bool QTemporaryFile::open(QIODevice::OpenMode flags) . In this case a reference or modification in documentation is required for second open version.