mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
Merge pull request #4136 from glassez/remove_labels
Fix 'Remove unused labels'. Closes #4066.
This commit is contained in:
commit
b76428420e
@ -85,12 +85,8 @@ void RssDownloadRuleList::loadRulesFromVariantHash(const QVariantHash &h)
|
|||||||
{
|
{
|
||||||
QVariantHash::ConstIterator it = h.begin();
|
QVariantHash::ConstIterator it = h.begin();
|
||||||
QVariantHash::ConstIterator itend = h.end();
|
QVariantHash::ConstIterator itend = h.end();
|
||||||
QStringList labels = Preferences::instance()->getTorrentLabels();
|
|
||||||
for ( ; it != itend; ++it) {
|
for ( ; it != itend; ++it) {
|
||||||
RssDownloadRulePtr rule = RssDownloadRule::fromVariantHash(it.value().toHash());
|
RssDownloadRulePtr rule = RssDownloadRule::fromVariantHash(it.value().toHash());
|
||||||
// Hack to readd labels forgotten before fix
|
|
||||||
if (!labels.contains(rule->label()))
|
|
||||||
Preferences::instance()->addTorrentLabelExternal(rule->label());
|
|
||||||
if (rule && !rule->name().isEmpty())
|
if (rule && !rule->name().isEmpty())
|
||||||
saveRule(rule);
|
saveRule(rule);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user