Use of const arg in KConfigGroup constructors doesn't work with language bindings
Richard Dale
rdale at foton.es
Thu Mar 6 16:19:17 GMT 2008
On Thursday 06 March 2008 10:49:02 Alex Merry wrote:
> On Wednesday 05 March 2008 21:56:54 Richard Dale wrote:
> > The attached patch add two extra constructors with a bool 'isConst'
> > argument:
> >
> > /**
> > * This variant of the constructor is useful for non-c++ languages
> > * without const argument overloading.
> > *
> > * ### KDE 5 make isConst default to true
> > */
> > KConfigGroup(KConfigBase *master, const QString &group, bool
> > isConst); KConfigGroup(KConfigBase *master, const char *group, bool
> > isConst);
>
> Surely we want isConst to default to false (or the equivalent with an
> enum), s o that c++ retains its const/non-const selection if the default
> argument is us ed (ie: behaviour identical to the existing constructors)?
Yes, you're right it should be - I noticed that after I sent off the mail with
the patch. But I think my change is seen as uglier than the original problem,
and so it needs something better, or just leaving the api as it is. I don't
think that it is a major problem that scripting languages can't instantiate
read-only/const versions of KConfigGroup in the end.
-- Richard
More information about the kde-core-devel
mailing list