From 8c5abc8d932affab4bc79a85e3f98f6f6b982ae8 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Thu, 11 Aug 2016 17:22:35 +0200 Subject: Qt: Add KeyForMailboxJob * lang/qt/src/job.cpp: Include moc and make subclass. * lang/qt/src/keyformailboxjob.h, lang/qt/src/qgpgmekeyformailboxjob.cpp, lang/qt/src/qgpgmekeyformailboxjob.h: New. * lang/qt/tests/run-keyformailboxjob.cpp: New manual test. * lang/qt/tests/Makefile.am: Add run-keyformailboxjob. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/src/protocol.h, lang/qt/src/protocol_p.h: Add keyformailboxjob. -- The KeyForMailboxjob can be used to determine the best key to use to encrypt something to a given mail address. --- lang/qt/src/protocol_p.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lang/qt/src/protocol_p.h') diff --git a/lang/qt/src/protocol_p.h b/lang/qt/src/protocol_p.h index 9fcbc8b7..afb4f9cb 100644 --- a/lang/qt/src/protocol_p.h +++ b/lang/qt/src/protocol_p.h @@ -56,6 +56,7 @@ #include "qgpgmechangeownertrustjob.h" #include "qgpgmechangepasswdjob.h" #include "qgpgmeadduseridjob.h" +#include "qgpgmekeyformailboxjob.h" namespace { @@ -377,6 +378,15 @@ public: context->setKeyListMode(GpgME::Extern | GpgME::Local | GpgME::Signatures | GpgME::Validate); return new QGpgME::QGpgMEKeyListJob(context); } + + QGpgME::KeyForMailboxJob *keyForMailboxJob() const Q_DECL_OVERRIDE + { + GpgME::Context *context = GpgME::Context::createForProtocol(mProtocol); + if (!context) { + return Q_NULLPTR; + } + return new QGpgME::QGpgMEKeyForMailboxJob(context); + } }; } -- cgit v1.2.3