aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/src/protocol_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'lang/qt/src/protocol_p.h')
-rw-r--r--lang/qt/src/protocol_p.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/lang/qt/src/protocol_p.h b/lang/qt/src/protocol_p.h
index 91c522f1..9ff62ee6 100644
--- a/lang/qt/src/protocol_p.h
+++ b/lang/qt/src/protocol_p.h
@@ -42,6 +42,7 @@
#include "qgpgmelistallkeysjob.h"
#include "qgpgmedecryptjob.h"
#include "qgpgmedecryptverifyjob.h"
+#include "qgpgmerefreshopenpgpkeysjob.h"
#include "qgpgmerefreshsmimekeysjob.h"
#include "qgpgmedeletejob.h"
#include "qgpgmedownloadjob.h"
@@ -283,12 +284,15 @@ public:
QGpgME::RefreshKeysJob *refreshKeysJob() const Q_DECL_OVERRIDE
{
- if (mProtocol != GpgME::CMS) { // fixme: add support for gpg, too
- return nullptr;
+ if (mProtocol == GpgME::CMS) {
+ return new QGpgME::QGpgMERefreshSMIMEKeysJob;
}
- // this operation is not supported by gpgme, so we have to call gpgsm ourselves:
- return new QGpgME::QGpgMERefreshSMIMEKeysJob();
+ GpgME::Context *context = GpgME::Context::createForProtocol(mProtocol);
+ if (!context) {
+ return nullptr;
+ }
+ return new QGpgME::QGpgMERefreshOpenPGPKeysJob{context};
}
QGpgME::DownloadJob *downloadJob(bool armor) const Q_DECL_OVERRIDE