Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kalendar
Commits
3bb896a6
Commit
3bb896a6
authored
Sep 25, 2022
by
Claudio Cambra
Browse files
Fix sort of overdue tasks, prevent overdue section being split up
Signed-off-by:
Claudio Cambra
<
claudio.cambra@gmail.com
>
parent
1f7d1508
Pipeline
#236786
passed with stage
in 3 minutes and 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/models/todosortfilterproxymodel.cpp
View file @
3bb896a6
...
...
@@ -530,11 +530,15 @@ int TodoSortFilterProxyModel::compareDueDates(const QModelIndex &left, const QMo
}
else
if
(
!
leftIsEmpty
)
{
// Both have due dates
const
auto
leftDateTime
=
leftTodo
->
dtDue
();
const
auto
rightDateTime
=
rightTodo
->
dtDue
();
const
auto
leftOverdue
=
leftTodo
->
isOverdue
();
const
auto
rightOverdue
=
rightTodo
->
isOverdue
();
if
(
leftDateTime
==
rightDateTime
)
{
if
(
leftDateTime
==
rightDateTime
&&
leftOverdue
==
rightOverdue
)
{
return
0
;
}
else
{
}
else
if
(
leftOverdue
==
rightOverdue
)
{
return
leftDateTime
<
rightDateTime
?
-
1
:
1
;
}
else
{
return
leftOverdue
?
-
1
:
1
;
}
}
else
{
// Neither has a due date
return
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment