Missing KServiceType Info

David Faure faure at kde.org
Mon Feb 7 18:32:10 GMT 2005


On Monday 07 February 2005 14:21, ian geiser wrote:
> On Monday 07 February 2005 05:57 am, David Faure wrote:
> > On Sunday 06 February 2005 20:05, Ian Reinhart Geiser wrote:
> > > Greetings,
> > >  I am trying to get a list of propties for a given service type using the
> > > servicetype info from the KServiceType class.  But for the life of me I
> > > cannot figure out where stuff like X-KDE-Library is defined.
> >
> > As I found out myself the hard way, and documented in the KTrader online
> > doc, X-KDE-Library is a bit special because it is published as "Library" in
> > the service properties, and not "X-KDE-Library" like one would expect.
> >
> Okay, this is interesting, so why is it not found in the KServiceType 
> properties?

It's a standard KService property. I think you're confusing KService and KServiceType.
KServices (apps and modules) can have properties (Foo=Value). 
The KService class itself knows the builtin ones. Custom ones can be defined in 
custom service types (e.g. all koffice services have an X-KDE-NativeOasisMimeType
property, defined in kofficepart.desktop).

Service types themselves can have properties (like X-KDE-text in mimetype .desktop files),
but that's completely unrelated (the servicetype defines the type AND the value).

> So why are so many of them missing?
I see none missing. Can you be more specific?

> So what about Initial Preference, Keywords etc... ?  There are tons of 
> properties that are available in service desktop files that are defined 
> nowhere.
They are defined by the fact that they are returned by KService::propertyNames().
Or what do you mean? You mean in terms of documentation?

> > > Do we add these buggers automagicly somewhere?  Do we need to update our
> > > service type files?
> >
> > No and no :)
> Why, and why? ;)
Because they are simply all equal to the fields we read from any service - no matter
of which service types. Type, Name, Comment, GenericName, Icon, etc. etc.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list