Add step parameter to DoubleInput QInputDialog
David Faure
faure+bluesystems at kde.org
Thu May 2 11:07:34 UTC 2013
On Wednesday 24 April 2013 23:00:26 David Gil Oliva wrote:
> Hi!
>
> El 24/04/2013 22:38, "David Faure" <faure+bluesystems at kde.org> va escriure:
> > On Tuesday 23 April 2013 13:30:41 David Gil Oliva wrote:
> > > Hi!
> > >
> > > I've got a problem with the task of adding a step parameter to
> > > QInputDialog::getDouble. I already knew that directly adding the
>
> parameter
>
> > > wasn't right, but since I didn't know the right way, I did it. Now
>
> Giuseppe
>
> > > answered and he doesn't like any one of the alternatives (me neither,
>
> btw).
>
> > > What should I do with this task?
> >
> > We should find out if this is really used across the KDE source code.
> >
> > Easiest way would be to remove the arguments from KInputDialog and see
>
> where
>
> > compilation breaks.
> > This is a case where lxr.kde.org probably doesn't help (one would have to
>
> look
>
> > at all uses of the method, by going through the search results).
> >
> > If you don't have a full compilation of KDE SC, I can try this when I'm
>
> back
>
> > at the office, on May 2nd.
>
> I don't have a full compilation of KDE SC. Please try it for me and tell me
> something when you can.
OK I just did a full KDE SC compilation with the step and base parameters
removed from KInputDialog, and I couldn't find any call that used a step other
than 1 for ints and 0.1 for doubles, nor any call that used a base other than
10.
I think we can forget about adding step and base parameters to Qt, the current
code can already be ported to QInputDialog.
> > Thanks a lot for your help, this is exactly what we need right now: more
> > contributions to Qt to get rid of unnecessarily-kdelibs-specific stuff.
>
> It's a pleasure, really! I'm learning lots of new things. Sometimes it's a
> little hard to read the things I do wrong in the reviews (I'm still a
> newbie) but I'm also pretty stubborn :-)
Very good - one has to be stubborn, to get stuff into Qt :-)
> BTW, the definition of QInputDialog says that it "provides a simple
> convenience dialog to get a single value from the user." The future new
> method getItemList will be able to return more than one value (in a
> QStringList, for example). It will force me to change the documentation and
> the definition. We will see, what the reviews say.
Yep. We'll see :)
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by BlueSystems and KDAB to work on KDE Frameworks
More information about the Kde-frameworks-devel
mailing list