-rw-r--r-- | korganizer/calendarview.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 8d024c1..1800cf2 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1606,2 +1606,3 @@ void CalendarView::checkExternalId( Incidence * inc ) } +// SSSSSSSSSSSSSSSSSSSSSS bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) @@ -1725,4 +1726,11 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int if ( !skipIncidence ) { - inL = local->incidenceForUid( uid , false , true ); + int hasCalId = 0; + inL = local->incidenceForUid( uid , false , true, &hasCalId ); + if ( hasCalId && !inL ) + inL = local->incidenceForUid( uid , false , true, &hasCalId ); + else + hasCalId = 0; if ( inL ) { // maybe conflict - same uid in both calendars + if ( hasCalId ) + qDebug("KO: Cal id %d conflict detected: %s ", hasCalId, inL->summary().latin1()); if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { @@ -1752,2 +1760,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int int calID = inL->calID(); + if ( hasCalId ) + calID = hasCalId; local->deleteIncidence( inL ); @@ -1766,2 +1776,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } + } else { + // take == 0; events equal + if ( hasCalId ) + qDebug("EV EQUALLLL **************************** "); + } |