-rw-r--r-- | korganizer/calendarview.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 02c5e45..685bb60 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1067,6 +1067,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } } } else { // no conflict ********** add or delete remote + if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { QString des = eventLSync->description(); QString pref = "e"; @@ -1077,7 +1078,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int //remote->deleteIncidence( inR ); ++deletedEventR; } else { - if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ inR->setLastModified( modifiedCalendar ); inL = inR->clone(); inL->setIDStr( ":" ); @@ -1085,17 +1085,16 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); local->addIncidence( inL ); ++addedEvent; - } + } } else { if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { - if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ inR->setLastModified( modifiedCalendar ); inL = inR->clone(); inL->setIDStr( ":" ); local->addIncidence( inL ); ++addedEvent; - } + } else { checkExternSyncEvent(eventRSyncSharp, inR); remote->deleteIncidence( inR ); @@ -1104,6 +1103,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } } } + } inR = er.next(); } QPtrList<Incidence> el = local->rawIncidences(); @@ -1128,6 +1128,9 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int skipIncidence = true; if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->type() == "Journal" ) skipIncidence = true; + if ( filterOUT && ! filterOUT->filterCalendarItem( inL ) ){ + skipIncidence = true; + } if ( !skipIncidence ) { inR = remote->incidence( uid ); if ( ! inR ) { // no conflict ********** add or delete local @@ -1138,7 +1141,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int ++deletedEventL; } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { - if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ inL->removeID(mCurrentSyncDevice ); ++addedEventR; //qDebug("remote added Incidence %s ", inL->summary().latin1()); @@ -1149,7 +1151,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int remote->addIncidence( inR ); } } - } } else { if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { checkExternSyncEvent(eventLSyncSharp, inL); @@ -1157,7 +1158,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int ++deletedEventL; } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { - if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ ++addedEventR; inL->setLastModified( modifiedCalendar ); inR = inL->clone(); @@ -1168,7 +1168,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } } } - } inL = el.next(); } int delFut = 0; |