Is it able to make kservice's weightedOffers public access?
David Faure
faure at kde.org
Fri Jul 8 11:14:52 UTC 2016
On vendredi 8 juillet 2016 09:04:54 CEST zhaixiang wrote:
> KService::List services;
> const KServiceOfferList offers =
> KServiceTypeTrader::weightedOffers("Application");
>
> KServiceOfferList::const_iterator itOff = offers.begin();
> for (; itOff != offers.end(); ++itOff) {
> services.append((*itOff).service());
> }
You would get the same result by doing
const KServiceList::List services = KServiceTypeTrader::self()->query("Applications");
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
More information about the Kde-frameworks-devel
mailing list