Changeset View
Changeset View
Standalone View
Standalone View
plugins/plasma/pimeventsplugin/eventdatavisitor.cpp
Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Line(s) | |||||
165 | { | 165 | { | ||
166 | return visit(todo, CalendarEvents::EventData::Todo); | 166 | return visit(todo, CalendarEvents::EventData::Todo); | ||
167 | } | 167 | } | ||
168 | 168 | | |||
169 | void EventDataVisitor::insertResult(const CalendarEvents::EventData &result) | 169 | void EventDataVisitor::insertResult(const CalendarEvents::EventData &result) | ||
170 | { | 170 | { | ||
171 | QDate d = result.startDateTime().date(); | 171 | QDate d = result.startDateTime().date(); | ||
172 | const QDate end = result.endDateTime().date(); | 172 | const QDate end = result.endDateTime().date(); | ||
173 | | ||||
174 | // Agenda without start date will be placed at the end (due) date | ||||
175 | if (!d.isValid()) { | ||||
176 | mResults.insert(end, result); | ||||
177 | return; | ||||
178 | } | ||||
179 | | ||||
173 | while (d <= end) { | 180 | while (d <= end) { | ||
174 | mResults.insert(d, result); | 181 | mResults.insert(d, result); | ||
175 | d = d.addDays(1); | 182 | d = d.addDays(1); | ||
176 | } | 183 | } | ||
177 | } | 184 | } | ||
178 | 185 | | |||
179 | CalendarEvents::EventData EventDataVisitor::incidenceData(const KCalCore::Incidence::Ptr &incidence) const | 186 | CalendarEvents::EventData EventDataVisitor::incidenceData(const KCalCore::Incidence::Ptr &incidence) const | ||
180 | { | 187 | { | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |