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) (unidiff)
tree009a8e73b8e79bbd9d153a9cf17f258c60488fb2 /korganizer
parentd57ed4438bbd6e3d9a7a0e46283d3e7645b4e47b (diff)
downloadkdepimpi-f3f63a1a1363cba9f58790812e43d6eda14f733c.zip
kdepimpi-f3f63a1a1363cba9f58790812e43d6eda14f733c.tar.gz
kdepimpi-f3f63a1a1363cba9f58790812e43d6eda14f733c.tar.bz2
filter fix
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
1069 } else { // no conflict ********** add or delete remote 1069 } else { // no conflict ********** add or delete remote
1070 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1070 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
1071 QString des = eventLSync->description(); 1071 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1072 QString pref = "e"; 1072 QString des = eventLSync->description();
1073 if ( inR->type() == "Todo" ) 1073 QString pref = "e";
1074 pref = "t"; 1074 if ( inR->type() == "Todo" )
1075 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 1075 pref = "t";
1076 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 1076 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
1077 //remote->deleteIncidence( inR ); 1077 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE );
1078 ++deletedEventR; 1078 //remote->deleteIncidence( inR );
1079 } else { 1079 ++deletedEventR;
1080 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ 1080 } else {
1081 inR->setLastModified( modifiedCalendar ); 1081 inR->setLastModified( modifiedCalendar );
@@ -1087,7 +1087,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1087 ++addedEvent; 1087 ++addedEvent;
1088
1088 } 1089 }
1089 } 1090 } else {
1090 } else { 1091 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) {
1091 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) {
1092 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
1093 inR->setLastModified( modifiedCalendar ); 1092 inR->setLastModified( modifiedCalendar );
@@ -1097,7 +1096,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1097 ++addedEvent; 1096 ++addedEvent;
1097
1098 } else {
1099 checkExternSyncEvent(eventRSyncSharp, inR);
1100 remote->deleteIncidence( inR );
1101 ++deletedEventR;
1098 } 1102 }
1099 } else {
1100 checkExternSyncEvent(eventRSyncSharp, inR);
1101 remote->deleteIncidence( inR );
1102 ++deletedEventR;
1103 } 1103 }
@@ -1130,2 +1130,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1130 skipIncidence = true; 1130 skipIncidence = true;
1131 if ( filterOUT && ! filterOUT->filterCalendarItem( inL ) ){
1132 skipIncidence = true;
1133 }
1131 if ( !skipIncidence ) { 1134 if ( !skipIncidence ) {
@@ -1140,12 +1143,10 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1140 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1143 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1141 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ 1144 inL->removeID(mCurrentSyncDevice );
1142 inL->removeID(mCurrentSyncDevice ); 1145 ++addedEventR;
1143 ++addedEventR; 1146 //qDebug("remote added Incidence %s ", inL->summary().latin1());
1144 //qDebug("remote added Incidence %s ", inL->summary().latin1()); 1147 inL->setLastModified( modifiedCalendar );
1145 inL->setLastModified( modifiedCalendar ); 1148 inR = inL->clone();
1146 inR = inL->clone(); 1149 inR->setIDStr( ":" );
1147 inR->setIDStr( ":" ); 1150 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1148 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1151 remote->addIncidence( inR );
1149 remote->addIncidence( inR );
1150 }
1151 } 1152 }
@@ -1159,9 +1160,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1159 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1160 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1160 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ 1161 ++addedEventR;
1161 ++addedEventR; 1162 inL->setLastModified( modifiedCalendar );
1162 inL->setLastModified( modifiedCalendar ); 1163 inR = inL->clone();
1163 inR = inL->clone(); 1164 inR->setIDStr( ":" );
1164 inR->setIDStr( ":" ); 1165 remote->addIncidence( inR );
1165 remote->addIncidence( inR );
1166 }
1167 } 1166 }