[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Hidden KDED desktop file crashing systemsettings - where to fix?
From:       David Faure <faure () kde ! org>
Date:       2010-11-02 21:38:21
Message-ID: 201011022238.22068.faure () kde ! org
[Download RAW message or body]

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.

kdelibs/kded/kded.cpp:
     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@kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic