summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index efae874..e56e46a 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2791,50 +2791,50 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
2791 if ( syncOK ) { 2791 if ( syncOK ) {
2792 if ( syncManager->mWriteBackFile ) 2792 if ( syncManager->mWriteBackFile )
2793 { 2793 {
2794 if ( external ) 2794 if ( external )
2795 abLocal.removeSyncAddressees( !isXML); 2795 abLocal.removeSyncAddressees( !isXML);
2796 qDebug("Saving remote AB "); 2796 qDebug("Saving remote AB ");
2797 if ( ! abLocal.saveAB()) 2797 if ( ! abLocal.saveAB())
2798 qDebug("Error writing back AB to file "); 2798 qDebug("Error writing back AB to file ");
2799 if ( isXML ) { 2799 if ( isXML ) {
2800 // afterwrite processing 2800 // afterwrite processing
2801 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); 2801 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice );
2802 } 2802 }
2803 } 2803 }
2804 } 2804 }
2805 setModified(); 2805 setModified();
2806 2806
2807 } 2807 }
2808 if ( syncOK ) 2808 if ( syncOK )
2809 mViewManager->refreshView(); 2809 mViewManager->refreshView();
2810 return syncOK; 2810 return syncOK;
2811 2811
2812} 2812}
2813void KABCore::removeSyncInfo( QString syncProfile) 2813void KABCore::removeSyncInfo( QString syncProfile)
2814{ 2814{
2815 qDebug("removeSyncInfo for profile %s ", syncProfile.latin1()); 2815 qDebug("AB:removeSyncInfo for profile %s ", syncProfile.latin1());
2816 2816 mAddressBook->removeSyncInfo( syncProfile );
2817} 2817}
2818 2818
2819 2819
2820//this is a overwritten callbackmethods from the syncinterface 2820//this is a overwritten callbackmethods from the syncinterface
2821bool KABCore::syncExternal(KSyncManager* manager, QString resource) 2821bool KABCore::syncExternal(KSyncManager* manager, QString resource)
2822{ 2822{
2823 if ( resource == "phone" ) 2823 if ( resource == "phone" )
2824 return syncPhone(); 2824 return syncPhone();
2825 disableBR( true ); 2825 disableBR( true );
2826 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 2826 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
2827 2827
2828 AddressBook abLocal( resource,"syncContact"); 2828 AddressBook abLocal( resource,"syncContact");
2829 bool syncOK = false; 2829 bool syncOK = false;
2830 if ( abLocal.load() ) { 2830 if ( abLocal.load() ) {
2831 qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); 2831 qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
2832 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 2832 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
2833 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); 2833 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false );
2834 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 2834 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
2835 if ( syncOK ) { 2835 if ( syncOK ) {
2836 if ( syncManager->mWriteBackFile ) { 2836 if ( syncManager->mWriteBackFile ) {
2837 abLocal.removeSyncAddressees( false ); 2837 abLocal.removeSyncAddressees( false );
2838 abLocal.saveAB(); 2838 abLocal.saveAB();
2839 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); 2839 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice );
2840 } 2840 }