diff options
author | Saturneric <[email protected]> | 2021-12-25 01:54:57 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-12-25 01:54:57 +0000 |
commit | b5cd5eac82b6bbd8a00fb39c045d473d6517b5f4 (patch) | |
tree | f8ce246cb98222a24b8f59640d48a633464d333b /src/gpg/function/GpgCommandExecutor.h | |
parent | Continue to add Standalone Support. (diff) | |
download | GpgFrontend-b5cd5eac82b6bbd8a00fb39c045d473d6517b5f4.tar.gz GpgFrontend-b5cd5eac82b6bbd8a00fb39c045d473d6517b5f4.zip |
<refactor, test>(core, test): core improved and test gpg alone mode
1. let modules known their channels.
2. let factory create a channel.
3. reduce dumplicate code.
4. add type check for function object.
5. test gpg alone mode.
6. remove some asserts.
7. rename importexportor to importexporter.
8. move args in gpg context constructor to a struct.
Diffstat (limited to 'src/gpg/function/GpgCommandExecutor.h')
-rw-r--r-- | src/gpg/function/GpgCommandExecutor.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gpg/function/GpgCommandExecutor.h b/src/gpg/function/GpgCommandExecutor.h index f28caca8..dcdd318d 100644 --- a/src/gpg/function/GpgCommandExecutor.h +++ b/src/gpg/function/GpgCommandExecutor.h @@ -35,6 +35,9 @@ namespace GpgFrontend { class GpgCommandExecutor : public SingletonFunctionObject<GpgCommandExecutor> { public: + explicit GpgCommandExecutor( + int channel = SingletonFunctionObject::GetDefaultChannel()) + : SingletonFunctionObject<GpgCommandExecutor>(channel) {} #ifndef WINDOWS void Execute(StringArgsRef arguments, @@ -44,7 +47,8 @@ class GpgCommandExecutor : public SingletonFunctionObject<GpgCommandExecutor> { #endif private: - GpgContext &ctx = GpgContext::GetInstance(); + GpgContext &ctx = + GpgContext::GetInstance(SingletonFunctionObject::GetChannel()); }; } // namespace GpgFrontend |