diff options
author | saturneric <[email protected]> | 2024-12-02 17:10:01 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-12-02 19:32:59 +0000 |
commit | 0b5131cd895f6c4f7fc21af6740d03952a2463af (patch) | |
tree | 18d3eeac659e18346aa1477a318c47fecc094c0c /src/ui/GpgFrontendApplication.cpp | |
parent | translations: update zh_CN and de_DE (diff) | |
download | GpgFrontend-0b5131cd895f6c4f7fc21af6740d03952a2463af.tar.gz GpgFrontend-0b5131cd895f6c4f7fc21af6740d03952a2463af.zip |
fix: qt5 build issues
Diffstat (limited to 'src/ui/GpgFrontendApplication.cpp')
-rw-r--r-- | src/ui/GpgFrontendApplication.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/ui/GpgFrontendApplication.cpp b/src/ui/GpgFrontendApplication.cpp index 94d8f808..271c8e57 100644 --- a/src/ui/GpgFrontendApplication.cpp +++ b/src/ui/GpgFrontendApplication.cpp @@ -40,14 +40,20 @@ GpgFrontendApplication::GpgFrontendApplication(int &argc, char *argv[]) #endif QString application_display_name = GetProjectName(); + +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + const auto commit_short_hash = GetProjectBuildGitCommitHash().last(6); +#else + const auto commit_short_hash = GetProjectBuildGitCommitHash().right(6); +#endif + if (GetProjectBuildGitBranchName().contains("develop")) { - application_display_name += - " " + - QString("Testing (%1)").arg(GetProjectBuildGitCommitHash().last(6)); + application_display_name += " " + + + QString("Testing (%1)").arg(commit_short_hash); } else if (GetProjectBuildGitBranchName().contains("dev/")) { application_display_name += - " " + - QString("Develop (%1)").arg(GetProjectBuildGitCommitHash().last(6)); + " " + QString("Develop (%1)").arg(commit_short_hash); } // set the extra information of the build |