Add a class to represent a tag

PR #20028.
Closes #19744.
This commit is contained in:
Vladimir Golovnev 2023-12-05 17:01:09 +03:00 committed by GitHub
parent 65771d66fc
commit 7a41192597
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 421 additions and 251 deletions

View file

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