summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimrecord.cpp2
-rw-r--r--libopie2/opiepim/ocontact.cpp5
-rw-r--r--libopie2/opiepim/ocontact.h6
3 files changed, 4 insertions, 9 deletions
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp
index 62dc353..21cf131 100644
--- a/libopie2/opiepim/core/opimrecord.cpp
+++ b/libopie2/opiepim/core/opimrecord.cpp
@@ -123,9 +123,7 @@ QString OPimRecord::crossToString()const {
/* if uid = 1 assign a new one */
void OPimRecord::setUid( int uid ) {
-// qWarning("setting uid" );
if ( uid == 1)
uid = uidGen().generate();
-// qWarning(" uid %d", uid);
Qtopia::Record::setUid( uid );
};
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp
index cd238ef..8a0930b 100644
--- a/libopie2/opiepim/ocontact.cpp
+++ b/libopie2/opiepim/ocontact.cpp
@@ -49,5 +49,4 @@
*/
-Qtopia::UidGen OContact::sUidGen( Qtopia::UidGen::Qtopia );
/*!
@@ -1471,6 +1470,8 @@ QValueList<OContact> OContact::readVCard( const QString &filename )
* Nokia6210
*/
- if ( con.uid() == 0 )
+ if ( con.uid() == 0 ){
con.setUid( 1 );
+ qWarning("assigned new uid %d",con.uid() );
+ }
contacts.append(con );
diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/ocontact.h
index 038a59f..81ac1c1 100644
--- a/libopie2/opiepim/ocontact.h
+++ b/libopie2/opiepim/ocontact.h
@@ -201,5 +201,5 @@ public:
void setUid( int i )
-{ Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); }
+{ OPimRecord::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); }
QString toShortText()const;
@@ -231,8 +231,4 @@ private:
const QString &country ) const;
- Qtopia::UidGen &uidGen() { return sUidGen; }
-
-
- static Qtopia::UidGen sUidGen;
QMap<int, QString> mMap;
ContactPrivate *d;