[Kde-pim] Review Request 121994: Make SearchPatternString::requiredPart consistent with KMime and Akonadi

Tomáš Trnka tomastrnka at gmx.com
Fri Feb 20 21:07:45 GMT 2015


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

(Updated Úno. 20, 2015, 9:07 odp.)


Review request for KDEPIM.


Changes
-------

Added a unit test for SearchPatternXXX::requiredPart()


Repository: kdepim


Description
-------

SearchRule::RequiredPart::Envelope covers exactly those headers that are
directly provided by KMime::Message (and filled in by
SerializerPluginMail::deserialize in
kdepim-runtime/plugins/akonadi_serializer_mail.cpp). Anything else has
to use the Header part or the necessary data will not be fetched.

The inconsistency had been causing weird bugs where filters using header
fields other than those provided by Envelope "randomly" worked/failed
depending on whether there was another filter in the chain that caused
the Header part to be fetched. This commit fixes filtering using
arbitrary headers.


Diffs (updated)
-----

  mailcommon/search/tests/searchpatterntest.cpp PRE-CREATION 
  mailcommon/search/tests/searchpatterntest.h PRE-CREATION 
  mailcommon/search/tests/CMakeLists.txt PRE-CREATION 
  mailcommon/CMakeLists.txt 6c1b19b27e3b167fbe4167b4d2048673d46e090a 
  mailcommon/search/searchpattern.cpp 18533445ecc479018904290f6e93a6d5933e4950 

Diff: https://git.reviewboard.kde.org/r/121994/diff/


Testing
-------

I'm using this on 4.14 for several months now with heavy filtering without problems. As the change is towards fetching more than before, existing filters cannot break.


Thanks,

Tomáš Trnka

_______________________________________________
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