summaryrefslogtreecommitdiffabout
path: root/libkcal
Side-by-side diff
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.h1
-rw-r--r--libkcal/calendarlocal.cpp16
-rw-r--r--libkcal/calendarlocal.h1
3 files changed, 16 insertions, 2 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 4b8b3ff..0a94914 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -81,2 +81,3 @@ public:
virtual void setSyncEventsReadOnly() = 0;
+ virtual void setSyncEventsEnabled() = 0;
virtual void stopAllTodos() = 0;
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 0ddfeca..45e3128 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -175,3 +175,3 @@ bool CalendarLocal::addCalendarFile( QString name, int id )
}
-void CalendarLocal::setSyncEventsReadOnly()
+void CalendarLocal::setSyncEventsEnabled()
{
@@ -181,3 +181,15 @@ void CalendarLocal::setSyncEventsReadOnly()
if ( ev->uid().left(15) == QString("last-syncEvent-") )
- ev->setReadOnly( true );
+ ev->setCalEnabled( true );
+ ev = mEventList.next();
+ }
+}
+void CalendarLocal::setSyncEventsReadOnly()
+{
+ Event * ev;
+ ev = mEventList.first();
+ while ( ev ) {
+ if ( ev->uid().left(15) == QString("last-syncEvent-") ) {
+ ev->setReadOnly( true );
+ ev->setCalID( 1 );
+ }
ev = mEventList.next();
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index ca0bd98..eb7bf34 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -51,2 +51,3 @@ class CalendarLocal : public Calendar
void setSyncEventsReadOnly();
+ void setSyncEventsEnabled();
void stopAllTodos();