author | zecke <zecke> | 2002-11-03 17:56:17 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-03 17:56:17 (UTC) |
commit | 2981b8f55f4a33860452f4571ef9f04781267489 (patch) (unidiff) | |
tree | 3d0fe68318c23efdbcf72acfae94b3e76e2b4a14 /libopie2/opiepim/ocontact.h | |
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/ocontact.h | 6 |
1 files changed, 1 insertions, 5 deletions
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 | |||
@@ -191,25 +191,25 @@ public: | |||
191 | static QStringList untrfields(); | 191 | static QStringList untrfields(); |
192 | 192 | ||
193 | QString toRichText() const; | 193 | QString toRichText() const; |
194 | QMap<int, QString> toMap() const; | 194 | QMap<int, QString> toMap() const; |
195 | QString field( int key ) const { return find( key ); } | 195 | QString field( int key ) const { return find( key ); } |
196 | 196 | ||
197 | 197 | ||
198 | // journaling... | 198 | // journaling... |
199 | void saveJournal( journal_action action, const QString &key = QString::null ); | 199 | void saveJournal( journal_action action, const QString &key = QString::null ); |
200 | void save( QString &buf ) const; | 200 | void save( QString &buf ) const; |
201 | 201 | ||
202 | void setUid( int i ) | 202 | void setUid( int i ) |
203 | { Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } | 203 | { OPimRecord::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } |
204 | 204 | ||
205 | QString toShortText()const; | 205 | QString toShortText()const; |
206 | QString OContact::type()const; | 206 | QString OContact::type()const; |
207 | QMap<QString,QString> OContact::toExtraMap() const; | 207 | QMap<QString,QString> OContact::toExtraMap() const; |
208 | class QString OContact::recordField(int) const; | 208 | class QString OContact::recordField(int) const; |
209 | 209 | ||
210 | // Why private ? (eilers,se) | 210 | // Why private ? (eilers,se) |
211 | QString emailSeparator() const { return " "; } | 211 | QString emailSeparator() const { return " "; } |
212 | // the emails should be seperated by a comma | 212 | // the emails should be seperated by a comma |
213 | void setEmails( const QString &v ); | 213 | void setEmails( const QString &v ); |
214 | QString emails() const { return find( Qtopia::Emails ); } | 214 | QString emails() const { return find( Qtopia::Emails ); } |
215 | 215 | ||
@@ -221,22 +221,18 @@ private: | |||
221 | friend class XMLIO; | 221 | friend class XMLIO; |
222 | 222 | ||
223 | void insert( int key, const QString &value ); | 223 | void insert( int key, const QString &value ); |
224 | void replace( int key, const QString &value ); | 224 | void replace( int key, const QString &value ); |
225 | QString find( int key ) const; | 225 | QString find( int key ) const; |
226 | 226 | ||
227 | QString displayAddress( const QString &street, | 227 | QString displayAddress( const QString &street, |
228 | const QString &city, | 228 | const QString &city, |
229 | const QString &state, | 229 | const QString &state, |
230 | const QString &zip, | 230 | const QString &zip, |
231 | const QString &country ) const; | 231 | const QString &country ) const; |
232 | 232 | ||
233 | Qtopia::UidGen &uidGen() { return sUidGen; } | ||
234 | |||
235 | |||
236 | static Qtopia::UidGen sUidGen; | ||
237 | QMap<int, QString> mMap; | 233 | QMap<int, QString> mMap; |
238 | ContactPrivate *d; | 234 | ContactPrivate *d; |
239 | }; | 235 | }; |
240 | 236 | ||
241 | 237 | ||
242 | #endif | 238 | #endif |