-rw-r--r-- | korganizer/calendarview.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index fab4540..5150455 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -729,3 +729,3 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b bool remCh, locCh; - remCh = ( remote->zaurusUid() != local->zaurusUid() ); + remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); locCh = ( local->lastModified() > mLastCalendarSync ); @@ -775,3 +775,3 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { - local->setZaurusUid( remote->zaurusUid() ); + local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); } @@ -897,4 +897,4 @@ void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* t while ( eve ) { - int id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name - if ( id >= 0 ) { + QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name + if ( !id.isEmpty() ) { QString des = eve->description(); @@ -903,3 +903,3 @@ void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* t pref = "t"; - des += pref+ QString::number ( id ) + ","; + des += pref+ id + ","; eve->setReadOnly( false ); @@ -1015,3 +1015,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int if ( take == 1 ) {// take local - inL->setZaurusUid( inR->zaurusUid() ); + inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); remote->deleteIncidence( inR ); @@ -1035,3 +1035,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int pref = "t"; - if ( des.find(pref+QString::number( inR->getID(mCurrentSyncDevice) ) +"," ) >= 0 && mode != 5) { // delete it + if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); @@ -1085,3 +1085,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { - if ( inL->getID(mCurrentSyncDevice) >= 0 && mode != 4 ) { + if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { local->deleteIncidence( inL ); @@ -1090,3 +1090,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) { - inL->setID(mCurrentSyncDevice, -1 ); + inL->removeID(mCurrentSyncDevice ); ++addedEventR; @@ -1210,3 +1210,3 @@ void CalendarView::syncSharp() loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); - loc->setZaurusUid( inc->zaurusUid() ); + loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); } |