[KParts] patch: don't emit urlChanged, when url is the same

Michal Humpula michal.humpula at seznam.cz
Tue Dec 24 11:30:56 UTC 2013


Hi there,

as suggested without fully functional reviewboard, here is the little patch 
for discussion.

Emit urlChanged only when actually changing url trough setUrl. The drawback of 
this is that now the fast assignment is replaced by possibly expensive string 
comparison. On the other hand, when the urls are the same, the emit wont fire 
and whole bunch of potentially expensive operations connected to that signal 
will not happen.

IMHO the same could/should be done for others setters.

Cheers

Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: emit.patch
Type: text/x-patch
Size: 392 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131224/c5ade969/attachment.patch>


More information about the Kde-frameworks-devel mailing list