From ced210b0c4643ddac6a2e80eab4c85c1994b20e0 Mon Sep 17 00:00:00 2001 From: zautrix Date: Tue, 18 Jan 2005 14:09:00 +0000 Subject: ab sync fixes --- (limited to 'kabc') diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index bfcfab5..18b4d58 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -196,6 +196,7 @@ ulong Addressee::getCsum4List( const QStringList & attList) int ii = i+1; add = add * mul *ii*ii*ii; cSum += add; + //qDebug("csum: %d %d %d", i,k,cSum); } } @@ -228,9 +229,32 @@ void Addressee::computeCsum(const QString &dev) if ( !mData->productId.isEmpty() ) l.append(mData->productId ); if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); - // if ( !mData->logo.isEmpty() ) l.append( ); - //if ( !mData->photo.isEmpty() ) l.append( ); - //if ( !mData->sound.isEmpty() ) l.append( ); + if ( !mData->logo.undefined() ) { + if ( !mData->logo.isIntern() ) + l.append( mData->logo.url() ); + else + l.append( QString::number(mData->logo.data().width()* mData->logo.data().height())); + } else { + l.append( "nologo"); + } + if ( !mData->photo.undefined() ) { + if ( !mData->photo.isIntern() ) + l.append( mData->photo.url() ); + else + l.append( QString::number(mData->photo.data().width()* mData->photo.data().height())); + } else { + l.append( "nophoto"); + } +#if 0 + if ( !mData->sound.undefined() ) { + if ( !mData->sound.isIntern() ) + l.append( mData->sound.url() ); + else + l.append( QString(mData->sound.data().with()* mData->sound.data().height())); + } else { + l.append( "nosound"); + } +#endif //if ( !mData->agent.isEmpty() ) l.append( ); if ( mData->url.isValid() ) if ( ! mData->url.path().isEmpty()) l.append( mData->url.path() ); @@ -278,6 +302,7 @@ void Addressee::computeCsum(const QString &dev) 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 )); } -- cgit v0.9.0.2