<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/126308/">https://git.reviewboard.kde.org/r/126308/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On December 10th, 2015, 10:11 p.m. UTC, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">What tells you that this is a dialog buttonbox pushbutton?</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">What happens if the button has no text?</li>
</ol>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The bug is in QDialogButtonBox (or rather the K variant, QDialogButtonBoxPrivate::createButton() seems to incorporate the hint correctly)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">[KDE] has "ShowIconsOnPushButtons=false" in kdeglobals which was interpreted by KPushButton <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">and</em> kstyle for the hint, but the hint only covers Q'DialogButtonBox'es - there's simply no global rule for this like AA_DontShowIconsInMenus</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">=> KDialogButtonBox shall respect the hint for its buttons (there're two special creation routines).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">For the rest, the platform plugin ideally picks the kdeglobals setting and exports it to the application object (dyn property?) where the style can pick it and incorporate it into its calculations (ie. if no icons are wanted and there's text or arrow, omit the icon in size calculation and painting)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">"Fixing" that in deprecated KPushButton doesn't really fix anything. We'll face the mix we had, just that users of QPushButton were far less prone to pass them an icon in pre-KF5 times.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Please also attach Hugo Pereira Da Costa.</p></pre>
 </blockquote>




 <p>On December 10th, 2015, 10:51 p.m. UTC, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">1: why should one care? It is said nowhere that the setting defined as "show icons on buttons" in <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">systemsettings(5)</code> applies only to dialogs. Rather, the tooltip says "when this is enabled, KDE applications will show icons alongside [sic!] some important buttons".
In other words, when "this" is <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">not</em> enabled, there should be no icons, period.
I have found no sign in the code that the ShowIconsOnPushButtons hint is to be used only for dialogs; <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">SH_DialogButtonBox_ButtonsHaveIcons</code> indeed carries the suggestion in its name but I would not be surprised if Qt really thinks of it in a more general sense. Probably also because the notion of what a dialog is has become a lot vaguer.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">And that also happens to be what Qt does; buttons show their icons on Linux (and other Unix variants?) but on OS X or MS Windows displaying of those icons is deactivated unless you use a style that enables it. In fact, the default setting for <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">SH_DialogButtonBox_ButtonsHaveIcons</code> is false except in the generic Unix theme (= it does work globally like <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">AA_DontShowIconsInMenus</code> everywhere else).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">2: a user who indicates s/he doesn't want to see icons will get an empty button. That's also what can happen with QPushButton, and app developers have to take this into consideration. Cf. toolbars (and Qt's position on the use of "texted separators").
I don't think I've ever come across a standard button showing only an icon, except possibly the arrow button next to the progress indicators in KMail and KDevelop.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">As to fixing it here: as it turns out, "here" is the main source for annoying icons rearing their silly heads on buttons on my screen ;) and it was also something of a challenge to understand why they kept appearing despite the fact that all code appeared to return the value of <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ShowIconsOnPushButtons</code>. Deprecated or not, it doesn't look like all applications are going to stop using it anytime soon.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I looked into fixing the issue in KDialogButtonBox but saw that it does nothing to override the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ShowIconsOnPushButtons</code> setting. The only way to respect the setting through that class (or a modern equivalent) would be to set an empty icon if <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ShowIconsOnPushButtons=false</code>. That introduces another regression: changes in this setting are supposed to be reflected by running applications without requiring a restart (or a recreation of dialogs). If it were just me I'd decree that buttons can have either text or an icon, but right now we have to make do with this mixed situation.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I don't mind making this an OS X (and MS Windows) specific modification, of course, but on those platforms</p></pre>
 </blockquote>





 <p>On December 10th, 2015, 11:34 p.m. UTC, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">1: why should one care?</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Because, as explained, that is what the hint says. Nothing else.</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have found no sign in the code that the ShowIconsOnPushButtons hint is to be used only for dialogs</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">No, but it's been used to feed SH_DialogButtonBox_ButtonsHaveIcons <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">AND</em> KPushButton.
ShowIconsOnPushButtons implied SH_DialogButtonBox_ButtonsHaveIcons but NOT vv.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The approach is wrong, since you're abusing the hint for generalisation.</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">but on OS X or MS Windows</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">... Qt uses native elements which might simply globally downforce the pushbutton icon nonsense (as could any style - I was more than once close to doing that in virtuality)
Eg. Breeze might do that on favor of the HIG, but that's not relevant here.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Downforcing in KPushButton means to operate on legacy code only and fixes nothing.
Downforcing in a style (only) is the styles choice only.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">We simply need to ensure to
a) respect SH_DialogButtonBox_ButtonsHaveIcons in KDialogButtonBox
b) forward the offered variable to a position where the style can pick it. (As alternative, the style can read it directly, but that "requires" it to link KDE in order to <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">correctly</em> read kdeglobals)</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">in KDialogButtonBox but saw that it does nothing to override the ShowIconsOnPushButtons setting</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Err... what? The problem will be in "KDialogButtonBox::addButton(const KGuiItem &guiitem, .)", you need to get rid of the icon after KGuiItem::assign() if SH_DialogButtonBox_ButtonsHaveIcons is false (for the other function, Qt should do correctly)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">And to repeat myself: that has <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">nothing</em> to do with ShowIconsOnPushButtons - you can ignore that value in this position, it feeds the stylehint via the platform plugin, but in this position <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">only</em> the stylehint matters.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">ShowIconsOnPushButtons is orthogonal and supposed to cover <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">all</em> Q/KPushButtons and must therefore be forwarded to and caught by the style as suggested (or by any equivalent implementation)</p></pre>
 </blockquote>





 <p>On December 11th, 2015, 10:40 a.m. UTC, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With all due respect, this seems like overzealous application of a principle that doesn't really apply, making things overly complicated.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So, I was right that <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">"ShowIconsOnPushButtons is orthogonal and supposed to cover all Q/KPushButtons"</em>. Inside/under a KDE environment, I presume, so also for "pure Qt" applications that get to use the KdePlatformPlugin in order to blend in?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In that case, it doesn't matter how some central bit of KDE code achieves this. <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">All that counts is the end result that users see</em>, and that this end result is consistent. If they can reasonably expect that the control that toggles <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ShowIconsOnPushButtons</code> has an immediate effect on just about all buttons, if SH_DialogButtonBox_ButtonsHaveIcons allows to achieve this and if Qt itself already uses the parameter in situations outside of a QDialogButtonBox context, then I think there is no harm in using that parameter. If there were a setting call <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">HandYourDirtyLaundryOutToDry</code> which has the desired effect (and no undesirable side-effects), then we'd be using that (and asking Qt what they think about all that :)).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Am I right that the only buttons Qt provides that can show icons automatically as a function of their role are the ones in a QDialogButtonBox? Either way, whatever the idea of the developer who introduced <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">SH_DialogButtonBox_ButtonsHaveIcons</code> was, the code seems to have evolved since to use it in a broader context. (Or the opposite is going on, in which case I think that this would already have been pointed out to me on the Qt ML and/or bug report.)
The main point here is that I can see no unexpected side-effects of generalising <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">SH_DialogButtonBox_ButtonsHaveIcons</code>. Qt's idea must have been that it should be possible to hide icons assigned automatically to the buttons that have this feature, but not the ones assigned by developers to buttons that do not provide automatic icons. That idea is not violated in a context where the parameter is generalised to hide the icons on all buttons.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Also:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">    <span style="color: #408080; font-style: italic">/**</span>
<span style="color: #408080; font-style: italic">     * This function determines if the user wishes to see icons on the</span>
<span style="color: #408080; font-style: italic">     * push buttons.</span>
<span style="color: #408080; font-style: italic">     *</span>
<span style="color: #408080; font-style: italic">     * @return Returns true if user wants to show icons.</span>
<span style="color: #408080; font-style: italic">     * @deprecated since 5.0, use style->styleHint(QStyle::SH_DialogButtonBox_ButtonsHaveIcons, 0, widget);</span>
<span style="color: #408080; font-style: italic">     */</span>
    <span style="color: #008000; font-weight: bold">static</span> KDELIBS4SUPPORT_DEPRECATED bool showIconsOnPushButtons();
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">seems to be very clear...</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The KdePlatformPlugin already respects the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ShowIconsOnPushButtons</code> setting and returns it when queried for the corresponding hint. I hope that should be enough to ensure that <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">QDialogButtonBox</code> buttons don't show their icons when so requested, but have yet to confirm that.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Did I say that I agree that patching KPushButton has limited interest, even if it does solve part of the problem currently, namely that of applications building dialog-like interfaces without using Q/KDialogButtonBox (and using KPushButton instead).
If KDialogButtonBox is not (or less) deprecated I (or someone else) can indeed modify it so that it respects <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">SH_DialogButtonBox_ButtonsHaveIcons</code>, but again, I think that can only be done by ignoring the icon when the buttons are created. You'd still get icons though if there is a way to change the icon on those buttons, and applications use that.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">And that still doesn't address the fact that QPushButtons should also respect <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ShowIconsOnPushButtons</code> . The only way I see to achieve that currently that does not involve patching Qt is to oblige all code to check for the corresponding KDE style hint (or global setting, but see the deprecation note above), and assign an icon only when the feature is requested by the user. That seems like a strong argument to reintroduce KPushButton to me ...</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">BTW: let me be pedantic for a bit, and point out that <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ShowIconsOnPushButtons</code> literal meaning suggests that <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">all</em> push buttons should show an icon if the parameter is true. Ultimately that means that the setting has been violated for ages, maybe not the same way I'm proposing to violate <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">SH_DialogButtonBox_ButtonsHaveIcons</code> but still :)</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">but on OS X or MS Windows
... Qt uses native elements</p>
</blockquote>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Actually, no. Not on OS X at least, and not in the sense that a QPushButton is implemented using an NSButton. I was under that impression myself, until it was pointed out to me that "QWidgets (and QML) don't use native UI views. They draw everything themself (or refrain from drawing, in case of button icons). The drawing is done in the style (qmacstyle_mac.mm in this case)." And I can confirm that this is true: on OS X I can use the XCB QPA and request the macintosh style, which gives me a X11 windows (local <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">or</em> remote) that have the exact same content as "native" windows, up to a scale factor and some colour differences. I'd been wondering how this was possible, now I know.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">(before anyone jumps at the thought of getting a true Mac theme on their KDE desktop: I suppose it still requires basic drawing routines and other [ObjC] APIs only available on a Mac :P)</p></pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With all due respect, anything else simply makes no sense :-P</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">See, the shortest cut to "please no superfluous icons on pushbuttons" is to have the style omit them.
It's also the only global and with deprecation of KPushButton the only relevant approach.
Agreed?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Now, SH_DialogButtonBox_ButtonsHaveIcons is a hint <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">from</em> the style to "something" (the ButtonBox in particular) to not add icons to (certain) pushbuttons.
If it's turned into a global hint <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">from</em> the style <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">to</em> something for something  that only the style can actually provide, it's pointless. Do we agree on that? The style knows "i don't want to see icons on pushbuttons", it doesn't really have to share that info with the world (at least not for this purpose) - or itself.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Now the only remaining question is "How do we make the style know what it wants".
1. The behavior is hardcoded in the style or the style has maybe some private config key for it
2. There's a central KDE setting that is to be honored by anything inheriting KStyle and can ideally be read by anything being a plain QStyle as well.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The central setting exists and you promote to abuse SH_DialogButtonBox_ButtonsHaveIcons to propagate it.
Leaving the abuse character aside, the patch doesn't really get you what you wanted to achieve (QPushButtons still have undesired icons everywhere) and will be increasingly useless by KPushButton -> QPushButton replacements.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">=> To get what you want, you'll have to change KStyle/Breeze/Other styles <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">or</em> QPushButton.
Much luck on the latter but if you resolve this within *Style (what is imo the only correct solution, because QStyle is the LAF abstraction in Qt), walking across the StyleHint is just CPU burning, therefore the likely abuse is pointless.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So my proposal is to
a) fix KDialogButtonBox (it's a bug and bugs exist to be fixed - even in deprecated code, notably if it's still widely used)
b) Wire up the kglobals setting from the platform plugin into the application where QStyle implementations can pick it up.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The alternative to (b) is to let styles deal this locally (and ditch the gui config, resp. interpret it for dialogbuttonboxes only since that's the only thing we can effectively control - at least for KStyle inheritors that do not override the hint...)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'll provide a patch for (a), you take your preference on (b) and maybe Hugo wants to say a word ;-)</p></pre>
<br />










<p>- Thomas</p>


<br />
<p>On December 10th, 2015, 10:54 p.m. UTC, René J.V. Bertin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KDE Software on Mac OS X, KDE Frameworks, Qt KDE, and Hugo Pereira Da Costa.</div>
<div>By René J.V. Bertin.</div>


<p style="color: grey;"><i>Updated Dec. 10, 2015, 10:54 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs4support
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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 <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KPushButton::paintEvent</code>, by removing the icon (forcing it to the null icon) in the option instance, before handing off control to the painter.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On Kubuntu 14.04 and OS X 10.9.5 with Qt 5.5.1 and KF5 frameworks 5.16.0 .</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have not yet verified if there are other classes where this modification would be relevant too.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/kdeui/kpushbutton.cpp <span style="color: grey">(98534fa)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/126308/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>