summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp17
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
@@ -1605,4 +1605,5 @@ void CalendarView::checkExternalId( Incidence * inc )
}
+// SSSSSSSSSSSSSSSSSSSSSS
bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode )
{
@@ -1724,6 +1725,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
qApp->processEvents();
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 ) {
//qDebug("take %d %s ", take, inL->summary().latin1());
@@ -1751,4 +1759,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
int pid = inL->pilotId();
int calID = inL->calID();
+ if ( hasCalId )
+ calID = hasCalId;
local->deleteIncidence( inL );
inL = inR->clone();
@@ -1765,4 +1775,9 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
}
}
+ } else {
+ // take == 0; events equal
+ if ( hasCalId )
+ qDebug("EV EQUALLLL **************************** ");
+
}
} else { // no conflict ********** add or delete remote