diff options
author | saturneric <[email protected]> | 2025-04-19 00:08:03 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-04-19 00:08:03 +0000 |
commit | a6b23476a2c38f2a2809cc4f80b3798a1e5c99a7 (patch) | |
tree | 65c024239a4d2864804bac16133347374947927f /src/core/function/gpg/GpgAdvancedOperator.cpp | |
parent | fix: operations of subkey (diff) | |
download | GpgFrontend-a6b23476a2c38f2a2809cc4f80b3798a1e5c99a7.tar.gz GpgFrontend-a6b23476a2c38f2a2809cc4f80b3798a1e5c99a7.zip |
fix: gpg context will take response of gpg-agent
Diffstat (limited to 'src/core/function/gpg/GpgAdvancedOperator.cpp')
-rw-r--r-- | src/core/function/gpg/GpgAdvancedOperator.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/core/function/gpg/GpgAdvancedOperator.cpp b/src/core/function/gpg/GpgAdvancedOperator.cpp index c9af8b59..d6323901 100644 --- a/src/core/function/gpg/GpgAdvancedOperator.cpp +++ b/src/core/function/gpg/GpgAdvancedOperator.cpp @@ -36,33 +36,27 @@ namespace GpgFrontend { auto GpgAdvancedOperator::ClearGpgPasswordCache() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--reload", "gpg-agent"}}); - return ret == 0; + return info_.ReloadGpgAgent(); } auto GpgAdvancedOperator::ReloadAllGpgComponents() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--reload", "all"}}); - return ret == 0; + return info_.ReloadGpgAgent(); } auto GpgAdvancedOperator::KillAllGpgComponents() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--kill", "all"}}); - return ret == 0; + return ctx_.RestartGpgAgent(); } auto GpgAdvancedOperator::ResetConfigures() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--apply-defaults"}}); - return ret == 0; + return info_.ReloadGpgAgent(); } auto GpgAdvancedOperator::LaunchAllGpgComponents() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--launch", "all"}}); - return ret == 0; + return ctx_.RestartGpgAgent(); } auto GpgAdvancedOperator::RestartGpgComponents() -> bool { - if (!KillAllGpgComponents()) return false; - return LaunchAllGpgComponents(); + return ctx_.RestartGpgAgent(); } GpgAdvancedOperator::GpgAdvancedOperator(int channel) |