summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-22 13:45:00 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-22 14:30:20 +0200
commit80b86238620e667d10486ff212238fbfe9271ded (patch)
tree57993158f70232c15be3cb19bc0e482ac414a7b8 /common
parent46313049ac01a3007ef60bdc937442945355a38d (diff)
downloadsink-80b86238620e667d10486ff212238fbfe9271ded.tar.gz
sink-80b86238620e667d10486ff212238fbfe9271ded.zip
Cache a recurring flag
Diffstat (limited to 'common')
-rw-r--r--common/domain/applicationdomaintype.cpp1
-rw-r--r--common/domain/applicationdomaintype.h1
-rw-r--r--common/domain/event.fbs1
-rw-r--r--common/domain/typeimplementations.cpp2
-rw-r--r--common/eventpreprocessor.cpp1
5 files changed, 6 insertions, 0 deletions
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);
145SINK_REGISTER_PROPERTY(Event, StartTime); 145SINK_REGISTER_PROPERTY(Event, StartTime);
146SINK_REGISTER_PROPERTY(Event, EndTime); 146SINK_REGISTER_PROPERTY(Event, EndTime);
147SINK_REGISTER_PROPERTY(Event, AllDay); 147SINK_REGISTER_PROPERTY(Event, AllDay);
148SINK_REGISTER_PROPERTY(Event, Recurring);
148SINK_REGISTER_PROPERTY(Event, Ical); 149SINK_REGISTER_PROPERTY(Event, Ical);
149SINK_REGISTER_PROPERTY(Event, Calendar); 150SINK_REGISTER_PROPERTY(Event, Calendar);
150 151
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 {
405 SINK_EXTRACTED_PROPERTY(QDateTime, StartTime, startTime); 405 SINK_EXTRACTED_PROPERTY(QDateTime, StartTime, startTime);
406 SINK_EXTRACTED_PROPERTY(QDateTime, EndTime, endTime); 406 SINK_EXTRACTED_PROPERTY(QDateTime, EndTime, endTime);
407 SINK_EXTRACTED_PROPERTY(bool, AllDay, allDay); 407 SINK_EXTRACTED_PROPERTY(bool, AllDay, allDay);
408 SINK_EXTRACTED_PROPERTY(bool, Recurring, recurring);
408 SINK_PROPERTY(QByteArray, Ical, ical); 409 SINK_PROPERTY(QByteArray, Ical, ical);
409 SINK_REFERENCE_PROPERTY(Calendar, Calendar, calendar); 410 SINK_REFERENCE_PROPERTY(Calendar, Calendar, calendar);
410}; 411};
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 {
7 startTime:string; 7 startTime:string;
8 endTime:string; 8 endTime:string;
9 allDay:bool; 9 allDay:bool;
10 recurring:bool;
10 ical:string; 11 ical:string;
11 calendar:string; 12 calendar:string;
12} 13}
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<Addressbook,
67typedef IndexConfig<Event, 67typedef IndexConfig<Event,
68 ValueIndex<Event::Uid>, 68 ValueIndex<Event::Uid>,
69 ValueIndex<Event::Calendar>, 69 ValueIndex<Event::Calendar>,
70 ValueIndex<Event::AllDay>,
71 ValueIndex<Event::Recurring>,
70 SortedIndex<Event::StartTime>, 72 SortedIndex<Event::StartTime>,
71 SampledPeriodIndex<Event::StartTime, Event::EndTime> 73 SampledPeriodIndex<Event::StartTime, Event::EndTime>
72 > EventIndexConfig; 74 > 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
48 event.setExtractedStartTime(icalEvent->dtStart()); 48 event.setExtractedStartTime(icalEvent->dtStart());
49 event.setExtractedEndTime(icalEvent->dtEnd()); 49 event.setExtractedEndTime(icalEvent->dtEnd());
50 event.setExtractedAllDay(icalEvent->allDay()); 50 event.setExtractedAllDay(icalEvent->allDay());
51 event.setExtractedRecurring(icalEvent->recurs());
51} 52}
52 53
53void EventPropertyExtractor::newEntity(Event &event) 54void EventPropertyExtractor::newEntity(Event &event)