summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index a350c3b..7044e90 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1441,7 +1441,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1441 QString idS; 1441 QString idS;
1442 qApp->processEvents(); 1442 qApp->processEvents();
1443 if ( !skipIncidence ) { 1443 if ( !skipIncidence ) {
1444 inL = local->incidence( uid ); 1444 inL = local->incidenceForUid( uid , false );
1445 if ( inL ) { // maybe conflict - same uid in both calendars 1445 if ( inL ) { // maybe conflict - same uid in both calendars
1446 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { 1446 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) {
1447 //qDebug("take %d %s ", take, inL->summary().latin1()); 1447 //qDebug("take %d %s ", take, inL->summary().latin1());
@@ -1464,21 +1464,23 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1464 inR->setPilotId( 2 ); 1464 inR->setPilotId( 2 );
1465 ++changedRemote; 1465 ++changedRemote;
1466 } else {// take remote ********************** 1466 } else {// take remote **********************
1467 idS = inL->IDStr(); 1467 if ( !inL->isReadOnly() ) {
1468 int pid = inL->pilotId(); 1468 idS = inL->IDStr();
1469 int calID = inL->calID(); 1469 int pid = inL->pilotId();
1470 local->deleteIncidence( inL ); 1470 int calID = inL->calID();
1471 inL = inR->clone(); 1471 local->deleteIncidence( inL );
1472 inL->setCalID( calID ); 1472 inL = inR->clone();
1473 if ( mSyncManager->syncWithDesktop() ) 1473 inL->setCalID( calID );
1474 inL->setPilotId( pid ); 1474 if ( mSyncManager->syncWithDesktop() )
1475 inL->setIDStr( idS ); 1475 inL->setPilotId( pid );
1476 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1476 inL->setIDStr( idS );
1477 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1477 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1478 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1478 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1479 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1480 }
1481 local->addIncidence( inL );
1482 ++changedLocal;
1479 } 1483 }
1480 local->addIncidence( inL );
1481 ++changedLocal;
1482 } 1484 }
1483 } 1485 }
1484 } else { // no conflict ********** add or delete remote 1486 } else { // no conflict ********** add or delete remote
@@ -1549,7 +1551,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1549 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) 1551 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID )
1550 skipIncidence = true; 1552 skipIncidence = true;
1551 if ( !skipIncidence ) { 1553 if ( !skipIncidence ) {
1552 inR = remote->incidence( uid ); 1554 inR = remote->incidenceForUid( uid , true );
1553 if ( ! inR ) { 1555 if ( ! inR ) {
1554 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ 1556 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
1555 // no conflict ********** add or delete local 1557 // no conflict ********** add or delete local