From e33082778e2bd7cf68fb45e485c887f2a2400a9e Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 2 Oct 2023 13:05:43 +1000 Subject: [PATCH] Qt: Drop branch from title bar Doesn't show up if a commit is checked out, and arguably not very useful anyway. --- src/duckstation-nogui/nogui_host.cpp | 2 +- src/duckstation-qt/aboutdialog.cpp | 3 ++- src/duckstation-qt/qthost.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/duckstation-nogui/nogui_host.cpp b/src/duckstation-nogui/nogui_host.cpp index cc039a05f..eff8a73a7 100644 --- a/src/duckstation-nogui/nogui_host.cpp +++ b/src/duckstation-nogui/nogui_host.cpp @@ -515,7 +515,7 @@ void NoGUIHost::SavePlatformWindowGeometry(s32 x, s32 y, s32 width, s32 height) std::string NoGUIHost::GetAppNameAndVersion() { - return fmt::format("DuckStation {} ({})", g_scm_tag_str, g_scm_branch_str); + return fmt::format("DuckStation {}", g_scm_tag_str); } std::string NoGUIHost::GetAppConfigSuffix() diff --git a/src/duckstation-qt/aboutdialog.cpp b/src/duckstation-qt/aboutdialog.cpp index e5553ae86..8649d20c4 100644 --- a/src/duckstation-qt/aboutdialog.cpp +++ b/src/duckstation-qt/aboutdialog.cpp @@ -15,7 +15,8 @@ AboutDialog::AboutDialog(QWidget* parent /* = nullptr */) : QDialog(parent) setFixedSize(geometry().width(), geometry().height()); m_ui.scmversion->setTextInteractionFlags(Qt::TextSelectableByMouse); - m_ui.scmversion->setText(tr("%1 (%2)").arg(QString(g_scm_tag_str)).arg(QString(g_scm_branch_str))); + m_ui.scmversion->setText( + tr("%1 (%2)").arg(QLatin1StringView(g_scm_tag_str)).arg(QLatin1StringView(g_scm_branch_str))); m_ui.description->setTextInteractionFlags(Qt::TextBrowserInteraction); m_ui.description->setOpenExternalLinks(true); diff --git a/src/duckstation-qt/qthost.cpp b/src/duckstation-qt/qthost.cpp index 8f75534ed..37bc11674 100644 --- a/src/duckstation-qt/qthost.cpp +++ b/src/duckstation-qt/qthost.cpp @@ -138,7 +138,7 @@ bool QtHost::InNoGUIMode() QString QtHost::GetAppNameAndVersion() { - return QStringLiteral("DuckStation %1 (%2)").arg(g_scm_tag_str).arg(g_scm_branch_str); + return QStringLiteral("DuckStation %1").arg(QLatin1StringView(g_scm_tag_str)); } QString QtHost::GetAppConfigSuffix()