Porting feedback: Hiding the Help button in KConfigDialog

Kevin Ottens ervin at kde.org
Sun Feb 23 09:54:01 UTC 2014


On Sunday 23 February 2014 10:08:13 David Faure wrote:
> On Monday 17 February 2014 16:00:08 Eike Hein wrote:
> > Hi,
> > 
> > in the KDialog-based KConfigDialog of yesteryear, it was fairly easy
> > 
> > to hide the Help button:
> >   dialog->button(KDialog::Help)->hide();
> > 
> > This is useful for apps that don't (yet) ship a handbook, since it
> > avoids mounting user frustration when a click on Help actually re-
> > sults in a nasty error message (though it's actually looking less
> > nasty these days).
> > 
> > In Frameworks, this isn't possible any longer since the buttons
> > reside in a private QDialogButtonBox. Might be nice to get it back
> > tho ...
> 
> Kévin? (this is your port).

Hmmm yes, I was sure I replied in this thread though... apparently not. :-)
 
> Should we add an accessor for the QDialogButtonBox in KConfigDialog?
> 
> On one hand this could interfer with some of the internal handling
> (enabling/disabling "Defaults", "Apply", "Restore"...) but on the other hand
> this was possible before too (using KDialog members), and it gives most
> flexibility to the apps (e.g. adding another button, even).

Yep, was my thought as well in the imaginary email I sent. :-)

The more secure alternative would be hideButton() and addButton() which would 
take respectively a button code and a pointer to a button. That'd avoid 
breaking the encapsulation. 

I don't think I have a preference between the two. One breaks encapsulation 
badly, the other one carries the risk of API explosion later on (if we want to 
provide more control than just hiding).

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140223/1fb30011/attachment.sig>


More information about the Kde-frameworks-devel mailing list