diff options
Diffstat (limited to 'dummyresource')
-rw-r--r-- | dummyresource/domainadaptor.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/dummyresource/domainadaptor.cpp b/dummyresource/domainadaptor.cpp index fa00bbc..8649bc3 100644 --- a/dummyresource/domainadaptor.cpp +++ b/dummyresource/domainadaptor.cpp | |||
@@ -23,14 +23,11 @@ DummyEventAdaptorFactory::DummyEventAdaptorFactory() | |||
23 | { | 23 | { |
24 | //TODO turn this into initializeReadPropertyMapper as well? | 24 | //TODO turn this into initializeReadPropertyMapper as well? |
25 | mResourceMapper->addMapping("summary", [](DummyEvent const *buffer) -> QVariant { | 25 | mResourceMapper->addMapping("summary", [](DummyEvent const *buffer) -> QVariant { |
26 | if (buffer->summary()) { | 26 | return propertyToVariant<QString>(buffer->summary()); |
27 | return QString::fromStdString(buffer->summary()->c_str()); | ||
28 | } | ||
29 | return QVariant(); | ||
30 | }); | 27 | }); |
31 | 28 | ||
32 | mResourceWriteMapper->addMapping("summary", [](const QVariant &value, flatbuffers::FlatBufferBuilder &fbb) -> std::function<void(DummyEventBuilder &)> { | 29 | mResourceWriteMapper->addMapping("summary", [](const QVariant &value, flatbuffers::FlatBufferBuilder &fbb) -> std::function<void(DummyEventBuilder &)> { |
33 | auto offset = extractProperty<QString>(value, fbb); | 30 | auto offset = variantToProperty<QString>(value, fbb); |
34 | return [offset](DummyEventBuilder &builder) { builder.add_summary(offset); }; | 31 | return [offset](DummyEventBuilder &builder) { builder.add_summary(offset); }; |
35 | }); | 32 | }); |
36 | } | 33 | } |