-rw-r--r-- | korganizer/calendarview.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 4667918..4e29d6f 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1016,7 +1016,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int //qDebug("take %d %s ", take, inL->summary().latin1()); if ( take == 3 ) return false; - if ( take == 1 ) {// take local + if ( take == 1 ) {// take local ********************** if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); else @@ -1030,7 +1030,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int if ( mSyncManager->syncWithDesktop() ) inR->setPilotId( 2 ); ++changedRemote; - } else { + } else {// take remote ********************** idS = inL->IDStr(); int pid = inL->pilotId(); local->deleteIncidence( inL ); @@ -1046,7 +1046,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int ++changedLocal; } } - } else { // no conflict + } else { // no conflict ********** add or delete remote if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { QString des = eventLSync->description(); QString pref = "e"; @@ -1060,6 +1060,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int inR->setLastModified( modifiedCalendar ); inL = inR->clone(); inL->setIDStr( ":" ); + inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); + inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); local->addIncidence( inL ); ++addedEvent; } @@ -1104,7 +1106,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int skipIncidence = true; if ( !skipIncidence ) { inR = remote->incidence( uid ); - if ( ! inR ) { + if ( ! inR ) { // no conflict ********** add or delete local if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { checkExternSyncEvent(eventLSyncSharp, inL); |