author | zautrix <zautrix> | 2004-09-21 11:17:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-21 11:17:18 (UTC) |
commit | ba89a5d20eb054054d9cfae3723a4d62b9f62efd (patch) (unidiff) | |
tree | ee1a42079e3204dbab6f45762f83cb4c1712579e /kabc/addressee.cpp | |
parent | 19f445f0b6e7d4591db46b89e877ed9f4332ecd4 (diff) | |
download | kdepimpi-ba89a5d20eb054054d9cfae3723a4d62b9f62efd.zip kdepimpi-ba89a5d20eb054054d9cfae3723a4d62b9f62efd.tar.gz kdepimpi-ba89a5d20eb054054d9cfae3723a4d62b9f62efd.tar.bz2 |
DTM fix
-rw-r--r-- | kabc/addressee.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 31ce1d6..25c77f6 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -267,96 +267,97 @@ void Addressee::computeCsum(const QString &dev) | |||
267 | for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); | 267 | for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); |
268 | ++addressIter ) { | 268 | ++addressIter ) { |
269 | t = (*addressIter).asList(); | 269 | t = (*addressIter).asList(); |
270 | t.sort(); | 270 | t.sort(); |
271 | for ( iii = 0; iii < t.count(); ++iii) | 271 | for ( iii = 0; iii < t.count(); ++iii) |
272 | l.append( t[iii] ); | 272 | l.append( t[iii] ); |
273 | } | 273 | } |
274 | uint cs = getCsum4List(l); | 274 | uint cs = getCsum4List(l); |
275 | // qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); | 275 | // qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); |
276 | setCsum( dev, QString::number (cs )); | 276 | setCsum( dev, QString::number (cs )); |
277 | } | 277 | } |
278 | 278 | ||
279 | void Addressee::mergeContact( const Addressee& ad ) | 279 | void Addressee::mergeContact( const Addressee& ad ) |
280 | { | 280 | { |
281 | 281 | ||
282 | detach(); | 282 | detach(); |
283 | if ( mData->name.isEmpty() ) mData->name = ad.mData->name; | 283 | if ( mData->name.isEmpty() ) mData->name = ad.mData->name; |
284 | if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; | 284 | if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; |
285 | if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; | 285 | if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; |
286 | if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; | 286 | if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; |
287 | if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; | 287 | if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; |
288 | if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; | 288 | if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; |
289 | if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; | 289 | if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; |
290 | if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; | 290 | if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; |
291 | if ( !mData->birthday.isValid() ) | 291 | if ( !mData->birthday.isValid() ) |
292 | if ( ad.mData->birthday.isValid()) | 292 | if ( ad.mData->birthday.isValid()) |
293 | mData->birthday = ad.mData->birthday; | 293 | mData->birthday = ad.mData->birthday; |
294 | if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; | 294 | if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; |
295 | if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone; | 295 | if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone; |
296 | if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo; | 296 | if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo; |
297 | if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; | 297 | if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; |
298 | if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; | 298 | if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; |
299 | if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; | 299 | if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; |
300 | if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; | 300 | if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; |
301 | if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId; | 301 | if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId; |
302 | if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString; | 302 | if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString; |
303 | if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; | 303 | if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; |
304 | if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; | 304 | if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; |
305 | 305 | ||
306 | // pending: | 306 | // pending: |
307 | // merging phonenumbers | 307 | // merging phonenumbers |
308 | // merging addresses | 308 | // merging addresses |
309 | // merging emails; | 309 | // merging emails; |
310 | // merging categories; | 310 | // merging categories; |
311 | // merging custom; | 311 | // merging custom; |
312 | // merging keys | 312 | // merging keys |
313 | qDebug("merge contact %s ", ad.uid().latin1()); | 313 | qDebug("merge contact %s ", ad.uid().latin1()); |
314 | setUid( ad.uid() ); | 314 | setUid( ad.uid() ); |
315 | setRevision( ad.revision() ); | ||
315 | } | 316 | } |
316 | 317 | ||
317 | void Addressee::removeID(const QString &prof) | 318 | void Addressee::removeID(const QString &prof) |
318 | { | 319 | { |
319 | detach(); | 320 | detach(); |
320 | mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); | 321 | mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); |
321 | 322 | ||
322 | } | 323 | } |
323 | void Addressee::setID( const QString & prof , const QString & id ) | 324 | void Addressee::setID( const QString & prof , const QString & id ) |
324 | { | 325 | { |
325 | detach(); | 326 | detach(); |
326 | mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id ); | 327 | mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id ); |
327 | //qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); | 328 | //qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); |
328 | } | 329 | } |
329 | void Addressee::setTempSyncStat( int id ) | 330 | void Addressee::setTempSyncStat( int id ) |
330 | { | 331 | { |
331 | if ( mData->mTempSyncStat == id ) return; | 332 | if ( mData->mTempSyncStat == id ) return; |
332 | detach(); | 333 | detach(); |
333 | mData->mTempSyncStat = id; | 334 | mData->mTempSyncStat = id; |
334 | } | 335 | } |
335 | int Addressee::tempSyncStat() const | 336 | int Addressee::tempSyncStat() const |
336 | { | 337 | { |
337 | return mData->mTempSyncStat; | 338 | return mData->mTempSyncStat; |
338 | } | 339 | } |
339 | 340 | ||
340 | QString Addressee::getID( const QString & prof) | 341 | QString Addressee::getID( const QString & prof) |
341 | { | 342 | { |
342 | return KIdManager::getId ( mData->mExternalId, prof ); | 343 | return KIdManager::getId ( mData->mExternalId, prof ); |
343 | } | 344 | } |
344 | 345 | ||
345 | void Addressee::setCsum( const QString & prof , const QString & id ) | 346 | void Addressee::setCsum( const QString & prof , const QString & id ) |
346 | { | 347 | { |
347 | detach(); | 348 | detach(); |
348 | //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); | 349 | //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); |
349 | mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id ); | 350 | mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id ); |
350 | //qDebug("setcsum2 %s ",mData->mExternalId.latin1() ); | 351 | //qDebug("setcsum2 %s ",mData->mExternalId.latin1() ); |
351 | } | 352 | } |
352 | 353 | ||
353 | QString Addressee::getCsum( const QString & prof) | 354 | QString Addressee::getCsum( const QString & prof) |
354 | { | 355 | { |
355 | return KIdManager::getCsum ( mData->mExternalId, prof ); | 356 | return KIdManager::getCsum ( mData->mExternalId, prof ); |
356 | } | 357 | } |
357 | 358 | ||
358 | void Addressee::setIDStr( const QString & s ) | 359 | void Addressee::setIDStr( const QString & s ) |
359 | { | 360 | { |
360 | detach(); | 361 | detach(); |
361 | mData->mExternalId = s; | 362 | mData->mExternalId = s; |
362 | } | 363 | } |