-rw-r--r-- | korganizer/calendarview.cpp | 4 |
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 | |||
@@ -1146,18 +1146,18 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
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 | } |