summaryrefslogtreecommitdiff
path: root/libopie/pim/ocontact.cpp
authorzecke <zecke>2002-11-02 12:36:34 (UTC)
committer zecke <zecke>2002-11-02 12:36:34 (UTC)
commitffd0a764e4ac7f9bf29edf3b9b4d341e153ecf4a (patch) (side-by-side diff)
tree601ac645a3768c1fe89fce01243f54a24f08dc15 /libopie/pim/ocontact.cpp
parent74f49994a9c19bdfdbfdfb57a5cf5e1a1f966b53 (diff)
downloadopie-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
Diffstat (limited to 'libopie/pim/ocontact.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/ocontact.cpp11
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
@@ -1464,7 +1464,16 @@ QValueList<OContact> OContact::readVCard( const QString &filename )
QValueList<OContact> contacts;
while ( obj ) {
- contacts.append( parseVObject( obj ) );
+ OContact con = parseVObject( obj );
+ /*
+ * if uid is 0 assign a new one
+ * this at least happens on
+ * Nokia6210
+ */
+ if ( con.uid() == 0 )
+ con.setUid( 1 );
+
+ contacts.append(con );
VObject *t = obj;
obj = nextVObjectInList(obj);