diff options
author | Andre Heinecke <[email protected]> | 2016-05-13 11:16:12 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2016-05-13 11:16:12 +0000 |
commit | 52f2295d528029a36a3e0a89c777297762b3fc9b (patch) | |
tree | e69faffe879a97ac116daea69a825d3c2c9d270c /lang/qt/src/protocol_p.h | |
parent | Qt: Add missing copyright header in test (diff) | |
download | gpgme-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.h | 12 |
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); + } }; } |