summaryrefslogtreecommitdiffabout
path: root/libkcal/phoneformat.cpp
Unidiff
Diffstat (limited to 'libkcal/phoneformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index ef69bce..6d0da5c 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -275,8 +275,6 @@ ulong PhoneFormat::getCsum( const QStringList & attList)
275 cSum += add; 275 cSum += add;
276 } 276 }
277 } 277 }
278 if ( i == 0 )
279 qDebug("csum: i == 0 %d ", cSum);
280 278
281 } 279 }
282 QString dump = attList.join(","); 280 QString dump = attList.join(",");
@@ -467,13 +465,12 @@ void PhoneFormat::afterSave( Incidence* inc)
467{ 465{
468 uint csum; 466 uint csum;
469 inc->removeID( mProfileName ); 467 inc->removeID( mProfileName );
470#if 0
471 if ( inc->type() == "Event") 468 if ( inc->type() == "Event")
472 csum = PhoneFormat::getCsumEvent( (Event*) inc ); 469 csum = PhoneFormat::getCsumEvent( (Event*) inc );
473 else 470 else
474 csum = PhoneFormat::getCsumTodo( (Todo*) inc ); 471 csum = PhoneFormat::getCsumTodo( (Todo*) inc );
475 inc->setCsum( mProfileName, QString::number( csum )); 472 inc->setCsum( mProfileName, QString::number( csum ));
476#endif 473
477 inc->setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); 474 inc->setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
478 475
479} 476}
@@ -514,7 +511,11 @@ bool PhoneFormat::save( Calendar *calendar)
514 while ( to ) { 511 while ( to ) {
515 if ( to->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { 512 if ( to->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) {
516 calendar->deleteTodo( to ); 513 calendar->deleteTodo( to );
517 } 514 } else {
515 if ( to->isCompleted()) {
516 calendar->deleteTodo( to );
517 }
518 }
518 to = tl.next(); 519 to = tl.next();
519 } 520 }
520 // 3 save file 521 // 3 save file
@@ -563,7 +564,7 @@ bool PhoneFormat::save( Calendar *calendar)
563 uint csum; 564 uint csum;
564 csum = PhoneFormat::getCsumEvent( ev ); 565 csum = PhoneFormat::getCsumEvent( ev );
565 QString cSum = QString::number( csum ); 566 QString cSum = QString::number( csum );
566 ev->setCsum( mProfileName, cSum ); 567 //ev->setCsum( mProfileName, cSum );
567 //qDebug("Event cSum %s ", cSum.latin1()); 568 //qDebug("Event cSum %s ", cSum.latin1());
568 ev1 = er1.first(); 569 ev1 = er1.first();
569 while ( ev1 ) { 570 while ( ev1 ) {
@@ -599,7 +600,7 @@ bool PhoneFormat::save( Calendar *calendar)
599 uint csum; 600 uint csum;
600 csum = PhoneFormat::getCsumTodo( to ); 601 csum = PhoneFormat::getCsumTodo( to );
601 QString cSum = QString::number( csum ); 602 QString cSum = QString::number( csum );
602 to->setCsum( mProfileName, cSum ); 603 //to->setCsum( mProfileName, cSum );
603 qDebug("Todo cSum %s ", cSum.latin1()); 604 qDebug("Todo cSum %s ", cSum.latin1());
604 Todo* to1 = tl1.first(); 605 Todo* to1 = tl1.first();
605 while ( to1 ) { 606 while ( to1 ) {