-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[] ) | |||
165 | KCal::Incidence::List newInc = localCalendar->rawIncidences(); | 165 | KCal::Incidence::List newInc = localCalendar->rawIncidences(); |
166 | Incidence::List::ConstIterator it; | 166 | Incidence::List::ConstIterator it; |
167 | for( it = newInc.begin(); it != newInc.end(); ++it ) { | 167 | for( it = newInc.begin(); it != newInc.end(); ++it ) { |
168 | if ( (*it)->pilotId() > 0 ) { //changed | ||
168 | Incidence* cl = (*it)->clone(); | 169 | Incidence* cl = (*it)->clone(); |
169 | Incidence *incOld = calendarResource->incidence( cl->uid() ); | 170 | Incidence *incOld = calendarResource->incidence( cl->uid() ); |
170 | ResourceCalendar * res = 0; | 171 | ResourceCalendar * res = 0; |
171 | if ( incOld ) | 172 | if ( incOld ) |
172 | res = calendarResource->resource( incOld ); | 173 | res = calendarResource->resource( incOld ); |
173 | if ( res ) { | 174 | if ( res ) { |
175 | cl->setPilotId( incOld->pilotId() ); | ||
174 | ++num; | 176 | ++num; |
175 | if ( incOld->type() == "Journal" ) | 177 | if ( incOld->type() == "Journal" ) |
176 | calendarResource->deleteJournal( (Journal *) incOld ); | 178 | calendarResource->deleteJournal( (Journal *) incOld ); |
@@ -200,6 +202,11 @@ int main( int argc, char *argv[] ) | |||
200 | calendarResource->addIncidence( cl ); | 202 | calendarResource->addIncidence( cl ); |
201 | ++add; | 203 | ++add; |
202 | } | 204 | } |
205 | } else { // added | ||
206 | Incidence* cl = (*it)->clone(); | ||
207 | calendarResource->addIncidence( cl ); | ||
208 | ++add; | ||
209 | } | ||
203 | } | 210 | } |
204 | KCal::Incidence::List allInc = calendarResource->rawIncidences(); | 211 | KCal::Incidence::List allInc = calendarResource->rawIncidences(); |
205 | 212 | ||