summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.cpp
authorzautrix <zautrix>2004-10-29 09:03:54 (UTC)
committer zautrix <zautrix>2004-10-29 09:03:54 (UTC)
commit6500d6ebb080f1de58fe676aa0a730d47fcf64f5 (patch) (unidiff)
tree41841e05bf1e6b88e6e55f42011dce5f6bed85b4 /kabc/addressee.cpp
parent41e3625b8c38ff45e70b59416a519d59a5f4d937 (diff)
downloadkdepimpi-6500d6ebb080f1de58fe676aa0a730d47fcf64f5.zip
kdepimpi-6500d6ebb080f1de58fe676aa0a730d47fcf64f5.tar.gz
kdepimpi-6500d6ebb080f1de58fe676aa0a730d47fcf64f5.tar.bz2
sync fixes
Diffstat (limited to 'kabc/addressee.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index d5a110a..3d4992c 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -209,11 +209,11 @@ ulong Addressee::getCsum4List( const QStringList & attList)
209void Addressee::computeCsum(const QString &dev) 209void Addressee::computeCsum(const QString &dev)
210{ 210{
211 QStringList l; 211 QStringList l;
212 if ( !mData->name.isEmpty() ) l.append(mData->name); 212 //if ( !mData->name.isEmpty() ) l.append(mData->name);
213 if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); 213 //if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName );
214 if ( !mData->familyName.isEmpty() ) l.append( mData->familyName ); 214 if ( !mData->familyName.isEmpty() ) l.append( mData->familyName );
215 if ( !mData->givenName.isEmpty() ) l.append(mData->givenName ); 215 if ( !mData->givenName.isEmpty() ) l.append(mData->givenName );
216 if ( !mData->additionalName ) l.append( mData->additionalName ); 216 if ( !mData->additionalName.isEmpty() ) l.append( mData->additionalName );
217 if ( !mData->prefix.isEmpty() ) l.append( mData->prefix ); 217 if ( !mData->prefix.isEmpty() ) l.append( mData->prefix );
218 if ( !mData->suffix.isEmpty() ) l.append( mData->suffix ); 218 if ( !mData->suffix.isEmpty() ) l.append( mData->suffix );
219 if ( !mData->nickName.isEmpty() ) l.append( mData->nickName ); 219 if ( !mData->nickName.isEmpty() ) l.append( mData->nickName );
@@ -256,7 +256,13 @@ void Addressee::computeCsum(const QString &dev)
256 t = mData->custom; 256 t = mData->custom;
257 t.sort(); 257 t.sort();
258 for ( iii = 0; iii < t.count(); ++iii) 258 for ( iii = 0; iii < t.count(); ++iii)
259 l.append( t[iii] ); 259 if ( t[iii].left( 25 ) != "KADDRESSBOOK-X-ExternalID" ) {
260 int find = t[iii].find (':')+1;
261 //qDebug("lennnn %d %d ", find, t[iii].length());
262 if ( find < t[iii].length())
263 l.append( t[iii] );
264
265 }
260 KABC::Address::List::Iterator addressIter; 266 KABC::Address::List::Iterator addressIter;
261 for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); 267 for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end();
262 ++addressIter ) { 268 ++addressIter ) {
@@ -266,7 +272,11 @@ void Addressee::computeCsum(const QString &dev)
266 l.append( t[iii] ); 272 l.append( t[iii] );
267 } 273 }
268 uint cs = getCsum4List(l); 274 uint cs = getCsum4List(l);
269 //qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); 275#if 1
276 for ( iii = 0; iii < l.count(); ++iii)
277 qDebug("%d***%s***",iii,l[iii].latin1());
278 qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() );
279#endif
270 setCsum( dev, QString::number (cs )); 280 setCsum( dev, QString::number (cs ));
271} 281}
272 282
@@ -1111,7 +1121,10 @@ void Addressee::setRevision( const QDateTime &revision )
1111 if ( revision == mData->revision ) return; 1121 if ( revision == mData->revision ) return;
1112 detach(); 1122 detach();
1113 mData->empty = false; 1123 mData->empty = false;
1114 mData->revision = revision; 1124 mData->revision = QDateTime( revision.date(),
1125 QTime (revision.time().hour(),
1126 revision.time().minute(),
1127 revision.time().second()));
1115} 1128}
1116 1129
1117QDateTime Addressee::revision() const 1130QDateTime Addressee::revision() const