summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-11-28 01:23:02 (UTC)
committer zautrix <zautrix>2005-11-28 01:23:02 (UTC)
commite08811c2246f63b2b63f9db6b65701344460f3d7 (patch) (side-by-side diff)
treed450f486a9472d80eb86f605237b828a0e7ffae6 /korganizer
parent854d4a0c686962cd73ac7418b5fbf4b2d73adab7 (diff)
downloadkdepimpi-e08811c2246f63b2b63f9db6b65701344460f3d7.zip
kdepimpi-e08811c2246f63b2b63f9db6b65701344460f3d7.tar.gz
kdepimpi-e08811c2246f63b2b63f9db6b65701344460f3d7.tar.bz2
ync
Diffstat (limited to 'korganizer') (more/less context) (show 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
@@ -1604,6 +1604,7 @@ void CalendarView::checkExternalId( Incidence * inc )
checkExternSyncEvent( lastSync, inc );
}
+// SSSSSSSSSSSSSSSSSSSSSS
bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode )
{
@@ -1723,8 +1724,15 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
QString idS;
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());
if ( take == 3 )
@@ -1750,6 +1758,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
idS = inL->IDStr();
int pid = inL->pilotId();
int calID = inL->calID();
+ if ( hasCalId )
+ calID = hasCalId;
local->deleteIncidence( inL );
inL = inR->clone();
inL->setCalID_block( calID );
@@ -1764,6 +1774,11 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
++changedLocal;
}
}
+ } else {
+ // take == 0; events equal
+ if ( hasCalId )
+ qDebug("EV EQUALLLL **************************** ");
+
}
} else { // no conflict ********** add or delete remote
if ( !filterIN || filterIN->filterCalendarItem( inR ) ){