From ffc635e82ed2d85e41a86a5c9a12c6c98180d4b7 Mon Sep 17 00:00:00 2001 From: saturneric Date: Thu, 26 Oct 2023 20:55:53 +0800 Subject: fix: improve the commu between gig module and core --- src/core/function/gpg/GpgCommandExecutor.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/core/function/gpg/GpgCommandExecutor.h') diff --git a/src/core/function/gpg/GpgCommandExecutor.h b/src/core/function/gpg/GpgCommandExecutor.h index f8dc3a9c..bd356b8b 100644 --- a/src/core/function/gpg/GpgCommandExecutor.h +++ b/src/core/function/gpg/GpgCommandExecutor.h @@ -53,18 +53,14 @@ class GPGFRONTEND_CORE_EXPORT GpgCommandExecutor struct ExecuteContext { const std::string cmd; const std::vector arguments; - const GpgCommandExecutorCallback callback; - const GpgCommandExecutorInteractor interact_func; + const GpgCommandExecutorCallback cb_func; + const GpgCommandExecutorInteractor int_func; ExecuteContext( std::string cmd, std::vector arguments, GpgCommandExecutorCallback callback = [](int, std::string, std::string) {}, - GpgCommandExecutorInteractor interact_func = [](QProcess *) {}) - : cmd(cmd), - arguments(arguments), - callback(callback), - interact_func(interact_func) {} + GpgCommandExecutorInteractor int_func = [](QProcess *) {}); }; using ExecuteContexts = std::vector; @@ -93,7 +89,7 @@ class GPGFRONTEND_CORE_EXPORT GpgCommandExecutor GpgContext &ctx_ = GpgContext::GetInstance( SingletonFunctionObject::GetChannel()); ///< Corresponding context - Thread::Task *build_task(const ExecuteContext &); + Thread::Task *build_task_from_exec_ctx(const ExecuteContext &); }; } // namespace GpgFrontend -- cgit v1.2.3