summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2014-07-31 04:09:15 +0200
committerAnne Jan Brouwer <brouwer@annejan.com>2014-07-31 04:09:15 +0200
commit0326ca70db15d66a9b90ac887e3aba3cfe00b373 (patch)
tree2f679228377221875742544288810124022cb99e /main.cpp
parent528071fc220adfcf28bc5c162ebfb2d485ec13ea (diff)
check for pass executable
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 980485be..d95916f2 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,12 +1,21 @@
#include "mainwindow.h"
#include <QApplication>
+#include <QProcess>
+#include <QMessageBox>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow w;
- w.show();
- return app.exec();
+ QProcess *testProcess = new QProcess();
+ if (testProcess->execute("pass") == 0) {
+ w.show();
+ return app.exec();
+ } else {
+ QMessageBox msgBox;
+ msgBox.setText("Please install pass from http://www.passwordstore.org/");
+ msgBox.exec();
+ }
}