summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
authorzautrix <zautrix>2005-01-16 11:22:49 (UTC)
committer zautrix <zautrix>2005-01-16 11:22:49 (UTC)
commitd57ed4438bbd6e3d9a7a0e46283d3e7645b4e47b (patch) (side-by-side diff)
tree522438ce187845f6d74d7888be203759138615fa /korganizer/calendarview.cpp
parent92b8de5ff678bddf69b9f0a45c1d90829c50c592 (diff)
downloadkdepimpi-d57ed4438bbd6e3d9a7a0e46283d3e7645b4e47b.zip
kdepimpi-d57ed4438bbd6e3d9a7a0e46283d3e7645b4e47b.tar.gz
kdepimpi-d57ed4438bbd6e3d9a7a0e46283d3e7645b4e47b.tar.bz2
filter impl
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 );
+ }
}
}
}