Qt: Use the version string for the about dialog if the branch is unknown
Jeffrey Pfau jeffrey@endrift.com
Sun, 16 Aug 2015 19:07:38 -0700
1 files changed,
6 insertions(+),
1 deletions(-)
jump to
M
src/platform/qt/AboutScreen.cpp
→
src/platform/qt/AboutScreen.cpp
@@ -21,6 +21,11 @@ logo = logo.scaled(m_ui.logo->minimumSize() * devicePixelRatio(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
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 @@ QString description = m_ui.description->text();
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); }