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.
This commit is contained in:
parent
5a92cc96da
commit
4e37d0bb12
@ -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());
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user