<table><tr><td style="">dfaure created this revision.<br />dfaure added a reviewer: mlaurent.<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/D3768" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>And the constructor is called very often - once for each contact being {de}serialized<br />
by Akonadi (see VCardConverter::parseVCards).</p>

<p>Fixed by the usual "static const struct" readonly-data solution (from Marc Mutz in libkleo).</p>

<p>I hit this when using the "Select..." pushbutton in kmail composer, which fills in a model<br />
with all contacts.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Validated by the unittests (which are the reason why I had to sort both lists<br />
alphabetically, to match the ordering that was done by QMap previously).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R174 PIM: KContacts</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3768" rel="noreferrer">https://phabricator.kde.org/D3768</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/vcardtool.cpp<br />
src/vcardtool.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>dfaure, mlaurent<br /><strong>Cc: </strong>kde-pim, spencerb, dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>