Review Request 128573: Add overlay support to PlasmaCore::IconItem

David Edmundson david at davidedmundson.co.uk
Tue Aug 2 15:18:05 UTC 2016



> On Aug. 2, 2016, 10:08 a.m., David Edmundson wrote:
> > src/declarativeimports/core/iconitem.cpp, line 472
> > <https://git.reviewboard.kde.org/r/128573/diff/1/?file=472744#file472744line472>
> >
> >     why loop if we're going to use m_overlay every time?
> 
> Chinmoy Ranjan Pradhan wrote:
>     KIconloader::drawOverlays assumes that an overlay will be drawn and it needs some additional setup time. So (i think) its better to check if overlay is needed and then call drawOverlays.
> 
> David Edmundson wrote:
>     That would explain the if() statement, it does not explain the for loop.

oh, it breaks after. 
You're checking the list contains at least one non-null string before rendering the whole thing.

It kinda makes sense (though I would comment the code)

However:
KIconLoader::drawOverlays is pretty much a no-op, so you're not really saving anything.


- David


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


On Aug. 2, 2016, 3:08 p.m., Chinmoy Ranjan Pradhan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128573/
> -----------------------------------------------------------
> 
> (Updated Aug. 2, 2016, 3:08 p.m.)
> 
> 
> Review request for Plasma and Eike Hein.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> As suggested in https://git.reviewboard.kde.org/r/128552/ (by Eike), this patch adds overlay support to IconItem.
> 
> 
> Diffs
> -----
> 
>   src/declarativeimports/core/iconitem.h 6a1d67c 
>   src/declarativeimports/core/iconitem.cpp fae0330 
> 
> Diff: https://git.reviewboard.kde.org/r/128573/diff/
> 
> 
> Testing
> -------
> 
> build
> 
> 
> Thanks,
> 
> Chinmoy Ranjan Pradhan
> 
>

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


More information about the Plasma-devel mailing list