aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindowSlotUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/main_window/MainWindowSlotUI.cpp')
-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"));