aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-08-25 14:22:12 +0000
committerAndre Heinecke <[email protected]>2016-08-25 14:22:12 +0000
commit4e37d0bb1255558ce20e1a5ac83a2d06a37f8b0b (patch)
tree91da58445c232dbd2fb815ed7b7e9e3e379dc1d8
parentqt: Ensure that current src dir is included first (diff)
downloadgpgme-4e37d0bb1255558ce20e1a5ac83a2d06a37f8b0b.tar.gz
gpgme-4e37d0bb1255558ce20e1a5ac83a2d06a37f8b0b.zip
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.
-rw-r--r--lang/qt/src/keylistjob.h3
-rw-r--r--lang/qt/src/qgpgmekeylistjob.cpp5
-rw-r--r--lang/qt/src/qgpgmekeylistjob.h3
3 files changed, 10 insertions, 1 deletions
diff --git a/lang/qt/src/keylistjob.h b/lang/qt/src/keylistjob.h
index fc7a048c..8dc736e0 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 49a3c037..1169c46a 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 cbe1e94d..2d5406aa 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;