author | zautrix <zautrix> | 2004-09-19 09:11:04 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-19 09:11:04 (UTC) |
commit | 953277a85e6ec5630ab0d64b4d68815e4e4f9906 (patch) (side-by-side diff) | |
tree | 0a6acbc3ecd65784c1e875159b720849bc27dc48 /kaddressbook | |
parent | 787181d34f0d195ad72c9cf6aedbc317b6dd713e (diff) | |
download | kdepimpi-953277a85e6ec5630ab0d64b4d68815e4e4f9906.zip kdepimpi-953277a85e6ec5630ab0d64b4d68815e4e4f9906.tar.gz kdepimpi-953277a85e6ec5630ab0d64b4d68815e4e4f9906.tar.bz2 |
More AB sync
-rw-r--r-- | kaddressbook/kabcore.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 56f6af2..fa0c51f 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -2549,23 +2549,23 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i // 2 take remote // 3 cancel QDateTime lastSync = mLastAddressbookSync; if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { bool remCh, locCh; remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); - if ( remCh ) - qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); + + //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 %s %s", local->revision().toString().latin1(), mLastAddressbookSync.toString().latin1()); + //qDebug("loc changed %s %s", local->revision().toString().latin1(), mLastAddressbookSync.toString().latin1()); lastSync = local->revision().addDays( -1 ); if ( !remCh ) remote->setRevision( lastSync.addDays( -1 ) ); } else { //qDebug(" not loc changed "); lastSync = local->revision().addDays( 1 ); @@ -2723,13 +2723,13 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo mLastAddressbookSync = loadedFileVersion; qDebug("setting mLastAddressbookSync "); } #endif //qDebug("*************************** "); - qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); + // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); QStringList er = remote->uidList(); Addressee inR ;//= er.first(); Addressee inL; QProgressBar bar( er.count(),0 ); bar.setCaption (i18n("Syncing - close to abort!") ); @@ -2914,13 +2914,13 @@ bool KABCore::syncAB(QString filename, int mode) //pending prepare addresseeview for output //pending detect, if remote file has REV field. if not switch to external sync mGlobalSyncMode = SYNC_MODE_NORMAL; AddressBook abLocal(filename,"syncContact"); bool syncOK = false; if ( abLocal.load() ) { - qDebug("AB loaded %s mode %d",filename.latin1(), mode ); + qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); bool external = false; Addressee lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); if ( ! lse.isEmpty() ) { if ( lse.familyName().left(4) == "!E: " ) external = true; } else { @@ -2934,13 +2934,13 @@ bool KABCore::syncAB(QString filename, int mode) } } external = ! found; } if ( external ) { - qDebug("**********Setting vcf mode to external "); + qDebug("Setting vcf mode to external "); mGlobalSyncMode = SYNC_MODE_EXTERNAL; AddressBook::Iterator it; for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { (*it).setID( mCurrentSyncDevice, (*it).uid() ); (*it).computeCsum( mCurrentSyncDevice ); } @@ -2953,13 +2953,13 @@ bool KABCore::syncAB(QString filename, int mode) syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); if ( syncOK ) { if ( KABPrefs::instance()->mWriteBackFile ) { if ( external ) abLocal.removeDeletedAddressees(); - qDebug("saving remote AB "); + qDebug("Saving remote AB "); abLocal.saveAB(); } } setModified(); } |