aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindowSlotUI.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-01-27 15:39:09 +0000
committersaturneric <[email protected]>2025-01-27 15:39:09 +0000
commitaf1870fd422fc615a7039b998f505f100e98474a (patch)
tree5453ac586ce694863ecf438136614d3675b83aca /src/ui/main_window/MainWindowSlotUI.cpp
parentfeat: allow changing sort options by ui at file page (diff)
downloadGpgFrontend-af1870fd422fc615a7039b998f505f100e98474a.tar.gz
GpgFrontend-af1870fd422fc615a7039b998f505f100e98474a.zip
fix: kill all gnupg daemons in a proper way
Diffstat (limited to '')
-rw-r--r--src/ui/main_window/MainWindowSlotUI.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ui/main_window/MainWindowSlotUI.cpp b/src/ui/main_window/MainWindowSlotUI.cpp
index dc282c64..7ce0024e 100644
--- a/src/ui/main_window/MainWindowSlotUI.cpp
+++ b/src/ui/main_window/MainWindowSlotUI.cpp
@@ -330,12 +330,9 @@ void MainWindow::slot_reload_gpg_components(bool) {
}
void MainWindow::slot_restart_gpg_components(bool) {
- GpgFrontend::GpgAdvancedOperator::RestartGpgComponents();
- Module::ListenRTPublishEvent(
- this, "core", "gpg_advanced_operator.restart_gpg_components",
- [=](Module::Namespace, Module::Key, int, std::any value) {
- bool success_state = std::any_cast<bool>(value);
- if (success_state) {
+ GpgFrontend::GpgAdvancedOperator::RestartGpgComponents(
+ [=](int err, DataObjectPtr) {
+ if (err >= 0) {
QMessageBox::information(
this, tr("Successful Operation"),
tr("Restart all the GnuPG's components successfully"));