Commit 81a19f7b authored by Glen Ditchfield's avatar Glen Ditchfield 🐛 Committed by Glen Ditchfield
Browse files

Toggle completed to-dos back to incomplete

If a non-recurring to-do has been completed, selecting "Toggle To-do
Completed" from its right-click menu does not make it incomplete, because
`Todo::setPercentComplete(0)` is not sufficient.  This patch brute-forces
all completion-related fields.

CCBUG: 397721
parent 30597ac9
Pipeline #69528 passed with stage
in 9 minutes and 36 seconds
......@@ -1338,8 +1338,12 @@ void CalendarView::toggleTodoCompleted(const Akonadi::Item &todoItem)
if (todo->isCompleted()) {
todo->setPercentComplete(0);
todo->setCompleted(false);
todo->setStatus(KCalendarCore::Incidence::StatusNone);
} else {
todo->setPercentComplete(0);
todo->setCompleted(QDateTime::currentDateTime());
todo->setStatus(KCalendarCore::Incidence::StatusCompleted);
}
mChanger->startAtomicOperation(i18n("Toggle To-do Completed"));
......
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