Akonadi
specialcollectionsrequestjob.cpp
26 SpecialCollectionsRequestJobPrivate(SpecialCollections *collections, SpecialCollectionsRequestJob *qq);
58 SpecialCollectionsRequestJobPrivate::SpecialCollectionsRequestJobPrivate(SpecialCollections *collections, SpecialCollectionsRequestJob *qq)
75 for (auto resourceIt = mFoldersForResource.cbegin(), end = mFoldersForResource.cend(); resourceIt != end; ++resourceIt) {
78 if (it.value() && !mSpecialCollections->hasCollection(it.key(), AgentManager::self()->instance(resourceIt.key()))) {
154 qCDebug(AKONADICORE_LOG) << "A resource is done," << mFoldersForResource.count() << "more to do. Now doing resource" << resourceId;
171 qCWarning(AKONADICORE_LOG) << "Failed to request resource" << resourceId << ":" << job->errorString();
178 qCWarning(AKONADICORE_LOG) << "Resource id's don't match: " << resourceId << mSpecialCollections->d->defaultResourceId();
191 void SpecialCollectionsRequestJobPrivate::createRequestedFolders(ResourceScanJob *scanJob, QHash<QByteArray, bool> &requestedFolders)
260 SpecialCollectionsRequestJob::SpecialCollectionsRequestJob(SpecialCollections *collections, QObject *parent)
276 void SpecialCollectionsRequestJob::requestCollection(const QByteArray &type, const AgentInstance &instance)
334 qCWarning(AKONADICORE_LOG) << "Failed SpecialCollectionsRequestJob::slotResult" << job->errorString();
SpecialCollectionsRequestJob(SpecialCollections *collections, QObject *parent=nullptr)
Creates a new special collections request job.
Definition: specialcollectionsrequestjob.cpp:260
QString identifier() const
Returns the unique identifier of the agent instance.
Definition: core/agentinstance.cpp:42
void setTypes(const QList< QByteArray > &types)
Sets the list of well known special collection types.
Definition: specialcollectionsrequestjob.cpp:302
const T value(const Key &key) const const
void result(KJob *job)
void setDefaultResourceOptions(const QVariantMap &options)
Sets the configuration options that shall be applied to the new resource that is created if the reque...
Definition: specialcollectionsrequestjob.cpp:297
void doStart() override
This method must be reimplemented in the concrete jobs.
Definition: specialcollectionsrequestjob.cpp:317
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QHash::const_iterator cend() const const
QHash::iterator insert(const Key &key, const T &value)
AgentInstance instance(const QString &identifier) const
Returns the agent instance with the given identifier or an invalid agent instance if the identifier d...
Definition: core/agentmanager.cpp:385
~SpecialCollectionsRequestJob() override
Destroys the special collections request job.
void requestDefaultCollection(const QByteArray &type)
Requests a special collection of the given type in the default resource.
Definition: specialcollectionsrequestjob.cpp:269
void setIconForTypeMap(const QMap< QByteArray, QString > &map)
Sets the map of special collection types to icon names.
Definition: specialcollectionsrequestjob.cpp:312
void setDefaultResourceType(const QString &type)
Sets the type of the resource that shall be created if the requested special collection does not exis...
Definition: specialcollectionsrequestjob.cpp:292
An Attribute that stores the special collection type of a collection.
Definition: specialcollectionattribute.h:28
Base class for jobs that need to run a sequence of sub-jobs in a transaction.
Definition: transactionsequence.h:54
bool setProperty(const char *name, const QVariant &value)
void setNameForTypeMap(const QMap< QByteArray, QString > &map)
Sets the map of special collection types to display names.
Definition: specialcollectionsrequestjob.cpp:307
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
int remove(const Key &key)
QString::const_iterator cbegin() const const
static AgentManager * self()
Returns the global instance of the agent manager.
Definition: core/agentmanager.cpp:355
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition: collection.cpp:204
QHash::const_iterator cbegin() const const
Job that creates a new collection in the Akonadi storage.
Definition: collectioncreatejob.h:39
KGuiItem ok()
void emitResult()
virtual QString errorString() const
int error() const
void setName(const QString &name)
Sets the i18n'ed name of the collection.
Definition: collection.cpp:221
A job to request SpecialCollections.
Definition: specialcollectionsrequestjob.h:41
Helper integration between Akonadi and Qt.
Collection collection() const
Returns the requested collection.
Definition: specialcollectionsrequestjob.cpp:283
void requestCollection(const QByteArray &type, const AgentInstance &instance)
Requests a special collection of the given type in the given resource instance.
Definition: specialcollectionsrequestjob.cpp:276
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:52:45 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:52:45 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.