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)
iterator insert(const Key &key, const T &value)
KSycocaDict * m_nameDict
QVector< ServiceTypeAndPreference > & _k_accessServiceTypes()
void append(const T &value)
virtual bool seek(qint64 pos)
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()
const_iterator insert(const T &value)
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
virtual qint64 pos() const
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
bool allowAsDefault() const
void save(QDataStream &str)
const_iterator constEnd() const
KSycocaDict * m_relNameDict
void createFakeMimeType(const QString &name)
Definition: kbuildmimetypefactory.cpp:121
bool isEmpty() const
QString menuId() const
KSycocaDict * m_menuIdDict
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
virtual void addEntry(const KSycocaEntry::Ptr &newEntry)
Add a new entry.
Definition: kbuildservicefactory.cpp:381
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
int m_offerListOffset
Service group factory for building ksycoca.
Definition: kbuildservicegroupfactory.h:30
iterator end()
const T value(const Key &key) const
virtual KService::Ptr findServiceByDesktopPath(const QString &name)
Reimplemented from KServiceFactory.
Definition: kbuildservicefactory.cpp:75
KSycocaEntryDict * entryDict()
bool contains(const T &value) const
const_iterator constBegin() const
QStringList serviceTypes() const
QString mid(int position, int n) const
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 count(const T &value) const
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
QIODevice * device() const
const_iterator constEnd() const
const_iterator constBegin() const
KBuildServiceFactory(KSycocaFactory *serviceTypeFactory, KBuildMimeTypeFactory *mimeTypeFactory, KBuildServiceGroupFactory *serviceGroupFactory)
Create factory.
Definition: kbuildservicefactory.cpp:36
typedef Iterator
QString canonicalName(const QString &mime)
iterator begin()
QString parentApp() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26: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:26:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.