KDED
kbuildservicefactory.cpp
Go to the documentation of this file.
85 KSycocaEntry* KBuildServiceFactory::createEntry( const QString& file, const char *resource ) const
159 // TODO do the same for all/all and all/allfiles, if (!KServiceTypeProfile::configurationMode())
162 void KBuildServiceFactory::collectInheritedServices(const QString& mimeTypeName, QSet<QString>& visitedMimes)
185 //kDebug(7021) << "INHERITANCE: Adding service" << (*itserv).service()->entryPath() << "to" << mimeTypeName << "mimeTypeInheritanceLevel=" << mimeTypeInheritanceLevel;
216 //kDebug(7021) << "adding service" << service.data() << service->type() << "menuId=" << service->menuId() << "name=" << name << "relName=" << relName;
242 for (int i = 0; i < serviceTypeList.count() /*don't cache it, it can change during iteration!*/; ++i) {
252 //kDebug(7021) << "Adding service" << service->entryPath() << "to" << serviceType->name() << "pref=" << preference;
253 m_offerHash.addServiceOffer(stName, KServiceOffer(service, preference, 0, service->allowAsDefault()) );
274 // But don't skip aliases (they got resolved into mime->name() already, but don't let two aliases cancel out)
276 //kDebug() << "Skipping" << mime->name() << "because of" << otherType << "(canonical" << KMimeTypeRepository::self()->canonicalName(otherType) << ") while parsing" << service->entryPath();
290 // Read user preferences (added/removed associations) and add/remove serviceoffers to m_offerHash
319 KMimeTypeFactory::MimeTypeEntry::Ptr entry = KMimeTypeFactory::MimeTypeEntry::Ptr::staticCast( *itmtf );
346 //kDebug(7021) << "servicetype offers list:" << entry->name() << "->" << (*it2).service()->entryPath();
361 const KMimeTypeFactory::MimeTypeEntry::Ptr entry = KMimeTypeFactory::MimeTypeEntry::Ptr::staticCast( *itmtf );
368 //kDebug(7021) << "mimetype offers list:" << entry->name() << "->" << (*it2).service()->entryPath() << "pref" << (*it2).preference();
QList< KServiceOffer > offersFor(const QString &serviceType) const
Definition: kmimeassociations.h:41
QStringList allMimeTypes()
int m_nameDictOffset
virtual KService::Ptr findServiceByMenuId(const QString &menuId)
Reimplemented from KServiceFactory.
Definition: kbuildservicefactory.cpp:80
void add(const QString &key, const KSycocaEntry::Ptr &payload)
KSycocaDict * m_nameDict
virtual ~KBuildServiceFactory()
Definition: kbuildservicefactory.cpp:65
void addServiceOffer(const QString &serviceType, const KServiceOffer &offer)
Definition: kmimeassociations.cpp:118
const char * name(StandardAction id)
void addNewChild(const QString &parent, const KSycocaEntry::Ptr &newEntry)
Adds the entry newEntry to the "parent group" parent, creating the group if necassery.
Definition: kbuildservicegroupfactory.cpp:125
int m_menuIdDictOffset
Definition: ksycocaresourcelist.h:32
virtual KSycocaEntry * createEntry(const QString &file, const char *resource) const
Construct a KService from a config file.
Definition: kbuildservicefactory.cpp:85
static KMimeTypeRepository * self()
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static QStringList resourceTypes()
Returns all resource types for this service factory.
Definition: kbuildservicefactory.cpp:60
void save(QDataStream &str)
KSycocaDict * m_relNameDict
void createFakeMimeType(const QString &name)
Definition: kbuildmimetypefactory.cpp:121
QString menuId() const
KSycocaDict * m_menuIdDict
virtual void addEntry(const KSycocaEntry::Ptr &newEntry)
Add a new entry.
Definition: kbuildservicefactory.cpp:381
int m_offerListOffset
Service group factory for building ksycoca.
Definition: kbuildservicegroupfactory.h:30
virtual KService::Ptr findServiceByDesktopPath(const QString &name)
Reimplemented from KServiceFactory.
Definition: kbuildservicefactory.cpp:75
KSycocaEntryDict * entryDict()
KServiceOfferList offers(int serviceTypeOffset, int serviceOffersOffset)
virtual KService::Ptr findServiceByDesktopName(const QString &name)
Reimplemented from KServiceFactory.
Definition: kbuildservicefactory.cpp:70
QString desktopEntryName() const
void postProcessServices()
Definition: kbuildservicefactory.cpp:192
int m_relNameDictOffset
virtual void save(QDataStream &str)
Write out service specific index files.
Definition: kbuildservicefactory.cpp:124
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
bool hasRemovedOffer(const QString &serviceType, KService::Ptr service) const
Definition: kmimeassociations.cpp:152
virtual void saveHeader(QDataStream &str)
Write out header information.
Definition: kbuildservicefactory.cpp:114
KBuildServiceFactory(KSycocaFactory *serviceTypeFactory, KBuildMimeTypeFactory *mimeTypeFactory, KBuildServiceGroupFactory *serviceGroupFactory)
Create factory.
Definition: kbuildservicefactory.cpp:36
QString canonicalName(const QString &mime)
QString parentApp() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:13 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:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.