-rw-r--r-- | libkdepim/ksyncmanager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 3adbf61..df5a0d9 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -54,17 +54,17 @@ | |||
54 | #include <kglobal.h> | 54 | #include <kglobal.h> |
55 | #include <kconfig.h> | 55 | #include <kconfig.h> |
56 | #include <kfiledialog.h> | 56 | #include <kfiledialog.h> |
57 | 57 | ||
58 | QDateTime KSyncManager::mRequestedSyncEvent; | 58 | QDateTime KSyncManager::mRequestedSyncEvent; |
59 | 59 | ||
60 | 60 | ||
61 | KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) | 61 | KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) |
62 | : QObject(), mParent(parent), mImplementation(implementation), mTargetApp(ta), mPrefs(prefs ),mSyncMenu(syncmenu) | 62 | : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu) |
63 | { | 63 | { |
64 | mServerSocket = 0; | 64 | mServerSocket = 0; |
65 | bar = new QProgressBar ( 1, 0 ); | 65 | bar = new QProgressBar ( 1, 0 ); |
66 | bar->setCaption (""); | 66 | bar->setCaption (""); |
67 | mWriteBackInPast = 2; | 67 | mWriteBackInPast = 2; |
68 | int w = 300; | 68 | int w = 300; |
69 | if ( QApplication::desktop()->width() < 320 ) | 69 | if ( QApplication::desktop()->width() < 320 ) |
70 | w = 220; | 70 | w = 220; |
@@ -455,20 +455,19 @@ void KSyncManager::syncLocalFile() | |||
455 | } | 455 | } |
456 | 456 | ||
457 | bool KSyncManager::syncWithFile( QString fn , bool quick ) | 457 | bool KSyncManager::syncWithFile( QString fn , bool quick ) |
458 | { | 458 | { |
459 | bool ret = false; | 459 | bool ret = false; |
460 | QFileInfo info; | 460 | QFileInfo info; |
461 | info.setFile( fn ); | 461 | info.setFile( fn ); |
462 | QString mess; | 462 | QString mess; |
463 | bool loadbup = true; | ||
464 | if ( !info. exists() ) { | 463 | if ( !info. exists() ) { |
465 | mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) ); | 464 | mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) ); |
466 | int result = QMessageBox::warning( mParent, i18n("Warning!"), | 465 | QMessageBox::warning( mParent, i18n("Warning!"), |
467 | mess ); | 466 | mess ); |
468 | return ret; | 467 | return ret; |
469 | } | 468 | } |
470 | int result = 0; | 469 | int result = 0; |
471 | if ( !quick ) { | 470 | if ( !quick ) { |
472 | mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); | 471 | mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); |
473 | result = QMessageBox::warning( mParent, i18n("Warning!"), | 472 | result = QMessageBox::warning( mParent, i18n("Warning!"), |
474 | mess, | 473 | mess, |
@@ -551,17 +550,17 @@ int KSyncManager::ringSync() | |||
551 | QStringList syncProfileNames = mSyncProfileNames; | 550 | QStringList syncProfileNames = mSyncProfileNames; |
552 | KSyncProfile* temp = new KSyncProfile (); | 551 | KSyncProfile* temp = new KSyncProfile (); |
553 | mAskForPreferences = false; | 552 | mAskForPreferences = false; |
554 | for ( i = 0; i < syncProfileNames.count(); ++i ) { | 553 | for ( i = 0; i < syncProfileNames.count(); ++i ) { |
555 | mCurrentSyncProfile = i; | 554 | mCurrentSyncProfile = i; |
556 | temp->setName(syncProfileNames[mCurrentSyncProfile]); | 555 | temp->setName(syncProfileNames[mCurrentSyncProfile]); |
557 | temp->readConfig(&config); | 556 | temp->readConfig(&config); |
558 | 557 | ||
559 | bool includeInRingSync; | 558 | bool includeInRingSync = false; |
560 | switch(mTargetApp) | 559 | switch(mTargetApp) |
561 | { | 560 | { |
562 | case (KAPI): | 561 | case (KAPI): |
563 | includeInRingSync = temp->getIncludeInRingSyncAB(); | 562 | includeInRingSync = temp->getIncludeInRingSyncAB(); |
564 | break; | 563 | break; |
565 | case (KOPI): | 564 | case (KOPI): |
566 | includeInRingSync = temp->getIncludeInRingSync(); | 565 | includeInRingSync = temp->getIncludeInRingSync(); |
567 | break; | 566 | break; |