-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 | |||
@@ -5,7 +5,4 @@ OPimRecord::OPimRecord( int uid ) | |||
5 | 5 | ||
6 | setUid( uid ); | 6 | setUid( uid ); |
7 | /* assign a new UID */ | ||
8 | if ( uid == 1 ) | ||
9 | assignUid(); | ||
10 | } | 7 | } |
11 | OPimRecord::~OPimRecord() { | 8 | OPimRecord::~OPimRecord() { |
@@ -105,2 +102,10 @@ QString OPimRecord::crossToString()const { | |||
105 | return str; | 102 | return str; |
106 | } | 103 | } |
104 | /* if uid = 1 assign a new one */ | ||
105 | void OPimRecord::setUid( int uid ) { | ||
106 | |||
107 | if ( uid == 1) | ||
108 | uid = uidGen().generate(); | ||
109 | |||
110 | Qtopia::Record::setUid( uid ); | ||
111 | }; | ||
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 | |||
@@ -102,4 +102,5 @@ public: | |||
102 | */ | 102 | */ |
103 | void setRelations( const QString&, QArray<int> ids ); | 103 | void setRelations( const QString&, QArray<int> ids ); |
104 | virtual void setUid( int uid ); | ||
104 | 105 | ||
105 | protected: | 106 | protected: |