summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index e45240a..6128137 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1494,20 +1494,20 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b
if ( localMod >= remoteMod )
return 1;
else
return 2;
break;
case SYNC_PREF_ASK:
- qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
+ //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
if ( lastSync > remoteMod && lastSync > localMod)
return 0;
if ( lastSync > remoteMod )
return 1;
if ( lastSync > localMod )
return 2;
- qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
+ //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
localIsNew = localMod >= remoteMod;
if ( localIsNew )
getEventViewerDialog()->setColorMode( 1 );
else
getEventViewerDialog()->setColorMode( 2 );
getEventViewerDialog()->setIncidence(local);
@@ -1538,27 +1538,30 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b
return 0;
}
Event* CalendarView::getLastSyncEvent()
{
Event* lse;
//qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
+ mCalendar->setSyncEventsEnabled();
lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice );
if (!lse) {
+ qDebug("KO: New last Syncevent created for local: %s",mCurrentSyncDevice.latin1() );
lse = new Event();
lse->setUid( "last-syncEvent-"+mCurrentSyncDevice );
QString sum = "";
if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) )
sum = "E: ";
lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event"));
lse->setDtStart( mLastCalendarSync );
lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) );
lse->setCategories( i18n("SyncEvent") );
lse->setReadOnly( true );
lse->setCalID( 1 );
mCalendar->addEvent( lse );
- }
+ } else
+ qDebug("KO: Last Syncevent on local found");
return lse;
}
// we check, if the to delete event has a id for a profile
@@ -1630,13 +1633,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
}
}
QDateTime modifiedCalendar = mLastCalendarSync;
eventLSync = getLastSyncEvent();
eventR = remote->event("last-syncEvent-"+mCurrentSyncName );
if ( eventR ) {
- qDebug("last-syncEvent on remote found ");
+ qDebug("KO: Last-syncEvent on remote found ");
eventRSync = (Event*) eventR->clone();
remote->deleteEvent(eventR );
} else {
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) {
eventRSync = (Event*)eventLSync->clone();