-rw-r--r-- | kde2file/caldump/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kde2file/caldump/main.cpp b/kde2file/caldump/main.cpp index 03571b9..755e792 100644 --- a/kde2file/caldump/main.cpp +++ b/kde2file/caldump/main.cpp @@ -165,12 +165,14 @@ int main( int argc, char *argv[] ) KCal::Incidence::List newInc = localCalendar->rawIncidences(); Incidence::List::ConstIterator it; for( it = newInc.begin(); it != newInc.end(); ++it ) { + if ( (*it)->pilotId() > 0 ) { //changed Incidence* cl = (*it)->clone(); Incidence *incOld = calendarResource->incidence( cl->uid() ); ResourceCalendar * res = 0; if ( incOld ) res = calendarResource->resource( incOld ); if ( res ) { + cl->setPilotId( incOld->pilotId() ); ++num; if ( incOld->type() == "Journal" ) calendarResource->deleteJournal( (Journal *) incOld ); @@ -200,6 +202,11 @@ int main( int argc, char *argv[] ) calendarResource->addIncidence( cl ); ++add; } + } else { // added + Incidence* cl = (*it)->clone(); + calendarResource->addIncidence( cl ); + ++add; + } } KCal::Incidence::List allInc = calendarResource->rawIncidences(); |