author | zautrix <zautrix> | 2004-10-17 16:06:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-17 16:06:42 (UTC) |
commit | d92f58ffa1937af8a4240b9d235da15f5f352769 (patch) (side-by-side diff) | |
tree | 48768599988f33c7f20017a76d05e919fa77ac51 /kde2file | |
parent | 711c4c06a7d1a52b97fd24efa3586543f46cc6d7 (diff) | |
download | kdepimpi-d92f58ffa1937af8a4240b9d235da15f5f352769.zip kdepimpi-d92f58ffa1937af8a4240b9d235da15f5f352769.tar.gz kdepimpi-d92f58ffa1937af8a4240b9d235da15f5f352769.tar.bz2 |
KDE sync fixes
-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 @@ -162,18 +162,20 @@ int main( int argc, char *argv[] ) int add = 0; if ( storage->load() ) { qDebug("*************************loaded!"); 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 ); else if ( incOld->type() == "Todo" ) calendarResource->deleteTodo( (Todo *) incOld ); else if ( incOld->type() == "Event" ) @@ -197,12 +199,17 @@ int main( int argc, char *argv[] ) calendarResource->deleteEvent( (Event *) incOld ); } calendarResource->addIncidence( cl ); ++add; } + } else { // added + Incidence* cl = (*it)->clone(); + calendarResource->addIncidence( cl ); + ++add; + } } KCal::Incidence::List allInc = calendarResource->rawIncidences(); for( it = allInc.begin(); it != allInc.end(); ++it ) { ResourceCalendar * re = calendarResource->resource( (*it) ); if ( re && !re->readOnly() ) { |