Hidden KDED desktop file crashing systemsettings - where to fix?

Jonathan Marten jjm2 at keelhaul.demon.co.uk
Tue Nov 2 08:26:04 GMT 2010

Dear all,

Since it got committed to trunk a few days ago, the new activity
manager (kdebase/runtime/activitymanager) crashes the "kcmkded"
systemsettings module:

ASSERT: "file.desktopGroup().readEntry("X-KDE-ServiceTypes") == "KDEDModule""
in file /ws/trunk/kdebase/runtime/kcontrol/kded/kcmkded.cpp, line 190

This seems to be because it installs a desktop file
(share/kde4/services/kded/activitymanager.desktop) which contains

[Desktop Entry]

KDEDConfig::load() simply lists all the desktop files in the "kded"
subdirectory - it does not check whether the desktop file is hidden,
therefore hitting the assert later.

So my question: where is the best place to fix this?  Should it be:

a) add the required (plus some dummy) entries to
activitymanager.desktop, until its final version is in place.  Just
adding X-KDE-ServiceTypes=KDEDModule, though, fixes the assert but
shows a blank service entry in the list.

b) check for file.desktopGroup().readEntry("Hidden", false) just
before the assert, and continue the loop if so.

c) use a KServiceTypeTrader query (which hopefully ignores hidden
desktop files) instead of listing them.

Even if we say that (a) is the solution for this particular instance,
it still leaves an unexpected catch in this systemsettings module
(desktop files here cannot be hidden in the same way as others).  So
should one of (b) or (c) be implemented also?


Jonathan Marten                         http://www.keelhaul.demon.co.uk
Twickenham, UK                          jjm2 at keelhaul.demon.co.uk

More information about the kde-core-devel mailing list