Akonadi
specialcollectionsrequestjob.cpp
26 SpecialCollectionsRequestJobPrivate(SpecialCollections *collections, SpecialCollectionsRequestJob *qq);
58SpecialCollectionsRequestJobPrivate::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();
191void SpecialCollectionsRequestJobPrivate::createRequestedFolders(ResourceScanJob *scanJob, QHash<QByteArray, bool> &requestedFolders)
260SpecialCollectionsRequestJob::SpecialCollectionsRequestJob(SpecialCollections *collections, QObject *parent)
276void SpecialCollectionsRequestJob::requestCollection(const QByteArray &type, const AgentInstance &instance)
334 qCWarning(AKONADICORE_LOG) << "Failed SpecialCollectionsRequestJob::slotResult" << job->errorString();
Represents one agent instance and takes care of communication with it.
Definition akonadicontrol/agentinstance.h:35
QString identifier() const
Returns the unique identifier of the agent instance.
static AgentManager * self()
Returns the global instance of the agent manager.
Definition core/agentmanager.cpp:362
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:392
Job that creates a new collection in the Akonadi storage.
Definition collectioncreatejob.h:41
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition collection.cpp:204
void setName(const QString &name)
Sets the i18n'ed name of the collection.
Definition collection.cpp:221
An Attribute that stores the special collection type of a collection.
Definition specialcollectionattribute.h:29
A job to request SpecialCollections.
Definition specialcollectionsrequestjob.h:42
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
void setIconForTypeMap(const QMap< QByteArray, QString > &map)
Sets the map of special collection types to icon names.
Definition specialcollectionsrequestjob.cpp:312
void setTypes(const QList< QByteArray > &types)
Sets the list of well known special collection types.
Definition specialcollectionsrequestjob.cpp:302
SpecialCollectionsRequestJob(SpecialCollections *collections, QObject *parent=nullptr)
Creates a new special collections request job.
Definition specialcollectionsrequestjob.cpp:260
Collection collection() const
Returns the requested collection.
Definition specialcollectionsrequestjob.cpp:283
void setNameForTypeMap(const QMap< QByteArray, QString > &map)
Sets the map of special collection types to display names.
Definition specialcollectionsrequestjob.cpp:307
~SpecialCollectionsRequestJob() override
Destroys the special collections request 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
void requestDefaultCollection(const QByteArray &type)
Requests a special collection of the given type in the default resource.
Definition specialcollectionsrequestjob.cpp:269
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
bool hasCollection(const QByteArray &type, const AgentInstance &instance) const
Returns whether the given agent instance has a special collection of the given type.
Definition specialcollections.cpp:178
bool hasDefaultCollection(const QByteArray &type) const
Returns whether the default resource has a special collection of the given type.
Definition specialcollections.cpp:256
bool registerCollection(const QByteArray &type, const Akonadi::Collection &collection)
Registers the given collection as a special collection with the given type.
Definition specialcollections.cpp:228
Base class for jobs that need to run a sequence of sub-jobs in a transaction.
Definition transactionsequence.h:55
void commit()
Commits the transaction as soon as all pending sub-jobs finished successfully.
Definition transactionsequence.cpp:156
void setErrorText(const QString &errorText)
virtual QString errorString() const
void emitResult()
int error() const
void result(KJob *job)
void setError(int errorCode)
Helper integration between Akonadi and Qt.
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
KGuiItem ok()
const_iterator cbegin() const const
const_iterator cend() const const
qsizetype count() const const
iterator insert(const Key &key, const T &value)
bool isEmpty() const const
bool remove(const Key &key)
T value(const Key &key) const const
void append(QList< T > &&value)
T value(const Key &key, const T &defaultValue) const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool setProperty(const char *name, QVariant &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.