mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 22:14:32 +00:00
Fix 'must not contain' regexp with '|' character
Checking if we are using regexp was done in setMustContain and setMustNotContain before m_useRegex was even read, corrupting the value. Only m_mustNotContain is affected because of how RssDownloadRule::setMustNotContain handles read string when m_useRegex is false.
This commit is contained in:
parent
05330632f2
commit
7d49e8868c
@ -82,13 +82,13 @@ RssDownloadRulePtr RssDownloadRule::fromVariantHash(const QVariantHash &rule_has
|
|||||||
{
|
{
|
||||||
RssDownloadRulePtr rule(new RssDownloadRule);
|
RssDownloadRulePtr rule(new RssDownloadRule);
|
||||||
rule->setName(rule_hash.value("name").toString());
|
rule->setName(rule_hash.value("name").toString());
|
||||||
|
rule->setUseRegex(rule_hash.value("use_regex", false).toBool());
|
||||||
rule->setMustContain(rule_hash.value("must_contain").toString());
|
rule->setMustContain(rule_hash.value("must_contain").toString());
|
||||||
rule->setMustNotContain(rule_hash.value("must_not_contain").toString());
|
rule->setMustNotContain(rule_hash.value("must_not_contain").toString());
|
||||||
rule->setRssFeeds(rule_hash.value("affected_feeds").toStringList());
|
rule->setRssFeeds(rule_hash.value("affected_feeds").toStringList());
|
||||||
rule->setEnabled(rule_hash.value("enabled", false).toBool());
|
rule->setEnabled(rule_hash.value("enabled", false).toBool());
|
||||||
rule->setSavePath(rule_hash.value("save_path").toString());
|
rule->setSavePath(rule_hash.value("save_path").toString());
|
||||||
rule->setLabel(rule_hash.value("label_assigned").toString());
|
rule->setLabel(rule_hash.value("label_assigned").toString());
|
||||||
rule->setUseRegex(rule_hash.value("use_regex", false).toBool());
|
|
||||||
return rule;
|
return rule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user