diff options
author | saturneric <[email protected]> | 2023-10-28 18:46:15 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-10-28 18:46:15 +0000 |
commit | fd46d4667611c0db9cea3f06205727399b6fb5fd (patch) | |
tree | 8755059620d00d1690673d963cd0d913df92ae1c /src/ui/main_window/MainWindowUI.cpp | |
parent | feat: introduce clang-tidy config and modify clang-format config (diff) | |
download | GpgFrontend-fd46d4667611c0db9cea3f06205727399b6fb5fd.tar.gz GpgFrontend-fd46d4667611c0db9cea3f06205727399b6fb5fd.zip |
refactor: start to tidy up code using clang-tidy
Diffstat (limited to 'src/ui/main_window/MainWindowUI.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowUI.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/main_window/MainWindowUI.cpp b/src/ui/main_window/MainWindowUI.cpp index 93bbd088..9c4e5ceb 100644 --- a/src/ui/main_window/MainWindowUI.cpp +++ b/src/ui/main_window/MainWindowUI.cpp @@ -287,8 +287,7 @@ void MainWindow::create_actions() { clean_gpg_password_cache_act_->setIcon(QIcon(":configure.png")); clean_gpg_password_cache_act_->setToolTip(_("Clear Password Cache of GnuPG")); connect(clean_gpg_password_cache_act_, &QAction::triggered, this, [=]() { - if (GpgFrontend::GpgAdvancedOperator::GetInstance() - .ClearGpgPasswordCache()) { + if (GpgFrontend::GpgAdvancedOperator::ClearGpgPasswordCache()) { QMessageBox::information(this, _("Successful Operation"), _("Clear password cache successfully")); } else { @@ -301,7 +300,7 @@ 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()) { + if (GpgFrontend::GpgAdvancedOperator::ReloadGpgComponents()) { QMessageBox::information( this, _("Successful Operation"), _("Reload all the GnuPG's components successfully")); @@ -316,7 +315,7 @@ void MainWindow::create_actions() { restart_components_act_->setIcon(QIcon(":configure.png")); restart_components_act_->setToolTip(_("Restart All GnuPG's Components")); connect(restart_components_act_, &QAction::triggered, this, [=]() { - GpgFrontend::GpgAdvancedOperator::GetInstance().RestartGpgComponents(); + GpgFrontend::GpgAdvancedOperator::RestartGpgComponents(); Module::ListenRTPublishEvent( this, "core", "gpg_advanced_operator.restart_gpg_components", [=](Module::Namespace, Module::Key, int, std::any value) { |