summaryrefslogtreecommitdiffabout
path: root/libkcal/phoneformat.cpp
authorzautrix <zautrix>2004-09-12 17:18:27 (UTC)
committer zautrix <zautrix>2004-09-12 17:18:27 (UTC)
commitbc4153a99e205f43d0144e2e910730dd1a14d402 (patch) (side-by-side diff)
tree16aeb28cd765539bac6e85e714478f31a7b93bac /libkcal/phoneformat.cpp
parenta222c2f7369eeefd19454c973c0cc48300f72bec (diff)
downloadkdepimpi-bc4153a99e205f43d0144e2e910730dd1a14d402.zip
kdepimpi-bc4153a99e205f43d0144e2e910730dd1a14d402.tar.gz
kdepimpi-bc4153a99e205f43d0144e2e910730dd1a14d402.tar.bz2
added missing sync featute
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)
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,7 +511,11 @@ 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();
}
// 3 save file
@@ -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 ) {