Commit 5a02a1c1 authored by Glen Ditchfield's avatar Glen Ditchfield 🐛 Committed by David Faure
Browse files

Fix crash when creating all-day to-dos

Creating all-day to-dos by right-clicking in the month view or in the
all-day area of the agenda view caused an assertion failure, "editor
shouldn't be dirty", because the timeSpec of an all-day event is not
rigorously defined.  This patch codes around the problem and imitates
the "dirty" logic for events.

parent ba964b3b
Pipeline #159211 passed with stage
in 1 minute and 7 seconds
......@@ -437,17 +437,16 @@ bool IncidenceDateTime::isDirty(const KCalendarCore::Todo::Ptr &todo) const
return true;
if (mUi->mStartCheck->isChecked()) {
// Use mActiveStartTime. This is the QTimeZone selected on load coming from
// the combobox. We use this one as it can slightly differ (e.g. missing
// country code in the incidence time spec) from the incidence.
if (!identical(currentStartDateTime(), mInitialStartDT)) {
if (todo->allDay()) {
if ((mUi->mStartCheck->isChecked() && mUi->mStartDateEdit->date() !=
|| (mUi->mEndCheck->isChecked() && mUi->mEndDateEdit->date() != {
return true;
} else {
if ((mUi->mStartCheck->isChecked() &&!identical(currentStartDateTime(), mInitialStartDT))
|| (mUi->mEndCheck->isChecked() && !identical(currentEndDateTime(), mInitialEndDT))) {
return true;
if (mUi->mEndCheck->isChecked() && !identical(currentEndDateTime(), mInitialEndDT)) {
return true;
return false;
Supports Markdown
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