KDED
kmimeassociations.cpp
Go to the documentation of this file.
55 // Using the "merged view" from KConfig is not enough since we -add- at every level, we don't replace.
56 const QStringList mimeappsFiles = KGlobal::dirs()->findAllResources("xdgdata-apps", "mimeapps.list");
79 parseAddedAssociations(KConfigGroup(&profile, "Added KDE Service Associations"), file, basePreference);
83 void KMimeAssociations::parseAddedAssociations(const KConfigGroup& group, const QString& file, int basePreference)
94 //kDebug(7021) << "adding mime" << resolvedMimeName << "to service" << pService->entryPath() << "pref=" << pref;
95 m_offerHash.addServiceOffer(resolvedMimeName, KServiceOffer(pService, pref, 0, pService->allowAsDefault()));
102 void KMimeAssociations::parseRemovedAssociations(const KConfigGroup& group, const QString& file)
111 //kDebug(7021) << "removing mime" << mime << "from service" << pService.data() << pService->entryPath();
121 //kDebug(7021) << "Adding" << service->entryPath() << "to" << serviceType << offer.preference();
134 if (sfit.next().service() == service) // we can compare KService::Ptrs because they are from the memory hash
bool parseAllMimeAppsList()
Definition: kmimeassociations.cpp:53
void addServiceOffer(const QString &serviceType, const KServiceOffer &offer)
Definition: kmimeassociations.cpp:118
KStandardDirs * dirs()
static KMimeTypeRepository * self()
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KService::Ptr service() const
KMimeAssociations(KOfferHash &offerHash)
Definition: kmimeassociations.cpp:31
Definition: kmimeassociations.h:37
void removeServiceOffer(const QString &serviceType, KService::Ptr service)
Definition: kmimeassociations.cpp:140
QStringList readXdgListEntry(const QString &pKey, const QStringList &aDefault=QStringList()) const
QStringList keyList() const
void parseMimeAppsList(const QString &file, int basePreference)
Definition: kmimeassociations.cpp:72
QString name() const
int preference() const
QString storageId() const
bool hasRemovedOffer(const QString &serviceType, KService::Ptr service) const
Definition: kmimeassociations.cpp:152
QStringList findAllResources(const char *type, const QString &filter=QString(), SearchOptions options=NoSearchOptions) const
QSet< KService::Ptr > removedOffers
Definition: kmimeassociations.h:34
QString canonicalName(const QString &mime)
Definition: kmimeassociations.h:31
static Ptr serviceByStorageId(const QString &_storageId)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.