diff --git a/src/gui/transferlistmodel.cpp b/src/gui/transferlistmodel.cpp index dcc83dba5..ecfe1842b 100644 --- a/src/gui/transferlistmodel.cpp +++ b/src/gui/transferlistmodel.cpp @@ -194,7 +194,7 @@ QVariant TransferListModel::headerData(const int section, const Qt::Orientation case TR_INFOHASH_V2: return tr("Info Hash v2", "i.e: torrent info hash v2"); case TR_REANNOUNCE: return tr("Reannounce In", "Indicates the time until next trackers reannounce"); case TR_PRIVATE: return tr("Private", "Flags private torrents"); - case TR_PERCENT_SELECTED: return tr("% Selected", "Percentage of torrent selected"); + case TR_PERCENT_SELECTED: return tr("% Selected Data", "Percentage of selected data to download."); default: return {}; } } @@ -445,6 +445,8 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons case TR_PRIVATE: return privateString(torrent->isPrivate(), torrent->hasMetadata()); case TR_PERCENT_SELECTED: + if (!torrent->hasMetadata()) + return tr("N/A"); return QString::number((torrent->wantedSize() * 100) / torrent->totalSize()) + u'%'; } @@ -530,6 +532,8 @@ QVariant TransferListModel::internalValue(const BitTorrent::Torrent *torrent, co case TR_PRIVATE: return (torrent->hasMetadata() ? torrent->isPrivate() : QVariant()); case TR_PERCENT_SELECTED: + if (!torrent->hasMetadata()) + return 0; return (torrent->wantedSize() * 100) / torrent->totalSize(); }