summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index fa0c51f..d6482fb 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2929,48 +2929,50 @@ bool KABCore::syncAB(QString filename, int mode)
2929 AddressBook::Iterator it; 2929 AddressBook::Iterator it;
2930 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 2930 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
2931 if ( (*it).revision() != dt ) { 2931 if ( (*it).revision() != dt ) {
2932 found = true; 2932 found = true;
2933 break; 2933 break;
2934 } 2934 }
2935 } 2935 }
2936 external = ! found; 2936 external = ! found;
2937 } 2937 }
2938 2938
2939 if ( external ) { 2939 if ( external ) {
2940 qDebug("Setting vcf mode to external "); 2940 qDebug("Setting vcf mode to external ");
2941 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 2941 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
2942 AddressBook::Iterator it; 2942 AddressBook::Iterator it;
2943 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 2943 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
2944 (*it).setID( mCurrentSyncDevice, (*it).uid() ); 2944 (*it).setID( mCurrentSyncDevice, (*it).uid() );
2945 (*it).computeCsum( mCurrentSyncDevice ); 2945 (*it).computeCsum( mCurrentSyncDevice );
2946 } 2946 }
2947 } 2947 }
2948 //AddressBook::Iterator it; 2948 //AddressBook::Iterator it;
2949 //QStringList vcards; 2949 //QStringList vcards;
2950 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 2950 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
2951 // qDebug("Name %s ", (*it).familyName().latin1()); 2951 // qDebug("Name %s ", (*it).familyName().latin1());
2952 //} 2952 //}
2953 if ( filename.right(4) == ".xml")
2954 abLocal.mergeAB( mAddressBook ,mCurrentSyncDevice );
2953 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); 2955 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode );
2954 if ( syncOK ) { 2956 if ( syncOK ) {
2955 if ( KABPrefs::instance()->mWriteBackFile ) 2957 if ( KABPrefs::instance()->mWriteBackFile )
2956 { 2958 {
2957 if ( external ) 2959 if ( external )
2958 abLocal.removeDeletedAddressees(); 2960 abLocal.removeDeletedAddressees();
2959 qDebug("Saving remote AB "); 2961 qDebug("Saving remote AB ");
2960 abLocal.saveAB(); 2962 abLocal.saveAB();
2961 } 2963 }
2962 } 2964 }
2963 setModified(); 2965 setModified();
2964 2966
2965 } 2967 }
2966 if ( syncOK ) 2968 if ( syncOK )
2967 mViewManager->refreshView(); 2969 mViewManager->refreshView();
2968 return syncOK; 2970 return syncOK;
2969#if 0 2971#if 0
2970 2972
2971 if ( storage->load(KOPrefs::instance()->mUseQuicksave) ) { 2973 if ( storage->load(KOPrefs::instance()->mUseQuicksave) ) {
2972 getEventViewerDialog()->setSyncMode( true ); 2974 getEventViewerDialog()->setSyncMode( true );
2973 syncOK = synchronizeCalendar( mCalendar, calendar, mode ); 2975 syncOK = synchronizeCalendar( mCalendar, calendar, mode );
2974 getEventViewerDialog()->setSyncMode( false ); 2976 getEventViewerDialog()->setSyncMode( false );
2975 if ( syncOK ) { 2977 if ( syncOK ) {
2976 if ( KOPrefs::instance()->mWriteBackFile ) 2978 if ( KOPrefs::instance()->mWriteBackFile )