Akonadi
itemsync.cpp
130 return mDeliveryDone && mCurrentBatchRemoteItems.isEmpty() && mRemoteItemQueue.isEmpty() && mRemovedRemoteItemQueue.isEmpty()
145 if (mTransactionMode == ItemSync::MultipleTransactions || (mDeliveryDone && mRemoteItemQueue.isEmpty())) {
159 qCDebug(AKONADICORE_LOG) << "ItemSync of collection" << mSyncCollection.id() << "finished due to user cancelling";
176 // prevent double result emission, can happen since checkDone() is called from all over the place
215 qCDebug(AKONADICORE_LOG) << "Received batch: " << items.count() << "Already processed: " << d->mTotalItemsProcessed
244void ItemSync::setIncrementalSyncItems(const Item::List &changedItems, const Item::List &removedItems)
323 return QStringLiteral("Collection %1 (%2)").arg(mSyncCollection.id()).arg(mSyncCollection.name());
340 std::move(mRemoteItemQueue.begin(), mRemoteItemQueue.begin() + num, std::back_inserter(mCurrentBatchRemoteItems));
390 qCWarning(AKONADICORE_LOG) << "Item " << remoteItem.id() << " does not have a remote identifier";
432 qCWarning(AKONADICORE_LOG) << "Deleting items from the akonadi database failed:" << job->errorString();
443 qCWarning(AKONADICORE_LOG) << "Creating/updating items from the akonadi database failed:" << job->errorString();
465 // we never want parallel transactions, single transaction just makes one big transaction, and multi transaction uses multiple transaction sequentially
505 // propagate the first error we got but continue, we might still be fed with stuff from a resource
Job that creates a new item in the Akonadi storage.
Definition itemcreatejob.h:61
void itemsReceived(const Akonadi::Item::List &items)
This signal is emitted whenever new items have been fetched completely.
Syncs between items known to a client (usually a resource) and the Akonadi storage.
Definition itemsync.h:41
ItemSync(const Collection &collection, const QDateTime ×tamp={}, QObject *parent=nullptr)
Creates a new item synchronizer.
Definition itemsync.cpp:183
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:223
@ NoTransaction
Use no transaction at all, provides highest responsiveness (might therefore feel faster even when act...
Definition itemsync.h:133
@ MultipleTransactions
Use one transaction per chunk of delivered items, good compromise between the other two when using st...
Definition itemsync.h:132
void setDisableAutomaticDeliveryDone(bool disable)
Disables the automatic completion of the item sync, based on the number of delivered items.
Definition itemsync.cpp:238
void setIncrementalSyncItems(const Item::List &changedItems, const Item::List &removedItems)
Sets the item lists for incrementally syncing the collection.
Definition itemsync.cpp:244
void setFullSyncItems(const Item::List &items)
Sets the full item list for the collection.
Definition itemsync.cpp:198
void doStart() override
This method must be reimplemented in the concrete jobs.
Definition itemsync.cpp:269
void rollback()
Aborts the sync process and rolls back all not yet committed transactions.
Definition itemsync.cpp:515
void deliveryDone()
Notify ItemSync that all remote items have been delivered.
Definition itemsync.cpp:491
int batchSize() const
Minimum number of items required to start processing in streaming mode.
Definition itemsync.cpp:533
void setMergeMode(MergeMode mergeMode)
Set what merge method should be used for next ItemSync run.
Definition itemsync.cpp:551
void setTransactionMode(TransactionMode mode)
Set the transaction mode to use for this sync.
Definition itemsync.cpp:527
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 setAutomaticCommittingEnabled(bool enable)
Disable automatic committing.
Definition transactionsequence.cpp:217
void setErrorText(const QString &errorText)
Bytes
virtual QString errorString() const
void setTotalAmount(Unit unit, qulonglong amount)
int error() const
void result(KJob *job)
void setError(int errorCode)
QString errorText() const
Helper integration between Akonadi and Qt.
QStringView merge(QStringView lhs, QStringView rhs)
QAction * create(StandardAction id, const Receiver *recvr, Func slot, QObject *parent, std::optional< Qt::ConnectionType > connectionType=std::nullopt)
bool isValid() const const
iterator begin()
void clear()
qsizetype count() const const
iterator erase(const_iterator begin, const_iterator end)
bool isEmpty() const const
void reserve(qsizetype size)
qsizetype size() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool contains(const QSet< T > &other) const const
QString arg(Args &&... args) const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.