summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-10-29 09:03:54 (UTC)
committer zautrix <zautrix>2004-10-29 09:03:54 (UTC)
commit6500d6ebb080f1de58fe676aa0a730d47fcf64f5 (patch) (unidiff)
tree41841e05bf1e6b88e6e55f42011dce5f6bed85b4 /kaddressbook
parent41e3625b8c38ff45e70b59416a519d59a5f4d937 (diff)
downloadkdepimpi-6500d6ebb080f1de58fe676aa0a730d47fcf64f5.zip
kdepimpi-6500d6ebb080f1de58fe676aa0a730d47fcf64f5.tar.gz
kdepimpi-6500d6ebb080f1de58fe676aa0a730d47fcf64f5.tar.bz2
sync fixes
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/addresseeeditorwidget.cpp4
-rw-r--r--kaddressbook/kabcore.cpp25
2 files changed, 16 insertions, 13 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp
index 012780b..3397e06 100644
--- a/kaddressbook/addresseeeditorwidget.cpp
+++ b/kaddressbook/addresseeeditorwidget.cpp
@@ -1062,3 +1062,5 @@ void AddresseeEditorWidget::save()
1062 } 1062 }
1063 1063
1064 mAddressee.setRevision( QDateTime::currentDateTime() );
1065
1064 mAddressee.setRole( mRoleEdit->text() ); 1066 mAddressee.setRole( mRoleEdit->text() );
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 273d435..6e482b5 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2408,7 +2408,6 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
2408 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 2408 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
2409 2409 qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
2410 //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
2411 locCh = ( localMod > mLastAddressbookSync ); 2410 locCh = ( localMod > mLastAddressbookSync );
2412 if ( !remCh && ! locCh ) { 2411 if ( !remCh && ! locCh ) {
2413 //qDebug("both not changed "); 2412 qDebug("both not changed ");
2414 lastSync = localMod.addDays(1); 2413 lastSync = localMod.addDays(1);
@@ -2418,3 +2417,3 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
2418 if ( locCh ) { 2417 if ( locCh ) {
2419 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); 2418 qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1());
2420 lastSync = localMod.addDays( -1 ); 2419 lastSync = localMod.addDays( -1 );
@@ -2423,6 +2422,8 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
2423 } else { 2422 } else {
2424 //qDebug(" not loc changed "); 2423 qDebug(" not loc changed ");
2425 lastSync = localMod.addDays( 1 ); 2424 lastSync = localMod.addDays( 1 );
2426 if ( remCh ) 2425 if ( remCh ) {
2426 qDebug("rem changed ");
2427 remoteMod =( lastSync.addDays( 1 ) ); 2427 remoteMod =( lastSync.addDays( 1 ) );
2428 }
2428 2429
@@ -2438,6 +2439,4 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
2438 } 2439 }
2439 // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); 2440 qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec());
2440 2441 qDebug("lastsync %s ", lastSync.toString().latin1() );
2441 //qDebug("%s %d %s %d", local->lastModified().toString().latin1() , localMod, remote->lastModified().toString().latin1(), remoteMod);
2442 //qDebug("%d %d %d %d ", local->lastModified().time().second(), local->lastModified().time().msec(), remote->lastModified().time().second(), remote->lastModified().time().msec() );
2443 //full = true; //debug only 2442 //full = true; //debug only
@@ -2446,3 +2445,3 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
2446 if ( equ ) { 2445 if ( equ ) {
2447 //qDebug("equal "); 2446 qDebug("equal ");
2448 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2447 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
@@ -2645,4 +2644,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
2645 inR.setExternalUID( idS ); 2644 inR.setExternalUID( idS );
2646 if ( syncManager->syncWithDesktop() ) 2645 if ( syncManager->syncWithDesktop() ) {
2647 inR.setIDStr("changed" ); 2646 inR.setIDStr("changed" );
2647 }
2648 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); 2648 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" );
@@ -2748,2 +2748,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
2748 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { 2748 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) {
2749 //qDebug("data %s ", inL.revision().toString().latin1());
2749 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 2750 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);