[Kde-pim] Re: IMAP filtering doesn't work?

Andre Heinecke aheinecke at intevation.de
Tue May 24 19:30:49 BST 2011


Hi Stephen,

Am Tuesday, 24. May 2011, 17:57:01 schrieb Stephen Kelly:
> Andre Heinecke wrote:
> > I think the problem is that the slotInitialCollectionsFeteched is only
> > triggered when KMail ( and thus the filtermanager ) is running. The only
> > solution i see there is to apply all Filters on the inbox on startup?
> 
> I just sat down to implement that, but it turns out to already be there.
> 
> FilterManager::tryToFilterInboxOnStartup
Sorry for not noticing this function :) Indeed this addresses exactly our 
problem.
> I don't know if it's getting called, if it's fetching collections, or if
> it's fetching items correctly. Could you track that and see where the
> problem gets introduced?
I had a look at the code and confirmed it with debug output.
The only place where tryToFilterInboxOnStartup is called is the ctor of the 
FilterManager. At this time the filters are not read from the config because 
FilterManager::ReadConfig() is not called in the ctor. So the filters are always 
empty and the tryToFilterInboxOnStartup returns immediately.

I think this is pretty straightforward to fix but I would rather leave 
implementing this fix to you. When i tried to use readConfig in the ctor i had a 
segmentation fault. But since tryToFilterInboxOnStartup i cannot call it from 
the kmkernel after the FilterManager object is constructed.

My solution would be to make it a public function "tryToFilterInbox" and call 
it from the kmkernel. Do you have a better idea?

Regards,
Andre

-- 
Andre Heinecke |  ++49-541-335083-262  |  http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list