qt5base-lts/tests/auto/corelib/io/qfile
Volker Hilsheimer a033c23ddf QFile::moveToTrash: work with relative file paths on Windows
The system APIs expect an absolute "display name" of the file path,
so make it absolute.

The test was overly tolerant in accepting failure, as a QStorageInfo
initialized with a file path that doesn't exist is invalid, and thus
always different from the QStorageInfo of the home directory. Fix the
test to compare only valid QStorageInfo objects, and postpone the check
until the file we want to move has been created.

[ChangeLog][QtCore][QFile] moveToTrash supports relative file paths
on Windows

Change-Id: I94c8cd40c60fde469e38f76a98f867f20c6a0b15
Fixes: QTBUG-84015
Pick-to: 5.15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-07 14:27:09 +02:00
..
resources Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
stdinprocess Q{File,FileInfo,Dir}: add std::filesystem::path overloads 2020-03-24 16:20:03 +01:00
.gitattributes Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
.gitignore tst_qfile: Fix execution for WinRT 2018-06-28 15:43:58 +00:00
.prev_CMakeLists.txt Port more tests from qtbase/tests/auto/corelib/io/ to CMake 2020-05-04 19:21:15 +02:00
CMakeLists.txt Port more tests from qtbase/tests/auto/corelib/io/ to CMake 2020-05-04 19:21:15 +02:00
copy-fallback.qrc Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
dosfile.txt Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
forCopying.txt Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
forRenaming.txt Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
noendofline.txt Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
qfile.pro Add qt_test_helper feature 2018-07-25 05:17:47 +00:00
qfile.qrc Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
rename-fallback.qrc Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
test.pro Q{File,FileInfo,Dir}: add std::filesystem::path overloads 2020-03-24 16:20:03 +01:00
testfile.txt Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
testlog.txt Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
tst_qfile.cpp QFile::moveToTrash: work with relative file paths on Windows 2020-05-07 14:27:09 +02:00
two.dots.file Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00