From 1c49e0973c94b32bf3bfe52845b6b9572c997ef2 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 12 Jun 2024 15:20:37 +0800 Subject: [PATCH] Revise Protocol column Add "BT" (BitTorrent) to avoid confusion about which protocol it is referring to. Also its value doesn't need to be translated. PR #20897. --- src/gui/trackerlist/trackerlistmodel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/trackerlist/trackerlistmodel.cpp b/src/gui/trackerlist/trackerlistmodel.cpp index 92fb8acb3..0d0b8fdf7 100644 --- a/src/gui/trackerlist/trackerlistmodel.cpp +++ b/src/gui/trackerlist/trackerlistmodel.cpp @@ -488,11 +488,11 @@ QVariant TrackerListModel::headerData(const int section, const Qt::Orientation o switch (section) { case COL_URL: - return tr("URL/Announce endpoint"); + return tr("URL/Announce Endpoint"); case COL_TIER: return tr("Tier"); case COL_PROTOCOL: - return tr("Protocol"); + return tr("BT Protocol"); case COL_STATUS: return tr("Status"); case COL_PEERS: @@ -506,9 +506,9 @@ QVariant TrackerListModel::headerData(const int section, const Qt::Orientation o case COL_MSG: return tr("Message"); case COL_NEXT_ANNOUNCE: - return tr("Next announce"); + return tr("Next Announce"); case COL_MIN_ANNOUNCE: - return tr("Min announce"); + return tr("Min Announce"); default: return {}; } @@ -585,7 +585,7 @@ QVariant TrackerListModel::data(const QModelIndex &index, const int role) const case COL_TIER: return (isEndpoint || (index.row() < STICKY_ROW_COUNT)) ? QString() : QString::number(itemPtr->tier); case COL_PROTOCOL: - return isEndpoint ? tr("v%1").arg(itemPtr->btVersion) : QString(); + return isEndpoint ? (u'v' + QString::number(itemPtr->btVersion)) : QString(); case COL_STATUS: if (isEndpoint) return toString(itemPtr->status);