Hidden KDED desktop file crashing systemsettings - where to fix?
faure at kde.org
Tue Nov 2 21:38:21 GMT 2010
On Tuesday 02 November 2010, Jonathan Marten wrote:
> c) use a KServiceTypeTrader query (which hopefully ignores hidden
> desktop files) instead of listing them.
Yes, this is the right way, since it matches what kded itself does.
const KService::List kdedModules = KServiceTypeTrader::self()->query("KDEDModule");
for(KService::List::ConstIterator it = kdedModules.begin(); it != kdedModules.end(); ++it)
KService::Ptr service = *it;
and yes, it skips Hidden=true files, since they are not in ksycoca at all.
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
More information about the kde-core-devel