[kate/frameworks] part: port from KDialog to QDialog (KateGlobal::configDialog)

Michal Humpula michal.humpula at seznam.cz
Sun Dec 29 15:12:53 UTC 2013


On Sunday 29 of December 2013 14:44:59 David Faure wrote:
> On Thursday 19 December 2013 15:28:27 Dominik Haumann wrote:
> > On Thursday, December 19, 2013 15:12:01 Michal Humpula wrote:
> > > On Thursday 19 of December 2013 14:57:33 Dominik Haumann wrote:
> > > > On Wednesday, December 18, 2013 19:42:43 Michal Humpula wrote:
> > > > > Git commit 4e6c1c3d8cd6dbe4d826ce6720169fd94d8848f6 by Michal
> > > > > Humpula.
> > > > > Committed on 18/12/2013 at 19:42.
> > > > > Pushed by michalhumpula into branch 'frameworks'.
> > > > > 
> > > > > port from KDialog to QDialog (KateGlobal::configDialog)
> > > > > 
> > > > > M  +1    -4    part/utils/kateglobal.cpp
> > > > > M  +2    -1    part/view/kateview.cpp
> > > > > 
> > > > > http://commits.kde.org/kate/4e6c1c3d8cd6dbe4d826ce6720169fd94d8848f6
> > > > > 
> > > > > diff --git a/part/utils/kateglobal.cpp b/part/utils/kateglobal.cpp
> > > > > index e576f12..94de177 100644
> > > > > --- a/part/utils/kateglobal.cpp
> > > > > +++ b/part/utils/kateglobal.cpp
> > > > > @@ -310,10 +310,7 @@ void KateGlobal::configDialog(QWidget *parent)
> > > > > -#if 0 //FIXME KF5
> > > > > -  kd->setButtons( KDialog::Ok | KDialog::Cancel | KDialog::Apply |
> > > > > KDialog::Help ); -  kd->setHelp( QString(),
> > > > > KGlobal::mainComponent().componentName() ); -#endif
> > > > > +  kd->setStandardButtons(QDialogButtonBox::Ok |
> > > > > QDialogButtonBox::Cancel | QDialogButtonBox::Apply |
> > > > > QDialogButtonBox::Help );> >
> > > > 
> > > > If I'm not mistaken, we can use setStandardButtons() in a lot of other
> > > > places as well instead of adding the respective buttons manually.
> > > > 
> > > > Is that correct?
> > > > 
> > > > If so, we really should do that, to always keep the correct button
> > > > order
> > > > (e.g. Cancel on the very right or similar).
> > > > 
> > > > Greetings,
> > > > Dominik
> > > 
> > > The drawback is that currently the buttons are not styled the KDE way:(
> > > I'm guessing this will be fixed in the future in frameworks QPA?
> > 
> > Hm, no idea. CCing frameworks-devel.
> 
> [did you forget to CC Michal too?]
> 
> What does "styled" mean here exactly?
> The icons on the buttons are missing?

Yes, icons and tooltips. I'm guessing whatever the KStandardGuiItem setups 
too. So should the buttons created by setStandardButtons be restyled manually 
or should the platform take care of it?

Attaching screenshot, how it looks for me. Buttons with icons are manually 
constructed.

> > > Sometimes the buttons have different text or icon then standard, so the
> > > need for creating buttons manually is still there, imho.
> > 
> > That's fine: You can still get the respective button with:
> >   QPushButton * QDialogButtonBox::button(StandardButton which);
> > 
> > And then change the icon or text.
> 
> Yes.
> 
> > But this way, the order at least is
> > kind of automatically set. I'm not sure though, whether this is of
> > importance in all cases.
> 
> Yes, that's the whole point of QDialogButtonBox.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buttons.png
Type: image/png
Size: 3567 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131229/896b6dac/attachment-0001.png>


More information about the Kde-frameworks-devel mailing list