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
38 changed files with 421 additions and 251 deletions

View File

@@ -85,8 +85,8 @@ namespace
{
ListType entryList;
entryList.reserve(input.size());
for (const QString &setValue : input)
entryList.emplace_back(setValue.toStdString());
for (const Tag &setValue : input)
entryList.emplace_back(setValue.toString().toStdString());
return entryList;
}
}
@@ -263,7 +263,7 @@ BitTorrent::LoadResumeDataResult BitTorrent::BencodeResumeDataStorage::loadTorre
{
for (int i = 0; i < tagsNode.list_size(); ++i)
{
const QString tag = fromLTString(tagsNode.list_string_value_at(i));
const Tag tag {fromLTString(tagsNode.list_string_value_at(i))};
torrentParams.tags.insert(tag);
}
}