bruns added a comment.
The code looks fine now, but the summary is incorrect. The savings is not from using a lambda, but caused by initializing it once. If the old code had used `m_collator(other.m_collator)` in the copy constructor, construction would have been just a ref count increment and each of the following `m_collator.setFoo(...)` would have been noops (QCollator checks if the new value is different to its current value). Of course this would have triggered the QCollator bug as well. REPOSITORY R318 Dolphin REVISION DETAIL https://phabricator.kde.org/D13814 To: jtamate, #dolphin, #frameworks, markg, elvisangelaccio, bruns Cc: elvisangelaccio, apol, bruns, markg, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp