601ce9e08a
This implements the operation for Windows, macOS, and Unix, for now only as a private API (since QFileSystemEngine is private). This adds the capability as a testable function; public API to be agreed on and added in a separate commit. The Unix implementation follows the freedesktop.org specification [1] version 1.0. [1] https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html On macOS and Windows, native APIs are used, with each having some limitations: * on macOS, the file in the trash won't have a "put back" option, as we don't use Finder automation, for the reasons provided in the comments * on Windows, we might not be able to use the modern IFileOperation API, e.g. if Qt is built with mingw which doesn't seem to provide the interface definition; the fallback doesn't provide access to the file name in the trash The test case creates files and directories, and moves them to the trash. As part of the cleanup routine, it deletes all file system entries created. If run on Windows without IFileOperations support, this will add a file in the trash for each test run, filling up hard drive space. Task-number: QTBUG-47703 Change-Id: I5f5f4e578be2f45d7da84f70a03acbe1a12a1231 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io> |
||
---|---|---|
.. | ||
largefile | ||
qabstractfileengine | ||
qbuffer | ||
qdataurl | ||
qdebug | ||
qdir | ||
qdiriterator | ||
qfile | ||
qfileinfo | ||
qfileselector | ||
qfilesystemengine | ||
qfilesystementry | ||
qfilesystemmetadata | ||
qfilesystemwatcher | ||
qiodevice | ||
qipaddress | ||
qlockfile | ||
qloggingcategory | ||
qloggingregistry | ||
qnodebug | ||
qprocess | ||
qprocess-noapplication | ||
qprocessenvironment | ||
qresourceengine | ||
qsavefile | ||
qsettings | ||
qstandardpaths | ||
qstorageinfo | ||
qtemporarydir | ||
qtemporaryfile | ||
qurl | ||
qurlinternal | ||
qurlquery | ||
io.pro |