-rw-r--r-- | libkcal/calendarlocal.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index e75154b..0eba6a9 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -574,33 +574,32 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) | |||
574 | sortEvent = eventListSorted.first(); | 574 | sortEvent = eventListSorted.first(); |
575 | int i = 0; | 575 | int i = 0; |
576 | while ( sortEvent && event->dtStart().time()>=sortEvent->dtStart().time() ) | 576 | while ( sortEvent && event->dtStart().time()>=sortEvent->dtStart().time() ) |
577 | { | 577 | { |
578 | i++; | 578 | i++; |
579 | sortEvent = eventListSorted.next(); | 579 | sortEvent = eventListSorted.next(); |
580 | } | 580 | } |
581 | eventListSorted.insert( i, event ); | 581 | eventListSorted.insert( i, event ); |
582 | } | 582 | } |
583 | return eventListSorted; | 583 | return eventListSorted; |
584 | } | 584 | } |
585 | 585 | ||
586 | 586 | ||
587 | QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, | 587 | QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, |
588 | bool inclusive ) | 588 | bool inclusive ) |
589 | { | 589 | { |
590 | qDebug("CalendarLocal::rawEvents called "); | ||
591 | Event *event = 0; | 590 | Event *event = 0; |
592 | 591 | ||
593 | QPtrList<Event> eventList; | 592 | QPtrList<Event> eventList; |
594 | 593 | ||
595 | // Get non-recurring events | 594 | // Get non-recurring events |
596 | for( event = mEventList.first(); event; event = mEventList.next() ) { | 595 | for( event = mEventList.first(); event; event = mEventList.next() ) { |
597 | if ( event->doesRecur() ) { | 596 | if ( event->doesRecur() ) { |
598 | QDate rStart = event->dtStart().date(); | 597 | QDate rStart = event->dtStart().date(); |
599 | bool found = false; | 598 | bool found = false; |
600 | if ( inclusive ) { | 599 | if ( inclusive ) { |
601 | if ( rStart >= start && rStart <= end ) { | 600 | if ( rStart >= start && rStart <= end ) { |
602 | // Start date of event is in range. Now check for end date. | 601 | // Start date of event is in range. Now check for end date. |
603 | // if duration is negative, event recurs forever, so do not include it. | 602 | // if duration is negative, event recurs forever, so do not include it. |
604 | if ( event->recurrence()->duration() == 0 ) { // End date set | 603 | if ( event->recurrence()->duration() == 0 ) { // End date set |
605 | QDate rEnd = event->recurrence()->endDate(); | 604 | QDate rEnd = event->recurrence()->endDate(); |
606 | if ( rEnd >= start && rEnd <= end ) { // End date within range | 605 | if ( rEnd >= start && rEnd <= end ) { // End date within range |