author | zautrix <zautrix> | 2004-09-19 09:00:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-19 09:00:55 (UTC) |
commit | 787181d34f0d195ad72c9cf6aedbc317b6dd713e (patch) (unidiff) | |
tree | ac49d2b1d7887f96f3834458071b89e77b59218b /kaddressbook | |
parent | f370d0f89bcaeeb68bd60152a9812a9cd55e5d8a (diff) | |
download | kdepimpi-787181d34f0d195ad72c9cf6aedbc317b6dd713e.zip kdepimpi-787181d34f0d195ad72c9cf6aedbc317b6dd713e.tar.gz kdepimpi-787181d34f0d195ad72c9cf6aedbc317b6dd713e.tar.bz2 |
more AB sync
-rw-r--r-- | kaddressbook/kabcore.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 8776b53..56f6af2 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2528,3 +2528,3 @@ KABC::Addressee KABCore::getLastSyncAddressee() | |||
2528 | QString sum = ""; | 2528 | QString sum = ""; |
2529 | if ( KABPrefs::instance()->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) | 2529 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
2530 | sum = "E: "; | 2530 | sum = "E: "; |
@@ -2554,11 +2554,13 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i | |||
2554 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); | 2554 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); |
2555 | //if ( remCh ) | 2555 | if ( remCh ) |
2556 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | 2556 | qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); |
2557 | locCh = ( local->revision() > mLastAddressbookSync ); | 2557 | locCh = ( local->revision() > mLastAddressbookSync ); |
2558 | if ( !remCh && ! locCh ) { | 2558 | if ( !remCh && ! locCh ) { |
2559 | //qDebug("both not changed "); | 2559 | qDebug("both not changed "); |
2560 | lastSync = local->revision().addDays(1); | 2560 | lastSync = local->revision().addDays(1); |
2561 | if ( mode <= SYNC_PREF_ASK ) | ||
2562 | return 0; | ||
2561 | } else { | 2563 | } else { |
2562 | if ( locCh ) { | 2564 | if ( locCh ) { |
2563 | //qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1()); | 2565 | qDebug("loc changed %s %s", local->revision().toString().latin1(), mLastAddressbookSync.toString().latin1()); |
2564 | lastSync = local->revision().addDays( -1 ); | 2566 | lastSync = local->revision().addDays( -1 ); |
@@ -2792,5 +2794,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2792 | QString des = addresseeLSync.note(); | 2794 | QString des = addresseeLSync.note(); |
2793 | QString pref = "a"; | 2795 | if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it |
2794 | if ( des.find(pref+ inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it | ||
2795 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); | 2796 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
2797 | remote->insertAddressee( inR, false ); | ||
2796 | ++deletedAddresseeR; | 2798 | ++deletedAddresseeR; |
@@ -2822,3 +2824,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2822 | er.clear(); | 2824 | er.clear(); |
2823 | QStringList el = remote->uidList(); | 2825 | QStringList el = local->uidList(); |
2824 | modulo = (el.count()/10)+1; | 2826 | modulo = (el.count()/10)+1; |
@@ -2829,3 +2831,2 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2829 | while ( incCounter < el.count()) { | 2831 | while ( incCounter < el.count()) { |
2830 | |||
2831 | qApp->processEvents(); | 2832 | qApp->processEvents(); |
@@ -2839,4 +2840,2 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2839 | skipIncidence = true; | 2840 | skipIncidence = true; |
2840 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | ||
2841 | skipIncidence = true; | ||
2842 | if ( !skipIncidence ) { | 2841 | if ( !skipIncidence ) { |
@@ -2853,4 +2852,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2853 | inL.removeID(mCurrentSyncDevice ); | 2852 | inL.removeID(mCurrentSyncDevice ); |
2854 | ++addedAddresseeR; | 2853 | ++addedAddresseeR; |
2855 | //qDebug("remote added Incidence %s ", inL.summary().latin1()); | ||
2856 | inL.setRevision( modifiedCalendar ); | 2854 | inL.setRevision( modifiedCalendar ); |
@@ -2897,2 +2895,4 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2897 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); | 2895 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); |
2896 | addresseeRSync.setNote( "" ) ; | ||
2897 | addresseeLSync.setNote( "" ); | ||
2898 | 2898 | ||
@@ -2939,2 +2939,3 @@ bool KABCore::syncAB(QString filename, int mode) | |||
2939 | if ( external ) { | 2939 | if ( external ) { |
2940 | qDebug("**********Setting vcf mode to external "); | ||
2940 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2941 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |