Qt: Use the version string for the about dialog if the branch is unknown

This commit is contained in:
Jeffrey Pfau 2015-08-16 19:07:38 -07:00
parent ba1fb17dde
commit d10b5c52e6
1 changed files with 6 additions and 1 deletions

View File

@ -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);
}