From d10b5c52e642cf843187100f07aa93f075cff0e9 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 16 Aug 2015 19:07:38 -0700 Subject: [PATCH] Qt: Use the version string for the about dialog if the branch is unknown --- src/platform/qt/AboutScreen.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/platform/qt/AboutScreen.cpp b/src/platform/qt/AboutScreen.cpp index ca53d334a..c898f2c16 100644 --- a/src/platform/qt/AboutScreen.cpp +++ b/src/platform/qt/AboutScreen.cpp @@ -21,6 +21,11 @@ AboutScreen::AboutScreen(QWidget* parent) logo.setDevicePixelRatio(devicePixelRatio()); m_ui.logo->setPixmap(logo); + QLatin1String tree(gitBranch); + if (tree == QLatin1String("(unknown)")) { + tree = QLatin1String(projectVersion); + } + m_ui.projectName->setText(QLatin1String(projectName)); m_ui.projectVersion->setText(QLatin1String(projectVersion)); QString gitInfo = m_ui.gitInfo->text(); @@ -31,6 +36,6 @@ AboutScreen::AboutScreen(QWidget* parent) description.replace("{projectName}", QLatin1String(projectName)); m_ui.description->setText(description); QString extraLinks = m_ui.extraLinks->text(); - extraLinks.replace("{gitBranch}", QLatin1String(gitBranch)); + extraLinks.replace("{gitBranch}", tree); m_ui.extraLinks->setText(extraLinks); }