-rw-r--r-- | libkcal/phoneformat.cpp | 13 |
1 files changed, 7 insertions, 6 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) cSum += add; } } - if ( i == 0 ) - qDebug("csum: i == 0 %d ", cSum); } QString dump = attList.join(","); @@ -467,13 +465,12 @@ void PhoneFormat::afterSave( Incidence* inc) { uint csum; inc->removeID( mProfileName ); -#if 0 if ( inc->type() == "Event") csum = PhoneFormat::getCsumEvent( (Event*) inc ); else csum = PhoneFormat::getCsumTodo( (Todo*) inc ); inc->setCsum( mProfileName, QString::number( csum )); -#endif + inc->setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); } @@ -514,6 +511,10 @@ bool PhoneFormat::save( Calendar *calendar) while ( to ) { if ( to->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { calendar->deleteTodo( to ); + } else { + if ( to->isCompleted()) { + calendar->deleteTodo( to ); + } } to = tl.next(); } @@ -563,7 +564,7 @@ bool PhoneFormat::save( Calendar *calendar) uint csum; csum = PhoneFormat::getCsumEvent( ev ); QString cSum = QString::number( csum ); - ev->setCsum( mProfileName, cSum ); + //ev->setCsum( mProfileName, cSum ); //qDebug("Event cSum %s ", cSum.latin1()); ev1 = er1.first(); while ( ev1 ) { @@ -599,7 +600,7 @@ bool PhoneFormat::save( Calendar *calendar) uint csum; csum = PhoneFormat::getCsumTodo( to ); QString cSum = QString::number( csum ); - to->setCsum( mProfileName, cSum ); + //to->setCsum( mProfileName, cSum ); qDebug("Todo cSum %s ", cSum.latin1()); Todo* to1 = tl1.first(); while ( to1 ) { |