summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 258bd43..94cc97d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -739,5 +739,5 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b
} else {
if ( locCh ) {
- qDebug("loc changed %d", local->revision() );
+ qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1());
lastSync = local->lastModified().addDays( -1 );
if ( !remCh )
@@ -787,5 +787,5 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b
int result;
bool localIsNew;
- qDebug("mLastCalendarSync %s lastsync %s --- local %s remote %s ",mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() );
+ //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() );
if ( full && mode < SYNC_PREF_NEWEST )
@@ -1031,5 +1031,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( inL->revision() < maxrev )
inL->setRevision( maxrev );
- remote->addIncidence( inL->clone() );
+ inR = inL->clone();
+ inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
+ remote->addIncidence( inR );
++changedRemote;
} else {
@@ -1053,5 +1055,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
} else {
inR->setLastModified( modifiedCalendar );
- local->addIncidence( inR->clone() );
+ inL = inR->clone();
+ local->addIncidence( inL );
++addedEvent;
}
@@ -1104,6 +1107,9 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
inL->removeID(mCurrentSyncDevice );
++addedEventR;
+ qDebug("remote added Incidence %s ", inL->summary().latin1());
inL->setLastModified( modifiedCalendar );
- remote->addIncidence( inL->clone() );
+ inR = inL->clone();
+ inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
+ remote->addIncidence( inR );
}
}