Commit 9b6b7b93 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Remove dead ItemSync::fetchScope & ResourceBase::itemSynchronizationFetchScope

Left-over from switch to server-side merging in
5b640f86
parent 930897af
Pipeline #82515 passed with stage
in 13 minutes and 34 seconds
......@@ -63,7 +63,6 @@ public:
: AgentBasePrivate(parent)
, scheduler(nullptr)
, mItemSyncer(nullptr)
, mItemSyncFetchScope(nullptr)
, mItemTransactionMode(ItemSync::SingleTransaction)
, mItemMergeMode(ItemSync::RIDMerge)
, mCollectionSyncer(nullptr)
......@@ -85,10 +84,7 @@ public:
mKeepLocalCollectionChanges << "ENTITYDISPLAY";
}
~ResourceBasePrivate() override
{
delete mItemSyncFetchScope;
}
~ResourceBasePrivate() override = default;
Q_DECLARE_PUBLIC(ResourceBase)
......@@ -182,9 +178,6 @@ public:
mItemSyncer->setTransactionMode(mItemTransactionMode);
mItemSyncer->setBatchSize(mItemSyncBatchSize);
mItemSyncer->setMergeMode(mItemMergeMode);
if (mItemSyncFetchScope) {
mItemSyncer->setFetchScope(*mItemSyncFetchScope);
}
mItemSyncer->setDisableAutomaticDeliveryDone(mDisableAutomaticItemDeliveryDone);
mItemSyncer->setProperty("collection", QVariant::fromValue(q->currentCollection()));
connect(mItemSyncer, &KJob::percentChanged, this,
......@@ -431,7 +424,6 @@ public:
ResourceScheduler *scheduler = nullptr;
ItemSync *mItemSyncer = nullptr;
ItemFetchScope *mItemSyncFetchScope = nullptr;
ItemSync::TransactionMode mItemTransactionMode;
ItemSync::MergeMode mItemMergeMode;
CollectionSync *mCollectionSyncer = nullptr;
......@@ -1492,15 +1484,6 @@ void ResourceBase::setItemTransactionMode(ItemSync::TransactionMode mode)
d->mItemTransactionMode = mode;
}
void ResourceBase::setItemSynchronizationFetchScope(const ItemFetchScope &fetchScope)
{
Q_D(ResourceBase);
if (!d->mItemSyncFetchScope) {
d->mItemSyncFetchScope = new ItemFetchScope;
}
*(d->mItemSyncFetchScope) = fetchScope;
}
void ResourceBase::setItemMergingMode(ItemSync::MergeMode mode)
{
Q_D(ResourceBase);
......
......@@ -580,19 +580,6 @@ protected:
*/
void setItemMergingMode(ItemSync::MergeMode mode);
/**
* Set the fetch scope applied for item synchronization.
* By default, the one set on the changeRecorder() is used. However, it can make sense
* to specify a specialized fetch scope for synchronization to improve performance.
* The rule of thumb is to remove anything from this fetch scope that does not provide
* additional information regarding whether and item has changed or not. This is primarily
* relevant for backends not supporting incremental retrieval.
* @param fetchScope The fetch scope to use by the internal Akonadi::ItemSync instance.
* @see Akonadi::ItemSync
* @since 4.6
*/
void setItemSynchronizationFetchScope(const ItemFetchScope &fetchScope);
/**
* Call this method to supply incrementally retrieved items from the remote server.
*
......
......@@ -47,9 +47,6 @@ public:
, mBatchSize(10)
, mMergeMode(Akonadi::ItemSync::RIDMerge)
{
// we want to fetch all data by default
mFetchScope.fetchFullPayload();
mFetchScope.fetchAllAttributes();
}
void createOrMerge(const Item &item);
......@@ -77,9 +74,6 @@ public:
TransactionSequence *mCurrentTransaction = nullptr;
int mTransactionJobs;
// fetch scope for initial item listing
ItemFetchScope mFetchScope;
Akonadi::Item::List mRemoteItemQueue;
Akonadi::Item::List mRemovedRemoteItemQueue;
Akonadi::Item::List mCurrentBatchRemoteItems;
......@@ -262,18 +256,6 @@ void ItemSync::setIncrementalSyncItems(const Item::List &changedItems, const Ite
d->execute();
}
void ItemSync::setFetchScope(ItemFetchScope &fetchScope)
{
Q_D(ItemSync);
d->mFetchScope = fetchScope;
}
ItemFetchScope &ItemSync::fetchScope()
{
Q_D(ItemSync);
return d->mFetchScope;
}
void ItemSync::doStart()
{
}
......
......@@ -13,7 +13,6 @@
namespace Akonadi
{
class Collection;
class ItemFetchScope;
class ItemSyncPrivate;
/**
......@@ -111,33 +110,6 @@ public:
*/
void setIncrementalSyncItems(const Item::List &changedItems, const Item::List &removedItems);
/**
* Sets the item fetch scope.
*
* The ItemFetchScope controls how much of an item's data is fetched
* from the server, e.g. whether to fetch the full item payload or
* only meta data.
*
* @param fetchScope The new scope for item fetch operations.
*
* @see fetchScope()
*/
void setFetchScope(ItemFetchScope &fetchScope);
/**
* Returns the item fetch scope.
*
* Since this returns a reference it can be used to conveniently modify the
* current scope in-place, i.e. by calling a method on the returned reference
* without storing it in a local variable. See the ItemFetchScope documentation
* for an example.
*
* @return a reference to the current item fetch scope
*
* @see setFetchScope() for replacing the current item fetch scope
*/
ItemFetchScope &fetchScope();
/**
* Aborts the sync process and rolls back all not yet committed transactions.
* Use this if an external error occurred during the sync process (such as the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment