From 6a40d65ddd6657e34c69d839da458810a8d8ff98 Mon Sep 17 00:00:00 2001 From: zautrix Date: Tue, 21 Sep 2004 11:42:03 +0000 Subject: cleanup --- (limited to 'kabc/plugins/sharpdtm') diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp index adc7256..c013f52 100644 --- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp +++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp @@ -229,20 +229,7 @@ bool ResourceSharpDTM::save( Ticket *ticket ) //(*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); //(*it).setExternalUID( QString::number( id ) ); //(*it).setOriginalExternalUID( QString::number( id ) ); - map.insert(id,(*it).uid()); - -#if 0 - KABC::Addressee addressee; - res = mConverter->sharpToAddressee( id, mAccess, addressee ); - addressee.setUid((*it).uid() ); - (it*).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); - res = mAccess->finishEditCard(&id); - //qDebug("2NEW id is %d", id); - addressee.setExternalUID( QString::number( id ) ); - addressee.setOriginalExternalUID( QString::number( id ) ); - changedAddressees.append( addressee ); -#endif - + map.insert(id,(*it).uid()); if (res == false) qDebug("Unable to append Contact: %s", addressee.formattedName().latin1()); @@ -256,15 +243,12 @@ bool ResourceSharpDTM::save( Ticket *ticket ) } else if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { res = mAccess->deleteCard(&id); - if ( res ) - qDebug("delete success "); - else + if ( !res ) qDebug("delete error "); } else if ( (*it).tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { //changed - qDebug("changed ****"); res = mAccess->startEditCard(id); if (res == true) { @@ -274,15 +258,6 @@ bool ResourceSharpDTM::save( Ticket *ticket ) res = mAccess->finishEditCard(&id); //(*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_CSUM ); map.insert(id,(*it).uid()); - -#if 0 - KABC::Addressee addressee; - res = mConverter->sharpToAddressee( id, mAccess, addressee ); - addressee.setUid((*it).uid() ); - addressee.setTempSyncStat( SYNC_TEMPSTATE_NEW_CSUM ); - changedAddressees.append( addressee ); - res = mAccess->finishEditCard(&id); -#endif if (res == false) qDebug("Unable to append Contact: %s", addressee.formattedName().latin1()); @@ -305,7 +280,6 @@ bool ResourceSharpDTM::save( Ticket *ticket ) itam = map.find( idint ); if ( itam != map.end() ) { KABC::Addressee addressee; - qDebug("found change %d %s ", idint, itam.data().latin1()); res = mConverter->sharpToAddressee( id, mAccess, addressee ); if ( !addressee.isEmpty() && res ) @@ -317,14 +291,7 @@ bool ResourceSharpDTM::save( Ticket *ticket ) } } } -#if 0 - KABC::Addressee::List::Iterator it2; - for ( it2 = changedAddressees.begin(); it2 != changedAddressees.end(); ++it2 ) { - (*it2).computeCsum( "Sharp_DTM" ); - qDebug("CSUM: %s ",(*it2).getCsum( "Sharp_DTM" ).latin1() ); - addressBook()->insertAddressee((*it2)); - } -#endif + //US mAccess->save(); mDirWatch.startScan(); -- cgit v0.9.0.2