summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp12
-rw-r--r--korganizer/calendarview.cpp10
2 files changed, 14 insertions, 8 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index bdc5bd8..c75b4bc 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2637,5 +2637,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
if ( take == 3 )
return false;
- if ( take == 1 ) {// take local
+ if ( take == 1 ) {// take local **********************
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
@@ -2662,5 +2662,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
remote->insertAddressee( inR , false);
++changedRemote;
- } else { // take == 2 take remote
+ } else { // take == 2 take remote **********************
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
if ( inR.revision().date().year() < 2004 )
@@ -2681,5 +2681,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
}
}
- } else { // no conflict
+ } else { // no conflict ********** add or delete remote
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
QString des = addresseeLSync.note();
@@ -2692,4 +2692,7 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
remote->insertAddressee( inR, false );
inL = inR;
+ inL.setIDStr( ":" );
+ inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
+ inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
inL.setResource( 0 );
local->insertAddressee( inL , false);
@@ -2733,5 +2736,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
if ( !inL.resource() || inL.resource()->includeInSync() ) {
inR = remote->findByUid( uid );
- if ( inR.isEmpty() ) {
+ if ( inR.isEmpty() ) { / no conflict ********** add or delete local
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
@@ -2762,4 +2765,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
local->insertAddressee( inL, false );
inR = inL;
+ inR.setIDStr( ":" );
inR.setResource( 0 );
remote->insertAddressee( inR, false );
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 4667918..4e29d6f 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1017,5 +1017,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( take == 3 )
return false;
- if ( take == 1 ) {// take local
+ if ( take == 1 ) {// take local **********************
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
@@ -1031,5 +1031,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
inR->setPilotId( 2 );
++changedRemote;
- } else {
+ } else {// take remote **********************
idS = inL->IDStr();
int pid = inL->pilotId();
@@ -1047,5 +1047,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
}
}
- } else { // no conflict
+ } else { // no conflict ********** add or delete remote
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
QString des = eventLSync->description();
@@ -1061,4 +1061,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
inL = inR->clone();
inL->setIDStr( ":" );
+ inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
+ inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
local->addIncidence( inL );
++addedEvent;
@@ -1105,5 +1107,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( !skipIncidence ) {
inR = remote->incidence( uid );
- if ( ! inR ) {
+ if ( ! inR ) { // no conflict ********** add or delete local
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {