summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-01-16 12:04:50 (UTC)
committer zautrix <zautrix>2005-01-16 12:04:50 (UTC)
commitf3f63a1a1363cba9f58790812e43d6eda14f733c (patch) (side-by-side diff)
tree009a8e73b8e79bbd9d153a9cf17f258c60488fb2 /korganizer
parentd57ed4438bbd6e3d9a7a0e46283d3e7645b4e47b (diff)
downloadkdepimpi-f3f63a1a1363cba9f58790812e43d6eda14f733c.zip
kdepimpi-f3f63a1a1363cba9f58790812e43d6eda14f733c.tar.gz
kdepimpi-f3f63a1a1363cba9f58790812e43d6eda14f733c.tar.bz2
filter fix
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp15
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
@@ -1066,8 +1066,9 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
++changedLocal;
}
}
} else { // no conflict ********** add or delete remote
+ if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
QString des = eventLSync->description();
QString pref = "e";
if ( inR->type() == "Todo" )
@@ -1076,35 +1077,34 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE );
//remote->deleteIncidence( inR );
++deletedEventR;
} else {
- 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 ) {
- if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
inR->setLastModified( modifiedCalendar );
inL = inR->clone();
inL->setIDStr( ":" );
local->addIncidence( inL );
++addedEvent;
- }
+
} else {
checkExternSyncEvent(eventRSyncSharp, inR);
remote->deleteIncidence( inR );
++deletedEventR;
}
}
}
}
+ }
inR = er.next();
}
QPtrList<Incidence> el = local->rawIncidences();
inL = el.first();
@@ -1127,8 +1127,11 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( uid.left(15) == QString("last-syncEvent-") )
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
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
@@ -1137,9 +1140,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
local->deleteIncidence( inL );
++deletedEventL;
} else {
if ( ! mSyncManager->mWriteBackExistingOnly ) {
- if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
inL->removeID(mCurrentSyncDevice );
++addedEventR;
//qDebug("remote added Incidence %s ", inL->summary().latin1());
inL->setLastModified( modifiedCalendar );
@@ -1148,17 +1150,15 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
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 ) {
- if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
++addedEventR;
inL->setLastModified( modifiedCalendar );
inR = inL->clone();
inR->setIDStr( ":" );
@@ -1167,9 +1167,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
}
}
}
}
- }
inL = el.next();
}
int delFut = 0;
int remRem = 0;