author | zautrix <zautrix> | 2005-01-17 12:47:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-17 12:47:46 (UTC) |
commit | 214b82c86bd5365d7a5fc786c8c9c7231ec6dc77 (patch) (side-by-side diff) | |
tree | 9b6052411933ccd1a15428c8f747f0143db4690d /korganizer/calendarview.cpp | |
parent | ba5e5a22ad492f798b2626026cc1838b731e055b (diff) | |
download | kdepimpi-214b82c86bd5365d7a5fc786c8c9c7231ec6dc77.zip kdepimpi-214b82c86bd5365d7a5fc786c8c9c7231ec6dc77.tar.gz kdepimpi-214b82c86bd5365d7a5fc786c8c9c7231ec6dc77.tar.bz2 |
small cal fix
-rw-r--r-- | korganizer/calendarview.cpp | 70 |
1 files changed, 38 insertions, 32 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 685bb60..da1edea 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -926,2 +926,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int int changedRemote = 0; + int filteredIN = 0; + int filteredOUT = 0; //QPtrList<Event> el = local->rawEvents(); @@ -1103,2 +1105,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } + } else { + ++filteredIN; } @@ -1130,39 +1134,41 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int skipIncidence = true; - if ( filterOUT && ! filterOUT->filterCalendarItem( inL ) ){ - skipIncidence = true; - } if ( !skipIncidence ) { inR = remote->incidence( uid ); - if ( ! inR ) { // no conflict ********** add or delete local - if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { - if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { - checkExternSyncEvent(eventLSyncSharp, inL); - local->deleteIncidence( inL ); - ++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 ( ! inR ) { + if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ + // no conflict ********** add or delete local + if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { + if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { + checkExternSyncEvent(eventLSyncSharp, inL); + local->deleteIncidence( inL ); + ++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 ); + } } - } - } else { - if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { - checkExternSyncEvent(eventLSyncSharp, inL); - local->deleteIncidence( inL ); - ++deletedEventL; } else { - if ( ! mSyncManager->mWriteBackExistingOnly ) { - ++addedEventR; - inL->setLastModified( modifiedCalendar ); - inR = inL->clone(); - inR->setIDStr( ":" ); - remote->addIncidence( inR ); + if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { + checkExternSyncEvent(eventLSyncSharp, inL); + local->deleteIncidence( inL ); + ++deletedEventL; + } else { + if ( ! mSyncManager->mWriteBackExistingOnly ) { + ++addedEventR; + inL->setLastModified( modifiedCalendar ); + inR = inL->clone(); + inR->setIDStr( ":" ); + remote->addIncidence( inR ); + } } } + } else { + ++filteredOUT; } @@ -1220,3 +1226,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int QString mes; - mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR ); + mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR, filteredIN, filteredOUT ); QString delmess; |