Review Request: fix the rect passed to kcapacitybar paint method

Hugo Pereira Da Costa hugo at oxygen-icons.org
Tue Jan 10 18:37:25 GMT 2012



> On Jan. 10, 2012, 6:08 p.m., Thomas L├╝bking wrote:
> > kdeui/widgets/kcapacitybar.cpp, line 374
> > <http://git.reviewboard.kde.org/r/103669/diff/2/?file=46380#file46380line374>
> >
> >     rather "..., contentsRect());"
> >     Otherwise looks fine (i guess setCllipRegion() is overhead)

Concerning setClipRegion() overhead, no clue.

Concerning passing contentsRect() instead of rect(), well, QStyleOption::initFrom uses widget->rect() by default. Now, other widgets implementation might use contentsRect() when initializing their options.
Testing, both work (I guess cause the margin is zero :)).


- Hugo


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103669/#review9716
-----------------------------------------------------------


On Jan. 10, 2012, 5:06 p.m., Hugo Pereira Da Costa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103669/
> -----------------------------------------------------------
> 
> (Updated Jan. 10, 2012, 5:06 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Description
> -------
> 
> fixes the rect passed to paint method so that it matches the widget rect and not the event (clip) rect, since the former is what's expected by widget styles.
> 
> 
> This addresses bug 290879.
>     http://bugs.kde.org/show_bug.cgi?id=290879
> 
> 
> Diffs
> -----
> 
>   kdeui/widgets/kcapacitybar.cpp 6e63c3f 
> 
> Diff: http://git.reviewboard.kde.org/r/103669/diff/diff
> 
> 
> Testing
> -------
> 
> Fixes bug above.
> No regression with other styles.
> 
> 
> Thanks,
> 
> Hugo Pereira Da Costa
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120110/59d1f161/attachment.htm>


More information about the kde-core-devel mailing list