Diffstat (limited to 'libopie2/opiepim/core/opimcontact.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimcontact.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/libopie2/opiepim/core/opimcontact.cpp b/libopie2/opiepim/core/opimcontact.cpp index 36e9a93..64f195b 100644 --- a/libopie2/opiepim/core/opimcontact.cpp +++ b/libopie2/opiepim/core/opimcontact.cpp | |||
@@ -83,3 +83,2 @@ OPimContact::OPimContact( const QMap<int, QString> &fromMap ):OPimRecord(), mMap | |||
83 | { | 83 | { |
84 | owarn << "Invalid UID found. Generate new one.." << oendl; | ||
85 | setUid( uidGen().generate() ); | 84 | setUid( uidGen().generate() ); |
@@ -1140,3 +1139,2 @@ void OPimContact::setBirthday( const QDate &v ) | |||
1140 | { | 1139 | { |
1141 | owarn << "Remove Birthday" << oendl; | ||
1142 | replace( Qtopia::Birthday, QString::null ); | 1140 | replace( Qtopia::Birthday, QString::null ); |
@@ -1159,3 +1157,2 @@ void OPimContact::setAnniversary( const QDate &v ) | |||
1159 | { | 1157 | { |
1160 | owarn << "Remove Anniversary" << oendl; | ||
1161 | replace( Qtopia::Anniversary, QString::null ); | 1158 | replace( Qtopia::Anniversary, QString::null ); |
@@ -1175,3 +1172,2 @@ QDate OPimContact::birthday() const | |||
1175 | QString str = find( Qtopia::Birthday ); | 1172 | QString str = find( Qtopia::Birthday ); |
1176 | // owarn << "Birthday " << str << oendl; | ||
1177 | if ( !str.isEmpty() ) | 1173 | if ( !str.isEmpty() ) |
@@ -1190,3 +1186,2 @@ QDate OPimContact::anniversary() const | |||
1190 | QString str = find( Qtopia::Anniversary ); | 1186 | QString str = find( Qtopia::Anniversary ); |
1191 | // owarn << "Anniversary " << str << oendl; | ||
1192 | if ( !str.isEmpty() ) | 1187 | if ( !str.isEmpty() ) |
@@ -1284,2 +1279,21 @@ int OPimContact::rtti() const | |||
1284 | 1279 | ||
1280 | /** | ||
1281 | * \brief Cast to OPimContact or on failure return 0l | ||
1282 | * | ||
1283 | * This method tries to cast from a OPimRecord to a | ||
1284 | * OPimContact it uses. If the OPimRecord is from type | ||
1285 | * OPimContact the case will suceed and a pointer to | ||
1286 | * OPimContact is returned otherwise a Null Pointer is returned. | ||
1287 | * | ||
1288 | * | ||
1289 | * @see OPimTodo::safeCast() | ||
1290 | * @see OPimEvent::safeCast() | ||
1291 | * @return Return a OPimContact or a Null Pointer | ||
1292 | */ | ||
1293 | OPimContact* OPimContact::safeCast( const OPimRecord* rec ) { | ||
1294 | return( rec && rec->rtti() == OPimResolver::AddressBook ) ? | ||
1295 | static_cast<OPimContact*>( const_cast<OPimRecord*>(rec) ) : | ||
1296 | 0l; | ||
1297 | } | ||
1298 | |||
1285 | 1299 | ||