summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2015-08-06 11:52:48 +0200
committerAnne Jan Brouwer <annejan@noprotocol.com>2015-08-06 11:52:48 +0200
commit20936dafee6477012e9fda43b0a9dd1e80a5d50b (patch)
tree6a6c470898beefb4200c7a117cad55f17f957bd8
parent8b9874cec3a0760e443894736b7d5cb922e8e44f (diff)
missing git recursive delete
-rw-r--r--mainwindow.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index d47dfd8a..2995946f 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -1041,14 +1041,24 @@ void MainWindow::on_deleteButton_clicked()
if (usePass) {
currentAction = DELETE;
executePass("rm -r \"" + file + '"');
+ if (useGit && autoPush) {
+ on_pushButton_clicked();
+ }
} else {
- // TODO GIT
+ if (useGit) {
+ executeWrapper(gitExecutable, "rm -rf \"" + file + '"');
+ executeWrapper(gitExecutable, "commit \"" + file + "\" -m \" Remove for " + getFile(ui->treeView->currentIndex(), true) + " using QtPass.\"");
+ if (autoPush) {
+ on_pushButton_clicked();
+ }
+ } else {
#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
+ }
}
}
}