diff options
author | saturneric <[email protected]> | 2024-05-17 16:33:21 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-05-17 16:33:21 +0000 |
commit | 63dbe4a917d89c30b0bf5c45d65c2a2e9ccb907b (patch) | |
tree | 03d9ed3a0a7b13b3a9d0fbe8d942ffa6d1156b2a | |
parent | fix: remove qt5compat and redirect dll output path of modules (diff) | |
download | GpgFrontend-63dbe4a917d89c30b0bf5c45d65c2a2e9ccb907b.tar.gz GpgFrontend-63dbe4a917d89c30b0bf5c45d65c2a2e9ccb907b.zip |
fix: cannot show version in about tab
-rw-r--r-- | src/core/utils/BuildInfoUtils.cpp | 5 | ||||
-rw-r--r-- | src/ui/GpgFrontendApplication.cpp | 2 | ||||
-rw-r--r-- | src/ui/dialog/help/AboutDialog.cpp | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/core/utils/BuildInfoUtils.cpp b/src/core/utils/BuildInfoUtils.cpp index a7d914ef..261057b7 100644 --- a/src/core/utils/BuildInfoUtils.cpp +++ b/src/core/utils/BuildInfoUtils.cpp @@ -6,8 +6,9 @@ namespace GpgFrontend { auto GetProjectVersion() -> QString { - return QString("v") + VERSION_MAJOR + "." + VERSION_MINOR + "." + - VERSION_PATCH; + return (QStringList{} << "v" << VERSION_MAJOR << "." << VERSION_MINOR << "." + << VERSION_PATCH) + .join(""); } auto GetProjectBuildVersion() -> QString { return BUILD_VERSION; } diff --git a/src/ui/GpgFrontendApplication.cpp b/src/ui/GpgFrontendApplication.cpp index b3c12de6..900d4735 100644 --- a/src/ui/GpgFrontendApplication.cpp +++ b/src/ui/GpgFrontendApplication.cpp @@ -40,7 +40,7 @@ GpgFrontendApplication::GpgFrontendApplication(int &argc, char *argv[]) #endif // set the extra information of the build - GpgFrontendApplication::setApplicationVersion(GetProjectBuildVersion()); + GpgFrontendApplication::setApplicationVersion(GetProjectVersion()); GpgFrontendApplication::setApplicationName(QString::fromUtf8((PROJECT_NAME))); GpgFrontendApplication::setApplicationDisplayName( QString::fromUtf8((PROJECT_NAME))); diff --git a/src/ui/dialog/help/AboutDialog.cpp b/src/ui/dialog/help/AboutDialog.cpp index 0735ddba..6fe56d76 100644 --- a/src/ui/dialog/help/AboutDialog.cpp +++ b/src/ui/dialog/help/AboutDialog.cpp @@ -97,8 +97,8 @@ InfoTab::InfoTab(QWidget* parent) : QWidget(parent) { auto text = "<center><h2>" + qApp->applicationName() + "</h2></center>" + - "<center><b>" + "v" + qApp->applicationVersion() + "</b></center>" + - "<center>" + GetProjectBuildGitVersion() + "</center>" + "<br><center>" + + "<center><b>" + GetProjectVersion() + "</b></center>" + "<center>" + + GetProjectBuildGitVersion() + "</center>" + "<br><center>" + tr("GpgFrontend is an easy-to-use, compact, cross-platform, " "and installation-free GnuPG Frontend." "It visualizes most of the common operations of GnuPG." |