Commit cbd43d44 authored by Volker Krause's avatar Volker Krause
Browse files

Set a sensible default length for events without an end time

Fixes generation of 0-length ical events in that case.
parent a092e5fc
......@@ -348,7 +348,11 @@ static void fillEvent(const KItinerary::Event &ev, const KCalCore::Event::Ptr &e
event->setLocation(location.name());
fillGeoPosition(location, event);
event->setDtStart(ev.startDate());
event->setDtEnd(ev.endDate());
if (ev.endDate().isValid()) {
event->setDtEnd(ev.endDate());
} else {
event->setDtEnd(ev.startDate().addSecs(3600));
}
event->setAllDay(false);
if (ev.doorTime().isValid()) {
......
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