<table><tr><td style="">dvratil created this revision.<br />dvratil added a reviewer: knauss.<br />dvratil added a subscriber: KDE PIM.<br />dvratil set the repository for this revision to rMESSAGELIB PIM: Message Library.<br />Restricted Application added a project: KDE PIM.<br />Restricted Application added a subscriber: kde-pim.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D3387" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Currently <tt style="background: #ebebeb; font-size: 13px;">NodeHelper::fromAsString()</tt> can only return the sender only if the passed <tt style="background: #ebebeb; font-size: 13px;">KMime::Content</tt> is directly part of the original <tt style="background: #ebebeb; font-size: 13px;">KMime::Message</tt> node tree. This patch makes <tt style="background: #ebebeb; font-size: 13px;">NodeHelper::fromAsString()</tt> non-static, so that it can also perform lookups for extra <tt style="background: #ebebeb; font-size: 13px;">KMime::Content</tt> parts.</p>

<p>Typical usecase is to look up sender from a signed part encapsulated inside an originally encrypted <tt style="background: #ebebeb; font-size: 13px;">KMime::Content</tt>. The signed part is not part of the original <tt style="background: #ebebeb; font-size: 13px;">KMime::Message</tt> node tree, thus <tt style="background: #ebebeb; font-size: 13px;">NodeHelper::fromAsString()</tt> would return an empty string. With this patch we can lookup the original <tt style="background: #ebebeb; font-size: 13px;">KMime::Conten</tt>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.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Added a unit-test</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rMESSAGELIB PIM: Message Library</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3387" rel="noreferrer">https://phabricator.kde.org/D3387</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>mimetreeparser/autotests/nodehelpertest.cpp<br />
mimetreeparser/autotests/nodehelpertest.h<br />
mimetreeparser/src/bodyformatter/applicationpgpencrypted.cpp<br />
mimetreeparser/src/bodyformatter/applicationpkcs7mime.cpp<br />
mimetreeparser/src/bodyformatter/multipartencrypted.cpp<br />
mimetreeparser/src/bodyformatter/multipartsigned.cpp<br />
mimetreeparser/src/viewer/messagepart.cpp<br />
mimetreeparser/src/viewer/nodehelper.cpp<br />
mimetreeparser/src/viewer/nodehelper.h</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>dvratil, knauss<br /><strong>Cc: </strong>kde-pim, KDE PIM, spencerb, dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>