<table><tr><td style="">bruns added a comment.
</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/D13814">View Revision</a></tr></table><br /><div><div><p>The code looks fine now, but the summary is incorrect.</p>
<p>The savings is not from using a lambda, but caused by initializing it once. If the old code had used <tt style="background: #ebebeb; font-size: 13px;">m_collator(other.m_collator)</tt> in the copy constructor, construction would have been just a ref count increment and each of the following <tt style="background: #ebebeb; font-size: 13px;">m_collator.setFoo(...)</tt> would have been noops (QCollator checks if the new value is different to its current value).</p>
<p>Of course this would have triggered the QCollator bug as well.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R318 Dolphin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13814">https://phabricator.kde.org/D13814</a></div></div><br /><div><strong>To: </strong>jtamate, Dolphin, Frameworks, markg, elvisangelaccio, bruns<br /><strong>Cc: </strong>elvisangelaccio, apol, bruns, markg, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp<br /></div>