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.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
//remote->deleteIncidence( inR );
++deletedEventR;
} else {
- inR->setLastModified( modifiedCalendar );
- inL = inR->clone();
- inL->setIDStr( ":" );
- inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
- inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
- local->addIncidence( inL );
- ++addedEvent;
+ if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
+ inR->setLastModified( modifiedCalendar );
+ inL = inR->clone();
+ inL->setIDStr( ":" );
+ inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
+ inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
+ local->addIncidence( inL );
+ ++addedEvent;
+ }
}
} else {
if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) {
- inR->setLastModified( modifiedCalendar );
- inL = inR->clone();
- inL->setIDStr( ":" );
- local->addIncidence( inL );
- ++addedEvent;
+ if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
+ inR->setLastModified( modifiedCalendar );
+ inL = inR->clone();
+ inL->setIDStr( ":" );
+ local->addIncidence( inL );
+ ++addedEvent;
+ }
} else {
checkExternSyncEvent(eventRSyncSharp, inR);
remote->deleteIncidence( inR );
@@ -1134,14 +1138,16 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
++deletedEventL;
} else {
if ( ! mSyncManager->mWriteBackExistingOnly ) {
- inL->removeID(mCurrentSyncDevice );
- ++addedEventR;
- //qDebug("remote added Incidence %s ", inL->summary().latin1());
- inL->setLastModified( modifiedCalendar );
- inR = inL->clone();
- inR->setIDStr( ":" );
- inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
- remote->addIncidence( inR );
+ if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
+ inL->removeID(mCurrentSyncDevice );
+ ++addedEventR;
+ //qDebug("remote added Incidence %s ", inL->summary().latin1());
+ inL->setLastModified( modifiedCalendar );
+ inR = inL->clone();
+ inR->setIDStr( ":" );
+ inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
+ remote->addIncidence( inR );
+ }
}
}
} else {
@@ -1151,11 +1157,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
++deletedEventL;
} else {
if ( ! mSyncManager->mWriteBackExistingOnly ) {
- ++addedEventR;
- inL->setLastModified( modifiedCalendar );
- inR = inL->clone();
- inR->setIDStr( ":" );
- remote->addIncidence( inR );
+ if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
+ ++addedEventR;
+ inL->setLastModified( modifiedCalendar );
+ inR = inL->clone();
+ inR->setIDStr( ":" );
+ remote->addIncidence( inR );
+ }
}
}
}