Plasma::Service API review
Kevin Ottens
ervin at kde.org
Sun May 18 20:03:44 CEST 2008
Le Saturday 17 May 2008, Aaron J. Seigo a écrit :
> On Friday 16 May 2008, Kevin Ottens wrote:
> > Well, apart from the defaults (and well, using a QMap instead of a
> > KConfigGroup is exactly the same if you already fill the map) what does
> > it provides? I really don't get why KConfigGroup is so special in this
> > context.
>
> we already have code from ConfigXML to allow a very nice non-code way of
> describing these things that also happens to magically work with our
> configuration system.
>
> i think you're sort of looking at it the wrong way around here: what is so
> great about QMap that is makes up for all the additional API it would
> require to support it properly?
Well, I don't think QMap is "great" or something like that. I just don't
understand what additional API would be require to "support it properly". My
point is that if we ignore runtime documentation for a minute I really don't
see what KConfigGroup would provide which would be useful in this context.
I really have this feeling I just didn't find the right API from KConfigGroup
somehow to understand why it's so special in this context... somehow that
pisses me off. :-)
> > Make that a:
> > QMap<QString, QVariant> args = service.defaultsForOperation("update");
> > Assuming it's prefilled you get the parameters, their defaults and their
> > types.
>
> and where do we get runtime documentation?
Ignoring this one for a minute still.
> and where can we store these in an offline format?
IMO, it doesn't really make sense to expose KConfig in API because you
internally have a storage need.
> i'm actually hoping to use KConfigSkeleton a little more
> agressively here than i currently am.
>
> > > and runtime documentation for them and
> > > ... you end up with KConfigSkeleton.
> >
> > KConfigGroup actually provides runtime documentation?
>
> KConfigSkeleton does.
OK, then it makes sense to have KConfigSkeleton. Runtime documentation in
itself is probably enough to justify its use.
Regards.
--
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080518/055e3560/attachment.pgp
More information about the Panel-devel
mailing list