mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 14:23:35 -07:00
fix: setTags grab tags from method
This commit is contained in:
parent
c04703750e
commit
6e4700e3ad
1 changed files with 2 additions and 5 deletions
|
@ -942,17 +942,14 @@ bool TorrentImpl::setTags(const TagSet &newTags)
|
|||
{
|
||||
// Identify tags to add
|
||||
for (const Tag &tag : newTags)
|
||||
{
|
||||
if (!hasTag(tag))
|
||||
addTag(tag);
|
||||
}
|
||||
|
||||
// Identify tags to remove
|
||||
for (const Tag &tag : asConst(m_tags))
|
||||
{
|
||||
for (const Tag &tag : asConst(tags()))
|
||||
if (!newTags.contains(tag))
|
||||
removeTag(tag);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue