qt5base-lts/tests/auto/corelib
Volker Hilsheimer 74a2467edd 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>
2020-02-05 20:21:45 +01:00
..
animation Flatten version-specific blacklisting on macOS to all macOS versions 2020-01-22 17:58:31 +01:00
codecs Port from QStringViewLiteral to u"" 2019-07-29 11:17:28 +03:00
global Merge remote-tracking branch 'origin/5.14' into 5.15 2020-01-09 20:30:39 +01:00
io Add QFile::moveToTrash, which moves a file to the trash 2020-02-05 20:21:45 +01:00
itemmodels QIdentityProxyModel: implement moveRows / moveColumns 2020-01-02 17:48:07 +01:00
kernel QSignalMapper: deprecate overridden signals 2020-02-01 21:23:44 +01:00
mimetypes Remove handling of missing Q_COMPILER_RVALUE_REFS 2019-05-01 20:24:45 +00:00
plugin Avoid initializing QFlags with 0 or nullptr in tests 2019-11-26 09:08:51 +01:00
serialization tst_QDataStream::readQCursor(): Replace deprecated QCursor API 2020-02-01 07:31:02 +08:00
statemachine QStateMachine: Don't scream at the user 2019-10-24 10:26:03 +02:00
text Merge remote-tracking branch 'origin/5.14' into 5.15 2020-02-04 10:44:00 +01:00
thread Add a constructor for QRunnable from anonymous functions 2020-01-31 19:20:43 +01:00
time Deprecate locale-related DateFormat enum members 2020-01-31 19:20:43 +01:00
tools QScopeGuard: Fix build failures with qScopeGuard() 2020-02-01 11:07:08 +02:00
corelib.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00