aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-02 16:05:12 +0000
committersaturneric <[email protected]>2024-12-02 16:05:12 +0000
commit3349a56ea04dd32033bc9d2d8b12f92142768bba (patch)
tree9d6cdb0317662c7f32ab4a1f77f3a313e3424451
parentfeat: skip version notifying on developing or testing build (diff)
downloadGpgFrontend-3349a56ea04dd32033bc9d2d8b12f92142768bba.tar.gz
GpgFrontend-3349a56ea04dd32033bc9d2d8b12f92142768bba.zip
fix: settings prohibit version checking at start not working
m---------modules0
-rw-r--r--src/ui/main_window/MainWindow.cpp26
2 files changed, 16 insertions, 10 deletions
diff --git a/modules b/modules
-Subproject 5b145543bb98e86a8d47ce87cb9a2e02aa194db
+Subproject 27fb3bf50feffd0f177c2bbb2cca010284823bc
diff --git a/src/ui/main_window/MainWindow.cpp b/src/ui/main_window/MainWindow.cpp
index 2f37e95b..d191e268 100644
--- a/src/ui/main_window/MainWindow.cpp
+++ b/src/ui/main_window/MainWindow.cpp
@@ -131,24 +131,30 @@ void MainWindow::Init() noexcept {
info_board_->AssociateTabWidget(edit_->TabWidget());
- Module::ListenRTPublishEvent(
- this, kVersionCheckingModuleID, "version.loading_done",
- [=](Module::Namespace, Module::Key, int, std::any) {
- FLOG_D(
- "version-checking version.loading_done changed, calling slot "
- "version upgrade");
- this->slot_version_upgrade_notify();
- });
-
// loading process is done
emit SignalLoaded();
Module::TriggerEvent("APPLICATION_LOADED");
+ // check version information
+ auto settings = GlobalSettingStation::GetInstance().GetSettings();
+ auto prohibit_update_checking =
+ settings.value("network/prohibit_update_checking").toBool();
+ if (!prohibit_update_checking) {
+ Module::ListenRTPublishEvent(
+ this, kVersionCheckingModuleID, "version.loading_done",
+ [=](Module::Namespace, Module::Key, int, std::any) {
+ FLOG_D(
+ "version-checking version.loading_done changed, calling slot "
+ "version upgrade");
+ this->slot_version_upgrade_notify();
+ });
+ Module::TriggerEvent("CHECK_APPLICATION_VERSION");
+ }
+
// recover unsaved page from cache if it exists
recover_editor_unsaved_pages_from_cache();
// check if need to open wizard window
- auto settings = GlobalSettingStation::GetInstance().GetSettings();
auto show_wizard = settings.value("wizard/show_wizard", true).toBool();
if (show_wizard) slot_start_wizard();