KDECore
kservicetypeprofile.cpp
Go to the documentation of this file.
95 //kDebug(7014) << "adding service " << serviceId << " to profile for " << type << " with preference " << pref;
117 KServiceOfferList sortServiceTypeOffers( const KServiceOfferList& list, const QString& servicetype );
120 KServiceOfferList KServiceTypeProfile::sortServiceTypeOffers( const KServiceOfferList& list, const QString& serviceType )
138 QMap<QString,int>::ConstIterator it2 = profile->m_mapServices.constFind( servPtr->storageId() );
154 // but it's also the case for any service that's neither App nor ReadOnlyPart, e.g. RenameDlg/Plugin
157 // If there's a profile, we use 0 as the preference to ensure new apps don't take over existing apps (which default to 1)
#define K_GLOBAL_STATIC(TYPE, NAME)
This macro makes it easy to use non-POD types as global statics.
Definition: kglobal.h:221
void deleteGroup(const QByteArray &group, WriteConfigFlags flags=Normal)
Delete aGroup.
Definition: kconfigbase.cpp:74
void deleteServiceTypeProfile(const QString &serviceType)
Delete the complete profile for a given servicetype, reverting to the default preference order (the o...
Definition: kservicetypeprofile.cpp:220
bool hasProfile(const QString &serviceType)
Definition: kservicetypeprofile.cpp:171
QMap< QString, int > m_mapServices
Map of all services for which we have assessments.
Definition: kservicetypeprofile_p.h:50
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
Writes a value to the configuration object.
Definition: kconfiggroup.cpp:1037
const_iterator constFind(const Key &key) const
bool allowAsDefault() const
Set to true if it is allowed to use this service as the default (main) action for the files it suppor...
Definition: kservice.cpp:955
QString number(int n, int base)
int count(const T &value) const
void append(const T &value)
bool configurationMode()
Definition: kservicetypeprofile.cpp:238
void writeServiceTypeProfile(const QString &serviceType, const KService::List &services, const KService::List &disabledServices=KService::List())
Write the complete profile for a given servicetype.
Definition: kservicetypeprofile.cpp:176
Definition: ksycocafactory.h:28
void setConfigurationMode()
This method activates a special mode of KServiceTypeProfile, in which all/all and all/allfiles are ex...
Definition: kservicetypeprofile.cpp:233
bool isEmpty() const
const_iterator constEnd() const
Definition: kaboutdata.h:33
void clear()
iterator end()
QString storageId() const
Returns a normalized ID suitable for storing in configuration files.
Definition: kservice.cpp:783
typedef ConstIterator
KServiceOfferList sortServiceTypeOffers(const KServiceOfferList &list, const QString &servicetype)
Definition: kservicetypeprofile.cpp:120
QString fromLatin1(const char *str, int size)
bool contains(const Key &key) const
void addService(const QString &service, int preference=1)
Add a service to this profile.
Definition: kservicetypeprofile_p.h:41
T readEntry(const QString &key, const T &aDefault) const
Reads the value of an entry specified by pKey in the current group.
Definition: kconfiggroup.h:248
iterator begin()
const T value(const Key &key) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.