From 6f1d3437b3bdd3ccde1243ceddf19f0c0fb5afda Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 9 Oct 2015 18:51:04 +0200 Subject: Modification and removal in results Now we just need to ensure that equality is tested using the ApplicationDomainType::identifier --- common/domain/applicationdomaintype.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'common/domain/applicationdomaintype.h') diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index e0a6de0..b583a6e 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -97,6 +97,15 @@ private: qint64 mRevision; }; +/* + * Should this be specific to the synclistresultset, in other cases we may want to take revision and resource into account. + */ +inline bool operator==(const ApplicationDomainType& lhs, const ApplicationDomainType& rhs) +{ + return lhs.identifier() == rhs.identifier() + && lhs.resourceInstanceIdentifier() == rhs.resourceInstanceIdentifier(); +} + struct Event : public ApplicationDomainType { typedef QSharedPointer Ptr; using ApplicationDomainType::ApplicationDomainType; -- cgit v1.2.3