From 31dbc0cba9e5acfaeca41679873b17e11ceab811 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 22 Dec 2015 10:42:37 +0100 Subject: Only load the properties we need. ...and adjust the test accordingly with what we expect. --- common/domain/applicationdomaintype.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'common/domain') 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: ApplicationDomainType& operator=(const ApplicationDomainType &other); template - static typename DomainType::Ptr getInMemoryRepresentation(const ApplicationDomainType &domainType) + static typename DomainType::Ptr getInMemoryRepresentation(const ApplicationDomainType &domainType, const QList properties = QList()) { - //TODO only copy requested properties - auto memoryAdaptor = QSharedPointer::create(*(domainType.mAdaptor)); + auto memoryAdaptor = QSharedPointer::create(*(domainType.mAdaptor), properties); //The identifier still internal refers to the memory-mapped pointer, we need to copy the memory or it will become invalid return QSharedPointer::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor); } -- cgit v1.2.3