diff options
author | saturneric <[email protected]> | 2024-12-02 16:04:48 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-12-02 16:04:48 +0000 |
commit | a4c4d5dfdb5f3164d1784ec80f492522ad2c325c (patch) | |
tree | 3bc3b159989674f8a805604a6df8f140005d67c3 /src/ui/main_window/MainWindowSlotFunction.cpp | |
parent | fix: add some untranslated strings (diff) | |
download | GpgFrontend-a4c4d5dfdb5f3164d1784ec80f492522ad2c325c.tar.gz GpgFrontend-a4c4d5dfdb5f3164d1784ec80f492522ad2c325c.zip |
feat: skip version notifying on developing or testing build
Diffstat (limited to 'src/ui/main_window/MainWindowSlotFunction.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowSlotFunction.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp index c0bb8b6f..7b44dd7e 100644 --- a/src/ui/main_window/MainWindowSlotFunction.cpp +++ b/src/ui/main_window/MainWindowSlotFunction.cpp @@ -38,6 +38,7 @@ #include "core/model/GpgSignResult.h" #include "core/module/ModuleManager.h" #include "core/typedef/GpgTypedef.h" +#include "core/utils/BuildInfoUtils.h" #include "core/utils/CommonUtils.h" #include "core/utils/GpgUtils.h" #include "ui/UIModuleManager.h" @@ -289,9 +290,6 @@ void MainWindow::SlotOpenFile(const QString& path) { } void MainWindow::slot_version_upgrade_notify() { - FLOG_D( - "slot version upgrade notify called, checking version info from rt..."); - auto is_loading_done = Module::RetrieveRTValueTypedOrDefault<>( kVersionCheckingModuleID, "version.loading_done", false); if (!is_loading_done) { @@ -299,6 +297,13 @@ void MainWindow::slot_version_upgrade_notify() { return; } + const auto project_build_branch = GetProjectBuildGitBranchName(); + if (project_build_branch.contains("develop") || + project_build_branch.contains("dev/")) { + LOG_I() << "develop or testing version, skip notifying version info."; + return; + } + auto is_need_upgrade = Module::RetrieveRTValueTypedOrDefault<>( kVersionCheckingModuleID, "version.need_upgrade", false); |