Ambiguous KLed constructors
porten at froglogic.com
porten at froglogic.com
Wed Nov 5 13:27:40 GMT 2003
On Wed, 5 Nov 2003, Richard Dale wrote:
> The KLed class has two constructors with all optional arguments:
>
> KLed(QWidget *parent=0, const char *name=0);
>
> KLed(const QColor &col=Qt::green, QWidget *parent=0, const char *name=0);
>
> This is a problem for language bindings code generation because a call to
> KLed::KLed() with no args gives a compiler error as it's ambiguous.
I think it's a bad thing for every language.
> What is the correct C++ behaviour - take the first one - or should this
> really be a compilation error which is being missed by gcc?
There's probably no code instantiating KLed without any args.
Without knowing the class too well I'd suggest to remove the Qt::green
default assuming that the other does use this default, too.
Harri.
More information about the kde-core-devel
mailing list