summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
authorzautrix <zautrix>2004-09-14 01:03:08 (UTC)
committer zautrix <zautrix>2004-09-14 01:03:08 (UTC)
commit30762fe125216362e1a6c1d5ec5d22d9525aa336 (patch) (side-by-side diff)
tree4ff0fbf43efa921c86d64ff3f50baa9e59d207d9 /korganizer/calendarview.cpp
parent8ce7eae438dcd20f9c79fc0a36dfef0a6d3931eb (diff)
downloadkdepimpi-30762fe125216362e1a6c1d5ec5d22d9525aa336.zip
kdepimpi-30762fe125216362e1a6c1d5ec5d22d9525aa336.tar.gz
kdepimpi-30762fe125216362e1a6c1d5ec5d22d9525aa336.tar.bz2
Many bugfixes
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 258bd43..94cc97d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -738,7 +738,7 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b
lastSync = local->lastModified().addDays(1);
} else {
if ( locCh ) {
- qDebug("loc changed %d", local->revision() );
+ qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1());
lastSync = local->lastModified().addDays( -1 );
if ( !remCh )
remote->setLastModified( lastSync.addDays( -1 ) );
@@ -786,7 +786,7 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b
}
int result;
bool localIsNew;
- qDebug("mLastCalendarSync %s lastsync %s --- local %s remote %s ",mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() );
+ //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() );
if ( full && mode < SYNC_PREF_NEWEST )
mode = SYNC_PREF_ASK;
@@ -1030,7 +1030,9 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
remote->deleteIncidence( inR );
if ( inL->revision() < maxrev )
inL->setRevision( maxrev );
- remote->addIncidence( inL->clone() );
+ inR = inL->clone();
+ inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
+ remote->addIncidence( inR );
++changedRemote;
} else {
if ( inR->revision() < maxrev )
@@ -1052,7 +1054,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
++deletedEventR;
} else {
inR->setLastModified( modifiedCalendar );
- local->addIncidence( inR->clone() );
+ inL = inR->clone();
+ local->addIncidence( inL );
++addedEvent;
}
} else {
@@ -1103,8 +1106,11 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) {
inL->removeID(mCurrentSyncDevice );
++addedEventR;
+ qDebug("remote added Incidence %s ", inL->summary().latin1());
inL->setLastModified( modifiedCalendar );
- remote->addIncidence( inL->clone() );
+ inR = inL->clone();
+ inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
+ remote->addIncidence( inR );
}
}
} else {