-rw-r--r-- | kaddressbook/kabcore.cpp | 2 |
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 @@ -2937,32 +2937,34 @@ bool KABCore::syncAB(QString filename, int mode) } if ( external ) { qDebug("Setting vcf mode to external "); mGlobalSyncMode = SYNC_MODE_EXTERNAL; AddressBook::Iterator it; for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { (*it).setID( mCurrentSyncDevice, (*it).uid() ); (*it).computeCsum( mCurrentSyncDevice ); } } //AddressBook::Iterator it; //QStringList vcards; //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { // qDebug("Name %s ", (*it).familyName().latin1()); //} + if ( filename.right(4) == ".xml") + abLocal.mergeAB( mAddressBook ,mCurrentSyncDevice ); syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); if ( syncOK ) { if ( KABPrefs::instance()->mWriteBackFile ) { if ( external ) abLocal.removeDeletedAddressees(); qDebug("Saving remote AB "); abLocal.saveAB(); } } setModified(); } if ( syncOK ) mViewManager->refreshView(); return syncOK; |