summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index cfd9290..d5d31e2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1125,4 +1125,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
inL = el.next();
}
+ int delFut = 0;
if ( KOPrefs::instance()->mWriteBackInFuture ) {
er = remote->rawIncidences();
@@ -1139,7 +1140,16 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
dt = cur.addSecs( 62 );
}
- else dt = inR->dtStart();
- if ( dt < cur || dt > end )
+ else if (inR->type() == "Event" ) {
+ bool ok;
+ dt = inR->getNextOccurence( cur, &ok );
+ if ( !ok )
+ dt = cur.addSecs( -62 );
+ }
+ else
+ dt = inR->dtStart();
+ if ( dt < cur || dt > end ) {
remote->deleteIncidence( inR );
+ ++delFut;
+ }
inR = er.next();
}
@@ -1159,4 +1169,9 @@ 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 );
+ QString delmess;
+ if ( delFut ) {
+ delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are in the past or\nmore than %d weeks in the future.\n"),delFut, KOPrefs::instance()->mWriteBackInFuture );
+ mes += delmess;
+ }
if ( KOPrefs::instance()->mShowSyncSummary ) {
KMessageBox::information(this, mes, i18n("KO/Pi Synchronization") );
@@ -1246,10 +1261,8 @@ void CalendarView::syncExternal( int mode )
QPtrList<Incidence> iL = mCalendar->rawIncidences();
Incidence* inc = iL.first();
- /* obsolete
while ( inc ) {
- inc->setZaurusStat( inc->revision () );
+ inc->removeID(mCurrentSyncDevice);
inc = iL.next();
}
- */
#ifndef DESKTOP_VERSION
if ( sharpFormat )