-rw-r--r-- | libkcal/calendarlocal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 18f1af8..418bfca 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -730,49 +730,49 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, | |||
730 | QDate rEnd = event->recurrence()->endDate(); | 730 | QDate rEnd = event->recurrence()->endDate(); |
731 | if ( rEnd >= start && rEnd <= end ) { // End date within range | 731 | if ( rEnd >= start && rEnd <= end ) { // End date within range |
732 | found = true; | 732 | found = true; |
733 | } | 733 | } |
734 | } else { // Duration set | 734 | } else { // Duration set |
735 | // TODO: Calculate end date from duration. Should be done in Event | 735 | // TODO: Calculate end date from duration. Should be done in Event |
736 | // For now include all events with a duration. | 736 | // For now include all events with a duration. |
737 | found = true; | 737 | found = true; |
738 | } | 738 | } |
739 | } | 739 | } |
740 | */ | 740 | */ |
741 | 741 | ||
742 | } | 742 | } |
743 | 743 | ||
744 | if ( found ) eventList.append( event ); | 744 | if ( found ) eventList.append( event ); |
745 | } else { | 745 | } else { |
746 | QDate s = event->dtStart().date(); | 746 | QDate s = event->dtStart().date(); |
747 | QDate e = event->dtEnd().date(); | 747 | QDate e = event->dtEnd().date(); |
748 | 748 | ||
749 | if ( inclusive ) { | 749 | if ( inclusive ) { |
750 | if ( s >= start && e <= end ) { | 750 | if ( s >= start && e <= end ) { |
751 | eventList.append( event ); | 751 | eventList.append( event ); |
752 | } | 752 | } |
753 | } else { | 753 | } else { |
754 | if ( ( s >= start && s <= end ) || ( e >= start && e <= end ) ) { | 754 | if ( ( e >= start && s <= end ) ) { |
755 | eventList.append( event ); | 755 | eventList.append( event ); |
756 | } | 756 | } |
757 | } | 757 | } |
758 | } | 758 | } |
759 | } | 759 | } |
760 | 760 | ||
761 | return eventList; | 761 | return eventList; |
762 | } | 762 | } |
763 | 763 | ||
764 | QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) | 764 | QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) |
765 | { | 765 | { |
766 | return rawEventsForDate( qdt.date() ); | 766 | return rawEventsForDate( qdt.date() ); |
767 | } | 767 | } |
768 | 768 | ||
769 | QPtrList<Event> CalendarLocal::rawEvents() | 769 | QPtrList<Event> CalendarLocal::rawEvents() |
770 | { | 770 | { |
771 | QPtrList<Event> el; | 771 | QPtrList<Event> el; |
772 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 772 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
773 | if ( it->calEnabled() ) el.append( it ); | 773 | if ( it->calEnabled() ) el.append( it ); |
774 | return el; | 774 | return el; |
775 | } | 775 | } |
776 | 776 | ||
777 | bool CalendarLocal::addJournal(Journal *journal) | 777 | bool CalendarLocal::addJournal(Journal *journal) |
778 | { | 778 | { |