Skip to content
This repository was archived by the owner on Sep 24, 2023. It is now read-only.

Commit 3bfa59c

Browse files
Fix event filtering
Start date is to be used here, not start and end date. Makes events that start yesterday and end today show up under "yesterday" in the event editor. This was a regression introduced in 5102303. Change-Id: I70d1c5aef1b59bd857f9dc1efb0581ca5c5a72d9 Reviewed-on: https://codereview.kdab.com/25946 Tested-by: Continuous Integration <[email protected]> Reviewed-by: Boyer de la Giroday Michel <[email protected]> Reviewed-by: Frank Osterfeld <[email protected]>
1 parent 66c8468 commit 3bfa59c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Charm/EventModelFilter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ bool EventModelFilter::filterAcceptsRow( int srow, const QModelIndex& sparent )
8484
return false;
8585
}
8686

87-
if ( m_start.isValid() && event.startDateTime().date() < m_start ) {
87+
const auto startDate = event.startDateTime().date();
88+
if ( m_start.isValid() && startDate < m_start ) {
8889
return false;
8990
}
9091

91-
if ( m_end.isValid() && event.endDateTime().date() >= m_end ) {
92+
if ( m_end.isValid() && startDate >= m_end ) {
9293
return false;
9394
}
9495

0 commit comments

Comments
 (0)