[Kde-pim] Review Request: Avoid multiple calls to KMime::Contents::parse() in filters

Szymon Stefanek pragma at kvirc.net
Mon Feb 27 02:45:49 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104090/
-----------------------------------------------------------

Review request for KDEPIM.


Description
-------

The search patterns in filters call the KMime::Contents::parse() method.
When multiple filters are present the method is called multiple times.
This is against the documented policy and ends up breaking the message
headers (see bug 291171).

This patch avoids the call to parse() if headers are already accessible
in the e-mail (that is, parse() has been already called).


This addresses bug 291171.
    http://bugs.kde.org/show_bug.cgi?id=291171


Diffs
-----

  mailcommon/searchpattern.cpp c637bf1 

Diff: http://git.reviewboard.kde.org/r/104090/diff/


Testing
-------

Compiled and tested locally. Fixes bug 291171.


Thanks,

Szymon Stefanek

_______________________________________________
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