[Differential] [Request, 49 lines] D3387: NodeHelper::fromAsString: make it work with extra content nodes

dvratil (Daniel Vrátil) noreply at phabricator.kde.org
Wed Nov 16 14:33:34 GMT 2016


dvratil created this revision.
dvratil added a reviewer: knauss.
dvratil added a subscriber: KDE PIM.
dvratil set the repository for this revision to rMESSAGELIB PIM: Message Library.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: kde-pim.

REVISION SUMMARY
  Currently `NodeHelper::fromAsString()` can only return the sender only if the passed `KMime::Content` is directly part of the original `KMime::Message` node tree. This patch makes `NodeHelper::fromAsString()` non-static, so that it can also perform lookups for extra `KMime::Content` parts.
  
  Typical usecase is to look up sender from a signed part encapsulated inside an originally encrypted `KMime::Content`. The signed part is not part of the original `KMime::Message` node tree, thus `NodeHelper::fromAsString()` would return an empty string. With this patch we can lookup the original `KMime::Conten`t that this part is attached to (in this case it would be the original encrypted part) for which we can perform the sender lookup.

TEST PLAN
  Added a unit-test

REPOSITORY
  rMESSAGELIB PIM: Message Library

REVISION DETAIL
  https://phabricator.kde.org/D3387

AFFECTED FILES
  mimetreeparser/autotests/nodehelpertest.cpp
  mimetreeparser/autotests/nodehelpertest.h
  mimetreeparser/src/bodyformatter/applicationpgpencrypted.cpp
  mimetreeparser/src/bodyformatter/applicationpkcs7mime.cpp
  mimetreeparser/src/bodyformatter/multipartencrypted.cpp
  mimetreeparser/src/bodyformatter/multipartsigned.cpp
  mimetreeparser/src/viewer/messagepart.cpp
  mimetreeparser/src/viewer/nodehelper.cpp
  mimetreeparser/src/viewer/nodehelper.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: dvratil, knauss
Cc: kde-pim, #kde_pim, spencerb, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20161116/4df604e0/attachment.html>


More information about the kde-pim mailing list