aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindowSlotFunction.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-02 16:04:48 +0000
committersaturneric <[email protected]>2024-12-02 16:04:48 +0000
commita4c4d5dfdb5f3164d1784ec80f492522ad2c325c (patch)
tree3bc3b159989674f8a805604a6df8f140005d67c3 /src/ui/main_window/MainWindowSlotFunction.cpp
parentfix: add some untranslated strings (diff)
downloadGpgFrontend-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.cpp11
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);