KService
kservicetypetrader.cpp
29 KServiceOfferList sortServiceTypeOffers(const KServiceOfferList &list, const QString &servicetype);
77 KServiceOfferList KServiceTypeTrader::weightedOffers(const QString &serviceType) // static, internal
82 KServiceType::Ptr servTypePtr = KSycocaPrivate::self()->serviceTypeFactory()->findServiceTypeByName(serviceType);
92 const KServiceOfferList services = KSycocaPrivate::self()->serviceFactory()->offers(servTypePtr->offset(), servTypePtr->serviceOffersOffset());
94 const KServiceOfferList offers = KServiceTypeProfile::sortServiceTypeOffers(services, serviceType);
99 KService::List KServiceTypeTrader::defaultOffers(const QString &serviceType, const QString &constraint) const
102 KServiceType::Ptr servTypePtr = KSycocaPrivate::self()->serviceTypeFactory()->findServiceTypeByName(serviceType);
111 KService::List lst = KSycocaPrivate::self()->serviceFactory()->serviceOffers(servTypePtr->offset(), servTypePtr->serviceOffersOffset());
120 KService::List KServiceTypeTrader::query(const QString &serviceType, const QString &constraint) const
123 // Fast path: skip the profile stuff if there's none (to avoid kservice->serviceoffer->kservice)
134 std::transform(offers.cbegin(), offers.cend(), std::back_inserter(lst), [](const KServiceOffer &offer) {
static KSycoca * self()
Get or create the only instance of KSycoca (read-only)
Definition: ksycoca.cpp:379
KSERVICE_EXPORT bool hasProfile(const QString &serviceType)
Definition: kservicetypeprofile.cpp:166
KService::Ptr preferredService(const QString &serviceType) const
Returns the preferred service for serviceType.
Definition: kservicetypetrader.cpp:145
Returns the offers in the profile for the requested service type.
Definition: kservicetypeprofile.cpp:108
Q_GLOBAL_STATIC(Internal::StaticControl, s_instance) class ControlPrivate
void reserve(int alloc)
int size() const const
Definition: kservicetypetrader.h:72
bool isEmpty() const const
bool isEmpty() const const
QList::const_iterator cend() const const
QExplicitlySharedDataPointer< KService > Ptr
A shared data pointer for KService.
Definition: kservice.h:56
QList::iterator erase(QList::iterator pos)
static void applyConstraints(KService::List &lst, const QString &constraint)
Definition: kservicetypetrader.cpp:55
KService::List defaultOffers(const QString &serviceType, const QString &constraint=QString()) const
Returns all offers associated with a given servicetype, IGNORING the user preference.
Definition: kservicetypetrader.cpp:99
QList::const_iterator cbegin() const const
void clear()
QList::iterator begin()
KService::List query(const QString &servicetype, const QString &constraint=QString()) const
The main function in the KServiceTypeTrader class.
Definition: kservicetypetrader.cpp:120
QList::iterator end()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Mar 20 2023 03:56:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Mar 20 2023 03:56:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.