summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-04-26 21:38:26 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-04-26 21:38:26 +0200
commit31ebc4f47a990e65e9872d8e7251bee5f22153d7 (patch)
tree64d0f0a7148d2a5201cce3ca5157b89496698e84 /framework
parent5da025fb7d42e4c82d7f3c3a7460e2ac1b8698d0 (diff)
downloadkube-31ebc4f47a990e65e9872d8e7251bee5f22153d7.tar.gz
kube-31ebc4f47a990e65e9872d8e7251bee5f22153d7.zip
Another qgpgme dependency gone
Diffstat (limited to 'framework')
-rw-r--r--framework/src/domain/mime/mimetreeparser/tests/gpgerrortest.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/tests/gpgerrortest.cpp b/framework/src/domain/mime/mimetreeparser/tests/gpgerrortest.cpp
index 7e0e0d04..356c0821 100644
--- a/framework/src/domain/mime/mimetreeparser/tests/gpgerrortest.cpp
+++ b/framework/src/domain/mime/mimetreeparser/tests/gpgerrortest.cpp
@@ -19,9 +19,6 @@
19 19
20#include <objecttreeparser.h> 20#include <objecttreeparser.h>
21 21
22#include <QGpgME/Protocol>
23#include <gpgme++/context.h>
24#include <gpgme++/engineinfo.h>
25#include <gpgme.h> 22#include <gpgme.h>
26 23
27#include <QDebug> 24#include <QDebug>
@@ -148,10 +145,14 @@ public Q_SLOTS:
148 mResetGpgmeEngine = false; 145 mResetGpgmeEngine = false;
149 mModifiedEnv.clear(); 146 mModifiedEnv.clear();
150 { 147 {
151 QGpgME::openpgp(); // We need to intialize it, otherwise ctx will be a nullpointer 148
152 const GpgME::Context *ctx = GpgME::Context::createForProtocol(GpgME::Protocol::OpenPGP); 149 gpgme_check_version(0);
153 const auto engineinfo = ctx->engineInfo(); 150 gpgme_ctx_t ctx = 0;
154 mGpgmeEngine_fname = engineinfo.fileName(); 151 gpgme_new(&ctx);
152 gpgme_set_protocol(ctx, GPGME_PROTOCOL_OpenPGP);
153 gpgme_engine_info_t info = gpgme_ctx_get_engine_info(ctx);
154 mGpgmeEngine_fname = info->file_name;
155 gpgme_release(ctx);
155 } 156 }
156 mEnv = QProcessEnvironment::systemEnvironment(); 157 mEnv = QProcessEnvironment::systemEnvironment();
157 unsetEnv("GNUPGHOME"); 158 unsetEnv("GNUPGHOME");