summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Side-by-side diff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 6194d6d..4c4ae09 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -564,3 +564,2 @@ void AddressBook::removeSyncInfo( QString syncProfile)
Iterator it2 ;
- QDateTime dt ( QDate( 2004,1,1) );
while ( it != end() ) {
@@ -788,8 +787,3 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev, bool takeRes
if ( setRev ) {
-
- // get rid of micro seconds
- QDateTime dt = QDateTime::currentDateTime();
- QTime t = dt.time();
- dt.setTime( QTime (t.hour (), t.minute (), t.second () ) );
- (*it).setRevision( dt );
+ (*it).setRevision( QDateTime::currentDateTime() );
}
@@ -817,3 +811,4 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev, bool takeRes
if ( found )
- return;
+ return;
+
d->mAddressees.append( a );
@@ -822,3 +817,2 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev, bool takeRes
addr.setResource( standardResource() );
-
addr.setChanged( true );
@@ -861,3 +855,3 @@ void AddressBook::removeSyncAddressees( bool removeDeleted )
Iterator it2 ;
- QDateTime dt ( QDate( 2004,1,1) );
+ QDateTime dt ( QDate( 2003,1,1) );
while ( it != end() ) {
@@ -867,3 +861,3 @@ void AddressBook::removeSyncAddressees( bool removeDeleted )
(*it).removeCustom( "KADDRESSBOOK", "X-ExternalID" );
- (*it).setIDStr("");
+ (*it).setIDStr(":");
}
@@ -880,4 +874,2 @@ void AddressBook::removeSyncAddressees( bool removeDeleted )
(*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
-
-
}
@@ -933,3 +925,4 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool
if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ||
- (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_CSUM ) {
+ (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_CSUM ||
+ (*it).tempSyncStat() == SYNC_TEMPSTATE_ADDED_EXTERNAL) {
Addressee ad = aBook->findByUid( ( (*it).uid() ));
@@ -939,3 +932,2 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool
(*it).setIDStr(":");
- (*it).computeCsum( csd );
if ( setID ) {
@@ -945,4 +937,6 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool
ad.setID( csd, (*it).uid() );
+ (*it).computeCsum( csd );
ad.setCsum( csd, (*it).getCsum( csd ) );
- aBook->insertAddressee( ad );
+ //qDebug("CSUM %s ",(*it).getCsum( csd ).latin1() );
+ aBook->insertAddressee( ad , false);
}