summaryrefslogtreecommitdiffabout
path: root/kabc
Side-by-side diff
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index bfcfab5..18b4d58 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -195,8 +195,9 @@ ulong Addressee::getCsum4List( const QStringList & attList)
mul = mul * mul;
int ii = i+1;
add = add * mul *ii*ii*ii;
cSum += add;
+ //qDebug("csum: %d %d %d", i,k,cSum);
}
}
}
@@ -227,11 +228,34 @@ void Addressee::computeCsum(const QString &dev)
if ( !mData->note.isEmpty() ) l.append( mData->note );
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() );
KABC::PhoneNumber::List phoneNumbers;
@@ -277,8 +301,9 @@ void Addressee::computeCsum(const QString &dev)
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 ));
}