diff --git a/src/domain/livequery.h b/src/domain/livequery.h --- a/src/domain/livequery.h +++ b/src/domain/livequery.h @@ -81,6 +81,27 @@ typedef std::function UpdateFunction; typedef std::function RepresentsFunction; + LiveQuery() + { + } + + LiveQuery(const LiveQuery &other) + : m_fetch(other.m_fetch), + m_predicate(other.m_predicate), + m_convert(other.m_convert), + m_update(other.m_update), + m_represents(other.m_represents), + m_provider(other.m_provider) + { + } + + LiveQuery &operator=(const LiveQuery &other) + { + LiveQuery tmp(other); + std::swap(*this, other); + return *this; + } + ~LiveQuery() { clear(); diff --git a/src/utils/dependencymanager.h b/src/utils/dependencymanager.h --- a/src/utils/dependencymanager.h +++ b/src/utils/dependencymanager.h @@ -175,8 +175,11 @@ static DependencyManager &globalInstance(); DependencyManager(); + DependencyManager(const DependencyManager &other); ~DependencyManager(); + DependencyManager &operator=(const DependencyManager &other); + template void add(const typename Internal::Provider::FactoryType &factory) { diff --git a/src/utils/dependencymanager.cpp b/src/utils/dependencymanager.cpp --- a/src/utils/dependencymanager.cpp +++ b/src/utils/dependencymanager.cpp @@ -37,9 +37,20 @@ { } +DependencyManager::DependencyManager(const DependencyManager &other) + : m_cleanupFunctions(other.m_cleanupFunctions) +{ +} + DependencyManager::~DependencyManager() { foreach (void (*cleanupFunction)(DependencyManager*), m_cleanupFunctions) { cleanupFunction(this); } } + +DependencyManager &DependencyManager::operator=(const DependencyManager &other) +{ + m_cleanupFunctions = other.m_cleanupFunctions; + return *this; +} diff --git a/tests/features/features-run.cpp b/tests/features/features-run.cpp --- a/tests/features/features-run.cpp +++ b/tests/features/features-run.cpp @@ -43,6 +43,9 @@ } private: + ProcessKiller(const ProcessKiller &other); + ProcessKiller &operator=(const ProcessKiller &other); + QProcess *m_process; }; diff --git a/tests/testlib/akonadifakedata.h b/tests/testlib/akonadifakedata.h --- a/tests/testlib/akonadifakedata.h +++ b/tests/testlib/akonadifakedata.h @@ -48,6 +48,8 @@ AkonadiFakeData(const AkonadiFakeData &other); ~AkonadiFakeData(); + AkonadiFakeData &operator=(const AkonadiFakeData &other); + Akonadi::Collection::List collections() const; Akonadi::Collection::List childCollections(Akonadi::Collection::Id parentId) const; Akonadi::Collection collection(Akonadi::Collection::Id id) const; diff --git a/tests/testlib/akonadifakedata.cpp b/tests/testlib/akonadifakedata.cpp --- a/tests/testlib/akonadifakedata.cpp +++ b/tests/testlib/akonadifakedata.cpp @@ -61,6 +61,15 @@ { } +AkonadiFakeData &AkonadiFakeData::operator=(const AkonadiFakeData &other) +{ + m_collections = other.m_collections; + m_childCollections = other.m_childCollections; + m_items = other.m_items; + m_childItems = other.m_childItems; + return *this; +} + Akonadi::Collection::List AkonadiFakeData::collections() const { return m_collections.values().toVector();