-rw-r--r-- | libopie/pim/ocontact.cpp | 5 | ||||
-rw-r--r-- | libopie/pim/ocontact.h | 6 | ||||
-rw-r--r-- | libopie/pim/opimrecord.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 5 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.h | 6 |
6 files changed, 8 insertions, 18 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 @@ -45,13 +45,12 @@ information, and business information such as deparment and job title. \ingroup qtopiaemb \ingroup qtopiadesktop */ -Qtopia::UidGen OContact::sUidGen( Qtopia::UidGen::Qtopia ); /*! Creates a new, empty contact. */ OContact::OContact() : OPimRecord(), mMap(), d( 0 ) @@ -1467,14 +1466,16 @@ QValueList<OContact> OContact::readVCard( const QString &filename ) OContact con = parseVObject( obj ); /* * if uid is 0 assign a new one * this at least happens on * Nokia6210 */ - if ( con.uid() == 0 ) + if ( con.uid() == 0 ){ con.setUid( 1 ); + qWarning("assigned new uid %d",con.uid() ); + } contacts.append(con ); VObject *t = obj; obj = nextVObjectInList(obj); cleanVObject( t ); 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 @@ -197,13 +197,13 @@ public: // journaling... void saveJournal( journal_action action, const QString &key = QString::null ); void save( QString &buf ) const; 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; QString OContact::type()const; QMap<QString,QString> OContact::toExtraMap() const; class QString OContact::recordField(int) const; @@ -227,16 +227,12 @@ private: QString displayAddress( const QString &street, const QString &city, const QString &state, const QString &zip, const QString &country ) const; - Qtopia::UidGen &uidGen() { return sUidGen; } - - - static Qtopia::UidGen sUidGen; QMap<int, QString> mMap; ContactPrivate *d; }; #endif 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 @@ -119,16 +119,14 @@ QString OPimRecord::crossToString()const { //qWarning("IDS " + str ); return str; } /* 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 ); }; Qtopia::UidGen &OPimRecord::uidGen() { return m_uidGen; } 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 @@ -119,16 +119,14 @@ QString OPimRecord::crossToString()const { //qWarning("IDS " + str ); return str; } /* 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 ); }; Qtopia::UidGen &OPimRecord::uidGen() { return m_uidGen; } 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 @@ -45,13 +45,12 @@ information, and business information such as deparment and job title. \ingroup qtopiaemb \ingroup qtopiadesktop */ -Qtopia::UidGen OContact::sUidGen( Qtopia::UidGen::Qtopia ); /*! Creates a new, empty contact. */ OContact::OContact() : OPimRecord(), mMap(), d( 0 ) @@ -1467,14 +1466,16 @@ QValueList<OContact> OContact::readVCard( const QString &filename ) OContact con = parseVObject( obj ); /* * if uid is 0 assign a new one * this at least happens on * Nokia6210 */ - if ( con.uid() == 0 ) + if ( con.uid() == 0 ){ con.setUid( 1 ); + qWarning("assigned new uid %d",con.uid() ); + } contacts.append(con ); VObject *t = obj; obj = nextVObjectInList(obj); cleanVObject( t ); 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 @@ -197,13 +197,13 @@ public: // journaling... void saveJournal( journal_action action, const QString &key = QString::null ); void save( QString &buf ) const; 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; QString OContact::type()const; QMap<QString,QString> OContact::toExtraMap() const; class QString OContact::recordField(int) const; @@ -227,16 +227,12 @@ private: QString displayAddress( const QString &street, const QString &city, const QString &state, const QString &zip, const QString &country ) const; - Qtopia::UidGen &uidGen() { return sUidGen; } - - - static Qtopia::UidGen sUidGen; QMap<int, QString> mMap; ContactPrivate *d; }; #endif |