author | zautrix <zautrix> | 2004-09-21 10:08:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-21 10:08:57 (UTC) |
commit | 19f445f0b6e7d4591db46b89e877ed9f4332ecd4 (patch) (unidiff) | |
tree | fd21a5dc32332060197d792552ef1eb469e92175 /kaddressbook | |
parent | 1cf4cc6e7bf25ee309852c7c97155de86917289f (diff) | |
download | kdepimpi-19f445f0b6e7d4591db46b89e877ed9f4332ecd4.zip kdepimpi-19f445f0b6e7d4591db46b89e877ed9f4332ecd4.tar.gz kdepimpi-19f445f0b6e7d4591db46b89e877ed9f4332ecd4.tar.bz2 |
more sync fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index c1ead9d..c2f031a 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2764,16 +2764,17 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2764 | if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars | 2764 | if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars |
2765 | if ( take = takeAddressee( &inL, &inR, mode, fullDateRange ) ) { | 2765 | if ( take = takeAddressee( &inL, &inR, mode, fullDateRange ) ) { |
2766 | //qDebug("take %d %s ", take, inL.summary().latin1()); | 2766 | //qDebug("take %d %s ", take, inL.summary().latin1()); |
2767 | if ( take == 3 ) | 2767 | if ( take == 3 ) |
2768 | return false; | 2768 | return false; |
2769 | if ( take == 1 ) {// take local | 2769 | if ( take == 1 ) {// take local |
2770 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2770 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2771 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 2771 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
2772 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | ||
2772 | local->insertAddressee( inL, false ); | 2773 | local->insertAddressee( inL, false ); |
2773 | idS = inR.externalUID(); | 2774 | idS = inR.externalUID(); |
2774 | OidS = inR.originalExternalUID(); | 2775 | OidS = inR.originalExternalUID(); |
2775 | } | 2776 | } |
2776 | else | 2777 | else |
2777 | idS = inR.IDStr(); | 2778 | idS = inR.IDStr(); |
2778 | remote->removeAddressee( inR ); | 2779 | remote->removeAddressee( inR ); |
2779 | inR = inL; | 2780 | inR = inL; |
@@ -2791,16 +2792,20 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2791 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2792 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2792 | if ( inR.revision().date().year() < 2004 ) | 2793 | if ( inR.revision().date().year() < 2004 ) |
2793 | inR.setRevision( modifiedCalendar ); | 2794 | inR.setRevision( modifiedCalendar ); |
2794 | } | 2795 | } |
2795 | idS = inL.IDStr(); | 2796 | idS = inL.IDStr(); |
2796 | local->removeAddressee( inL ); | 2797 | local->removeAddressee( inL ); |
2797 | inL = inR; | 2798 | inL = inR; |
2798 | inL.setIDStr( idS ); | 2799 | inL.setIDStr( idS ); |
2800 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | ||
2801 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | ||
2802 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | ||
2803 | } | ||
2799 | inL.setResource( 0 ); | 2804 | inL.setResource( 0 ); |
2800 | local->insertAddressee( inL , false ); | 2805 | local->insertAddressee( inL , false ); |
2801 | ++changedLocal; | 2806 | ++changedLocal; |
2802 | } | 2807 | } |
2803 | } | 2808 | } |
2804 | } else { // no conflict | 2809 | } else { // no conflict |
2805 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2810 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2806 | QString des = addresseeLSync.note(); | 2811 | QString des = addresseeLSync.note(); |