-rw-r--r-- | korganizer/calendarview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index d5d31e2..258bd43 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1247,35 +1247,37 @@ void CalendarView::syncExternal( int mode ) | |||
1247 | KOPrefs::instance()->mPhoneConnection, | 1247 | KOPrefs::instance()->mPhoneConnection, |
1248 | KOPrefs::instance()->mPhoneModel); | 1248 | KOPrefs::instance()->mPhoneModel); |
1249 | loadSuccess = phoneFormat->load( calendar,mCalendar); | 1249 | loadSuccess = phoneFormat->load( calendar,mCalendar); |
1250 | 1250 | ||
1251 | } else | 1251 | } else |
1252 | return; | 1252 | return; |
1253 | if ( loadSuccess ) { | 1253 | if ( loadSuccess ) { |
1254 | getEventViewerDialog()->setSyncMode( true ); | 1254 | getEventViewerDialog()->setSyncMode( true ); |
1255 | syncOK = synchronizeCalendar( mCalendar, calendar, KOPrefs::instance()->mSyncAlgoPrefs ); | 1255 | syncOK = synchronizeCalendar( mCalendar, calendar, KOPrefs::instance()->mSyncAlgoPrefs ); |
1256 | getEventViewerDialog()->setSyncMode( false ); | 1256 | getEventViewerDialog()->setSyncMode( false ); |
1257 | qApp->processEvents(); | 1257 | qApp->processEvents(); |
1258 | if ( syncOK ) { | 1258 | if ( syncOK ) { |
1259 | if ( KOPrefs::instance()->mWriteBackFile ) | 1259 | if ( KOPrefs::instance()->mWriteBackFile ) |
1260 | { | 1260 | { |
1261 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); | 1261 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); |
1262 | Incidence* inc = iL.first(); | 1262 | Incidence* inc = iL.first(); |
1263 | while ( inc ) { | 1263 | if ( phoneFormat ) { |
1264 | inc->removeID(mCurrentSyncDevice); | 1264 | while ( inc ) { |
1265 | inc = iL.next(); | 1265 | inc->removeID(mCurrentSyncDevice); |
1266 | inc = iL.next(); | ||
1267 | } | ||
1266 | } | 1268 | } |
1267 | #ifndef DESKTOP_VERSION | 1269 | #ifndef DESKTOP_VERSION |
1268 | if ( sharpFormat ) | 1270 | if ( sharpFormat ) |
1269 | sharpFormat->save(calendar); | 1271 | sharpFormat->save(calendar); |
1270 | #endif | 1272 | #endif |
1271 | if ( phoneFormat ) | 1273 | if ( phoneFormat ) |
1272 | phoneFormat->save(calendar); | 1274 | phoneFormat->save(calendar); |
1273 | iL = calendar->rawIncidences(); | 1275 | iL = calendar->rawIncidences(); |
1274 | inc = iL.first(); | 1276 | inc = iL.first(); |
1275 | Incidence* loc; | 1277 | Incidence* loc; |
1276 | while ( inc ) { | 1278 | while ( inc ) { |
1277 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { | 1279 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { |
1278 | loc = mCalendar->incidence(inc->uid() ); | 1280 | loc = mCalendar->incidence(inc->uid() ); |
1279 | if ( loc ) { | 1281 | if ( loc ) { |
1280 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); | 1282 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); |
1281 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); | 1283 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); |