-rw-r--r-- | korganizer/calendarview.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 5a6d615..369c7a0 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -728,18 +728,17 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
728 | QDateTime lastSync = mLastCalendarSync; | 728 | QDateTime lastSync = mLastCalendarSync; |
729 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 729 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
730 | bool remCh, locCh; | 730 | bool remCh, locCh; |
731 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); | 731 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); |
732 | if ( remCh ) | 732 | //if ( remCh ) |
733 | qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | 733 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); |
734 | locCh = ( local->lastModified() > mLastCalendarSync ); | 734 | locCh = ( local->lastModified() > mLastCalendarSync ); |
735 | //qDebug("locCh %d remCh %d locuid %d remuid %d", locCh, remCh,local->zaurusUid(), remote->zaurusUid() ); | ||
736 | if ( !remCh && ! locCh ) { | 735 | if ( !remCh && ! locCh ) { |
737 | //qDebug("both not changed "); | 736 | //qDebug("both not changed "); |
738 | lastSync = local->lastModified().addDays(1); | 737 | lastSync = local->lastModified().addDays(1); |
739 | } else { | 738 | } else { |
740 | if ( locCh ) { | 739 | if ( locCh ) { |
741 | // qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1()); | 740 | //qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1()); |
742 | lastSync = local->lastModified().addDays( -1 ); | 741 | lastSync = local->lastModified().addDays( -1 ); |
743 | if ( !remCh ) | 742 | if ( !remCh ) |
744 | remote->setLastModified( lastSync.addDays( -1 ) ); | 743 | remote->setLastModified( lastSync.addDays( -1 ) ); |
745 | } else { | 744 | } else { |
@@ -1114,9 +1113,9 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1114 | } else { | 1113 | } else { |
1115 | if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) { | 1114 | if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) { |
1116 | inL->removeID(mCurrentSyncDevice ); | 1115 | inL->removeID(mCurrentSyncDevice ); |
1117 | ++addedEventR; | 1116 | ++addedEventR; |
1118 | qDebug("remote added Incidence %s ", inL->summary().latin1()); | 1117 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); |
1119 | inL->setLastModified( modifiedCalendar ); | 1118 | inL->setLastModified( modifiedCalendar ); |
1120 | inR = inL->clone(); | 1119 | inR = inL->clone(); |
1121 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1120 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1122 | remote->addIncidence( inR ); | 1121 | remote->addIncidence( inR ); |