From 4de82d8eafdf0ed9fe48f6bc6627c14332f0fc3c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 6 Dec 2016 19:13:59 +0100 Subject: Fix copy constructor of SyncScope We used to loose the resource list and thus erroneously sync all available resources. --- common/query.h | 6 ++++-- common/store.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/query.h b/common/query.h index 8f69cb7..b69639b 100644 --- a/common/query.h +++ b/common/query.h @@ -455,6 +455,7 @@ public: } private: + friend class SyncScope; int mLimit; Flags mFlags; Filter mResourceFilter; @@ -467,8 +468,9 @@ public: SyncScope() = default; - SyncScope(const QueryBase &other) - : QueryBase(other) + SyncScope(const Query &other) + : QueryBase(other), + mResourceFilter(other.mResourceFilter) { } diff --git a/common/store.cpp b/common/store.cpp index 477b852..971cc7f 100644 --- a/common/store.cpp +++ b/common/store.cpp @@ -289,7 +289,7 @@ static KAsync::Job synchronize(const QByteArray &resource, const Sink::Syn KAsync::Job Store::synchronize(const Sink::Query &query) { - return synchronize(Sink::SyncScope{static_cast(query)}); + return synchronize(Sink::SyncScope{query}); } KAsync::Job Store::synchronize(const Sink::SyncScope &scope) -- cgit v1.2.3