summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index d6ead37..547d02b 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1178,55 +1178,53 @@ void CalendarView::syncPhone()
1178{ 1178{
1179 syncExternal( 1 ); 1179 syncExternal( 1 );
1180} 1180}
1181void CalendarView::syncExternal( int mode ) 1181void CalendarView::syncExternal( int mode )
1182{ 1182{
1183 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 1183 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
1184 //mCurrentSyncDevice = "sharp-DTM"; 1184 //mCurrentSyncDevice = "sharp-DTM";
1185 if ( KOPrefs::instance()->mAskForPreferences ) 1185 if ( KOPrefs::instance()->mAskForPreferences )
1186 edit_sync_options(); 1186 edit_sync_options();
1187 qApp->processEvents(); 1187 qApp->processEvents();
1188 CalendarLocal* calendar = new CalendarLocal(); 1188 CalendarLocal* calendar = new CalendarLocal();
1189 calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); 1189 calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
1190 bool syncOK = false; 1190 bool syncOK = false;
1191 bool loadSuccess = false; 1191 bool loadSuccess = false;
1192 PhoneFormat* phoneFormat = 0; 1192 PhoneFormat* phoneFormat = 0;
1193#ifndef DESKTOP_VERSION 1193#ifndef DESKTOP_VERSION
1194 SharpFormat* sharpFormat = 0; 1194 SharpFormat* sharpFormat = 0;
1195 if ( mode == 0 ) { // sharp 1195 if ( mode == 0 ) { // sharp
1196 sharpFormat = new SharpFormat () ; 1196 sharpFormat = new SharpFormat () ;
1197 loadSuccess = sharpFormat->load( calendar, mCalendar ); 1197 loadSuccess = sharpFormat->load( calendar, mCalendar );
1198 1198
1199 } else 1199 } else
1200#endif 1200#endif
1201 if ( mode == 1 ) { // phone 1201 if ( mode == 1 ) { // phone
1202 phoneFormat = new PhoneFormat (); 1202 phoneFormat = new PhoneFormat (mCurrentSyncDevice,
1203 loadSuccess = phoneFormat->load( calendar,
1204 mCalendar,
1205 mCurrentSyncDevice,
1206 KOPrefs::instance()->mPhoneDevice, 1203 KOPrefs::instance()->mPhoneDevice,
1207 KOPrefs::instance()->mPhoneConnection, 1204 KOPrefs::instance()->mPhoneConnection,
1208 KOPrefs::instance()->mPhoneModel); 1205 KOPrefs::instance()->mPhoneModel);
1206 loadSuccess = phoneFormat->load( calendar,mCalendar);
1209 1207
1210 } else 1208 } else
1211 return; 1209 return;
1212 if ( loadSuccess ) { 1210 if ( loadSuccess ) {
1213 getEventViewerDialog()->setSyncMode( true ); 1211 getEventViewerDialog()->setSyncMode( true );
1214 syncOK = synchronizeCalendar( mCalendar, calendar, KOPrefs::instance()->mSyncAlgoPrefs ); 1212 syncOK = synchronizeCalendar( mCalendar, calendar, KOPrefs::instance()->mSyncAlgoPrefs );
1215 getEventViewerDialog()->setSyncMode( false ); 1213 getEventViewerDialog()->setSyncMode( false );
1216 qApp->processEvents(); 1214 qApp->processEvents();
1217 if ( syncOK ) { 1215 if ( syncOK ) {
1218 if ( KOPrefs::instance()->mWriteBackFile ) 1216 if ( KOPrefs::instance()->mWriteBackFile )
1219 { 1217 {
1220 QPtrList<Incidence> iL = mCalendar->rawIncidences(); 1218 QPtrList<Incidence> iL = mCalendar->rawIncidences();
1221 Incidence* inc = iL.first(); 1219 Incidence* inc = iL.first();
1222 /* obsolete 1220 /* obsolete
1223 while ( inc ) { 1221 while ( inc ) {
1224 inc->setZaurusStat( inc->revision () ); 1222 inc->setZaurusStat( inc->revision () );
1225 inc = iL.next(); 1223 inc = iL.next();
1226 } 1224 }
1227 */ 1225 */
1228#ifndef DESKTOP_VERSION 1226#ifndef DESKTOP_VERSION
1229 if ( sharpFormat ) 1227 if ( sharpFormat )
1230 sharpFormat->save(calendar); 1228 sharpFormat->save(calendar);
1231#endif 1229#endif
1232 if ( phoneFormat ) 1230 if ( phoneFormat )