Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit af23ae70 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[EventDataVisitor] Place events without start date at end date

This avoids an infinite loop.
Thanks Dmitry Nezhevenko for investigating.

CHANGELOG: Fixed an issue that would cause Plasma to freeze when there was an agenda item with no start date in the calendar

BUG: 367541

Differential Revision: https://phabricator.kde.org/D9811
parent 06eee4c6
......@@ -170,6 +170,13 @@ void EventDataVisitor::insertResult(const CalendarEvents::EventData &result)
{
QDate d = result.startDateTime().date();
const QDate end = result.endDateTime().date();
// Agenda without start date will be placed at the end (due) date
if (!d.isValid()) {
mResults.insert(end, result);
return;
}
while (d <= end) {
mResults.insert(d, result);
d = d.addDays(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment