summaryrefslogtreecommitdiffabout
path: root/libkcal/calendarlocal.cpp
Unidiff
Diffstat (limited to 'libkcal/calendarlocal.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index b02f706..ad8ace3 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -81,5 +81,5 @@ bool CalendarLocal::mergeCalendarFile( QString name )
81} 81}
82 82
83Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckDuplicates) 83Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckDuplicates, bool enabledOnly )
84{ 84{
85 Todo *todo;; 85 Todo *todo;;
@@ -87,4 +87,7 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD
87 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { 87 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
88 if ( todo->uid() == uid ) { 88 if ( todo->uid() == uid ) {
89 if ( enabledOnly )
90 if ( !todo->calEnabled() )
91 continue;
89 if ( doNotCheckDuplicates ) return todo; 92 if ( doNotCheckDuplicates ) return todo;
90 if ( retVal ) { 93 if ( retVal ) {
@@ -101,4 +104,7 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD
101 for ( event = mEventList.first(); event; event = mEventList.next() ) { 104 for ( event = mEventList.first(); event; event = mEventList.next() ) {
102 if ( event->uid() == uid ) { 105 if ( event->uid() == uid ) {
106 if ( enabledOnly )
107 if ( !event->calEnabled() )
108 continue;
103 if ( doNotCheckDuplicates ) return event; 109 if ( doNotCheckDuplicates ) return event;
104 if ( retVal ) { 110 if ( retVal ) {
@@ -114,4 +120,7 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD
114 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) 120 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
115 if ( it->uid() == uid ) { 121 if ( it->uid() == uid ) {
122 if ( enabledOnly )
123 if ( !it->calEnabled() )
124 continue;
116 if ( doNotCheckDuplicates ) return it; 125 if ( doNotCheckDuplicates ) return it;
117 if ( retVal ) { 126 if ( retVal ) {