Review Request 120913: [kcms/lnf] Make a list variable const

Martin Gräßlin mgraesslin at kde.org
Mon Nov 3 08:28:55 UTC 2014



> On Nov. 1, 2014, 5:58 p.m., Mark Gaiser wrote:
> > Just out of curiosity. Do you have any benchmark numbers? I bet it's faster, but by how much in terms of percentage?

no I don't have a benchmark. But the worst performance bug we ever had in KWin was accessing a Qt container class using the non-const variant instead of the const-variant.


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120913/#review69649
-----------------------------------------------------------


On Oct. 31, 2014, 12:13 p.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120913/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2014, 12:13 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-desktop
> 
> 
> Description
> -------
> 
> The dataPath variable is used in an extended for-loop as of C++11.
> As the variable was not const the for loop uses the more expensive
> iterators which allow modification of the list. By making the list
> const it can use the better const iterator.
> 
> See http://blog.qt.digia.com/blog/2011/05/26/cpp0x-in-qt/
> 
> 
> Diffs
> -----
> 
>   kcms/lookandfeel/kcm.cpp a46774200c0c378485a474ff538294c7617ef6d2 
> 
> Diff: https://git.reviewboard.kde.org/r/120913/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20141103/24c55a88/attachment-0001.html>


More information about the Plasma-devel mailing list