From 80b86238620e667d10486ff212238fbfe9271ded Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 22 Aug 2018 13:45:00 +0200 Subject: Cache a recurring flag --- common/domain/applicationdomaintype.cpp | 1 + common/domain/applicationdomaintype.h | 1 + common/domain/event.fbs | 1 + common/domain/typeimplementations.cpp | 2 ++ common/eventpreprocessor.cpp | 1 + 5 files changed, 6 insertions(+) diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index 97bf9f2..bb4bf78 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp @@ -145,6 +145,7 @@ SINK_REGISTER_PROPERTY(Event, Description); SINK_REGISTER_PROPERTY(Event, StartTime); SINK_REGISTER_PROPERTY(Event, EndTime); SINK_REGISTER_PROPERTY(Event, AllDay); +SINK_REGISTER_PROPERTY(Event, Recurring); SINK_REGISTER_PROPERTY(Event, Ical); SINK_REGISTER_PROPERTY(Event, Calendar); diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 7f214ba..ac15c27 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -405,6 +405,7 @@ struct SINK_EXPORT Event : public Entity { SINK_EXTRACTED_PROPERTY(QDateTime, StartTime, startTime); SINK_EXTRACTED_PROPERTY(QDateTime, EndTime, endTime); SINK_EXTRACTED_PROPERTY(bool, AllDay, allDay); + SINK_EXTRACTED_PROPERTY(bool, Recurring, recurring); SINK_PROPERTY(QByteArray, Ical, ical); SINK_REFERENCE_PROPERTY(Calendar, Calendar, calendar); }; diff --git a/common/domain/event.fbs b/common/domain/event.fbs index 9923810..5e2aa25 100644 --- a/common/domain/event.fbs +++ b/common/domain/event.fbs @@ -7,6 +7,7 @@ table Event { startTime:string; endTime:string; allDay:bool; + recurring:bool; ical:string; calendar:string; } diff --git a/common/domain/typeimplementations.cpp b/common/domain/typeimplementations.cpp index 6e14501..35f641f 100644 --- a/common/domain/typeimplementations.cpp +++ b/common/domain/typeimplementations.cpp @@ -67,6 +67,8 @@ typedef IndexConfig, ValueIndex, + ValueIndex, + ValueIndex, SortedIndex, SampledPeriodIndex > EventIndexConfig; diff --git a/common/eventpreprocessor.cpp b/common/eventpreprocessor.cpp index 9efa541..ec363fc 100644 --- a/common/eventpreprocessor.cpp +++ b/common/eventpreprocessor.cpp @@ -48,6 +48,7 @@ void EventPropertyExtractor::updatedIndexedProperties(Event &event, const QByteA event.setExtractedStartTime(icalEvent->dtStart()); event.setExtractedEndTime(icalEvent->dtEnd()); event.setExtractedAllDay(icalEvent->allDay()); + event.setExtractedRecurring(icalEvent->recurs()); } void EventPropertyExtractor::newEntity(Event &event) -- cgit v1.2.3