Introduce helper function to join values as string

PR #20130.
This commit is contained in:
Chocobo1 2023-12-19 00:08:37 +08:00 committed by GitHub
parent 9d90141c29
commit 073ca4267c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 188 additions and 77 deletions

View file

@ -380,10 +380,7 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons
case TR_CATEGORY:
return torrent->category();
case TR_TAGS:
{
const TagSet &tags = torrent->tags();
return QStringList(tags.cbegin(), tags.cend()).join(u", "_s);
}
return Utils::String::joinIntoString(torrent->tags(), u", "_s);
case TR_ADD_DATE:
return QLocale().toString(torrent->addedTime().toLocalTime(), QLocale::ShortFormat);
case TR_SEED_DATE: