summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-09-22 01:13:09 (UTC)
committer zautrix <zautrix>2004-09-22 01:13:09 (UTC)
commited2feaa9f7e2064e5b26ff678a25eb79ceae599b (patch) (unidiff)
treebd698d689aa16ce8c52c5060402d9560f95a713e /korganizer
parent01572248367c63119514d15d7401a5b2b83349a0 (diff)
downloadkdepimpi-ed2feaa9f7e2064e5b26ff678a25eb79ceae599b.zip
kdepimpi-ed2feaa9f7e2064e5b26ff678a25eb79ceae599b.tar.gz
kdepimpi-ed2feaa9f7e2064e5b26ff678a25eb79ceae599b.tar.bz2
Sync dialog fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7fae4a9..bc8625d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1138,34 +1138,34 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1138 if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) { 1138 if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) {
1139 ++addedEventR; 1139 ++addedEventR;
1140 inL->setLastModified( modifiedCalendar ); 1140 inL->setLastModified( modifiedCalendar );
1141 remote->addIncidence( inL->clone() ); 1141 remote->addIncidence( inL->clone() );
1142 } 1142 }
1143 } 1143 }
1144 } 1144 }
1145 } 1145 }
1146 } 1146 }
1147 inL = el.next(); 1147 inL = el.next();
1148 } 1148 }
1149 int delFut = 0; 1149 int delFut = 0;
1150 if ( KOPrefs::instance()->mWriteBackInFuture ) { 1150 if ( KOPrefs::instance()->mWriteBackInFuture ) {
1151 er = remote->rawIncidences(); 1151 er = remote->rawIncidences();
1152 inR = er.first(); 1152 inR = er.first();
1153 QDateTime dt; 1153 QDateTime dt;
1154 QDateTime cur = QDateTime::currentDateTime(); 1154 QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
1155 QDateTime end = cur.addSecs( KOPrefs::instance()->mWriteBackInFuture * 3600 *24 *7 ); 1155 QDateTime end = cur.addDays( (KOPrefs::instance()->mWriteBackInFuture +1 ) *7 );
1156 while ( inR ) { 1156 while ( inR ) {
1157 if ( inR->type() == "Todo" ) { 1157 if ( inR->type() == "Todo" ) {
1158 Todo * t = (Todo*)inR; 1158 Todo * t = (Todo*)inR;
1159 if ( t->hasDueDate() ) 1159 if ( t->hasDueDate() )
1160 dt = t->dtDue(); 1160 dt = t->dtDue();
1161 else 1161 else
1162 dt = cur.addSecs( 62 ); 1162 dt = cur.addSecs( 62 );
1163 } 1163 }
1164 else if (inR->type() == "Event" ) { 1164 else if (inR->type() == "Event" ) {
1165 bool ok; 1165 bool ok;
1166 dt = inR->getNextOccurence( cur, &ok ); 1166 dt = inR->getNextOccurence( cur, &ok );
1167 if ( !ok ) 1167 if ( !ok )
1168 dt = cur.addSecs( -62 ); 1168 dt = cur.addSecs( -62 );
1169 } 1169 }
1170 else 1170 else
1171 dt = inR->dtStart(); 1171 dt = inR->dtStart();