-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.9.0 Beta1
-
None
-
2
-
fde2ec282 (dev), 8924fdf1b (6.10), 4cf9da126 (6.9), 7de757749 (tqtc/lts-6.8)
The documentation of QTemporaryFile neglects to define the relation between the autoRemove property and the rename() function, specifically whether a rename() will cause autoRemove to be unset or not.
Given that rename() is akin to QSaveFile::commit(), in that it "finishes" the write by (atomically) overwriting the old file with the new temp file, one could be mistakenly assume that a rename() would cancel autoRemove. It looks as though one has to explicitly disable it, though.
The relation between the two should be more explicitly documented, perhaps including a QSaveFile-like example:
- open QTemporaryFile tmp(target), return if failed
- write to tmp, return if failed
- tmp.rename(target), return if failed
- tmp.setAutoRemove(false);
- relates to
-
QTBUG-132669 Add a QTemporaryFile/Dir (named?) ctor that doesn't expect a placeholder
-
- Open
-
-
QTBUG-132617 Unclear behaviour of QTemporaryFile::rename()
-
- Closed
-
-
QTBUG-132620 QSaveFile follows symlinks unconditionally
-
- Closed
-
-
QTBUG-132646 Add a variant of QTemporaryFile::rename() that overwrites
-
- Closed
-
For Gerrit Dashboard: QTBUG-132590 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
658579,4 | Doc: Clarify rename() does not disable autoremove in QTemporaryFile | dev | qt/qtbase | Status: MERGED | +2 | 0 |
659025,2 | Doc: Clarify rename() does not disable autoremove in QTemporaryFile | 6.10 | qt/qtbase | Status: MERGED | +2 | 0 |
659417,2 | Doc: Clarify rename() does not disable autoremove in QTemporaryFile | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
659663,2 | Doc: Clarify rename() does not disable autoremove in QTemporaryFile | tqtc/lts-6.8 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |