Review Request 126308: KPushButton: respect SH_DialogButtonBox_ButtonsHaveIcons, also when drawing

Thomas Lübking thomas.luebking at gmail.com
Fri Dec 11 13:55:33 UTC 2015


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



src/kdeui/kdialogbuttonbox.cpp (line 36)
<https://git.reviewboard.kde.org/r/126308/#comment61103>

    unrelated and not required



src/kdeui/kdialogbuttonbox.cpp (line 39)
<https://git.reviewboard.kde.org/r/126308/#comment61105>

    QDialogButtonBox::addButton should do correctly anyway, so please don't workaround things that are not broken.



src/kdeui/kdialogbuttonbox.cpp (line 57)
<https://git.reviewboard.kde.org/r/126308/#comment61107>

    you can completely spare this, there's no reason to manipulate a copy of the GuiItem, just burns CPU



src/kdeui/kdialogbuttonbox.cpp (line 61)
<https://git.reviewboard.kde.org/r/126308/#comment61108>

    unrelated and it won't leak, since the cleanup is done by the parent/child relation ("this" passed to KPushButton)



src/kdeui/kdialogbuttonbox.cpp (line 70)
<https://git.reviewboard.kde.org/r/126308/#comment61106>

    Setting the icon is sufficient, please do not mess around with other attributes.



src/kdeui/kdialogbuttonbox.cpp (line 75)
<https://git.reviewboard.kde.org/r/126308/#comment61110>

    this is really the only thing you should need to do here.



src/kdeui/kpushbutton.cpp (line 257)
<https://git.reviewboard.kde.org/r/126308/#comment61111>

    still wrong and again, please don't mess with the icon size - you're just tempting DIV zero segfaults.


- Thomas Lübking


On Dec. 11, 2015, 12:59 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126308/
> -----------------------------------------------------------
> 
> (Updated Dec. 11, 2015, 12:59 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X, KDE Frameworks, Qt KDE, and Hugo Pereira Da Costa.
> 
> 
> Repository: kdelibs4support
> 
> 
> Description
> -------
> 
> KF5 applications have long had a habit of drawing icons on buttons even when this feature was turned off in the user's setting. This was mostly noticeable in applications built on kdelibs4support.
> 
> It seems that the actual culprit is in Qt's QPushButton implementation (https://bugreports.qt.io/browse/QTBUG-49887), but it is possible to work around it in `KPushButton::paintEvent`, by removing the icon (forcing it to the null icon) in the option instance, before handing off control to the painter.
> 
> 
> Diffs
> -----
> 
>   src/kdeui/kdialogbuttonbox.cpp 0f6649b 
>   src/kdeui/kpushbutton.cpp 98534fa 
> 
> Diff: https://git.reviewboard.kde.org/r/126308/diff/
> 
> 
> Testing
> -------
> 
> On Kubuntu 14.04 and OS X 10.9.5 with Qt 5.5.1 and KF5 frameworks 5.16.0 .
> 
> I have not yet verified if there are other classes where this modification would be relevant too.
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151211/ec5af06e/attachment.html>


More information about the Kde-frameworks-devel mailing list