Commit 533cde2d authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Fix possible assert fail in TodoSortFilterProxyModel

parent 939d249b
Pipeline #100995 passed with stage
in 6 minutes and 26 seconds
......@@ -364,7 +364,8 @@ bool TodoSortFilterProxyModel::lessThan(const QModelIndex &left, const QModelInd
// To-dos without due date should appear last when sorting ascending,
// so you can see the most urgent tasks first. (bug #174763)
if (right.column() == TodoModel::DueDateColumn) {
const int comparison = compareDueDates(left, right);
QModelIndex leftDueDateIndex = left.sibling(left.row(), TodoModel::DueDateColumn); // Prevent possible assert fail
const int comparison = compareDueDates(leftDueDateIndex, right);
if (comparison != 0) {
return comparison == -1;
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