aboutsummaryrefslogtreecommitdiffstats
path: root/src/m_ver_check/UpdateTab.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-01 21:13:50 +0000
committersaturneric <[email protected]>2024-12-01 21:13:50 +0000
commit2dc2f2e04888fcc7391ee544ee8ae3e3d042a297 (patch)
tree9e80f3ad89dc88f2afd90be02f2bb0d059b43147 /src/m_ver_check/UpdateTab.cpp
parentfeat: all users should know the meanings of update (diff)
downloadModules-2dc2f2e04888fcc7391ee544ee8ae3e3d042a297.tar.gz
Modules-2dc2f2e04888fcc7391ee544ee8ae3e3d042a297.zip
feat: check commit hash by current version
Diffstat (limited to 'src/m_ver_check/UpdateTab.cpp')
-rw-r--r--src/m_ver_check/UpdateTab.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/m_ver_check/UpdateTab.cpp b/src/m_ver_check/UpdateTab.cpp
index 3c4c2c4..64c2a86 100644
--- a/src/m_ver_check/UpdateTab.cpp
+++ b/src/m_ver_check/UpdateTab.cpp
@@ -120,6 +120,9 @@ void UpdateTab::slot_show_version_status() {
auto is_current_version_released = GFModuleRetrieveRTValueOrDefaultBool(
GFGetModuleID(), GFModuleStrDup("version.current_version_released"), 0);
+ auto is_git_commit_hash_mismatch = GFModuleRetrieveRTValueOrDefaultBool(
+ GFGetModuleID(), GFModuleStrDup("version.git_commit_hash_mismatch"), 0);
+
QString const latest_version = UDUP(GFModuleRetrieveRTValueOrDefault(
GFGetModuleID(), GFModuleStrDup("version.latest_version"),
GFModuleStrDup("")));
@@ -160,6 +163,17 @@ void UpdateTab::slot_show_version_status() {
tr("here") + "</a> " + tr("to download the latest stable version.") +
"</center>");
upgrade_label_->show();
+ } else if (is_git_commit_hash_mismatch != 0) {
+ upgrade_label_->setText(
+ "<center>" +
+ tr("The current version's commit hash does not match the official "
+ "release. This may indicate a modified or unofficial build.") +
+ "</center><center>" + tr("Click") +
+ " <a href=\"https://www.gpgfrontend.bktus.com/overview/downloads/\">" +
+ tr("here") + "</a> " +
+ tr("to verify your installation or download the official version.") +
+ "</center>");
+ upgrade_label_->show();
} else {
upgrade_label_->setText(
"<center>" +