Akonadi
typepluginloader.cpp
38Q_GLOBAL_STATIC(DefaultItemSerializerPlugin, s_defaultItemSerializerPlugin) // NOLINT(readability-redundant-member-init)
144 for (QMap<int, QHash<QByteArray, PluginEntry>::const_iterator>::const_iterator it = m_pluginsByMetaTypeId.constBegin(),
156 for (QHash<QByteArray, PluginEntry>::const_iterator it = m_plugins.constBegin(), end = m_plugins.constEnd(); it != end; ++it) {
173 const QMap<int, QHash<QByteArray, PluginEntry>::const_iterator> &c_pluginsByMetaTypeId = m_pluginsByMetaTypeId;
174 QMap<int, QHash<QByteArray, PluginEntry>::const_iterator>::const_iterator it = c_pluginsByMetaTypeId.find(metaTypeId);
177 m_pluginsByMetaTypeId.insert(metaTypeId, m_plugins.find(metaTypeId ? QMetaType(metaTypeId).name() : LEGACY_NAME)));
185 for (QList<int>::const_iterator it = metaTypeIds.begin(), end = metaTypeIds.end(); it != end; ++it) {
210 : mDefaultPlugin(PluginEntry(QStringLiteral("application/octet-stream@QByteArray"), s_defaultItemSerializerPlugin))
254 QObject *findBestMatch(const QString &type, const QList<int> &metaTypeId, TypePluginLoader::Options opt)
296 void findSuitablePlugins(QMimeType mimeType, QSet<QMimeType> &checkedMimeTypes, QList<int> &matchingIndexes, const QMimeDatabase &mimeDb) const
307 const QMimeType pluginMimeType = mimeDb.mimeTypeForName(allMimeTypes[i].type()); // Convert from Akonadi::MimeTypeEntry
312 matchingIndexes.append(i); // We found a match! This mimetype is supported by one of our plugins
324 QObject *findBestMatchImpl(const QString &type, const QList<int> &metaTypeIds, int &chosen) const
340 for (QList<int>::const_iterator it = matchingIndexes.constBegin(), end = matchingIndexes.constEnd(); it != end; ++it) {
341 // qCDebug(AKONADICORE_LOG) << " Considering serializer plugin for type" << allMimeTypes[matchingIndexes[*it]].type()
346 // qCDebug(AKONADICORE_LOG) << " -> got " << entry->pluginClassName() << " and am happy with it.";
347 // FIXME ? in qt5 we show "application/octet-stream" first so if will use default plugin. Exclude it until we look at all mimetype and use
356 // qCDebug(AKONADICORE_LOG) << " -> got " << entry->pluginClassName() << " and am happy with it.";
387 for (QList<int>::const_iterator it = metaTypeIds.begin(), end = metaTypeIds.end(); it != end; ++it) {
407QObject *TypePluginLoader::objectForMimeTypeAndClass(const QString &mimetype, const QList<int> &metaTypeIds, Options opt)
417ItemSerializerPlugin *TypePluginLoader::pluginForMimeTypeAndClass(const QString &mimetype, const QList<int> &metaTypeIds, Options opt)
419 return qobject_cast<ItemSerializerPlugin *>(objectForMimeTypeAndClass(mimetype, metaTypeIds, opt));
424 ItemSerializerPlugin *plugin = qobject_cast<ItemSerializerPlugin *>(defaultObjectForMimeType(mimetype));
Helper integration between Akonadi and Qt.
KCALUTILS_EXPORT QString mimeType()
KCOREADDONS_EXPORT Result match(QStringView pattern, QStringView str)
QString name(GameStandardAction id)
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
const_iterator constBegin() const const
const_iterator constEnd() const const
iterator end()
iterator find(const Key &key)
iterator insert(const Key &key, const T &value)
T value(const Key &key) const const
void append(QList< T > &&value)
iterator begin()
const_iterator constBegin() const const
const_iterator constEnd() const const
bool empty() const const
iterator end()
qsizetype size() const const
iterator end()
iterator find(const Key &key)
const char * className() const const
QMimeType mimeTypeForName(const QString &nameOrAlias) const const
name
bool isValid() const const
virtual const QMetaObject * metaObject() const const
QString anchoredPattern(QStringView expression)
bool contains(const QSet< T > &other) const const
iterator insert(const T &value)
QFuture< void > map(Iterator begin, Iterator end, MapFunctor &&function)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.