summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp58
1 files changed, 33 insertions, 25 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 8258c74..02c5e45 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1077,21 +1077,25 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1077 //remote->deleteIncidence( inR ); 1077 //remote->deleteIncidence( inR );
1078 ++deletedEventR; 1078 ++deletedEventR;
1079 } else { 1079 } else {
1080 inR->setLastModified( modifiedCalendar ); 1080 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
1081 inL = inR->clone(); 1081 inR->setLastModified( modifiedCalendar );
1082 inL->setIDStr( ":" ); 1082 inL = inR->clone();
1083 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1083 inL->setIDStr( ":" );
1084 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1084 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1085 local->addIncidence( inL ); 1085 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1086 ++addedEvent; 1086 local->addIncidence( inL );
1087 ++addedEvent;
1088 }
1087 } 1089 }
1088 } else { 1090 } else {
1089 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { 1091 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) {
1090 inR->setLastModified( modifiedCalendar ); 1092 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
1091 inL = inR->clone(); 1093 inR->setLastModified( modifiedCalendar );
1092 inL->setIDStr( ":" ); 1094 inL = inR->clone();
1093 local->addIncidence( inL ); 1095 inL->setIDStr( ":" );
1094 ++addedEvent; 1096 local->addIncidence( inL );
1097 ++addedEvent;
1098 }
1095 } else { 1099 } else {
1096 checkExternSyncEvent(eventRSyncSharp, inR); 1100 checkExternSyncEvent(eventRSyncSharp, inR);
1097 remote->deleteIncidence( inR ); 1101 remote->deleteIncidence( inR );
@@ -1134,14 +1138,16 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1134 ++deletedEventL; 1138 ++deletedEventL;
1135 } else { 1139 } else {
1136 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1140 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1137 inL->removeID(mCurrentSyncDevice ); 1141 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
1138 ++addedEventR; 1142 inL->removeID(mCurrentSyncDevice );
1139 //qDebug("remote added Incidence %s ", inL->summary().latin1()); 1143 ++addedEventR;
1140 inL->setLastModified( modifiedCalendar ); 1144 //qDebug("remote added Incidence %s ", inL->summary().latin1());
1141 inR = inL->clone(); 1145 inL->setLastModified( modifiedCalendar );
1142 inR->setIDStr( ":" ); 1146 inR = inL->clone();
1143 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1147 inR->setIDStr( ":" );
1144 remote->addIncidence( inR ); 1148 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1149 remote->addIncidence( inR );
1150 }
1145 } 1151 }
1146 } 1152 }
1147 } else { 1153 } else {
@@ -1151,11 +1157,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1151 ++deletedEventL; 1157 ++deletedEventL;
1152 } else { 1158 } else {
1153 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1159 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1154 ++addedEventR; 1160 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
1155 inL->setLastModified( modifiedCalendar ); 1161 ++addedEventR;
1156 inR = inL->clone(); 1162 inL->setLastModified( modifiedCalendar );
1157 inR->setIDStr( ":" ); 1163 inR = inL->clone();
1158 remote->addIncidence( inR ); 1164 inR->setIDStr( ":" );
1165 remote->addIncidence( inR );
1166 }
1159 } 1167 }
1160 } 1168 }
1161 } 1169 }