summaryrefslogtreecommitdiffabout
path: root/libkcal/calendarlocal.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/calendarlocal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 21b4aaf..3f46d53 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -221,7 +221,28 @@ Todo *CalendarLocal::todo( QString syncProf, QString id )
return 0;
}
-
+void CalendarLocal::removeSyncInfo( QString syncProfile)
+{
+ QPtrList<Incidence> all = rawIncidences() ;
+ Incidence *inc;
+ for ( inc = all.first(); inc; inc = all.next() ) {
+ inc->removeID( syncProfile );
+ }
+ if ( syncProfile.isEmpty() ) {
+ QPtrList<Event> el;
+ Event *todo;
+ for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
+ if ( todo->uid().left( 15 ) == QString("last-syncEvent-") )
+ el.append( todo );
+ }
+ for ( todo = el.first(); todo; todo = el.next() ) {
+ deleteIncidence ( todo );
+ }
+ } else {
+ Event *lse = event( "last-syncEvent-"+ syncProfile);
+ deleteIncidence ( lse );
+ }
+}
QPtrList<Event> CalendarLocal::getExternLastSyncEvents()
{
QPtrList<Event> el;