summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-09-19 09:00:55 (UTC)
committer zautrix <zautrix>2004-09-19 09:00:55 (UTC)
commit787181d34f0d195ad72c9cf6aedbc317b6dd713e (patch) (side-by-side diff)
treeac49d2b1d7887f96f3834458071b89e77b59218b /kaddressbook
parentf370d0f89bcaeeb68bd60152a9812a9cd55e5d8a (diff)
downloadkdepimpi-787181d34f0d195ad72c9cf6aedbc317b6dd713e.zip
kdepimpi-787181d34f0d195ad72c9cf6aedbc317b6dd713e.tar.gz
kdepimpi-787181d34f0d195ad72c9cf6aedbc317b6dd713e.tar.bz2
more AB sync
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp25
1 files changed, 13 insertions, 12 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()
QString sum = "";
- if ( KABPrefs::instance()->mExternSyncProfiles.contains( mCurrentSyncDevice ) )
+ if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
sum = "E: ";
@@ -2554,11 +2554,13 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
- //if ( remCh )
- //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
+ if ( remCh )
+ qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
locCh = ( local->revision() > mLastAddressbookSync );
if ( !remCh && ! locCh ) {
- //qDebug("both not changed ");
+ qDebug("both not changed ");
lastSync = local->revision().addDays(1);
+ if ( mode <= SYNC_PREF_ASK )
+ return 0;
} else {
if ( locCh ) {
- //qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1());
+ qDebug("loc changed %s %s", local->revision().toString().latin1(), mLastAddressbookSync.toString().latin1());
lastSync = local->revision().addDays( -1 );
@@ -2792,5 +2794,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
QString des = addresseeLSync.note();
- QString pref = "a";
- if ( des.find(pref+ inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
+ if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE );
+ remote->insertAddressee( inR, false );
++deletedAddresseeR;
@@ -2822,3 +2824,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
er.clear();
- QStringList el = remote->uidList();
+ QStringList el = local->uidList();
modulo = (el.count()/10)+1;
@@ -2829,3 +2831,2 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
while ( incCounter < el.count()) {
-
qApp->processEvents();
@@ -2839,4 +2840,2 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
skipIncidence = true;
- if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
- skipIncidence = true;
if ( !skipIncidence ) {
@@ -2854,3 +2853,2 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
++addedAddresseeR;
- //qDebug("remote added Incidence %s ", inL.summary().latin1());
inL.setRevision( modifiedCalendar );
@@ -2897,2 +2895,4 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() );
+ addresseeRSync.setNote( "" ) ;
+ addresseeLSync.setNote( "" );
@@ -2939,2 +2939,3 @@ bool KABCore::syncAB(QString filename, int mode)
if ( external ) {
+ qDebug("**********Setting vcf mode to external ");
mGlobalSyncMode = SYNC_MODE_EXTERNAL;