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) (side-by-side diff)
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 )
}
}
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 ) {
if ( a.uid() == (*it).uid() ) {
bool changed = false;
Addressee addr = a;
@@ -457,13 +457,14 @@ void AddressBook::insertAddressee( const Addressee &a )
(*it) = a;
if ( (*it).resource() == 0 )
(*it).setResource( standardResource() );
if ( changed ) {
- (*it).setRevision( QDateTime::currentDateTime() );
+ if ( setRev )
+ (*it).setRevision( QDateTime::currentDateTime() );
(*it).setChanged( true );
}
return;
}
}
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
/**
Insert an Addressee object into address book. If an object with the same
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.
*/
void removeAddressee( const Addressee & );
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()
{
mData = new AddresseeData;
mData->empty = true;
mData->changed = false;
mData->resource = 0;
mData->mExternalId = ":";
+ mData->revision = QDateTime ( QDate( 2004,1,1));
mTempSyncStat = SYNC_TEMPSTATE_INITIAL;
}
Addressee::~Addressee()
{
}