diff options
Diffstat (limited to 'common/domain')
-rw-r--r-- | common/domain/applicationdomaintype.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 227ab4d..cff0172 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -46,10 +46,9 @@ public: | |||
46 | ApplicationDomainType& operator=(const ApplicationDomainType &other); | 46 | ApplicationDomainType& operator=(const ApplicationDomainType &other); |
47 | 47 | ||
48 | template <typename DomainType> | 48 | template <typename DomainType> |
49 | static typename DomainType::Ptr getInMemoryRepresentation(const ApplicationDomainType &domainType) | 49 | static typename DomainType::Ptr getInMemoryRepresentation(const ApplicationDomainType &domainType, const QList<QByteArray> properties = QList<QByteArray>()) |
50 | { | 50 | { |
51 | //TODO only copy requested properties | 51 | auto memoryAdaptor = QSharedPointer<Akonadi2::ApplicationDomain::MemoryBufferAdaptor>::create(*(domainType.mAdaptor), properties); |
52 | auto memoryAdaptor = QSharedPointer<Akonadi2::ApplicationDomain::MemoryBufferAdaptor>::create(*(domainType.mAdaptor)); | ||
53 | //The identifier still internal refers to the memory-mapped pointer, we need to copy the memory or it will become invalid | 52 | //The identifier still internal refers to the memory-mapped pointer, we need to copy the memory or it will become invalid |
54 | return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor); | 53 | return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor); |
55 | } | 54 | } |