Configuration stuff in KDev4
Andreas Pakulat
apaku at gmx.de
Fri Mar 9 20:58:42 UTC 2007
On 09.03.07 13:41:51, Matt Rogers wrote:
> On Friday 09 March 2007 11:57, Andreas Pakulat wrote:
> > On 09.03.07 10:50:50, Matt Rogers wrote:
> > > On Mar 9, 2007, at 4:31 AM, Andreas Pakulat wrote:
> > > > Well, the thing is the current stuff is broken as it is, because of
> > > > all
> > > > the changes in KConfig. And back when I started to work on the project
> > > > stuff in lib/ you said I shouldn't touch the config stuff as you
> > > > want to
> > > > change it... Thats why its still completely broken...
> > > >
> > > > Anyway, I'll see if I have enough KConfig power to re-surrect what we
> > > > have now today/weekend along with the makebuilder and then I think we
> > > > may be able to start eating our own dogfood.
> > >
> > > I wasn't aware that the changes in KConfig affected us in any way.
> > > That was supposed to be the whole point of using KConfigXT and
> > > friends: encapsulating us from the lower level KConfig stuff. *shrug*
> >
> > Well, KConfig::setGroup completely vanished and was replaced by
> > KConfigGroup. So its more internal to KDevelop::Config and eventually
> > KDevelop::ConfigSkeleton.
> >
> > However as it turns out, we have a more serious problem, because
> > kcfg-stuff doesn't seem to fit very well with our architecture :(
>
> And how does it not fit? C'mon, I need details. :)
Seeing that you don't have much time, I wanted to solve the issue and
just present the resolution ;)
> The only things having
> configuration should be plugins and the implementer of the shell.
Well, currently KDevelop::Config needs access to a project and that
means having access to the projectcontroller. This would mean it needs
access to Core. But access to Core is only given to plugins and stuff in
shell. So the straightforward idea would be to make KDevelop::Config a
part of the shell. However KDevelop::ConfigSkeleton depends on Config
but it can't be part of the shell because its used as the base class for
the kcfg-generated Settings classes and nothing shall link against
shell.
Making an interface for Config in interfaces/ doesn't work either
because we have (as far as I can see) no way to give the skeleton class
the real pointer when it is constructed. The reason is that the
generated settings class is used as singleton by the kcm-class. And that
one doesn't have access to shell either. And we don't control creation
of the kcm-widgets at all - unless I'm totally missing something.
So it really boils down to: There's a class (generated Settings class)
that needs access to projectcontroller, but cannot get at ICore.
Andreas
--
So this is it. We're going to die.
More information about the KDevelop-devel
mailing list