From d3a8c2c8b68b290a642c83c53a5989ee7fdc6331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Tue, 31 Jan 2023 11:55:29 +0100 Subject: [PATCH] qt: Remove unused and commented-out code * lang/qt/src/qgpgmeencryptarchivejob.cpp, lang/qt/src/qgpgmeencryptarchivejob.h (QGpgMEEncryptArchiveJob): Remove member function resultHook and member mResult. * lang/qt/src/qgpgmesignarchivejob.cpp, lang/qt/src/qgpgmesignarchivejob.h (QGpgMESignArchiveJob): Remove member function resultHook and member mResult. -- GnuPG-bug-id: 6342 --- lang/qt/src/qgpgmeencryptarchivejob.cpp | 21 --------------------- lang/qt/src/qgpgmeencryptarchivejob.h | 12 ------------ lang/qt/src/qgpgmesignarchivejob.cpp | 5 ----- lang/qt/src/qgpgmesignarchivejob.h | 7 ------- 4 files changed, 45 deletions(-) diff --git a/lang/qt/src/qgpgmeencryptarchivejob.cpp b/lang/qt/src/qgpgmeencryptarchivejob.cpp index 63c55364..91086426 100644 --- a/lang/qt/src/qgpgmeencryptarchivejob.cpp +++ b/lang/qt/src/qgpgmeencryptarchivejob.cpp @@ -44,14 +44,7 @@ #include "encryptarchivejob_p.h" #include "filelistdataprovider.h" -// #include #include -// #include -// -// #include -// #include -// -// #include using namespace QGpgME; using namespace GpgME; @@ -135,18 +128,4 @@ GpgME::Error QGpgMEEncryptArchiveJob::start(const std::vector &recip return {}; } -// EncryptionResult QGpgMEEncryptArchiveJob::exec(const std::vector &recipients, const QByteArray &plainText, -// const Context::EncryptionFlags eflags, QByteArray &cipherText) -// { -// const result_type r = encrypt_qba(context(), recipients, plainText, eflags, mOutputIsBase64Encoded, fileName()); -// cipherText = std::get<1>(r); -// resultHook(r); -// return mResult; -// } - -void QGpgMEEncryptArchiveJob::resultHook(const result_type &tuple) -{ - mResult = std::get<0>(tuple); -} - #include "qgpgmeencryptarchivejob.moc" diff --git a/lang/qt/src/qgpgmeencryptarchivejob.h b/lang/qt/src/qgpgmeencryptarchivejob.h index 81398d07..64c3b18f 100644 --- a/lang/qt/src/qgpgmeencryptarchivejob.h +++ b/lang/qt/src/qgpgmeencryptarchivejob.h @@ -39,7 +39,6 @@ #include "threadedjobmixin.h" #include -#include namespace QGpgME { @@ -64,17 +63,6 @@ public: const std::vector &paths, const std::shared_ptr &cipherText, const GpgME::Context::EncryptionFlags flags) override; - - // GpgME::EncryptionResult exec(const std::vector &recipients, - // const std::vector &paths, - // const std::shared_ptr &cipherText, - // const GpgME::Context::EncryptionFlags flags) override; - - /* from ThreadedJobMixin */ - void resultHook(const result_type &r) override; - -private: - GpgME::EncryptionResult mResult; }; } diff --git a/lang/qt/src/qgpgmesignarchivejob.cpp b/lang/qt/src/qgpgmesignarchivejob.cpp index d9abec42..0a99627a 100644 --- a/lang/qt/src/qgpgmesignarchivejob.cpp +++ b/lang/qt/src/qgpgmesignarchivejob.cpp @@ -133,9 +133,4 @@ GpgME::Error QGpgMESignArchiveJob::start(const std::vector &signers, return {}; } -void QGpgMESignArchiveJob::resultHook(const result_type &tuple) -{ - mResult = std::get<0>(tuple); -} - #include "qgpgmesignarchivejob.moc" diff --git a/lang/qt/src/qgpgmesignarchivejob.h b/lang/qt/src/qgpgmesignarchivejob.h index ade4e8dc..2618e39a 100644 --- a/lang/qt/src/qgpgmesignarchivejob.h +++ b/lang/qt/src/qgpgmesignarchivejob.h @@ -39,7 +39,6 @@ #include "threadedjobmixin.h" #include -#include namespace QGpgME { @@ -63,12 +62,6 @@ public: GpgME::Error start(const std::vector &signers, const std::vector &paths, const std::shared_ptr &output) override; - - /* from ThreadedJobMixin */ - void resultHook(const result_type &r) override; - -private: - GpgME::SigningResult mResult; }; }