Commit 68507724 authored by Igor Poboiko's avatar Igor Poboiko
Browse files

[TodoView] Use parents collection when creating a subtodo

Summary:
When creating a subtodo of an existing task, it should belong to the same collection.

Apparenly, there was a typo: parent collection was determined, but not passed to `createIncidence` call.
Just fix it.

Test Plan:
1) Open KOrganizer todo list, select an existing todo
2) Enter new todo description in the text widget below the list, press Ctrl+Enter
3) (without patch) It asks for a collection despite attempting to create a sub-todo
4) (with patch) A sub-todo gets created in the same collection

Reviewers: dvratil

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D28434
parent 3582ee48
......@@ -682,7 +682,7 @@ void TodoView::addTodo(const QString &summary, const Akonadi::Item &parentItem,
collection = calendar()->collection(parentItem.storageCollectionId());
}
changer()->createIncidence(todo, Akonadi::Collection(), this);
changer()->createIncidence(todo, collection, this);
}
void TodoView::addQuickTodo(Qt::KeyboardModifiers modifiers)
......
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