-rw-r--r-- | korganizer/calendarview.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index ccacc52..a350c3b 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1221,20 +1221,20 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
1221 | if ( localMod >= remoteMod ) | 1221 | if ( localMod >= remoteMod ) |
1222 | return 1; | 1222 | return 1; |
1223 | else | 1223 | else |
1224 | return 2; | 1224 | return 2; |
1225 | break; | 1225 | break; |
1226 | case SYNC_PREF_ASK: | 1226 | case SYNC_PREF_ASK: |
1227 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 1227 | qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
1228 | if ( lastSync > remoteMod && lastSync > localMod) | 1228 | if ( lastSync > remoteMod && lastSync > localMod) |
1229 | return 0; | 1229 | return 0; |
1230 | if ( lastSync > remoteMod ) | 1230 | if ( lastSync > remoteMod ) |
1231 | return 1; | 1231 | return 1; |
1232 | if ( lastSync > localMod ) | 1232 | if ( lastSync > localMod ) |
1233 | return 2; | 1233 | return 2; |
1234 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 1234 | qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
1235 | localIsNew = localMod >= remoteMod; | 1235 | localIsNew = localMod >= remoteMod; |
1236 | if ( localIsNew ) | 1236 | if ( localIsNew ) |
1237 | getEventViewerDialog()->setColorMode( 1 ); | 1237 | getEventViewerDialog()->setColorMode( 1 ); |
1238 | else | 1238 | else |
1239 | getEventViewerDialog()->setColorMode( 2 ); | 1239 | getEventViewerDialog()->setColorMode( 2 ); |
1240 | getEventViewerDialog()->setIncidence(local); | 1240 | getEventViewerDialog()->setIncidence(local); |
@@ -1356,12 +1356,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1356 | } | 1356 | } |
1357 | } | 1357 | } |
1358 | QDateTime modifiedCalendar = mLastCalendarSync; | 1358 | QDateTime modifiedCalendar = mLastCalendarSync; |
1359 | eventLSync = getLastSyncEvent(); | 1359 | eventLSync = getLastSyncEvent(); |
1360 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); | 1360 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); |
1361 | if ( eventR ) { | 1361 | if ( eventR ) { |
1362 | qDebug("last-syncEvent on remote found "); | ||
1362 | eventRSync = (Event*) eventR->clone(); | 1363 | eventRSync = (Event*) eventR->clone(); |
1363 | remote->deleteEvent(eventR ); | 1364 | remote->deleteEvent(eventR ); |
1364 | 1365 | ||
1365 | } else { | 1366 | } else { |
1366 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { | 1367 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { |
1367 | eventRSync = (Event*)eventLSync->clone(); | 1368 | eventRSync = (Event*)eventLSync->clone(); |
@@ -1378,13 +1379,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1378 | if ( eventLSync->dtStart() == mLastCalendarSync ) | 1379 | if ( eventLSync->dtStart() == mLastCalendarSync ) |
1379 | fullDateRange = true; | 1380 | fullDateRange = true; |
1380 | 1381 | ||
1381 | if ( ! fullDateRange ) { | 1382 | if ( ! fullDateRange ) { |
1382 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { | 1383 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { |
1383 | 1384 | ||
1384 | // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); | 1385 | qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); |
1385 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); | 1386 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); |
1386 | fullDateRange = true; | 1387 | fullDateRange = true; |
1387 | } | 1388 | } |
1388 | } | 1389 | } |
1389 | if ( mSyncManager->syncWithDesktop() ) { | 1390 | if ( mSyncManager->syncWithDesktop() ) { |
1390 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); | 1391 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); |