summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp71
1 files changed, 35 insertions, 36 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 02c5e45..685bb60 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1069,13 +1069,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
} else { // no conflict ********** add or delete remote
- if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
- QString des = eventLSync->description();
- QString pref = "e";
- if ( inR->type() == "Todo" )
- pref = "t";
- if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
- inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE );
- //remote->deleteIncidence( inR );
- ++deletedEventR;
- } else {
- if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
+ if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
+ if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
+ QString des = eventLSync->description();
+ QString pref = "e";
+ if ( inR->type() == "Todo" )
+ pref = "t";
+ if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
+ inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE );
+ //remote->deleteIncidence( inR );
+ ++deletedEventR;
+ } else {
inR->setLastModified( modifiedCalendar );
@@ -1087,7 +1087,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
++addedEvent;
+
}
- }
- } else {
- if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) {
- if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
+ } else {
+ if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) {
inR->setLastModified( modifiedCalendar );
@@ -1097,7 +1096,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
++addedEvent;
+
+ } else {
+ checkExternSyncEvent(eventRSyncSharp, inR);
+ remote->deleteIncidence( inR );
+ ++deletedEventR;
}
- } else {
- checkExternSyncEvent(eventRSyncSharp, inR);
- remote->deleteIncidence( inR );
- ++deletedEventR;
}
@@ -1130,2 +1130,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
skipIncidence = true;
+ if ( filterOUT && ! filterOUT->filterCalendarItem( inL ) ){
+ skipIncidence = true;
+ }
if ( !skipIncidence ) {
@@ -1140,12 +1143,10 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( ! mSyncManager->mWriteBackExistingOnly ) {
- 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 );
- }
+ 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 );
}
@@ -1159,9 +1160,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( ! mSyncManager->mWriteBackExistingOnly ) {
- if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
- ++addedEventR;
- inL->setLastModified( modifiedCalendar );
- inR = inL->clone();
- inR->setIDStr( ":" );
- remote->addIncidence( inR );
- }
+ ++addedEventR;
+ inL->setLastModified( modifiedCalendar );
+ inR = inL->clone();
+ inR->setIDStr( ":" );
+ remote->addIncidence( inR );
}