summaryrefslogtreecommitdiffabout
path: root/kabc
authorzautrix <zautrix>2004-09-18 16:07:07 (UTC)
committer zautrix <zautrix>2004-09-18 16:07:07 (UTC)
commitbf18a7b4edb4121fd2ea974ac1ec634167c9b993 (patch) (unidiff)
tree056e62659f8bc5a5b20dc24dcaa73c38f4515cd5 /kabc
parentca8fcf3fd4dc068747d8f31e2189145b22853d55 (diff)
downloadkdepimpi-bf18a7b4edb4121fd2ea974ac1ec634167c9b993.zip
kdepimpi-bf18a7b4edb4121fd2ea974ac1ec634167c9b993.tar.gz
kdepimpi-bf18a7b4edb4121fd2ea974ac1ec634167c9b993.tar.bz2
more AB sync
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp5
-rw-r--r--kabc/addressbook.h2
-rw-r--r--kabc/addressee.cpp1
3 files changed, 5 insertions, 3 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 6e8d027..3ec0795 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -442,13 +442,13 @@ Ticket *AddressBook::requestSaveTicket( Resource *resource )
442 } 442 }
443 } 443 }
444 444
445 return 0; 445 return 0;
446} 446}
447 447
448void AddressBook::insertAddressee( const Addressee &a ) 448void AddressBook::insertAddressee( const Addressee &a, bool setRev )
449{ 449{
450 Addressee::List::Iterator it; 450 Addressee::List::Iterator it;
451 for ( it = d->mAddressees.begin(); it != d->mAddressees.end(); ++it ) { 451 for ( it = d->mAddressees.begin(); it != d->mAddressees.end(); ++it ) {
452 if ( a.uid() == (*it).uid() ) { 452 if ( a.uid() == (*it).uid() ) {
453 bool changed = false; 453 bool changed = false;
454 Addressee addr = a; 454 Addressee addr = a;
@@ -457,13 +457,14 @@ void AddressBook::insertAddressee( const Addressee &a )
457 457
458 (*it) = a; 458 (*it) = a;
459 if ( (*it).resource() == 0 ) 459 if ( (*it).resource() == 0 )
460 (*it).setResource( standardResource() ); 460 (*it).setResource( standardResource() );
461 461
462 if ( changed ) { 462 if ( changed ) {
463 (*it).setRevision( QDateTime::currentDateTime() ); 463 if ( setRev )
464 (*it).setRevision( QDateTime::currentDateTime() );
464 (*it).setChanged( true ); 465 (*it).setChanged( true );
465 } 466 }
466 467
467 return; 468 return;
468 } 469 }
469 } 470 }
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index 650a638..253de68 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -170,13 +170,13 @@ class AddressBook : public QObject
170 170
171 /** 171 /**
172 Insert an Addressee object into address book. If an object with the same 172 Insert an Addressee object into address book. If an object with the same
173 unique id already exists in the address book it it replaced by the new 173 unique id already exists in the address book it it replaced by the new
174 one. If not the new object is appended to the address book. 174 one. If not the new object is appended to the address book.
175 */ 175 */
176 void insertAddressee( const Addressee & ); 176 void insertAddressee( const Addressee &, bool setRev = true );
177 177
178 /** 178 /**
179 Removes entry from the address book. 179 Removes entry from the address book.
180 */ 180 */
181 void removeAddressee( const Addressee & ); 181 void removeAddressee( const Addressee & );
182 182
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index fb32f6e..7f04d8f 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -90,12 +90,13 @@ Addressee::Addressee()
90{ 90{
91 mData = new AddresseeData; 91 mData = new AddresseeData;
92 mData->empty = true; 92 mData->empty = true;
93 mData->changed = false; 93 mData->changed = false;
94 mData->resource = 0; 94 mData->resource = 0;
95 mData->mExternalId = ":"; 95 mData->mExternalId = ":";
96 mData->revision = QDateTime ( QDate( 2004,1,1));
96 mTempSyncStat = SYNC_TEMPSTATE_INITIAL; 97 mTempSyncStat = SYNC_TEMPSTATE_INITIAL;
97} 98}
98 99
99Addressee::~Addressee() 100Addressee::~Addressee()
100{ 101{
101} 102}