Bug 93756 - Filtering threads by regular expression in the headers does not work
Summary: Filtering threads by regular expression in the headers does not work
Status: RESOLVED FIXED
Alias: None
Product: knode
Classification: Miscellaneous
Component: general (show other bugs)
Version: 0.8.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-22 23:27 UTC by Roie Kerstein
Modified: 2005-02-20 19:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roie Kerstein 2004-11-22 23:27:10 UTC
Version:           0.8.1 (using KDE 3.3.1, Gentoo)
Compiler:          gcc version 3.4.2 (Gentoo Linux 3.4.2-r2, ssp-3.4.1-1, pie-8.7.6.5)
OS:                Linux (i686) release 2.6.9-gentoo-r1

When I try to filter threads with a specific regexp in the header, knode politely ignores it, and show all the threads.
When combined with other filtering criterias, the others works, while the regexp is still ignored.
Comment 1 Volker Krause 2005-02-19 17:29:33 UTC
Which header did you try to filter? This works only with headers provided by the server when getting the article list (subject, from, date, xref, ...).
Comment 2 Roie Kerstein 2005-02-19 19:37:13 UTC
Subject
Comment 3 Volker Krause 2005-02-20 18:44:22 UTC
I'm unable to reproduce this, could you maybe post the regexp that didn't work?
Comment 4 Volker Krause 2005-02-20 19:11:20 UTC
Never mind, I found it. I'll commit a fix soon.
Comment 5 Volker Krause 2005-02-20 19:16:07 UTC
CVS commit by vkrause: 

Matching on position 0 is okay too, only negative values mean no match.

BUG: 93756


  M +1 -1      knstringfilter.cpp   1.22


--- kdepim/knode/knstringfilter.cpp  #1.21:1.22
@@ -47,5 +47,5 @@ bool KNStringFilter::doFilter(const QStr
     if(regExp) {
       QRegExp matcher(expanded);
-      ret=(matcher.search(s) > 0);
+      ret = ( matcher.search(s) >= 0 );
     } else
       ret=(s.find(expanded,0,false)!=-1);