diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-02-06 10:17:52 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-02-07 12:21:13 +0100 |
commit | e79979ba40992d5ae8e12084f91c0d06f158a4df (patch) | |
tree | c5fff38dad539a324bb0147b1136fad2a6768d40 /tests/auto/corelib/io/qfile | |
parent | 5c520f4b0ad4b539dc0184c764ca9f12c98730d9 (diff) |
On Windows 7, fall back to SHFileOperation to avoid confirmation dialogs
Moving a file to the trash should preferably done via IFileOperation.
However, the implementation on Windows 7 ignores the operation flags
that request the shell not to show any confirmation dialogs or other UI
elements.
SHFileOperation is an old API that doesn't show any UI, but has the
limitation that it doesn't report the location of the file in the trash
after the move. So an application cannot restore the file, but the user
can do so via Explorer.
Overall, the better compromise is to not have dialogs at the expense of
not being able to report the new path. This allows us to run the unit
test on Windows 7 as well.
Change-Id: Ib8e651a69e2c6750f668b52d2a70925d156cc8ae
Fixes: QTBUG-81927
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qfile')
-rw-r--r-- | tests/auto/corelib/io/qfile/tst_qfile.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index b065e1f10f..350bff0652 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -3681,9 +3681,6 @@ void tst_QFile::moveToTrash_data() QTest::addColumn<bool>("create"); QTest::addColumn<bool>("result"); - if (QOperatingSystemVersion::current() <= QOperatingSystemVersion::Windows7) - QSKIP("Windows 7 insists on showing a confirmation dialog", SkipAll); - // success cases { QTemporaryFile temp; |