Diffstat (limited to 'libopie2/opiepim/core/opimrecord.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimrecord.cpp | 11 |
1 files changed, 8 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 @@ -4,9 +4,6 @@ OPimRecord::OPimRecord( int uid ) : Qtopia::Record() { setUid( uid ); - /* assign a new UID */ - if ( uid == 1 ) - assignUid(); } OPimRecord::~OPimRecord() { } @@ -104,3 +101,11 @@ QString OPimRecord::crossToString()const { return str; } +/* if uid = 1 assign a new one */ +void OPimRecord::setUid( int uid ) { + + if ( uid == 1) + uid = uidGen().generate(); + + Qtopia::Record::setUid( uid ); +}; |