-rw-r--r-- | kabc/addressbook.cpp | 3 | ||||
-rw-r--r-- | kabc/addressbook.h | 2 | ||||
-rw-r--r-- | kabc/addressee.cpp | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 6e8d027..3ec0795 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -445,7 +445,7 @@ Ticket *AddressBook::requestSaveTicket( Resource *resource ) return 0; } -void AddressBook::insertAddressee( const Addressee &a ) +void AddressBook::insertAddressee( const Addressee &a, bool setRev ) { Addressee::List::Iterator it; for ( it = d->mAddressees.begin(); it != d->mAddressees.end(); ++it ) { @@ -460,6 +460,7 @@ void AddressBook::insertAddressee( const Addressee &a ) (*it).setResource( standardResource() ); if ( changed ) { + if ( setRev ) (*it).setRevision( QDateTime::currentDateTime() ); (*it).setChanged( true ); } diff --git a/kabc/addressbook.h b/kabc/addressbook.h index 650a638..253de68 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h @@ -173,7 +173,7 @@ class AddressBook : public QObject unique id already exists in the address book it it replaced by the new one. If not the new object is appended to the address book. */ - void insertAddressee( const Addressee & ); + void insertAddressee( const Addressee &, bool setRev = true ); /** Removes entry from the address book. diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index fb32f6e..7f04d8f 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -93,6 +93,7 @@ Addressee::Addressee() mData->changed = false; mData->resource = 0; mData->mExternalId = ":"; + mData->revision = QDateTime ( QDate( 2004,1,1)); mTempSyncStat = SYNC_TEMPSTATE_INITIAL; } |