mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 19:40:18 -07:00
- Use Wildcard matching instead of full regex one (much simpler and seems to be what the user expects) in RSS feed downloader
This commit is contained in:
parent
ed13c43e93
commit
3f2076d195
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue