Browse Source

Merge pull request #4136 from glassez/remove_labels

Fix 'Remove unused labels'. Closes #4066.
adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
b76428420e
  1. 4
      src/gui/rss/rssdownloadrulelist.cpp

4
src/gui/rss/rssdownloadrulelist.cpp

@ -85,12 +85,8 @@ void RssDownloadRuleList::loadRulesFromVariantHash(const QVariantHash &h) @@ -85,12 +85,8 @@ void RssDownloadRuleList::loadRulesFromVariantHash(const QVariantHash &h)
{
QVariantHash::ConstIterator it = h.begin();
QVariantHash::ConstIterator itend = h.end();
QStringList labels = Preferences::instance()->getTorrentLabels();
for ( ; it != itend; ++it) {
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())
saveRule(rule);
}

Loading…
Cancel
Save