[Pkg-gnupg-commit] [gpgme] 316/412: qt: Add generic flag support for keylistjobs
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 22 21:27:10 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gpgme.
commit 4e37d0bb1255558ce20e1a5ac83a2d06a37f8b0b
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Thu Aug 25 16:22:12 2016 +0200
qt: Add generic flag support for keylistjobs
* lang/qt/src/keylistjob.h (addMode): New.
* lang/qt/src/qgpgmekeylistjob.h (addMode): New.
* lang/qt/src/qgpgmekeylistjob.cpp (addMode: New.
--
Instead of new API for each new thing lets be a bit more
generic / open.
---
lang/qt/src/keylistjob.h | 3 +++
lang/qt/src/qgpgmekeylistjob.cpp | 5 +++++
lang/qt/src/qgpgmekeylistjob.h | 3 ++-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/lang/qt/src/keylistjob.h b/lang/qt/src/keylistjob.h
index fc7a048..8dc736e 100644
--- a/lang/qt/src/keylistjob.h
+++ b/lang/qt/src/keylistjob.h
@@ -96,6 +96,9 @@ public:
virtual GpgME::KeyListResult exec(const QStringList &patterns, bool secretOnly, std::vector<GpgME::Key> &keys) = 0;
+ /** Add a flag to the keylistmode used. */
+ virtual void addMode(GpgME::KeyListMode mode) = 0;
+
Q_SIGNALS:
void nextKey(const GpgME::Key &key);
void result(const GpgME::KeyListResult &result, const std::vector<GpgME::Key> &keys = std::vector<GpgME::Key>(), const QString &auditLogAsHtml = QString(), const GpgME::Error &auditLogError = GpgME::Error());
diff --git a/lang/qt/src/qgpgmekeylistjob.cpp b/lang/qt/src/qgpgmekeylistjob.cpp
index 49a3c03..1169c46 100644
--- a/lang/qt/src/qgpgmekeylistjob.cpp
+++ b/lang/qt/src/qgpgmekeylistjob.cpp
@@ -151,6 +151,11 @@ void QGpgMEKeyListJob::resultHook(const result_type &tuple)
Q_EMIT nextKey(key);
}
}
+
+void QGpgMEKeyListJob::addMode(KeyListMode mode)
+{
+ context()->addKeyListMode(mode);
+}
#if 0
void QGpgMEKeyListJob::showErrorDialog(QWidget *parent, const QString &caption) const
{
diff --git a/lang/qt/src/qgpgmekeylistjob.h b/lang/qt/src/qgpgmekeylistjob.h
index cbe1e94..2d5406a 100644
--- a/lang/qt/src/qgpgmekeylistjob.h
+++ b/lang/qt/src/qgpgmekeylistjob.h
@@ -74,9 +74,10 @@ public:
/* from KeyListJob */
GpgME::KeyListResult exec(const QStringList &patterns, bool secretOnly, std::vector<GpgME::Key> &keys) Q_DECL_OVERRIDE;
+ void addMode(GpgME::KeyListMode mode) Q_DECL_OVERRIDE;
+
/* from ThreadedJobMixin */
void resultHook(const result_type &result) Q_DECL_OVERRIDE;
-
private:
GpgME::KeyListResult mResult;
bool mSecretOnly;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list