summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heinecke <aheinecke@intevation.de>2016-09-05 13:31:47 (GMT)
committerAndre Heinecke <aheinecke@intevation.de>2016-09-05 13:52:11 (GMT)
commitdd39faa6f4c5b4d534c03546cc7a60e1d68c7dcd (patch)
tree30fce6449ecf5f7456c35220a0c6329491d4313b
parent781fc0393303435c91a4510f78e0c11e352515cc (diff)
Look for paperkey executable in the install dir
This fixes paperkey lookup on Windows where it is not placed in PATH but packaged together with Kleopatra and installed into the same directory.
-rw-r--r--src/utils/gnupg-helper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/gnupg-helper.cpp b/src/utils/gnupg-helper.cpp
index c9f2d17..540e4c0 100644
--- a/src/utils/gnupg-helper.cpp
+++ b/src/utils/gnupg-helper.cpp
@@ -229,6 +229,8 @@ bool Kleo::engineIsVersion(int major, int minor, int patch, Engine engine)
const QString& Kleo::paperKeyInstallPath()
{
- static const QString pkPath = QStandardPaths::findExecutable("paperkey");
+ static const QString pkPath = QStandardPaths::findExecutable("paperkey", QStringList() << QCoreApplication::applicationDirPath()).isEmpty() ?
+ QStandardPaths::findExecutable("paperkey") :
+ QStandardPaths::findExecutable("paperkey", QStringList() << QCoreApplication::applicationDirPath());
return pkPath;
}