diff options
author | Saturneric <[email protected]> | 2022-12-04 10:15:50 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-12-04 10:16:25 +0000 |
commit | 6bdfddb208bb00fc67a309b0c23af124217d3541 (patch) | |
tree | b2fe2928b8ae7396021b433b808121260c6ef80f /src/ui/main_window/MainWindowSlotUI.cpp | |
parent | fix: solve a refresh crash (diff) | |
download | GpgFrontend-6bdfddb208bb00fc67a309b0c23af124217d3541.tar.gz GpgFrontend-6bdfddb208bb00fc67a309b0c23af124217d3541.zip |
feat(ui, core): add custom key db support
1. add custom key db support
2. add deep restart mode for custom key db settings
3. add core reset function
Diffstat (limited to 'src/ui/main_window/MainWindowSlotUI.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowSlotUI.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/main_window/MainWindowSlotUI.cpp b/src/ui/main_window/MainWindowSlotUI.cpp index 9061349e..8961a33f 100644 --- a/src/ui/main_window/MainWindowSlotUI.cpp +++ b/src/ui/main_window/MainWindowSlotUI.cpp @@ -27,6 +27,7 @@ */ #include "MainWindow.h" +#include "core/GpgConstants.h" #include "core/function/GlobalSettingStation.h" #include "ui/UserInterfaceUtils.h" #include "ui/struct/SettingsObject.h" @@ -128,7 +129,7 @@ void MainWindow::slot_open_settings_dialog() { if (get_restart_needed()) { if (edit_->MaybeSaveAnyTab()) { save_settings(); - qApp->exit(RESTART_CODE); + qApp->exit(get_restart_needed()); } } }); @@ -182,11 +183,12 @@ void MainWindow::slot_cut_pgp_header() { edit_->SlotFillTextEditWithText(content.trimmed()); } -void MainWindow::SlotSetRestartNeeded(bool needed) { - this->restart_needed_ = needed; +void MainWindow::SlotSetRestartNeeded(int mode) { + LOG(INFO) << "restart mode" << mode; + this->restart_needed_ = mode; } -bool MainWindow::get_restart_needed() const { return this->restart_needed_; } +int MainWindow::get_restart_needed() const { return this->restart_needed_; } void MainWindow::SetCryptoMenuStatus( MainWindow::CryptoMenu::OperationType type) { |