From 6500d6ebb080f1de58fe676aa0a730d47fcf64f5 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 29 Oct 2004 09:03:54 +0000 Subject: sync fixes --- (limited to 'kabc/addressee.cpp') 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) void Addressee::computeCsum(const QString &dev) { QStringList l; - if ( !mData->name.isEmpty() ) l.append(mData->name); - if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); + //if ( !mData->name.isEmpty() ) l.append(mData->name); + //if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); if ( !mData->familyName.isEmpty() ) l.append( mData->familyName ); if ( !mData->givenName.isEmpty() ) l.append(mData->givenName ); - if ( !mData->additionalName ) l.append( mData->additionalName ); + if ( !mData->additionalName.isEmpty() ) l.append( mData->additionalName ); if ( !mData->prefix.isEmpty() ) l.append( mData->prefix ); if ( !mData->suffix.isEmpty() ) l.append( mData->suffix ); if ( !mData->nickName.isEmpty() ) l.append( mData->nickName ); @@ -256,7 +256,13 @@ void Addressee::computeCsum(const QString &dev) t = mData->custom; t.sort(); for ( iii = 0; iii < t.count(); ++iii) - l.append( t[iii] ); + if ( t[iii].left( 25 ) != "KADDRESSBOOK-X-ExternalID" ) { + int find = t[iii].find (':')+1; + //qDebug("lennnn %d %d ", find, t[iii].length()); + if ( find < t[iii].length()) + l.append( t[iii] ); + + } KABC::Address::List::Iterator addressIter; for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); ++addressIter ) { @@ -266,7 +272,11 @@ void Addressee::computeCsum(const QString &dev) l.append( t[iii] ); } uint cs = getCsum4List(l); - //qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); +#if 1 + for ( iii = 0; iii < l.count(); ++iii) + qDebug("%d***%s***",iii,l[iii].latin1()); + qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); +#endif setCsum( dev, QString::number (cs )); } @@ -1111,7 +1121,10 @@ void Addressee::setRevision( const QDateTime &revision ) if ( revision == mData->revision ) return; detach(); mData->empty = false; - mData->revision = revision; + mData->revision = QDateTime( revision.date(), + QTime (revision.time().hour(), + revision.time().minute(), + revision.time().second())); } QDateTime Addressee::revision() const -- cgit v0.9.0.2