aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/src/protocol_p.h
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-05-13 11:16:12 +0000
committerAndre Heinecke <[email protected]>2016-05-13 11:16:12 +0000
commit52f2295d528029a36a3e0a89c777297762b3fc9b (patch)
treee69faffe879a97ac116daea69a825d3c2c9d270c /lang/qt/src/protocol_p.h
parentQt: Add missing copyright header in test (diff)
downloadgpgme-52f2295d528029a36a3e0a89c777297762b3fc9b.tar.gz
gpgme-52f2295d528029a36a3e0a89c777297762b3fc9b.zip
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.
Diffstat (limited to 'lang/qt/src/protocol_p.h')
-rw-r--r--lang/qt/src/protocol_p.h12
1 files changed, 12 insertions, 0 deletions
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);
+ }
};
}