author | zecke <zecke> | 2002-11-03 17:56:17 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-03 17:56:17 (UTC) |
commit | 2981b8f55f4a33860452f4571ef9f04781267489 (patch) (side-by-side diff) | |
tree | 3d0fe68318c23efdbcf72acfae94b3e76e2b4a14 /libopie2/opiepim | |
parent | 3bc2ff91e60f23dd235599b3d83471bde8be1c8a (diff) | |
download | opie-2981b8f55f4a33860452f4571ef9f04781267489.zip opie-2981b8f55f4a33860452f4571ef9f04781267489.tar.gz opie-2981b8f55f4a33860452f4571ef9f04781267489.tar.bz2 |
Oh OContact what a sucker ;)
first of all UID generation belongs to OPimRecord
and was removed from OContact
then setUid now actually calls OPimRecord::setUid instead
of Record::setUid
This finally fixes the problem with wrong uids
after beaming... At least locally on my machine
-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 |
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 @@ -124,3 +124,2 @@ QString OPimRecord::crossToString()const { void OPimRecord::setUid( int uid ) { -// qWarning("setting uid" ); if ( uid == 1) @@ -128,3 +127,2 @@ void OPimRecord::setUid( int uid ) { -// 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 @@ -50,3 +50,2 @@ -Qtopia::UidGen OContact::sUidGen( Qtopia::UidGen::Qtopia ); @@ -1472,4 +1471,6 @@ QValueList<OContact> OContact::readVCard( const QString &filename ) */ - if ( con.uid() == 0 ) + if ( con.uid() == 0 ){ con.setUid( 1 ); + qWarning("assigned new uid %d",con.uid() ); + } 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 @@ -202,3 +202,3 @@ public: void setUid( int i ) -{ Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } +{ OPimRecord::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } @@ -232,6 +232,2 @@ private: - Qtopia::UidGen &uidGen() { return sUidGen; } - - - static Qtopia::UidGen sUidGen; QMap<int, QString> mMap; |