summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 0faa24d..08b1a3d 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -376,97 +376,97 @@ void KSyncManager::multiSync( bool askforPrefs )
376{ 376{
377 if (blockSave()) 377 if (blockSave())
378 return; 378 return;
379 setBlockSave(true); 379 setBlockSave(true);
380 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); 380 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
381 if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"), 381 if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"),
382 question, 382 question,
383 i18n("Yes"), i18n("No"), 383 i18n("Yes"), i18n("No"),
384 0, 0 ) != 0 ) { 384 0, 0 ) != 0 ) {
385 setBlockSave(false); 385 setBlockSave(false);
386 mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!")); 386 mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!"));
387 return; 387 return;
388 } 388 }
389 mCurrentSyncDevice = i18n("Multiple profiles") ; 389 mCurrentSyncDevice = i18n("Multiple profiles") ;
390 mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs; 390 mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs;
391 if ( askforPrefs ) { 391 if ( askforPrefs ) {
392 edit_sync_options(); 392 edit_sync_options();
393 mPrefs->mRingSyncAlgoPrefs = mSyncAlgoPrefs; 393 mPrefs->mRingSyncAlgoPrefs = mSyncAlgoPrefs;
394 } 394 }
395 mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") ); 395 mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") );
396 qApp->processEvents(); 396 qApp->processEvents();
397 int num = ringSync() ; 397 int num = ringSync() ;
398 if ( num > 1 ) 398 if ( num > 1 )
399 ringSync(); 399 ringSync();
400 setBlockSave(false); 400 setBlockSave(false);
401 if ( num ) 401 if ( num )
402 emit save(); 402 emit save();
403 if ( num ) 403 if ( num )
404 mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) ); 404 mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) );
405 else 405 else
406 mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); 406 mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!"));
407 return; 407 return;
408} 408}
409 409
410int KSyncManager::ringSync() 410int KSyncManager::ringSync()
411{ 411{
412 int syncedProfiles = 0; 412 int syncedProfiles = 0;
413 unsigned int i; 413 unsigned int i;
414 QTime timer; 414 QTime timer;
415 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 415 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
416 QStringList syncProfileNames = mSyncProfileNames; 416 QStringList syncProfileNames = mSyncProfileNames;
417 KSyncProfile* temp = new KSyncProfile (); 417 KSyncProfile* temp = new KSyncProfile ();
418 mAskForPreferences = false; 418 mAskForPreferences = false;
419 for ( i = 0; i < syncProfileNames.count(); ++i ) { 419 for ( i = 0; i < syncProfileNames.count(); ++i ) {
420 mCurrentSyncProfile = i; 420 mCurrentSyncProfile = i;
421 temp->setName(syncProfileNames[mCurrentSyncProfile]); 421 temp->setName(syncProfileNames[mCurrentSyncProfile]);
422 temp->readConfig(&config); 422 temp->readConfig(&config);
423 423
424 QString includeInRingSync; 424 bool includeInRingSync;
425 switch(mTargetApp) 425 switch(mTargetApp)
426 { 426 {
427 case (KAPI): 427 case (KAPI):
428 includeInRingSync = temp->getIncludeInRingSyncAB(); 428 includeInRingSync = temp->getIncludeInRingSyncAB();
429 break; 429 break;
430 case (KOPI): 430 case (KOPI):
431 includeInRingSync = temp->getIncludeInRingSync(); 431 includeInRingSync = temp->getIncludeInRingSync();
432 break; 432 break;
433 case (PWMPI): 433 case (PWMPI):
434 includeInRingSync = temp->getIncludeInRingSyncPWM(); 434 includeInRingSync = temp->getIncludeInRingSyncPWM();
435 break; 435 break;
436 default: 436 default:
437 qDebug("KSyncManager::ringSync: invalid apptype selected"); 437 qDebug("KSyncManager::ringSync: invalid apptype selected");
438 break; 438 break;
439 439
440 } 440 }
441 441
442 442
443 if ( includeInRingSync && ( i < 1 || i > 2 )) { 443 if ( includeInRingSync && ( i < 1 || i > 2 )) {
444 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); 444 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
445 ++syncedProfiles; 445 ++syncedProfiles;
446 // mAskForPreferences = temp->getAskForPreferences(); 446 // mAskForPreferences = temp->getAskForPreferences();
447 mWriteBackFile = temp->getWriteBackFile(); 447 mWriteBackFile = temp->getWriteBackFile();
448 mWriteBackExistingOnly = temp->getWriteBackExisting(); 448 mWriteBackExistingOnly = temp->getWriteBackExisting();
449 mWriteBackInFuture = 0; 449 mWriteBackInFuture = 0;
450 if ( temp->getWriteBackFuture() ) 450 if ( temp->getWriteBackFuture() )
451 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 451 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
452 mShowSyncSummary = false; 452 mShowSyncSummary = false;
453 mCurrentSyncDevice = syncProfileNames[i] ; 453 mCurrentSyncDevice = syncProfileNames[i] ;
454 mCurrentSyncName = mLocalMachineName; 454 mCurrentSyncName = mLocalMachineName;
455 if ( i == 0 ) { 455 if ( i == 0 ) {
456 syncSharp(); 456 syncSharp();
457 } else { 457 } else {
458 if ( temp->getIsLocalFileSync() ) { 458 if ( temp->getIsLocalFileSync() ) {
459 switch(mTargetApp) 459 switch(mTargetApp)
460 { 460 {
461 case (KAPI): 461 case (KAPI):
462 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) 462 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
463 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 463 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
464 break; 464 break;
465 case (KOPI): 465 case (KOPI):
466 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 466 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
467 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); 467 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
468 break; 468 break;
469 case (PWMPI): 469 case (PWMPI):
470 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 470 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
471 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); 471 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
472 break; 472 break;