-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 25 |
2 files changed, 15 insertions, 12 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 012780b..3397e06 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -1063,2 +1063,4 @@ void AddresseeEditorWidget::save() + mAddressee.setRevision( QDateTime::currentDateTime() ); + 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 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); - - //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); + qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); locCh = ( localMod > mLastAddressbookSync ); if ( !remCh && ! locCh ) { - //qDebug("both not changed "); + qDebug("both not changed "); lastSync = localMod.addDays(1); @@ -2418,3 +2417,3 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i if ( locCh ) { - //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); + qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); lastSync = localMod.addDays( -1 ); @@ -2423,6 +2422,8 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i } else { - //qDebug(" not loc changed "); + qDebug(" not loc changed "); lastSync = localMod.addDays( 1 ); - if ( remCh ) + if ( remCh ) { + qDebug("rem changed "); remoteMod =( lastSync.addDays( 1 ) ); + } @@ -2438,6 +2439,4 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i } - // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); - - //qDebug("%s %d %s %d", local->lastModified().toString().latin1() , localMod, remote->lastModified().toString().latin1(), remoteMod); - //qDebug("%d %d %d %d ", local->lastModified().time().second(), local->lastModified().time().msec(), remote->lastModified().time().second(), remote->lastModified().time().msec() ); + qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); + qDebug("lastsync %s ", lastSync.toString().latin1() ); //full = true; //debug only @@ -2446,3 +2445,3 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i if ( equ ) { - //qDebug("equal "); + qDebug("equal "); if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { @@ -2645,4 +2644,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo inR.setExternalUID( idS ); - if ( syncManager->syncWithDesktop() ) + if ( syncManager->syncWithDesktop() ) { inR.setIDStr("changed" ); + } //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); @@ -2748,2 +2748,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { + //qDebug("data %s ", inL.revision().toString().latin1()); // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |