summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/sharpdtm
authorzautrix <zautrix>2004-09-21 11:42:03 (UTC)
committer zautrix <zautrix>2004-09-21 11:42:03 (UTC)
commit6a40d65ddd6657e34c69d839da458810a8d8ff98 (patch) (unidiff)
treeeba8aaa135d7a33a15527a38c95fcf0adb3bceaa /kabc/plugins/sharpdtm
parent4f0afab535db2e66f2ba8121e624782a70a3d409 (diff)
downloadkdepimpi-6a40d65ddd6657e34c69d839da458810a8d8ff98.zip
kdepimpi-6a40d65ddd6657e34c69d839da458810a8d8ff98.tar.gz
kdepimpi-6a40d65ddd6657e34c69d839da458810a8d8ff98.tar.bz2
cleanup
Diffstat (limited to 'kabc/plugins/sharpdtm') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp39
1 files changed, 3 insertions, 36 deletions
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 )
229 //(*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); 229 //(*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
230 //(*it).setExternalUID( QString::number( id ) ); 230 //(*it).setExternalUID( QString::number( id ) );
231 //(*it).setOriginalExternalUID( QString::number( id ) ); 231 //(*it).setOriginalExternalUID( QString::number( id ) );
232 map.insert(id,(*it).uid()); 232 map.insert(id,(*it).uid());
233
234#if 0
235 KABC::Addressee addressee;
236 res = mConverter->sharpToAddressee( id, mAccess, addressee );
237 addressee.setUid((*it).uid() );
238 (it*).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
239 res = mAccess->finishEditCard(&id);
240 //qDebug("2NEW id is %d", id);
241 addressee.setExternalUID( QString::number( id ) );
242 addressee.setOriginalExternalUID( QString::number( id ) );
243 changedAddressees.append( addressee );
244#endif
245
246 if (res == false) 233 if (res == false)
247 qDebug("Unable to append Contact: %s", addressee.formattedName().latin1()); 234 qDebug("Unable to append Contact: %s", addressee.formattedName().latin1());
248 235
@@ -256,15 +243,12 @@ bool ResourceSharpDTM::save( Ticket *ticket )
256 243
257 } else if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { 244 } else if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_DELETE ) {
258 res = mAccess->deleteCard(&id); 245 res = mAccess->deleteCard(&id);
259 if ( res ) 246 if ( !res )
260 qDebug("delete success ");
261 else
262 qDebug("delete error "); 247 qDebug("delete error ");
263 248
264 249
265 } else if ( (*it).tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { 250 } else if ( (*it).tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) {
266 //changed 251 //changed
267 qDebug("changed ****");
268 res = mAccess->startEditCard(id); 252 res = mAccess->startEditCard(id);
269 if (res == true) 253 if (res == true)
270 { 254 {
@@ -274,15 +258,6 @@ bool ResourceSharpDTM::save( Ticket *ticket )
274 res = mAccess->finishEditCard(&id); 258 res = mAccess->finishEditCard(&id);
275 //(*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_CSUM ); 259 //(*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_CSUM );
276 map.insert(id,(*it).uid()); 260 map.insert(id,(*it).uid());
277
278#if 0
279 KABC::Addressee addressee;
280 res = mConverter->sharpToAddressee( id, mAccess, addressee );
281 addressee.setUid((*it).uid() );
282 addressee.setTempSyncStat( SYNC_TEMPSTATE_NEW_CSUM );
283 changedAddressees.append( addressee );
284 res = mAccess->finishEditCard(&id);
285#endif
286 if (res == false) 261 if (res == false)
287 qDebug("Unable to append Contact: %s", addressee.formattedName().latin1()); 262 qDebug("Unable to append Contact: %s", addressee.formattedName().latin1());
288 263
@@ -305,7 +280,6 @@ bool ResourceSharpDTM::save( Ticket *ticket )
305 itam = map.find( idint ); 280 itam = map.find( idint );
306 if ( itam != map.end() ) { 281 if ( itam != map.end() ) {
307 KABC::Addressee addressee; 282 KABC::Addressee addressee;
308 qDebug("found change %d %s ", idint, itam.data().latin1());
309 res = mConverter->sharpToAddressee( id, mAccess, addressee ); 283 res = mConverter->sharpToAddressee( id, mAccess, addressee );
310 284
311 if ( !addressee.isEmpty() && res ) 285 if ( !addressee.isEmpty() && res )
@@ -317,14 +291,7 @@ bool ResourceSharpDTM::save( Ticket *ticket )
317 } 291 }
318 } 292 }
319 } 293 }
320#if 0 294
321 KABC::Addressee::List::Iterator it2;
322 for ( it2 = changedAddressees.begin(); it2 != changedAddressees.end(); ++it2 ) {
323 (*it2).computeCsum( "Sharp_DTM" );
324 qDebug("CSUM: %s ",(*it2).getCsum( "Sharp_DTM" ).latin1() );
325 addressBook()->insertAddressee((*it2));
326 }
327#endif
328 //US mAccess->save(); 295 //US mAccess->save();
329 296
330 mDirWatch.startScan(); 297 mDirWatch.startScan();