author | zecke <zecke> | 2002-11-02 12:36:34 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-02 12:36:34 (UTC) |
commit | ffd0a764e4ac7f9bf29edf3b9b4d341e153ecf4a (patch) (unidiff) | |
tree | 601ac645a3768c1fe89fce01243f54a24f08dc15 /libopie/pim/ocontact.cpp | |
parent | 74f49994a9c19bdfdbfdfb57a5cf5e1a1f966b53 (diff) | |
download | opie-ffd0a764e4ac7f9bf29edf3b9b4d341e153ecf4a.zip opie-ffd0a764e4ac7f9bf29edf3b9b4d341e153ecf4a.tar.gz opie-ffd0a764e4ac7f9bf29edf3b9b4d341e153ecf4a.tar.bz2 |
Fix a vCard problem in OContact
cell phones do not set the UId property...
add some more states to otodo
-rw-r--r-- | libopie/pim/ocontact.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp index acd65c4..cd238ef 100644 --- a/libopie/pim/ocontact.cpp +++ b/libopie/pim/ocontact.cpp | |||
@@ -1461,13 +1461,22 @@ QValueList<OContact> OContact::readVCard( const QString &filename ) | |||
1461 | 1461 | ||
1462 | qDebug("vobject = %p", obj ); | 1462 | qDebug("vobject = %p", obj ); |
1463 | 1463 | ||
1464 | QValueList<OContact> contacts; | 1464 | QValueList<OContact> contacts; |
1465 | 1465 | ||
1466 | while ( obj ) { | 1466 | while ( obj ) { |
1467 | contacts.append( parseVObject( obj ) ); | 1467 | OContact con = parseVObject( obj ); |
1468 | /* | ||
1469 | * if uid is 0 assign a new one | ||
1470 | * this at least happens on | ||
1471 | * Nokia6210 | ||
1472 | */ | ||
1473 | if ( con.uid() == 0 ) | ||
1474 | con.setUid( 1 ); | ||
1475 | |||
1476 | contacts.append(con ); | ||
1468 | 1477 | ||
1469 | VObject *t = obj; | 1478 | VObject *t = obj; |
1470 | obj = nextVObjectInList(obj); | 1479 | obj = nextVObjectInList(obj); |
1471 | cleanVObject( t ); | 1480 | cleanVObject( t ); |
1472 | } | 1481 | } |
1473 | 1482 | ||