Diffstat (limited to 'kabc/plugins/sharpdtm/resourcesharpdtm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/sharpdtm/resourcesharpdtm.cpp | 57 |
1 files changed, 10 insertions, 47 deletions
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp index bba5f9a..48d3985 100644 --- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp +++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp @@ -131,3 +131,3 @@ bool ResourceSharpDTM::doOpen() SlZDataBase::addressbookItems(), - NULL, true); + NULL, false); @@ -141,3 +141,3 @@ bool ResourceSharpDTM::doOpen() mConverter = new SharpDTMConverter(); - bool res = mConverter->init(); + bool res = mConverter->init(); if ( !res ) @@ -226,9 +226,10 @@ bool ResourceSharpDTM::save( Ticket *ticket ) KABC::Addressee addressee; - qDebug("1NEW id is %d", id); res = mConverter->sharpToAddressee( id, mAccess, addressee ); addressee.setUid((*it).uid() ); - addressee.setTempSyncStat( SYNC_TEMPSTATE_NEW_CSUM ); - changedAddressees.append( addressee ); + addressee.setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); res = mAccess->finishEditCard(&id); - qDebug("2NEW id is %d", id); + //qDebug("2NEW id is %d", id); + addressee.setExternalUID( QString::number( id ) ); + addressee.setOriginalExternalUID( QString::number( id ) ); + changedAddressees.append( addressee ); @@ -236,5 +237,3 @@ bool ResourceSharpDTM::save( Ticket *ticket ) qDebug("Unable to append Contact: %s", addressee.formattedName().latin1()); - else { - qDebug("added card success "); - } + } @@ -257,2 +256,3 @@ bool ResourceSharpDTM::save( Ticket *ticket ) //changed + qDebug("changed ****"); res = mAccess->startEditCard(id); @@ -271,5 +271,3 @@ bool ResourceSharpDTM::save( Ticket *ticket ) qDebug("Unable to append Contact: %s", addressee.formattedName().latin1()); - else { - qDebug("change card succes "); - } + } @@ -282,38 +280,3 @@ bool ResourceSharpDTM::save( Ticket *ticket ) } - - - - - - - - - } - -#if 0 - // old code - CardId id = 0; // 0 means new card - KABC::Addressee addressee = (*it); - - res = mAccess->startEditCard(id); - if (res == true) - { - res = mConverter->addresseeToSharp( *it, mAccess, id ); - if (res == true) - { - res = mAccess->finishEditCard(&id); - 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 - { - qDebug("Unable to add new card. Addressee: %s", addressee.formattedName().latin1()); - } -#endif |