aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindowUI.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-02-04 06:02:49 +0000
committersaturneric <[email protected]>2023-02-04 06:02:49 +0000
commit8c2e8e37505058bb2448ba65021f616ca658927b (patch)
tree919b0124932a5ee7dce940595c46f087f2d763cc /src/ui/main_window/MainWindowUI.cpp
parentfix: solve some issues (diff)
downloadGpgFrontend-8c2e8e37505058bb2448ba65021f616ca658927b.tar.gz
GpgFrontend-8c2e8e37505058bb2448ba65021f616ca658927b.zip
fix: solve open file issue in menu bar
1. add flush policy for logger 2. seperate the name of each logger 3. replace the old open file logic with the new one when click the button on the menu bar
Diffstat (limited to 'src/ui/main_window/MainWindowUI.cpp')
-rw-r--r--src/ui/main_window/MainWindowUI.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/ui/main_window/MainWindowUI.cpp b/src/ui/main_window/MainWindowUI.cpp
index 77bf2e14..452061cf 100644
--- a/src/ui/main_window/MainWindowUI.cpp
+++ b/src/ui/main_window/MainWindowUI.cpp
@@ -260,13 +260,14 @@ void MainWindow::create_actions() {
reload_components_act_->setIcon(QIcon(":configure.png"));
reload_components_act_->setToolTip(_("Reload All GnuPG's Components"));
connect(reload_components_act_, &QAction::triggered, this, [=]() {
- if (GpgFrontend::GpgAdvancedOperator::GetInstance()
- .ReloadGpgComponents()) {
- QMessageBox::information(this, _("Successful Operation"),
- _("Reload all the GnuPG's components successfully"));
+ if (GpgFrontend::GpgAdvancedOperator::GetInstance().ReloadGpgComponents()) {
+ QMessageBox::information(
+ this, _("Successful Operation"),
+ _("Reload all the GnuPG's components successfully"));
} else {
- QMessageBox::critical(this, _("Failed Operation"),
- _("Failed to reload all or one of the GnuPG's component(s)"));
+ QMessageBox::critical(
+ this, _("Failed Operation"),
+ _("Failed to reload all or one of the GnuPG's component(s)"));
}
});
@@ -276,11 +277,13 @@ void MainWindow::create_actions() {
connect(restart_components_act_, &QAction::triggered, this, [=]() {
if (GpgFrontend::GpgAdvancedOperator::GetInstance()
.RestartGpgComponents()) {
- QMessageBox::information(this, _("Successful Operation"),
- _("Restart all the GnuPG's components successfully"));
+ QMessageBox::information(
+ this, _("Successful Operation"),
+ _("Restart all the GnuPG's components successfully"));
} else {
- QMessageBox::critical(this, _("Failed Operation"),
- _("Failed to restart all or one of the GnuPG's component(s)"));
+ QMessageBox::critical(
+ this, _("Failed Operation"),
+ _("Failed to restart all or one of the GnuPG's component(s)"));
}
});