diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-01-21 15:51:31 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-02-05 20:21:45 +0100 |
commit | 74a2467edd1bf0800cbaf1878984c6bccd42570d (patch) | |
tree | 10d141287c8e9b32a37c5241432be5a800e8a847 /examples | |
parent | 7dd6d32657cb079f8b3e1ff6b1dc27248ec0a2d4 (diff) |
Add QFile::moveToTrash, which moves a file to the trash
Due to the nature of QFile just operating on a file path, this also
works for paths that are actually directories.
The test covers files from different locations on which this
operation should typically succeed, but tries to handle the case
where trashing files will fail because of the file system
structure.
On Windows 7, running the test will open a confirmation dialog as
the implementation of IFileOperation doesn't respect the various
flags. This might depend on the specific Windows 7 patch level,
and the option to always use SHFileOperation on that platform needs
to be evaluated further.
[ChangeLog][QtCore][QFile] Introduce QFile::moveToTrash to allow
applications to move files to the trash.
Change-Id: I45019040c25b30f7db293b6933c63aca2f319514
Fixes: QTBUG-47703
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions