-rw-r--r-- | libkcal/calendar.h | 2 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 11 | ||||
-rw-r--r-- | libkcal/calendarlocal.h | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 66836a1..f301768 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -79,3 +79,3 @@ public: virtual bool mergeCalendarFile( QString name ) = 0; - virtual Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates ) = 0; + virtual Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates , bool enabledOnly = false ) = 0; virtual void setSyncEventsReadOnly() = 0; diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index b02f706..ad8ace3 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -82,3 +82,3 @@ bool CalendarLocal::mergeCalendarFile( QString name ) -Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckDuplicates) +Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckDuplicates, bool enabledOnly ) { @@ -88,2 +88,5 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD if ( todo->uid() == uid ) { + if ( enabledOnly ) + if ( !todo->calEnabled() ) + continue; if ( doNotCheckDuplicates ) return todo; @@ -102,2 +105,5 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD if ( event->uid() == uid ) { + if ( enabledOnly ) + if ( !event->calEnabled() ) + continue; if ( doNotCheckDuplicates ) return event; @@ -115,2 +121,5 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD if ( it->uid() == uid ) { + if ( enabledOnly ) + if ( !it->calEnabled() ) + continue; if ( doNotCheckDuplicates ) return it; diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index b70f0c9..b611704 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h @@ -49,3 +49,3 @@ class CalendarLocal : public Calendar bool mergeCalendar( Calendar* cal ); - Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates ); + Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates, bool enabledOnly = false ); void setSyncEventsReadOnly(); |