KService: support for storing Actions defined in .desktop files into ksycoca4

Laurent Montel laurent at kdab.net
Mon Oct 15 15:57:21 BST 2007


On Monday 15 October 2007 16:06:18 David Faure wrote:
> On Saturday 13 October 2007, David Faure wrote:
> > Desktop files can defined Actions (as per the desktop entry standard).
> > [...] This is simple to fix: letting KService save the information about
> > those actions into ksycoca. [...]
> >
> > Also ported KDesktopFileActions to that; changes the API slightly,
> > KDesktopFileActions::Service is to be ported to KServiceAction, which is
> > good since Service had ugly public members. This part will wait until
> > Monday obviously.
>
> Here's the patch that ports kdebase to this API change.
> Kevin used KDesktopFileActions::Service more than I expected :)
>
> In the diff:
> Index: runtime/kioslave/media/*
> Index: runtime/soliduiserver/*
> Index: apps/lib/konq/konq_menuactions_p.h
> Index: apps/lib/konq/konq_menuactions.cpp
> Index: workspace/kscreensaver/krandom_screensaver/random.cpp (Laurent, can
> you double-check this one?)

For me sound good.

> OK for committing this today?

I am ok for this patch.

> > While writing the unit test for this, I noticed that the binary
> > representation (like, in ksycoca) of a single KService was 3700 bytes.
> > This is because KConfigGroup::entryMap returns all translated entries.
> > After filtering those out, the KService is down to 755 bytes; and the
> > whole ksycoca4 went from 9.0M to 1.5M!
> > I still have to figure out how this worked in KDE3. From my tests,
> > KConfig::entryMap(group) returned translated entries as well, and yet
> > they are not seen by kservice nor end up in ksycoca3; confusing. Seems
> > like KDesktopFile and KConfig behaved a bit differently on this; with
> > KDesktopFile the entryMap doesn't have the translations... Anyone knows
> > about this? (cf kconfigtest.cpp.kde3.diff)
>
> Any input from KConfig people?






More information about the kde-core-devel mailing list