author | zautrix <zautrix> | 2004-10-26 20:04:29 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-26 20:04:29 (UTC) |
commit | 8b111ae30fc51a4a580b8d485bef8ad28b0dde84 (patch) (side-by-side diff) | |
tree | fb4cf20f5675e5ff2221ed6eea51785bdd65616c /korganizer | |
parent | 62e91b888de607fa5a9f9c0fba807287e57d5d5c (diff) | |
download | kdepimpi-8b111ae30fc51a4a580b8d485bef8ad28b0dde84.zip kdepimpi-8b111ae30fc51a4a580b8d485bef8ad28b0dde84.tar.gz kdepimpi-8b111ae30fc51a4a580b8d485bef8ad28b0dde84.tar.bz2 |
fix in kapi translation call, clone fix and kde first sync fix
-rw-r--r-- | korganizer/calendarview.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 284ddbf..2ccccfa 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -955,17 +955,20 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int if ( ! fullDateRange ) { if ( eventLSync->dtStart() != eventRSync->dtStart() ) { // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); fullDateRange = true; } } - if ( fullDateRange && !mSyncKDE ) + if ( mSyncKDE ) { + fullDateRange = ( eventLSync->dtStart() == mLastCalendarSync ); + } + if ( fullDateRange ) mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); else mLastCalendarSync = eventLSync->dtStart(); // for resyncing if own file has changed if ( mCurrentSyncDevice == "deleteaftersync" ) { mLastCalendarSync = loadedFileVersion; //qDebug("setting mLastCalendarSync "); } @@ -1044,23 +1047,26 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int pref = "t"; if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); //remote->deleteIncidence( inR ); ++deletedEventR; } else { inR->setLastModified( modifiedCalendar ); inL = inR->clone(); + inL->setIDStr( ":" ); local->addIncidence( inL ); ++addedEvent; } } else { if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { inR->setLastModified( modifiedCalendar ); - local->addIncidence( inR->clone() ); + inL = inR->clone(); + inL->setIDStr( ":" ); + local->addIncidence( inL ); ++addedEvent; } else { checkExternSyncEvent(eventRSyncSharp, inR); remote->deleteIncidence( inR ); ++deletedEventR; } } } @@ -1099,30 +1105,33 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int ++deletedEventL; } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { inL->removeID(mCurrentSyncDevice ); ++addedEventR; //qDebug("remote added Incidence %s ", inL->summary().latin1()); inL->setLastModified( modifiedCalendar ); inR = inL->clone(); + inR->setIDStr( ":" ); inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); remote->addIncidence( inR ); } } } else { if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { checkExternSyncEvent(eventLSyncSharp, inL); local->deleteIncidence( inL ); ++deletedEventL; } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { ++addedEventR; inL->setLastModified( modifiedCalendar ); - remote->addIncidence( inL->clone() ); + inR = inL->clone(); + inR->setIDStr( ":" ); + remote->addIncidence( inR ); } } } } } inL = el.next(); } int delFut = 0; |