File place-events-without-start-at-end.patch of Package kdepim-addons.8020
From af23ae70e47d9d7e93c013d107397999df0ecb56 Mon Sep 17 00:00:00 2001
From: Kai Uwe Broulik <kde@privat.broulik.de>
Date: Thu, 11 Jan 2018 13:00:58 +0100
Subject: [PATCH] [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
---
plugins/plasma/pimeventsplugin/eventdatavisitor.cpp | 7 +++++++
1 file changed, 7 insertions(+)
Index: kdepim-addons-17.04.2/plugins/plasma/pimeventsplugin/eventdatavisitor.cpp
===================================================================
--- kdepim-addons-17.04.2.orig/plugins/plasma/pimeventsplugin/eventdatavisitor.cpp
+++ kdepim-addons-17.04.2/plugins/plasma/pimeventsplugin/eventdatavisitor.cpp
@@ -175,6 +175,13 @@ void EventDataVisitor::insertResult(cons
{
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);