From 3ec18dd19fdf4eb7e763b8022f90de83249facfd Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 22 Oct 2005 16:49:42 +0000 Subject: fixxx --- (limited to 'libkcal/calendarlocal.cpp') diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 1a1c6be..0ddfeca 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -452,7 +452,7 @@ Event *CalendarLocal::event( QString syncProf, QString id ) } Todo *CalendarLocal::todo( const QString &uid ) { - Todo *todo;; + Todo *todo; Todo *retVal = 0; for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { if ( todo->calEnabled() && todo->uid() == uid ) { @@ -467,6 +467,30 @@ Todo *CalendarLocal::todo( const QString &uid ) } return retVal; } +void CalendarLocal::getIncidenceCount( int calId, int& events, int & todos, int & journals) +{ + events = 0; + todos = 0; + journals = 0; + { + Todo *todo; + for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { + if ( todo->calID() == calId ) + ++todos; + } + } + { + Event *todo; + for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { + if ( todo->calID() == calId ) + ++events; + + } + } + for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) + if ( it->calID() == calId ) ++journals; + +} QString CalendarLocal::nextSummary() const { return mNextSummary; -- cgit v0.9.0.2