From 89eabf3c4df39f918fae9414d26a4cf5459f2047 Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Sun, 3 May 2015 09:51:01 +0100 Subject: added a 'yes to all' shellMove and made the drag-and-drop code use shellMove/shellCopy --- src/mainwindow.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 755b5469..578d4419 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4635,19 +4635,13 @@ void MainWindow::dropEvent(QDropEvent *event) } } - //We should really show progress and add a cancel button for these in case - //the operation takes a long time. if (action == Qt::MoveAction) { - if (MoveFileExW(file.absoluteFilePath().toStdWString().c_str(), - target.toStdWString().c_str(), - MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING) != 0) { + if (shellMove(file.absoluteFilePath(), target, true, this)) { continue; } } else { - if (CopyFileW(file.absoluteFilePath().toStdWString().c_str(), - target.toStdWString().c_str(), - FALSE) != 0) { + if (shellCopy(file.absoluteFilePath(), target, true, this)) { continue; } } -- cgit v1.3.1