<table><tr><td style="">dfaure created this revision.<br />dfaure added reviewers: mlaurent, dvratil, vkrause.<br />Restricted Application added a project: KDE PIM.<br />Restricted Application edited subscribers, added: kde-pim; removed: KDE PIM.<br />dfaure requested review of this revision.
</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/D14010">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Use collectionFromId on demand when the resource is needed and wasn't<br />
set in the collection passed to FolderSettings::forCollection.<br />
For instance this happens in KMail::Util::mailingListsFromMessage<br />
which uses item.parentCollection(), where the resource isn't set.</p>

<p>We do this on demand rather than in setCollection() because<br />
in many cases (when other methods of FolderSettings are being called)<br />
we don't actually need the resource.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Reply followed by Forward-as-attachment would often hit<br />
the assert for me, especially when using the toolbar buttons (probably<br />
unrelated?).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R92 PIM: Common Mail Support</div></div></div><br /><div><strong>BRANCH</strong><div><div>Applications/18.04</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14010">https://phabricator.kde.org/D14010</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/folder/foldersettings.cpp<br />
src/folder/foldersettings.h</div></div></div><br /><div><strong>To: </strong>dfaure, mlaurent, dvratil, vkrause<br /><strong>Cc: </strong>kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>