Akonadi
itemsync.cpp
124 return mDeliveryDone && mCurrentBatchRemoteItems.isEmpty() && mRemoteItemQueue.isEmpty() && mRemovedRemoteItemQueue.isEmpty()
139 if (mTransactionMode == ItemSync::MultipleTransactions || (mDeliveryDone && mRemoteItemQueue.isEmpty())) {
153 qCDebug(AKONADICORE_LOG) << "ItemSync of collection" << mSyncCollection.id() << "finished due to user cancelling";
170 // prevent double result emission, can happen since checkDone() is called from all over the place
205 qCDebug(AKONADICORE_LOG) << "Received batch: " << items.count() << "Already processed: " << d->mTotalItemsProcessed
234 void ItemSync::setIncrementalSyncItems(const Item::List &changedItems, const Item::List &removedItems)
251 qCDebug(AKONADICORE_LOG) << "Received: " << changedItems.count() << "Removed: " << removedItems.count() << "In total: " << d->mTotalItemsProcessed
313 return QStringLiteral("Collection %1 (%2)").arg(mSyncCollection.id()).arg(mSyncCollection.name());
330 std::move(mRemoteItemQueue.begin(), mRemoteItemQueue.begin() + num, std::back_inserter(mCurrentBatchRemoteItems));
380 qCWarning(AKONADICORE_LOG) << "Item " << remoteItem.id() << " does not have a remote identifier";
422 qCWarning(AKONADICORE_LOG) << "Deleting items from the akonadi database failed:" << job->errorString();
433 qCWarning(AKONADICORE_LOG) << "Creating/updating items from the akonadi database failed:" << job->errorString();
455 // we never want parallel transactions, single transaction just makes one big transaction, and multi transaction uses multiple transaction sequentially
495 // propagate the first error we got but continue, we might still be fed with stuff from a resource
void deliveryDone()
Notify ItemSync that all remote items have been delivered.
Definition: itemsync.cpp:481
void setIncrementalSyncItems(const Item::List &changedItems, const Item::List &removedItems)
Sets the item lists for incrementally syncing the collection.
Definition: itemsync.cpp:234
void itemsReceived(const Akonadi::Item::List &items)
This signal is emitted whenever new items have been fetched completely.
void rollback()
Aborts the sync process and rolls back all not yet committed transactions.
Definition: itemsync.cpp:505
Job that deletes items from the Akonadi storage.
Definition: itemdeletejob.h:47
void setErrorText(const QString &errorText)
void result(KJob *job)
Job that creates a new item in the Akonadi storage.
Definition: itemcreatejob.h:60
void clear()
int batchSize() const
Minimum number of items required to start processing in streaming mode.
Definition: itemsync.cpp:523
@ MultipleTransactions
Use one transaction per chunk of delivered items, good compromise between the other two when using st...
Definition: itemsync.h:128
void doStart() override
This method must be reimplemented in the concrete jobs.
Definition: itemsync.cpp:259
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setTotalAmount(Unit unit, qulonglong amount)
bool isEmpty() const const
QString errorText() const
QAction * create(StandardGameAction id, const QObject *recvr, const char *slot, QObject *parent)
Syncs between items known to a client (usually a resource) and the Akonadi storage.
Definition: itemsync.h:38
QVariant merge(const QVariant &lhs, const QVariant &rhs)
Base class for jobs that need to run a sequence of sub-jobs in a transaction.
Definition: transactionsequence.h:54
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
ItemSync(const Collection &collection, QObject *parent=nullptr)
Creates a new item synchronizer.
Definition: itemsync.cpp:177
@ NoTransaction
Use no transaction at all, provides highest responsiveness (might therefore feel faster even when act...
Definition: itemsync.h:129
void setMergeMode(MergeMode mergeMode)
Set what merge method should be used for next ItemSync run.
Definition: itemsync.cpp:541
int count(const T &value) const const
virtual QString errorString() const
int error() const
void setError(int errorCode)
void setTotalItems(int amount)
Set the amount of items which you are going to return in total by using the setFullSyncItems()/setInc...
Definition: itemsync.cpp:213
void setTransactionMode(TransactionMode mode)
Set the transaction mode to use for this sync.
Definition: itemsync.cpp:517
Q_D(Todo)
Bytes
void setFullSyncItems(const Item::List &items)
Sets the full item list for the collection.
Definition: itemsync.cpp:188
void setDisableAutomaticDeliveryDone(bool disable)
Disables the automatic completion of the item sync, based on the number of delivered items.
Definition: itemsync.cpp:228
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:01:06 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:01:06 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.