Changeset View
Changeset View
Standalone View
Standalone View
src/occurrenceiterator.cpp
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | 117 | recurrenceIds.insert( | |||
---|---|---|---|---|---|
118 | exception->recurrenceId().toTimeZone(incidenceRecStart.timeZone()), | 118 | exception->recurrenceId().toTimeZone(incidenceRecStart.timeZone()), | ||
119 | exception); | 119 | exception); | ||
120 | } | 120 | } | ||
121 | } | 121 | } | ||
122 | const auto occurrences = inc->recurrence()->timesInInterval(start, end); | 122 | const auto occurrences = inc->recurrence()->timesInInterval(start, end); | ||
123 | Incidence::Ptr incidence(inc), lastInc(inc); | 123 | Incidence::Ptr incidence(inc), lastInc(inc); | ||
124 | qint64 offset(0), lastOffset(0); | 124 | qint64 offset(0), lastOffset(0); | ||
125 | QDateTime occurrenceStartDate; | 125 | QDateTime occurrenceStartDate; | ||
126 | for (auto recurrenceId : qAsConst(occurrences)) { | 126 | for (const auto &recurrenceId : qAsConst(occurrences)) { | ||
dvratil: Since you are touching this, should it be `const auto &` for clarity? Also couple more times… | |||||
127 | occurrenceStartDate = recurrenceId; | 127 | occurrenceStartDate = recurrenceId; | ||
128 | 128 | | |||
129 | bool resetIncidence = false; | 129 | bool resetIncidence = false; | ||
130 | if (recurrenceIds.contains(recurrenceId)) { | 130 | if (recurrenceIds.contains(recurrenceId)) { | ||
131 | // TODO: exclude exceptions where the start/end is not within | 131 | // TODO: exclude exceptions where the start/end is not within | ||
132 | // (so the occurrence of the recurrence is omitted, but no exception is added) | 132 | // (so the occurrence of the recurrence is omitted, but no exception is added) | ||
133 | if (recurrenceIds.value(recurrenceId)->status() == Incidence::StatusCanceled) { | 133 | if (recurrenceIds.value(recurrenceId)->status() == Incidence::StatusCanceled) { | ||
134 | continue; | 134 | continue; | ||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |
Since you are touching this, should it be const auto & for clarity? Also couple more times below in this patch.