summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2015-06-15 22:46:04 +0200
committerAnne Jan Brouwer <brouwer@annejan.com>2015-06-15 22:46:04 +0200
commitb14b15757330a48e4ae1e99a80924187a716a60f (patch)
tree5dab0e01df3deccad8bbf4a7a5c708c89bd24444
parente5f845e663fd11fee280bd036eafc0aaf5a9fdae (diff)
use pass
-rw-r--r--mainwindow.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 8de65646..3b61d131 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -873,21 +873,25 @@ void MainWindow::on_deleteButton_clicked()
QFile(file).remove();
}
} else {
- file = getDir(ui->treeView->currentIndex(), false);
+ file = getDir(ui->treeView->currentIndex(), usePass);
if (QMessageBox::question(this, tr("Delete folder?"),
tr("Are you sure you want to delete %1?").arg(QDir::separator() + getDir(ui->treeView->currentIndex(), true)),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
return;
}
- // TODO GIT
+ if (usePass) {
+ currentAction = DELETE;
+ executePass("rm -r \"" + file + '"');
+ } else {
+ // TODO GIT
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
- QDir dir(file);
- dir.removeRecursively();
+ QDir dir(file);
+ dir.removeRecursively();
#else
- removeDir(file);
+ removeDir(file);
#endif
+ }
}
-
}
/**