[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Use of const arg in KConfigGroup constructors doesn't work with
From: Richard Dale <rdale () foton ! es>
Date: 2008-03-06 16:19:17
Message-ID: 200803061619.17662.rdale () foton ! es
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic