KColorDialog slot naming
Olivier Goffart
ogoffart at kde.org
Tue Jul 7 12:44:46 BST 2009
Le Tuesday 07 July 2009, Parker Coates a écrit :
> On Thu, Jul 2, 2009 at 10:59 PM, John Tapsell wrote:
> > Hi all,
> >
> > The API for KColorDialog is somewhat unfortunate. Currently we have a
> > signal:
> >
> > void colorSelected( const QColor &col );
> >
> > Which is emitted immediately when a color is selected.
> > Qt instead has:
> >
> > void colorSelected( const QColor &col );
> > void currentColorSelected( const QColor &col );
> >
> > Where "currentColorSelected" behaves like our "colorSelected" and
> > "colorSelected" is emitted only once - when the user presses Ok.
> >
> > I would like to have a signal like Qt's "colorSelected", but any
> > idea how we can solve this tangle?
>
> Call it "finalColorSelected", maybe?
>
> Whatever you do, add big warnings to the API documentation of both
> signals to explain the discrepancy with the Qt versions and a add
> comment in the code to straighten this out for KDE5.
Yes, also you can deprecate colorSelected and replace it by a new
currentColorSelected signal.
More information about the kde-core-devel
mailing list