all repos — mgba @ d10b5c52e642cf843187100f07aa93f075cff0e9

mGBA Game Boy Advance Emulator

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
commit

d10b5c52e642cf843187100f07aa93f075cff0e9

parent

ba1fb17dde839e1596a68b8553f0dbfc6aa51a04

1 files changed, 6 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/AboutScreen.cppsrc/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); }