From 8146bd3276c4b26018814446803dac7aa944797c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 14 Jul 2015 01:05:20 +0200 Subject: Removed unnecessary template parameter --- common/domainadaptor.h | 8 ++++---- common/facade.h | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'common') diff --git a/common/domainadaptor.h b/common/domainadaptor.h index ca89fba..48a0507 100644 --- a/common/domainadaptor.h +++ b/common/domainadaptor.h @@ -122,13 +122,13 @@ public: QSharedPointer > mResourceMapper; }; -template class DomainTypeAdaptorFactoryInterface { public: + typedef QSharedPointer Ptr; virtual ~DomainTypeAdaptorFactoryInterface() {}; virtual QSharedPointer createAdaptor(const Akonadi2::Entity &entity) = 0; - virtual void createBuffer(const DomainType &domainType, flatbuffers::FlatBufferBuilder &fbb) = 0; + virtual void createBuffer(const Akonadi2::ApplicationDomain::ApplicationDomainType &domainType, flatbuffers::FlatBufferBuilder &fbb) = 0; }; /** @@ -137,7 +137,7 @@ public: * This is required by the facade the read the value, and by the pipeline preprocessors to access the domain values in a generic way. */ template -class DomainTypeAdaptorFactory : public DomainTypeAdaptorFactoryInterface +class DomainTypeAdaptorFactory : public DomainTypeAdaptorFactoryInterface { typedef typename Akonadi2::ApplicationDomain::TypeImplementation::Buffer LocalBuffer; typedef typename Akonadi2::ApplicationDomain::TypeImplementation::BufferBuilder LocalBuilder; @@ -169,7 +169,7 @@ public: return adaptor; } - virtual void createBuffer(const DomainType &domainObject, flatbuffers::FlatBufferBuilder &fbb) Q_DECL_OVERRIDE + virtual void createBuffer(const Akonadi2::ApplicationDomain::ApplicationDomainType &domainObject, flatbuffers::FlatBufferBuilder &fbb) Q_DECL_OVERRIDE { flatbuffers::FlatBufferBuilder localFbb; if (mLocalWriteMapper) { diff --git a/common/facade.h b/common/facade.h index e32ee96..ad79213 100644 --- a/common/facade.h +++ b/common/facade.h @@ -106,7 +106,7 @@ public: * @param resourceIdentifier is the identifier of the resource instance * @param adaptorFactory is the adaptor factory used to generate the mappings from domain to resource types and vice versa */ - GenericFacade(const QByteArray &resourceIdentifier, const QSharedPointer > &adaptorFactory = QSharedPointer >()) + GenericFacade(const QByteArray &resourceIdentifier, const DomainTypeAdaptorFactoryInterface::Ptr &adaptorFactory = DomainTypeAdaptorFactoryInterface::Ptr()) : Akonadi2::StoreFacade(), mResourceAccess(new ResourceAccess(resourceIdentifier)), mDomainTypeAdaptorFactory(adaptorFactory), @@ -244,7 +244,7 @@ protected: }); } - static void readValue(const QSharedPointer &storage, const QByteArray &key, const std::function &resultCallback, const QSharedPointer > &adaptorFactory) + static void readValue(const QSharedPointer &storage, const QByteArray &key, const std::function &resultCallback, const DomainTypeAdaptorFactoryInterface::Ptr &adaptorFactory) { scan(storage, key, [=](const QByteArray &key, const Akonadi2::Entity &entity) { const auto metadataBuffer = Akonadi2::EntityBuffer::readBuffer(entity.metadata()); @@ -270,7 +270,7 @@ protected: return ResultSet(keys); } - static ResultSet filteredSet(const ResultSet &resultSet, const std::function &filter, const QSharedPointer &storage, const QSharedPointer > &adaptorFactory) + static ResultSet filteredSet(const ResultSet &resultSet, const std::function &filter, const QSharedPointer &storage, const DomainTypeAdaptorFactoryInterface::Ptr &adaptorFactory) { auto resultSetPtr = QSharedPointer::create(resultSet); @@ -288,7 +288,7 @@ protected: return ResultSet(generator); } - static ResultSet getResultSet(const Akonadi2::Query &query, const QSharedPointer &storage, const QSharedPointer > &adaptorFactory, const QByteArray &resourceInstanceIdentifier) + static ResultSet getResultSet(const Akonadi2::Query &query, const QSharedPointer &storage, const DomainTypeAdaptorFactoryInterface::Ptr &adaptorFactory, const QByteArray &resourceInstanceIdentifier) { QSet appliedFilters; ResultSet resultSet = Akonadi2::ApplicationDomain::TypeImplementation::queryIndexes(query, resourceInstanceIdentifier, appliedFilters); @@ -342,7 +342,7 @@ private: protected: //TODO use one resource access instance per application => make static QSharedPointer mResourceAccess; - QSharedPointer > mDomainTypeAdaptorFactory; + DomainTypeAdaptorFactoryInterface::Ptr mDomainTypeAdaptorFactory; QByteArray mResourceInstanceIdentifier; }; -- cgit v1.2.3