-rw-r--r-- | libkcal/calendarlocal.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 418bfca..ca64e66 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -776,12 +776,7 @@ QPtrList<Event> CalendarLocal::rawEvents() | |||
776 | 776 | ||
777 | bool CalendarLocal::addJournal(Journal *journal) | 777 | bool CalendarLocal::addJournal(Journal *journal) |
778 | { | 778 | { |
779 | if ( journal->dtStart().isValid()) | 779 | mJournalList.append(journal); |
780 | kdDebug(5800) << "Adding Journal on " << journal->dtStart().toString() << endl; | ||
781 | else | ||
782 | kdDebug(5800) << "Adding Journal without a DTSTART" << endl; | ||
783 | |||
784 | mJournalList.append(journal); | ||
785 | 780 | ||
786 | journal->registerObserver( this ); | 781 | journal->registerObserver( this ); |
787 | 782 | ||
@@ -801,6 +796,13 @@ void CalendarLocal::deleteJournal( Journal *journal ) | |||
801 | } | 796 | } |
802 | } | 797 | } |
803 | 798 | ||
799 | QPtrList<Journal> CalendarLocal::journals4Date( const QDate & date ) | ||
800 | { | ||
801 | QPtrList<Journal> el; | ||
802 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | ||
803 | if ( it->calEnabled() && it->dtStart().date() == date) el.append( it ); | ||
804 | return el; | ||
805 | } | ||
804 | Journal *CalendarLocal::journal( const QDate &date ) | 806 | Journal *CalendarLocal::journal( const QDate &date ) |
805 | { | 807 | { |
806 | // kdDebug(5800) << "CalendarLocal::journal() " << date.toString() << endl; | 808 | // kdDebug(5800) << "CalendarLocal::journal() " << date.toString() << endl; |