From 3f2076d19503c439d61c11c41b2393dbb5891065 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 29 Dec 2009 21:40:23 +0000 Subject: [PATCH] - Use Wildcard matching instead of full regex one (much simpler and seems to be what the user expects) in RSS feed downloader --- src/feeddownloader.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/feeddownloader.h b/src/feeddownloader.h index 1b6806611..949f2a80f 100644 --- a/src/feeddownloader.h +++ b/src/feeddownloader.h @@ -64,12 +64,16 @@ public: bool matches(QString s) { QStringList match_tokens = getMatchingTokens(); + //qDebug("Checking matching tokens: \"%s\"", getMatchingTokens_str().toLocal8Bit().data()); foreach(const QString& token, match_tokens) { if(token.isEmpty() || token == "") continue; - QRegExp reg(token, Qt::CaseInsensitive); + qDebug("Token: %s", token.toLocal8Bit().data()); + QRegExp reg(token, Qt::CaseInsensitive, QRegExp::Wildcard); + //reg.setMinimal(false); if(reg.indexIn(s) < 0) return false; } + qDebug("Checking not matching tokens"); // Checking not matching QStringList notmatch_tokens = getNotMatchingTokens(); foreach(const QString& token, notmatch_tokens) {