-rw-r--r-- | libkcal/calendar.cpp | 16 | ||||
-rw-r--r-- | libkcal/calendar.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index a3977d7..eeb5f48 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -245,12 +245,28 @@ QPtrList<Incidence> Calendar::incidences() QPtrList<Journal> j = journals(); for( i = j.first(); i; i = j.next() ) incidences.append( i ); return incidences; } + +void Calendar::resetPilotStat() +{ + QPtrList<Incidence> incidences; + + Incidence *i; + + QPtrList<Event> e = rawEvents(); + for( i = e.first(); i; i = e.next() ) i->setPilotId( 0 ); + + QPtrList<Todo> t = rawTodos(); + for( i = t.first(); i; i = t.next() ) i->setPilotId( 0 ); + + QPtrList<Journal> j = journals(); + for( i = j.first(); i; i = j.next() ) i->setPilotId( 0 ); +} void Calendar::resetTempSyncStat() { QPtrList<Incidence> incidences; Incidence *i; diff --git a/libkcal/calendar.h b/libkcal/calendar.h index c45d81f..d5294eb 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -64,12 +64,13 @@ class Calendar : public QObject, public CustomProperties, public: Calendar(); Calendar(const QString &timeZoneId); virtual ~Calendar(); void deleteIncidence(Incidence *in); void resetTempSyncStat(); + void resetPilotStat(); /** Clears out the current calendar, freeing all used memory etc. */ virtual void close() = 0; /** |