author | zautrix <zautrix> | 2004-09-21 07:05:01 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-21 07:05:01 (UTC) |
commit | 434ddaa08e0a650422ef271332a1d11879028095 (patch) (side-by-side diff) | |
tree | e4f229120d8bfa9febb7ab123b1311329f0e6aa4 /kabc/addressbook.cpp | |
parent | ed49c55dac215ac2ed9286ebfc36e5a19417f0bb (diff) | |
download | kdepimpi-434ddaa08e0a650422ef271332a1d11879028095.zip kdepimpi-434ddaa08e0a650422ef271332a1d11879028095.tar.gz kdepimpi-434ddaa08e0a650422ef271332a1d11879028095.tar.bz2 |
DTM sync fixes
-rw-r--r-- | kabc/addressbook.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index adb451f..5fb49eb 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -224,35 +224,33 @@ AddressBook::AddressBook( const QString &config ) { init(config, "contact"); } AddressBook::AddressBook( const QString &config, const QString &family ) { init(config, family); } // the default family is "contact" void AddressBook::init(const QString &config, const QString &family ) { blockLSEchange = false; d = new AddressBookData; QString fami = family; - qDebug("new ab "); if (config != 0) { - qDebug("config != 0 "); if ( family == "syncContact" ) { qDebug("creating sync config "); fami = "contact"; KConfig* con = new KConfig( locateLocal("config", "syncContactrc") ); con->setGroup( "General" ); con->writeEntry( "ResourceKeys", QString("sync") ); con->writeEntry( "Standard", QString("sync") ); con->setGroup( "Resource_sync" ); con->writeEntry( "FileName", config ); con->writeEntry( "FileFormat", QString("vcard") ); con->writeEntry( "ResourceIdentifier", QString("sync") ); con->writeEntry( "ResourceName", QString("sync_res") ); if ( config.right(4) == ".xml" ) con->writeEntry( "ResourceType", QString("qtopia") ); else if ( config == "sharp" ) { con->writeEntry( "ResourceType", QString("sharp") ); @@ -593,46 +591,46 @@ AddressBook::Iterator AddressBook::find( const Addressee &a ) } return end(); } Addressee AddressBook::findByUid( const QString &uid ) { Iterator it; for ( it = begin(); it != end(); ++it ) { if ( uid == (*it).uid() ) { return *it; } } return Addressee(); } void AddressBook::preExternSync( AddressBook* aBook, const QString& csd ) { - qDebug("AddressBook::preExternSync "); + //qDebug("AddressBook::preExternSync "); AddressBook::Iterator it; for ( it = begin(); it != end(); ++it ) { (*it).setID( csd, (*it).externalUID() ); (*it).computeCsum( csd ); } mergeAB( aBook ,csd ); } void AddressBook::postExternSync( AddressBook* aBook , const QString& csd) { - qDebug("AddressBook::postExternSync "); + //qDebug("AddressBook::postExternSync "); AddressBook::Iterator it; for ( it = begin(); it != end(); ++it ) { - qDebug("check uid %s ", (*it).uid().latin1() ); + // qDebug("check uid %s ", (*it).uid().latin1() ); if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID || (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_CSUM ) { Addressee ad = aBook->findByUid( ( (*it).uid() )); if ( ad.isEmpty() ) { qDebug("postExternSync:ERROR addressee is empty: %s ", (*it).uid().latin1()); } else { (*it).computeCsum( csd ); if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) ad.setID( csd, (*it).externalUID() ); ad.setCsum( csd, (*it).getCsum( csd ) ); aBook->insertAddressee( ad ); } } } } |