author | zautrix <zautrix> | 2004-10-27 19:44:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 19:44:10 (UTC) |
commit | bb82cac85cc196b3f60921ab27e84204036b54b8 (patch) (unidiff) | |
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 | |||
@@ -2514,10 +2514,10 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2514 | mLastAddressbookSync = QDateTime::currentDateTime(); | 2514 | mLastAddressbookSync = QDateTime::currentDateTime(); |
2515 | if ( syncManager->syncWithDesktop() ) { | 2515 | if ( syncManager->syncWithDesktop() ) { |
2516 | remote->removeSyncInfo( QString());//remove all info | 2516 | // remote->removeSyncInfo( QString());//remove all info |
2517 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { | 2517 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { |
2518 | mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; | 2518 | mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; |
2519 | qDebug("using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); | 2519 | qDebug("using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); |
2520 | } else { | 2520 | } else { |
2521 | qDebug("ERROR: KSyncManager::mRequestedSyncEvent has invalid datatime "); | 2521 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); |
2522 | } | 2522 | } |
2523 | } | 2523 | } |
@@ -2621,5 +2621,6 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2621 | inR.setExternalUID( idS ); | 2621 | inR.setExternalUID( idS ); |
2622 | if ( syncManager->syncWithDesktop() ) | 2622 | if ( syncManager->syncWithDesktop() ) |
2623 | inR.setIDStr( "changed" ); | 2623 | inR.setIDStr("changed" ); |
2624 | //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); | ||
2624 | } else { | 2625 | } else { |
2625 | inR.setIDStr( idS ); | 2626 | inR.setIDStr( idS ); |
@@ -2813,7 +2814,7 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | |||
2813 | if ( ! abLocal.saveAB()) | 2814 | if ( ! abLocal.saveAB()) |
2814 | qDebug("Error writing back AB to file "); | 2815 | qDebug("Error writing back AB to file "); |
2815 | if ( isXML ) { | 2816 | if ( external ) { |
2816 | // afterwrite processing | 2817 | // afterwrite processing |
2817 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2818 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); |
2818 | } | 2819 | } |
2819 | } | 2820 | } |
@@ -2831,4 +2832,5 @@ void KABCore::removeSyncInfo( QString syncProfile) | |||
2831 | qDebug("AB:removeSyncInfo for profile %s ", syncProfile.latin1()); | 2832 | qDebug("AB:removeSyncInfo for profile %s ", syncProfile.latin1()); |
2832 | mAddressBook->removeSyncInfo( syncProfile ); | 2833 | mAddressBook->removeSyncInfo( syncProfile ); |
2834 | setModified(); | ||
2833 | } | 2835 | } |
2834 | 2836 | ||
@@ -2853,5 +2855,5 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) | |||
2853 | abLocal.removeSyncAddressees( false ); | 2855 | abLocal.removeSyncAddressees( false ); |
2854 | abLocal.saveAB(); | 2856 | abLocal.saveAB(); |
2855 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2857 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
2856 | } | 2858 | } |
2857 | } | 2859 | } |
@@ -2892,5 +2894,5 @@ bool KABCore::syncPhone() | |||
2892 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); | 2894 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); |
2893 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); | 2895 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); |
2894 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2896 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
2895 | } | 2897 | } |
2896 | } | 2898 | } |