From ce9cba93557f7fc985c9f3b8957840c28c438cfe Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 14 May 2018 10:52:09 +0200 Subject: Add the "allDay" property to Event --- common/domain/applicationdomaintype.cpp | 1 + common/domain/applicationdomaintype.h | 1 + common/domain/event.fbs | 1 + common/domain/typeimplementations.cpp | 1 + common/eventpreprocessor.cpp | 1 + 5 files changed, 5 insertions(+) diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index b1469e1..6e22168 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp @@ -129,6 +129,7 @@ SINK_REGISTER_PROPERTY(Event, Summary); SINK_REGISTER_PROPERTY(Event, Description); SINK_REGISTER_PROPERTY(Event, StartTime); SINK_REGISTER_PROPERTY(Event, EndTime); +SINK_REGISTER_PROPERTY(Event, AllDay); SINK_REGISTER_PROPERTY(Event, Ical); SINK_REGISTER_PROPERTY(Event, Calendar); diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 93de8f5..d995b92 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -401,6 +401,7 @@ struct SINK_EXPORT Event : public Entity { SINK_EXTRACTED_PROPERTY(QString, Description, description); SINK_EXTRACTED_PROPERTY(QDateTime, StartTime, startTime); SINK_EXTRACTED_PROPERTY(QDateTime, EndTime, endTime); + SINK_EXTRACTED_PROPERTY(bool, AllDay, allDay); SINK_PROPERTY(QByteArray, Ical, ical); SINK_REFERENCE_PROPERTY(Calendar, Calendar, calendar); }; diff --git a/common/domain/event.fbs b/common/domain/event.fbs index 77aaef6..9923810 100644 --- a/common/domain/event.fbs +++ b/common/domain/event.fbs @@ -6,6 +6,7 @@ table Event { description:string; startTime:string; endTime:string; + allDay:bool; ical:string; calendar:string; } diff --git a/common/domain/typeimplementations.cpp b/common/domain/typeimplementations.cpp index b584138..e65c998 100644 --- a/common/domain/typeimplementations.cpp +++ b/common/domain/typeimplementations.cpp @@ -212,6 +212,7 @@ void TypeImplementation::configure(PropertyMapper &propertyMapper) SINK_REGISTER_SERIALIZER(propertyMapper, Event, Uid, uid); SINK_REGISTER_SERIALIZER(propertyMapper, Event, StartTime, startTime); SINK_REGISTER_SERIALIZER(propertyMapper, Event, EndTime, endTime); + SINK_REGISTER_SERIALIZER(propertyMapper, Event, AllDay, allDay); SINK_REGISTER_SERIALIZER(propertyMapper, Event, Ical, ical); SINK_REGISTER_SERIALIZER(propertyMapper, Event, Calendar, calendar); } diff --git a/common/eventpreprocessor.cpp b/common/eventpreprocessor.cpp index e087563..9efa541 100644 --- a/common/eventpreprocessor.cpp +++ b/common/eventpreprocessor.cpp @@ -47,6 +47,7 @@ void EventPropertyExtractor::updatedIndexedProperties(Event &event, const QByteA event.setExtractedDescription(icalEvent->description()); event.setExtractedStartTime(icalEvent->dtStart()); event.setExtractedEndTime(icalEvent->dtEnd()); + event.setExtractedAllDay(icalEvent->allDay()); } void EventPropertyExtractor::newEntity(Event &event) -- cgit v1.2.3