diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2014-07-31 15:56:59 +0200 |
---|---|---|
committer | Anne Jan Brouwer <ajbrouwer@totalactivemedia.nl> | 2014-07-31 15:56:59 +0200 |
commit | 86a6b3ba28919e13ecaa4ff67a602542035a9058 (patch) | |
tree | 5d202c64821ae789025ce15b9ec984cf3b8f85f7 /main.cpp | |
parent | 2aba44d04c76984f8c96a7c4cff36722f0e5ff76 (diff) |
pass less pass
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 33 |
1 files changed, 28 insertions, 5 deletions
@@ -14,11 +14,34 @@ int main(int argc, char *argv[]) testProcess->waitForFinished(); if (testProcess->exitCode() == 0) { w.setPassExecutable(testProcess->readAllStandardOutput()); - w.show(); - return app.exec(); } else { - QMessageBox msgBox; - msgBox.setText("Please install pass from http://www.passwordstore.org/"); - msgBox.exec(); + w.setPassExecutable(""); + //QMessageBox msgBox; + //msgBox.setText("Please install pass from http://www.passwordstore.org/"); + //msgBox.exec(); + testProcess->start("which git"); + testProcess->waitForFinished(); + if (testProcess->exitCode() != 0) { + QMessageBox msgBox; + msgBox.setText("Please install git"); + msgBox.exec(); + return 1; + } + w.setGitExecutable(testProcess->readAllStandardOutput()); + testProcess->start("which gpg2"); + testProcess->waitForFinished(); + if (testProcess->exitCode() != 0) { + testProcess->start("which gpg"); + testProcess->waitForFinished(); + if (testProcess->exitCode() != 0) { + QMessageBox msgBox; + msgBox.setText("Please install gpg"); + msgBox.exec(); + // return 1; + } + } + w.setGpgExecutable(testProcess->readAllStandardOutput()); } + w.show(); + return app.exec(); } |