summaryrefslogtreecommitdiff
path: root/libopie
Unidiff
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontact.cpp5
-rw-r--r--libopie/pim/ocontact.h6
-rw-r--r--libopie/pim/opimrecord.cpp2
3 files changed, 4 insertions, 9 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp
index cd238ef..8a0930b 100644
--- a/libopie/pim/ocontact.cpp
+++ b/libopie/pim/ocontact.cpp
@@ -48,7 +48,6 @@
48 \ingroup qtopiadesktop 48 \ingroup qtopiadesktop
49*/ 49*/
50 50
51Qtopia::UidGen OContact::sUidGen( Qtopia::UidGen::Qtopia );
52 51
53/*! 52/*!
54 Creates a new, empty contact. 53 Creates a new, empty contact.
@@ -1470,8 +1469,10 @@ QValueList<OContact> OContact::readVCard( const QString &filename )
1470 * this at least happens on 1469 * this at least happens on
1471 * Nokia6210 1470 * Nokia6210
1472 */ 1471 */
1473 if ( con.uid() == 0 ) 1472 if ( con.uid() == 0 ){
1474 con.setUid( 1 ); 1473 con.setUid( 1 );
1474 qWarning("assigned new uid %d",con.uid() );
1475 }
1475 1476
1476 contacts.append(con ); 1477 contacts.append(con );
1477 1478
diff --git a/libopie/pim/ocontact.h b/libopie/pim/ocontact.h
index 038a59f..81ac1c1 100644
--- a/libopie/pim/ocontact.h
+++ b/libopie/pim/ocontact.h
@@ -200,7 +200,7 @@ public:
200 void save( QString &buf ) const; 200 void save( QString &buf ) const;
201 201
202 void setUid( int i ) 202 void setUid( int i )
203{ Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } 203{ OPimRecord::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); }
204 204
205 QString toShortText()const; 205 QString toShortText()const;
206 QString OContact::type()const; 206 QString OContact::type()const;
@@ -230,10 +230,6 @@ private:
230 const QString &zip, 230 const QString &zip,
231 const QString &country ) const; 231 const QString &country ) const;
232 232
233 Qtopia::UidGen &uidGen() { return sUidGen; }
234
235
236 static Qtopia::UidGen sUidGen;
237 QMap<int, QString> mMap; 233 QMap<int, QString> mMap;
238 ContactPrivate *d; 234 ContactPrivate *d;
239}; 235};
diff --git a/libopie/pim/opimrecord.cpp b/libopie/pim/opimrecord.cpp
index 62dc353..21cf131 100644
--- a/libopie/pim/opimrecord.cpp
+++ b/libopie/pim/opimrecord.cpp
@@ -122,11 +122,9 @@ QString OPimRecord::crossToString()const {
122} 122}
123/* if uid = 1 assign a new one */ 123/* if uid = 1 assign a new one */
124void OPimRecord::setUid( int uid ) { 124void OPimRecord::setUid( int uid ) {
125// qWarning("setting uid" );
126 if ( uid == 1) 125 if ( uid == 1)
127 uid = uidGen().generate(); 126 uid = uidGen().generate();
128 127
129// qWarning(" uid %d", uid);
130 Qtopia::Record::setUid( uid ); 128 Qtopia::Record::setUid( uid );
131}; 129};
132Qtopia::UidGen &OPimRecord::uidGen() { 130Qtopia::UidGen &OPimRecord::uidGen() {