qt6-bb10/tests/auto
Volker Hilsheimer 601ce9e08a Implement moving of a single file system entry to the trash
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>
2020-01-30 06:14:56 +01:00
..
bic/data Add binary compatibility files for qtbase 5.14 branch 2019-12-20 10:41:11 +02:00
cmake CMake: Add support for auto-importing plugins in CMake 2019-08-12 18:23:58 +02:00
concurrent Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
corelib Implement moving of a single file system entry to the trash 2020-01-30 06:14:56 +01:00
dbus Deprecate constructing QFlags from a pointer 2019-11-20 19:43:38 +01:00
gui QPushButton: only trigger button when click occurs within the bevel rect 2020-01-28 22:26:26 +01:00
guiapplauncher
installed_cmake
network QNetworkAccessManager: deprecate bearer related functions 2020-01-30 05:29:35 +01:00
opengl Remove dead code from Qt 4 times 2019-08-20 22:27:46 +00:00
other Merge remote-tracking branch 'origin/5.14' into 5.15 2020-01-28 08:09:51 +01:00
printsupport Remove the remaining usages of deprecated APIs of qtbase 2019-08-01 06:48:27 +02:00
shared QWindowsFontDatabase: Check preferred family names for all fonts 2019-11-29 09:31:21 +01:00
sql Merge remote-tracking branch 'origin/5.14' into 5.15 2019-12-10 13:51:40 +02:00
testlib Deprecate constructing QFlags from a pointer 2019-11-20 19:43:38 +01:00
tools Introduce Q_PROPERTY attribute REQUIRED 2020-01-23 16:47:45 +01:00
widgets QPushButton: only trigger button when click occurs within the bevel rect 2020-01-28 22:26:26 +01:00
xml QNetworkReply: deprecate the 'error' getter 2020-01-13 15:50:47 +01:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h QAbstractSocket: deprecate 'error' member-function 2020-01-10 12:54:53 +01:00