-rw-r--r-- | kabc/addressbook.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index d03dea3..16e1653 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -451,4 +451,7 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev ) for ( it = d->mAddressees.begin(); it != d->mAddressees.end(); ++it ) { if ( a.uid() == (*it).uid() ) { + if ( setRev && (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) { + return; + } bool changed = false; Addressee addr = a; @@ -462,4 +465,5 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev ) if ( changed ) { if ( setRev ) { + // get rid of micro seconds QDateTime dt = QDateTime::currentDateTime(); @@ -526,5 +530,5 @@ Addressee::List AddressBook::getExternLastSyncAddressees() Iterator it; for ( it = begin(); it != end(); ++it ) { - if ( (*it).uid().left( 20 ) == "last-syncAddressee-" ) { + if ( (*it).uid().left( 19 ) == "last-syncAddressee-" ) { if ( (*it).familyName().left(3) == "E: " ) results.append( *it ); @@ -556,5 +560,6 @@ QStringList AddressBook:: uidList() Addressee::List AddressBook::allAddressees() { - return d->mAddressees; + return d->mAddressees; + } |