diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-06-28 23:36:19 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-08-23 04:02:19 +0000 |
commit | 189e9c93d7ed42202ad51507c8944d64e9a7888d (patch) | |
tree | 82f14423f4e78206024d5360922e9869b0224b1a /src/corelib/global/minimum-linux.S | |
parent | b6a61211280aa6ddd56f107a9795c9824b7702b0 (diff) |
QTemporaryFile: Add support for Linux's O_TMPFILE
That means a file is never created, unless you ask for the name. There's
no chance of left-over temporary files being left behind. QSaveFile also
benefits from this, since the save file is not present on disk until
commit(). Unfortunately, QSaveFile must go through a temporary name
because linkat(2) cannot overwrite -- we need rename(2) for that (for
now).
[ChangeLog][Important Behavior Changes][QTemporaryFile] On Linux,
QTemporaryFile will attempt to create unnamed temporary files. If that
succeeds, open() will return true but exists() will be false. If you
call fileName() or any function that calls it, QTemporaryFile will give
the file a name, so most applications will not see a difference.
Change-Id: I1eba2b016de74620bfc8fffd14cc843e5b0919d0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/global/minimum-linux.S')
-rw-r--r-- | src/corelib/global/minimum-linux.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/global/minimum-linux.S b/src/corelib/global/minimum-linux.S index aa67be44ca..6b7fb4f63b 100644 --- a/src/corelib/global/minimum-linux.S +++ b/src/corelib/global/minimum-linux.S @@ -81,6 +81,7 @@ * Feature Added in version Macro * - inotify_init1 before 2.6.12-rc12 * - futex(2) before 2.6.12-rc12 + * - linkat(2) 2.6.17 O_TMPFILE * - FUTEX_PRIVATE_FLAG 2.6.22 * - O_CLOEXEC 2.6.23 * - eventfd 2.6.23 |