summaryrefslogtreecommitdiffstats
path: root/mainwindow.cpp
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2016-04-04 11:20:35 +0200
committerAnne Jan Brouwer <annejan@noprotocol.com>2016-04-04 11:20:35 +0200
commit61cc2e11540ade12c1af79a2e6f67b1fb951179c (patch)
treee69eb729c9913ea70c7d1a58f13eb800de2664e2 /mainwindow.cpp
parent7863ef3c8b7f0e5bcef7627f78a9570947df0e4f (diff)
premature
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r--mainwindow.cpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index f397d531..4fa02211 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -1393,11 +1393,9 @@ void MainWindow::on_usersButton_clicked() {
tr("Failed to open .gpg-id for writing."));
return;
}
- QString initstring = "";
bool secret_selected = false;
foreach(const UserInfo &user, users) {
if (user.enabled) {
- initstring += " " + user.key_id;
gpgId.write((user.key_id + "\n").toUtf8());
secret_selected |= user.have_secret;
}
@@ -1409,26 +1407,15 @@ void MainWindow::on_usersButton_clicked() {
tr("None of the selected keys have a secret key available.\n"
"You will not be able to decrypt any newly added passwords!"));
}
- if (usePass) {
- QString initDir = currentDir.isEmpty()
- ? getDir(ui->treeView->currentIndex(), true)
- : currentDir;
- executePass("init \"" + initDir + "\" " + initstring);
- qDebug() << initDir + initstring;
- } else {
- // TODO reencrypt
-
-
- if (!useWebDav && useGit && !gitExecutable.isEmpty()) {
- if (addFile)
- executeWrapper(gitExecutable, "add \"" + gpgIdFile + '"');
- QString path = gpgIdFile;
- path.replace(QRegExp("\\.gpg$"), "");
- executeWrapper(gitExecutable, "commit \"" + gpgIdFile + "\" -m \"Added " +
- path + " using QtPass.\"");
- if (autoPush)
- on_pushButton_clicked();
- }
+ if (!useWebDav && useGit && !gitExecutable.isEmpty()) {
+ if (addFile)
+ executeWrapper(gitExecutable, "add \"" + gpgIdFile + '"');
+ QString path = gpgIdFile;
+ path.replace(QRegExp("\\.gpg$"), "");
+ executeWrapper(gitExecutable, "commit \"" + gpgIdFile + "\" -m \"Added " +
+ path + " using QtPass.\"");
+ if (autoPush)
+ on_pushButton_clicked();
}
}