author | zautrix <zautrix> | 2004-10-27 19:44:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 19:44:10 (UTC) |
commit | bb82cac85cc196b3f60921ab27e84204036b54b8 (patch) (side-by-side diff) | |
tree | 518629480b983b6b85a4cf1e5542f94fe1687e41 /kaddressbook | |
parent | 85a0e0d9b1d60805cb4947be1c296c18e73c82b8 (diff) | |
download | kdepimpi-bb82cac85cc196b3f60921ab27e84204036b54b8.zip kdepimpi-bb82cac85cc196b3f60921ab27e84204036b54b8.tar.gz kdepimpi-bb82cac85cc196b3f60921ab27e84204036b54b8.tar.bz2 |
sync fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index ea87929..b0cb986 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -2513,12 +2513,12 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo local->resetTempSyncStat(); mLastAddressbookSync = QDateTime::currentDateTime(); if ( syncManager->syncWithDesktop() ) { - remote->removeSyncInfo( QString());//remove all info + // remote->removeSyncInfo( QString());//remove all info if ( KSyncManager::mRequestedSyncEvent.isValid() ) { mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; qDebug("using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); } else { - qDebug("ERROR: KSyncManager::mRequestedSyncEvent has invalid datatime "); + qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); } } QDateTime modifiedCalendar = mLastAddressbookSync; @@ -2620,7 +2620,8 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo inR.setOriginalExternalUID( OidS ); inR.setExternalUID( idS ); if ( syncManager->syncWithDesktop() ) - inR.setIDStr( "changed" ); + inR.setIDStr("changed" ); + //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); } else { inR.setIDStr( idS ); } @@ -2812,9 +2813,9 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode) qDebug("Saving remote AB "); if ( ! abLocal.saveAB()) qDebug("Error writing back AB to file "); - if ( isXML ) { + if ( external ) { // afterwrite processing - abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); + abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); } } } @@ -2830,6 +2831,7 @@ void KABCore::removeSyncInfo( QString syncProfile) { qDebug("AB:removeSyncInfo for profile %s ", syncProfile.latin1()); mAddressBook->removeSyncInfo( syncProfile ); + setModified(); } @@ -2852,7 +2854,7 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) if ( syncManager->mWriteBackFile ) { abLocal.removeSyncAddressees( false ); abLocal.saveAB(); - abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); + abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); } } setModified(); @@ -2891,7 +2893,7 @@ bool KABCore::syncPhone() abLocal.saveABphone( fileName ); abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); - abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); + abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); } } setModified(); |