[KParts] patch: don't emit urlChanged, when url is the same
David Faure
faure at kde.org
Tue Dec 24 12:22:05 UTC 2013
On Tuesday 24 December 2013 12:30:56 Michal Humpula wrote:
> 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.
That's ok, this method is typically not called 10000 times per second.
> 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.
Yep. The patch makes a lot of sense, please commit it - at least to
frameworks. Do you also need it in kdelibs master?
> IMHO the same could/should be done for others setters.
Which are they?
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
More information about the Kde-frameworks-devel
mailing list