summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-21 11:42:03 (UTC)
committer zautrix <zautrix>2004-09-21 11:42:03 (UTC)
commit6a40d65ddd6657e34c69d839da458810a8d8ff98 (patch) (side-by-side diff)
treeeba8aaa135d7a33a15527a38c95fcf0adb3bceaa
parent4f0afab535db2e66f2ba8121e624782a70a3d409 (diff)
downloadkdepimpi-6a40d65ddd6657e34c69d839da458810a8d8ff98.zip
kdepimpi-6a40d65ddd6657e34c69d839da458810a8d8ff98.tar.gz
kdepimpi-6a40d65ddd6657e34c69d839da458810a8d8ff98.tar.bz2
cleanup
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/qtopia/qtopiaconverter.cpp2
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp37
2 files changed, 3 insertions, 36 deletions
diff --git a/kabc/plugins/qtopia/qtopiaconverter.cpp b/kabc/plugins/qtopia/qtopiaconverter.cpp
index 430c7b3..5eab1be 100644
--- a/kabc/plugins/qtopia/qtopiaconverter.cpp
+++ b/kabc/plugins/qtopia/qtopiaconverter.cpp
@@ -81,17 +81,17 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a
QString exuid = contact.uid().toString();
addr.setOriginalExternalUID( exuid );
int ente = exuid.find( "-0000");
if ( exuid.left(1) == "{" )
exuid = exuid.mid(1);
if ( ente > -1 )
exuid = exuid.left( ente-1 );
addr.setExternalUID( exuid );
- qDebug("QtopiaConverter:set %s uid %s ",addr.originalExternalUID().latin1(),addr.externalUID().latin1() );
+ // qDebug("QtopiaConverter:set %s uid %s ",addr.originalExternalUID().latin1(),addr.externalUID().latin1() );
// email
QStringList emails = contact.emailList();
for ( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) {
addr.insertEmail( *it, ((*it) == contact.defaultEmail()) );
}
if (!contact.defaultEmail().isEmpty())
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
@@ -225,69 +225,44 @@ bool ResourceSharpDTM::save( Ticket *ticket )
res = mConverter->addresseeToSharp( (*it), mAccess, id );
if (res == true)
{
res = mAccess->finishEditCard(&id);
//(*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
-
if (res == false)
qDebug("Unable to append Contact: %s", addressee.formattedName().latin1());
}
else
{
qDebug("Unable to convert Addressee: %s", addressee.formattedName().latin1());
mAccess->cancelEditCard();
}
}
} 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)
{
res = mConverter->addresseeToSharp( (*it), mAccess, id );
if (res == true)
{
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());
}
else
{
qDebug("Unable to convert Addressee: %s", addressee.formattedName().latin1());
mAccess->cancelEditCard();
@@ -300,36 +275,28 @@ bool ResourceSharpDTM::save( Ticket *ticket )
AddresseeMap::Iterator itam;
for ( res=mAccess->first(); res == true; res=mAccess->next())
{
id = mAccess->cardId();
int idint = id;
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 )
{
addressee.setResource( this );
addressee.setUid( itam.data() );
addressee.setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
addressBook()->insertAddressee( addressee , false );
}
}
}
-#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();
delete ticket;
unlock( fileName() );
return true;
}