diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2016-06-10 22:18:58 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2016-06-10 22:18:58 +0200 |
commit | 55ff570c945eb9ab7e074e851493457626fcda0e (patch) | |
tree | 66a304e89536f2c8d76359973d035f89c15db502 | |
parent | 9b79a166a22e2774f864a38572f69b7b6fc6266e (diff) |
Make sure process is ready, fixes #177v1.1.3
-rw-r--r-- | mainwindow.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index b13a120f..55cbee72 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1442,6 +1442,8 @@ void MainWindow::on_usersButton_clicked() { if (autoPush) on_pushButton_clicked(); } + + reencryptPath(dir); } @@ -1763,6 +1765,7 @@ void MainWindow::editPassword() { if (useGit && autoPull) on_updateButton_clicked(); waitFor(30); + process->waitForFinished(); // TODO(annejan) move to editbutton stuff possibly? currentDir = getDir(ui->treeView->currentIndex(), false); lastDecrypt = "Could not decrypt"; @@ -1882,10 +1885,22 @@ void MainWindow::setClippedPassword(const QString &pass) { const QString &MainWindow::getClippedPassword() { return clippedPass; } +/** + * @brief MainWindow::reencryptPath reencrypt all files under the chosen directory + * @param dir + */ void MainWindow::reencryptPath(QString dir) { + qDebug() << "reencrypt: " << dir; + // @TODO(annejan) disable interface until done + QDirIterator it(dir, QStringList() << "*.gpg", QDir::Files, QDirIterator::Subdirectories); + while (it.hasNext()) { + QString fileName = it.next(); + qDebug() << fileName; + } + QMessageBox::information( this, tr("Recursing not yet implemented!"), tr("This is an issue that only happens when you are not using pass.\n" - "Some people might not correctly be encrypted for %1!").arg(dir)); + "Passwords are not reencrypted in folder %1!").arg(dir)); } |