-rw-r--r-- | kabc/addressee.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index d6b70c4..c34f671 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -259,62 +259,61 @@ void Addressee::computeCsum(const QString &dev) | |||
259 | t.sort(); | 259 | t.sort(); |
260 | for ( iii = 0; iii < t.count(); ++iii) | 260 | for ( iii = 0; iii < t.count(); ++iii) |
261 | l.append( t[iii] ); | 261 | l.append( t[iii] ); |
262 | KABC::Address::List::Iterator addressIter; | 262 | KABC::Address::List::Iterator addressIter; |
263 | for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); | 263 | for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); |
264 | ++addressIter ) { | 264 | ++addressIter ) { |
265 | t = (*addressIter).asList(); | 265 | t = (*addressIter).asList(); |
266 | t.sort(); | 266 | t.sort(); |
267 | for ( iii = 0; iii < t.count(); ++iii) | 267 | for ( iii = 0; iii < t.count(); ++iii) |
268 | l.append( t[iii] ); | 268 | l.append( t[iii] ); |
269 | } | 269 | } |
270 | uint cs = getCsum4List(l); | 270 | uint cs = getCsum4List(l); |
271 | qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); | 271 | // qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); |
272 | setCsum( dev, QString::number (cs )); | 272 | setCsum( dev, QString::number (cs )); |
273 | } | 273 | } |
274 | void Addressee::removeID(const QString &prof) | 274 | void Addressee::removeID(const QString &prof) |
275 | { | 275 | { |
276 | detach(); | 276 | detach(); |
277 | mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); | 277 | mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); |
278 | 278 | ||
279 | } | 279 | } |
280 | void Addressee::setID( const QString & prof , const QString & id ) | 280 | void Addressee::setID( const QString & prof , const QString & id ) |
281 | { | 281 | { |
282 | detach(); | 282 | detach(); |
283 | qDebug("setID1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); | ||
284 | mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id ); | 283 | mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id ); |
285 | qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); | 284 | //qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); |
286 | } | 285 | } |
287 | void Addressee::setTempSyncStat( int id ) | 286 | void Addressee::setTempSyncStat( int id ) |
288 | { | 287 | { |
289 | if ( mData->mTempSyncStat == id ) return; | 288 | if ( mData->mTempSyncStat == id ) return; |
290 | detach(); | 289 | detach(); |
291 | mData->mTempSyncStat = id; | 290 | mData->mTempSyncStat = id; |
292 | } | 291 | } |
293 | int Addressee::tempSyncStat() const | 292 | int Addressee::tempSyncStat() const |
294 | { | 293 | { |
295 | return mData->mTempSyncStat; | 294 | return mData->mTempSyncStat; |
296 | } | 295 | } |
297 | 296 | ||
298 | QString Addressee::getID( const QString & prof) | 297 | QString Addressee::getID( const QString & prof) |
299 | { | 298 | { |
300 | return KIdManager::getId ( mData->mExternalId, prof ); | 299 | return KIdManager::getId ( mData->mExternalId, prof ); |
301 | } | 300 | } |
302 | 301 | ||
303 | void Addressee::setCsum( const QString & prof , const QString & id ) | 302 | void Addressee::setCsum( const QString & prof , const QString & id ) |
304 | { | 303 | { |
305 | detach(); | 304 | detach(); |
306 | qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); | 305 | //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); |
307 | mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id ); | 306 | mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id ); |
308 | qDebug("setcsum2 %s ",mData->mExternalId.latin1() ); | 307 | //qDebug("setcsum2 %s ",mData->mExternalId.latin1() ); |
309 | } | 308 | } |
310 | 309 | ||
311 | QString Addressee::getCsum( const QString & prof) | 310 | QString Addressee::getCsum( const QString & prof) |
312 | { | 311 | { |
313 | return KIdManager::getCsum ( mData->mExternalId, prof ); | 312 | return KIdManager::getCsum ( mData->mExternalId, prof ); |
314 | } | 313 | } |
315 | 314 | ||
316 | void Addressee::setIDStr( const QString & s ) | 315 | void Addressee::setIDStr( const QString & s ) |
317 | { | 316 | { |
318 | detach(); | 317 | detach(); |
319 | mData->mExternalId = s; | 318 | mData->mExternalId = s; |
320 | } | 319 | } |