diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-09-09 00:36:25 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-09-09 00:36:25 +0200 |
commit | c1e254e894144d08ad2dc560f9c1e3c719eea1f1 (patch) | |
tree | b2a19e9264481614f74855b1a6ed9639e2fc3f6d /common/domain/event.cpp | |
parent | 0233762ec425afd5792d02c822e5c990b01c119c (diff) | |
download | sink-c1e254e894144d08ad2dc560f9c1e3c719eea1f1.tar.gz sink-c1e254e894144d08ad2dc560f9c1e3c719eea1f1.zip |
Conciser PropertyMapper::addMapping notation
Diffstat (limited to 'common/domain/event.cpp')
-rw-r--r-- | common/domain/event.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/common/domain/event.cpp b/common/domain/event.cpp index e107441..38872f9 100644 --- a/common/domain/event.cpp +++ b/common/domain/event.cpp | |||
@@ -62,12 +62,8 @@ void TypeImplementation<Event>::index(const Event &type, Akonadi2::Storage::Tran | |||
62 | QSharedPointer<ReadPropertyMapper<TypeImplementation<Event>::Buffer> > TypeImplementation<Event>::initializeReadPropertyMapper() | 62 | QSharedPointer<ReadPropertyMapper<TypeImplementation<Event>::Buffer> > TypeImplementation<Event>::initializeReadPropertyMapper() |
63 | { | 63 | { |
64 | auto propertyMapper = QSharedPointer<ReadPropertyMapper<Buffer> >::create(); | 64 | auto propertyMapper = QSharedPointer<ReadPropertyMapper<Buffer> >::create(); |
65 | propertyMapper->addMapping("summary", [](Buffer const *buffer) -> QVariant { | 65 | propertyMapper->addMapping<QString, Buffer>("summary", &Buffer::summary); |
66 | return propertyToVariant<QString>(buffer->summary()); | 66 | propertyMapper->addMapping<QString, Buffer>("uid", &Buffer::uid); |
67 | }); | ||
68 | propertyMapper->addMapping("uid", [](Buffer const *buffer) -> QVariant { | ||
69 | return propertyToVariant<QString>(buffer->uid()); | ||
70 | }); | ||
71 | return propertyMapper; | 67 | return propertyMapper; |
72 | } | 68 | } |
73 | 69 | ||