diff options
author | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-08-06 11:52:48 +0200 |
---|---|---|
committer | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-08-06 11:52:48 +0200 |
commit | 4575ce7725c8f3e72ad1b078b12d4d6e41de99c7 (patch) | |
tree | 6a6c470898beefb4200c7a117cad55f17f957bd8 | |
parent | 3e93aa42682740b37fbe6bb68ca6cf9eec71b03d (diff) |
missing git recursive delete
-rw-r--r-- | mainwindow.cpp | 18 |
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 + } } } } |