-rw-r--r-- | libopie2/opiepim/core/opimrecord.cpp | 11 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.h | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp index d8f73c7..e510f4e 100644 --- a/libopie2/opiepim/core/opimrecord.cpp +++ b/libopie2/opiepim/core/opimrecord.cpp @@ -3,11 +3,8 @@ OPimRecord::OPimRecord( int uid ) : Qtopia::Record() { setUid( uid ); - /* assign a new UID */ - if ( uid == 1 ) - assignUid(); } OPimRecord::~OPimRecord() { } OPimRecord::OPimRecord( const OPimRecord& rec ) @@ -103,4 +100,12 @@ QString OPimRecord::crossToString()const { //qWarning("IDS " + str ); return str; } +/* if uid = 1 assign a new one */ +void OPimRecord::setUid( int uid ) { + + if ( uid == 1) + uid = uidGen().generate(); + + Qtopia::Record::setUid( uid ); +}; diff --git a/libopie2/opiepim/core/opimrecord.h b/libopie2/opiepim/core/opimrecord.h index 18112d4..297ff12 100644 --- a/libopie2/opiepim/core/opimrecord.h +++ b/libopie2/opiepim/core/opimrecord.h @@ -100,8 +100,9 @@ public: /** * */ void setRelations( const QString&, QArray<int> ids ); + virtual void setUid( int uid ); protected: QString crossToString()const; |