diff options
| author | Andre Heinecke <[email protected]> | 2017-12-01 13:29:04 +0000 | 
|---|---|---|
| committer | Andre Heinecke <[email protected]> | 2017-12-01 13:35:11 +0000 | 
| commit | 7d1ac5d61de3c55bf7ff14997b4b111a0f90c177 (patch) | |
| tree | bf299f329509fe090e861b793eb0021260e0cf45 /lang/qt/src/protocol_p.h | |
| parent | cpp: Wrap create_key and create_subkey (diff) | |
| download | gpgme-7d1ac5d61de3c55bf7ff14997b4b111a0f90c177.tar.gz gpgme-7d1ac5d61de3c55bf7ff14997b4b111a0f90c177.zip | |
qt: Add job for quick commands
* lang/qt/src/qgpgmequickjob.cpp,
lang/qt/src/qgpgmequickjob.h,
lang/qt/src/quickjob.h: New.
* lang/qt/src/Makefile.am,
lang/qt/src/protocol.h,
lang/qt/src/protocol_p.h,
lang/qt/src/job.cpp: Update accordingly.
--
Keeping it in line with the Job for everything pattern.
Although it's reduced to one job for four commands as
the commands all behave the same.
Diffstat (limited to 'lang/qt/src/protocol_p.h')
| -rw-r--r-- | lang/qt/src/protocol_p.h | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/lang/qt/src/protocol_p.h b/lang/qt/src/protocol_p.h index 58a0fa6a..b6d1abfa 100644 --- a/lang/qt/src/protocol_p.h +++ b/lang/qt/src/protocol_p.h @@ -60,6 +60,7 @@  #include "qgpgmekeyformailboxjob.h"  #include "qgpgmewkspublishjob.h"  #include "qgpgmetofupolicyjob.h" +#include "qgpgmequickjob.h"  namespace  { @@ -414,6 +415,18 @@ public:          }          return new QGpgME::QGpgMETofuPolicyJob(context);      } + +    QGpgME::QuickJob *quickJob() const Q_DECL_OVERRIDE +    { +        if (mProtocol != GpgME::OpenPGP) { +            return Q_NULLPTR; +        } +        GpgME::Context *context = GpgME::Context::createForProtocol(mProtocol); +        if (!context) { +            return Q_NULLPTR; +        } +        return new QGpgME::QGpgMEQuickJob(context); +    }  };  } | 
