From c6dbe8ea60d6570b749a6ad6694d3ecf7f796e8f Mon Sep 17 00:00:00 2001 From: Gabriele Date: Tue, 25 Nov 2014 19:01:20 +0100 Subject: [PATCH] Don't use white spaces as separator in RSS "must not contain" rules This RegExp uses both white spaces and | as separator. Use only the latter and drop the RegExp as it is no longer required. --- src/rss/automatedrssdownloader.cpp | 2 +- src/rss/rssdownloadrule.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rss/automatedrssdownloader.cpp b/src/rss/automatedrssdownloader.cpp index 5833913b0..f811294e0 100644 --- a/src/rss/automatedrssdownloader.cpp +++ b/src/rss/automatedrssdownloader.cpp @@ -605,7 +605,7 @@ void AutomatedRssDownloader::updateMustNotLineValidity() if (ui->checkRegex->isChecked()) tokens << text; else - tokens << text.split(QRegExp("[\\s|]")); + tokens << text.split("|"); foreach (const QString &token, tokens) { QRegExp reg(token, Qt::CaseInsensitive, ui->checkRegex->isChecked() ? QRegExp::RegExp : QRegExp::Wildcard); if (!reg.isValid()) { diff --git a/src/rss/rssdownloadrule.cpp b/src/rss/rssdownloadrule.cpp index bb8cb36fe..0a8867514 100644 --- a/src/rss/rssdownloadrule.cpp +++ b/src/rss/rssdownloadrule.cpp @@ -133,7 +133,7 @@ void RssDownloadRule::setMustNotContain(const QString &tokens) if (m_useRegex) m_mustNotContain = QStringList() << tokens; else - m_mustNotContain = tokens.split(QRegExp("[\\s|]")); + m_mustNotContain = tokens.split("|"); } RssDownloadRulePtr RssDownloadRule::fromVariantHash(const QVariantHash &rule_hash)