Skip to content

Commit

Permalink
Merge branch 'revision' into 'master'
Browse files Browse the repository at this point in the history
[nemo-qml-plugin-calendar] Increase revision of the base event when adding an exception. Contributes to JB#50167

See merge request mer-core/nemo-qml-plugin-calendar!59
  • Loading branch information
chriadam committed Jun 10, 2020
2 parents 32a1bf4 + 6f068d2 commit e6ff685
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/calendarworker.cpp
Expand Up @@ -111,11 +111,15 @@ void CalendarWorker::deleteEvent(const QString &uid, const KDateTime &recurrence
return;

if (event->recurs() && dateTime.isValid()) {
// We're deleting an occurrence from a recurring event.
// No incidence is deleted from the database in that case,
// only the base incidence is modified by adding an exDate.
event->recurrence()->addExDateTime(KDateTime(dateTime, KDateTime::Spec(KDateTime::LocalZone)));
event->setRevision(event->revision() + 1);
} else {
mCalendar->deleteEvent(event);
mExceptionEvents.append(QPair<QString, QDateTime>(uid, dateTime));
}
mExceptionEvents.append(QPair<QString, QDateTime>(uid, dateTime));
}

void CalendarWorker::deleteAll(const QString &uid)
Expand Down

0 comments on commit e6ff685

Please sign in to comment.