summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-18 14:09:00 (UTC)
committer zautrix <zautrix>2005-01-18 14:09:00 (UTC)
commitced210b0c4643ddac6a2e80eab4c85c1994b20e0 (patch) (unidiff)
tree5126b599b1213553ae71512a400f46d7b2037d92
parent4b82a36d1b2479dd2e6f00aef45af848f6793099 (diff)
downloadkdepimpi-ced210b0c4643ddac6a2e80eab4c85c1994b20e0.zip
kdepimpi-ced210b0c4643ddac6a2e80eab4c85c1994b20e0.tar.gz
kdepimpi-ced210b0c4643ddac6a2e80eab4c85c1994b20e0.tar.bz2
ab sync fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp31
-rw-r--r--kaddressbook/imagewidget.cpp5
-rw-r--r--kaddressbook/kabcore.cpp7
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp2
4 files changed, 38 insertions, 7 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index bfcfab5..18b4d58 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -197,4 +197,5 @@ ulong Addressee::getCsum4List( const QStringList & attList)
197 add = add * mul *ii*ii*ii; 197 add = add * mul *ii*ii*ii;
198 cSum += add; 198 cSum += add;
199 //qDebug("csum: %d %d %d", i,k,cSum);
199 } 200 }
200 } 201 }
@@ -229,7 +230,30 @@ void Addressee::computeCsum(const QString &dev)
229 if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); 230 if ( !mData->sortString.isEmpty() ) l.append( mData->sortString );
230 if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); 231 if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString());
231 // if ( !mData->logo.isEmpty() ) l.append( ); 232 if ( !mData->logo.undefined() ) {
232 //if ( !mData->photo.isEmpty() ) l.append( ); 233 if ( !mData->logo.isIntern() )
233 //if ( !mData->sound.isEmpty() ) l.append( ); 234 l.append( mData->logo.url() );
235 else
236 l.append( QString::number(mData->logo.data().width()* mData->logo.data().height()));
237 } else {
238 l.append( "nologo");
239 }
240 if ( !mData->photo.undefined() ) {
241 if ( !mData->photo.isIntern() )
242 l.append( mData->photo.url() );
243 else
244 l.append( QString::number(mData->photo.data().width()* mData->photo.data().height()));
245 } else {
246 l.append( "nophoto");
247 }
248#if 0
249 if ( !mData->sound.undefined() ) {
250 if ( !mData->sound.isIntern() )
251 l.append( mData->sound.url() );
252 else
253 l.append( QString(mData->sound.data().with()* mData->sound.data().height()));
254 } else {
255 l.append( "nosound");
256 }
257#endif
234 //if ( !mData->agent.isEmpty() ) l.append( ); 258 //if ( !mData->agent.isEmpty() ) l.append( );
235 if ( mData->url.isValid() ) 259 if ( mData->url.isValid() )
@@ -279,4 +303,5 @@ void Addressee::computeCsum(const QString &dev)
279 qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); 303 qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() );
280#endif 304#endif
305
281 306
282 setCsum( dev, QString::number (cs )); 307 setCsum( dev, QString::number (cs ));
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index 1e9743c..d0f52ea 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -240,6 +240,7 @@ KABC::Picture ImageWidget::logo() const
240 else 240 else
241 logo.setData( px->convertToImage().scaleWidth( 100 ) ); 241 logo.setData( px->convertToImage().scaleWidth( 100 ) );
242#else //KAB_EMBEDDED 242#else //KAB_EMBEDDED
243 logo.setData( px->convertToImage() ); 243 if (px->isNull() != true )
244 logo.setData( px->convertToImage() );
244#endif //KAB_EMBEDDED 245#endif //KAB_EMBEDDED
245 246
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d970ff1..e88706e 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1189,4 +1189,8 @@ void KABCore::contactModified( const KABC::Addressee &addr )
1189{ 1189{
1190 addrModified( addr ); 1190 addrModified( addr );
1191#if 0 // debug only
1192 KABC::Addressee ad = addr;
1193 ad.computeCsum( "123");
1194#endif
1191} 1195}
1192 1196
@@ -2714,5 +2718,6 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
2714 bool remCh, locCh; 2718 bool remCh, locCh;
2715 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 2719 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
2716 //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 2720 if ( remCh )
2721 qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
2717 locCh = ( localMod > mLastAddressbookSync ); 2722 locCh = ( localMod > mLastAddressbookSync );
2718 //qDebug("cahnged rem %d loc %d",remCh, locCh ); 2723 //qDebug("cahnged rem %d loc %d",remCh, locCh );
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index ecd6f05..7022dcb 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -158,5 +158,5 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field )
158 continue; 158 continue;
159#if QT_VERSION >= 300 159#if QT_VERSION >= 300
160 if (re.search(field->value( *it ).lower()) != -1) 160 if (re.search(field->value( *it ).lower()) == 0)
161#else 161#else
162 if (re.match(field->value( *it ).lower()) != -1) 162 if (re.match(field->value( *it ).lower()) != -1)