summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
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
@@ -1443,3 +1443,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( !skipIncidence ) {
- inL = local->incidence( uid );
+ inL = local->incidenceForUid( uid , false );
if ( inL ) { // maybe conflict - same uid in both calendars
@@ -1466,17 +1466,19 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
} else {// take remote **********************
- idS = inL->IDStr();
- int pid = inL->pilotId();
- int calID = inL->calID();
- local->deleteIncidence( inL );
- inL = inR->clone();
- inL->setCalID( calID );
- if ( mSyncManager->syncWithDesktop() )
- inL->setPilotId( pid );
- inL->setIDStr( idS );
- if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
- inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
- inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
+ if ( !inL->isReadOnly() ) {
+ idS = inL->IDStr();
+ int pid = inL->pilotId();
+ int calID = inL->calID();
+ local->deleteIncidence( inL );
+ inL = inR->clone();
+ inL->setCalID( calID );
+ if ( mSyncManager->syncWithDesktop() )
+ inL->setPilotId( pid );
+ inL->setIDStr( idS );
+ if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
+ inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
+ inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
+ }
+ local->addIncidence( inL );
+ ++changedLocal;
}
- local->addIncidence( inL );
- ++changedLocal;
}
@@ -1551,3 +1553,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( !skipIncidence ) {
- inR = remote->incidence( uid );
+ inR = remote->incidenceForUid( uid , true );
if ( ! inR ) {