diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-21 10:10:15 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-21 10:45:04 +0100 |
commit | a188fb648ba001314adbb9d5cfc0bfb77198a5b9 (patch) | |
tree | 899e46c4d581e7a13df0efc58ceaaa80098d64c7 /common/store.cpp | |
parent | a1dcb117835f7c1f0604f0302b42edd905190a52 (diff) | |
download | sink-a188fb648ba001314adbb9d5cfc0bfb77198a5b9.tar.gz sink-a188fb648ba001314adbb9d5cfc0bfb77198a5b9.zip |
sinksh list identity support
Diffstat (limited to 'common/store.cpp')
-rw-r--r-- | common/store.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/store.cpp b/common/store.cpp index 41b4867..5e0c327 100644 --- a/common/store.cpp +++ b/common/store.cpp | |||
@@ -200,6 +200,7 @@ static std::shared_ptr<StoreFacade<DomainType>> getFacade(const QByteArray &reso | |||
200 | template <class DomainType> | 200 | template <class DomainType> |
201 | KAsync::Job<void> Store::create(const DomainType &domainObject) | 201 | KAsync::Job<void> Store::create(const DomainType &domainObject) |
202 | { | 202 | { |
203 | SinkTrace() << "Create: " << domainObject; | ||
203 | // Potentially move to separate thread as well | 204 | // Potentially move to separate thread as well |
204 | auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); | 205 | auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); |
205 | return facade->create(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to create"; }); | 206 | return facade->create(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to create"; }); |
@@ -208,6 +209,7 @@ KAsync::Job<void> Store::create(const DomainType &domainObject) | |||
208 | template <class DomainType> | 209 | template <class DomainType> |
209 | KAsync::Job<void> Store::modify(const DomainType &domainObject) | 210 | KAsync::Job<void> Store::modify(const DomainType &domainObject) |
210 | { | 211 | { |
212 | SinkTrace() << "Modify: " << domainObject; | ||
211 | // Potentially move to separate thread as well | 213 | // Potentially move to separate thread as well |
212 | auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); | 214 | auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); |
213 | return facade->modify(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to modify"; }); | 215 | return facade->modify(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to modify"; }); |
@@ -216,6 +218,7 @@ KAsync::Job<void> Store::modify(const DomainType &domainObject) | |||
216 | template <class DomainType> | 218 | template <class DomainType> |
217 | KAsync::Job<void> Store::remove(const DomainType &domainObject) | 219 | KAsync::Job<void> Store::remove(const DomainType &domainObject) |
218 | { | 220 | { |
221 | SinkTrace() << "Remove: " << domainObject; | ||
219 | // Potentially move to separate thread as well | 222 | // Potentially move to separate thread as well |
220 | auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); | 223 | auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); |
221 | return facade->remove(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to remove"; }); | 224 | return facade->remove(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to remove"; }); |