From 52f2295d528029a36a3e0a89c777297762b3fc9b Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Fri, 13 May 2016 13:16:12 +0200 Subject: Qt: Add keyLocateJob and test for it * configure.ac (LIBQGPGME_LT_REVISION): Bump. * lang/qt/src/protocol.h (locateKeysJob): Add Job. * lang/qt/src/protocol_p.h (locateKeysJob): Implement. * lang/qt/tests/Makefile.am: Add t-keylocate. * lang/qt/tests/t-keylocate.cpp: New. --- lang/qt/src/protocol_p.h | 12 ++++++++++++ 1 file changed, 12 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 d6c5625a..9fcbc8b7 100644 --- a/lang/qt/src/protocol_p.h +++ b/lang/qt/src/protocol_p.h @@ -365,6 +365,18 @@ public: return new QGpgME::QGpgMEAddUserIDJob(context); } + QGpgME::KeyListJob *locateKeysJob() const Q_DECL_OVERRIDE + { + if (mProtocol != GpgME::OpenPGP) { + return Q_NULLPTR; + } + GpgME::Context *context = GpgME::Context::createForProtocol(mProtocol); + if (!context) { + return Q_NULLPTR; + } + context->setKeyListMode(GpgME::Extern | GpgME::Local | GpgME::Signatures | GpgME::Validate); + return new QGpgME::QGpgMEKeyListJob(context); + } }; } -- cgit v1.2.3