diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-05-04 09:44:15 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-05-04 16:26:26 +0200 |
commit | 112c285fcc065d07734b30ba49a62ead3be3d2c4 (patch) | |
tree | 62358196fa5e46eaa750c9377c0f886074a5f27e /tests/auto/corelib | |
parent | ea7d85457d30e915ad470919d2e74867cba9cad8 (diff) |
QFile::moveToTrash: use $XDG_DATA_HOME/Trash as the trash directory
The code assumed that files in $HOME should be moved into $HOME/.Trash,
which is not what the spec says. The "home trash" is defined to be
$XDG_DATA_HOME/Trash, and we can expect $XDG_DATA_HOME to exist. If it
doesn't, then we can safely fail, as the environment is not compliant
with the Desktop Base Directory Specification [1] anyway.
[1] http://www.freedesktop.org/Standards/basedir-spec
This will make the tests fail on such non-compliant environments, such
as server versions of the distribution. That's acceptable.
[ChangeLog][QtCore][QFile] moveToTrash now creates the trash folder on
Linux as $XDG_DATA_HOME/Trash, as required by the freedesktop.org spec.
Change-Id: I7ef73c0c268ef5ea4df141bb7831b93a65ad213a
Fixes: QTBUG-83933
Pick-to: 5.15
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto/corelib')
0 files changed, 0 insertions, 0 deletions