-rw-r--r-- | kabc/vcard21parser.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp index 277de22..60d02b8 100644 --- a/kabc/vcard21parser.cpp +++ b/kabc/vcard21parser.cpp | |||
@@ -167,14 +167,13 @@ bool VCardLineX::isValid() const | |||
167 | qualifiers.contains(VCARD_TEL_PAGER) || | 167 | qualifiers.contains(VCARD_TEL_PAGER) || |
168 | qualifiers.contains(VCARD_TEL_BBS) || | 168 | qualifiers.contains(VCARD_TEL_BBS) || |
169 | qualifiers.contains(VCARD_TEL_MODEM) || | 169 | qualifiers.contains(VCARD_TEL_MODEM) || |
170 | qualifiers.contains(VCARD_TEL_CAR) || | 170 | qualifiers.contains(VCARD_TEL_CAR) || |
171 | qualifiers.contains(VCARD_TEL_ISDN) || | 171 | qualifiers.contains(VCARD_TEL_ISDN) || |
172 | qualifiers.contains(VCARD_TEL_VIDEO) || | 172 | qualifiers.contains(VCARD_TEL_VIDEO) || |
173 | qualifiers.contains(VCARD_TEL_PCS) || | 173 | qualifiers.contains(VCARD_TEL_PCS) |
174 | qualifiers.contains(VCARD_TEL_SIP) | ||
175 | ) ) | 174 | ) ) |
176 | return true; | 175 | return true; |
177 | if ( name == VCARD_TZ ) | 176 | if ( name == VCARD_TZ ) |
178 | return true; | 177 | return true; |
179 | if ( name == VCARD_TITLE ) | 178 | if ( name == VCARD_TITLE ) |
180 | return true; | 179 | return true; |
@@ -276,15 +275,15 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data) | |||
276 | if ( (*i).qualified ) { | 275 | if ( (*i).qualified ) { |
277 | if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) | 276 | if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) |
278 | type |= PhoneNumber::Home; | 277 | type |= PhoneNumber::Home; |
279 | if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) | 278 | if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) |
280 | type |= PhoneNumber::Work; | 279 | type |= PhoneNumber::Work; |
281 | if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) | 280 | if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) |
282 | type |= PhoneNumber::Pref; | 281 | type |= PhoneNumber::Pref; |
283 | // if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) | 282 | if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) |
284 | // type |= PhoneNumber::Voice; | 283 | type |= PhoneNumber::Voice; |
285 | if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) | 284 | if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) |
286 | type |= PhoneNumber::Fax; | 285 | type |= PhoneNumber::Fax; |
287 | if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) ) | 286 | if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) ) |
288 | type |= PhoneNumber::Msg; | 287 | type |= PhoneNumber::Msg; |
289 | if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) ) | 288 | if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) ) |
290 | type |= PhoneNumber::Cell; | 289 | type |= PhoneNumber::Cell; |
@@ -299,19 +298,18 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data) | |||
299 | if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) ) | 298 | if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) ) |
300 | type |= PhoneNumber::Isdn; | 299 | type |= PhoneNumber::Isdn; |
301 | if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) | 300 | if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) |
302 | type |= PhoneNumber::Video; | 301 | type |= PhoneNumber::Video; |
303 | if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) | 302 | if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) |
304 | type |= PhoneNumber::Pcs; | 303 | type |= PhoneNumber::Pcs; |
305 | if ( (*i).qualifiers.contains( VCARD_TEL_SIP ) ) | 304 | |
306 | type |= PhoneNumber::Sip; | ||
307 | } | 305 | } |
308 | addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); | 306 | addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); |
309 | } | 307 | } |
310 | } | 308 | } |
311 | 309 | addressee.makePhoneNumbersOLcompatible(); | |
312 | //set the addressee's addresses | 310 | //set the addressee's addresses |
313 | for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { | 311 | for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { |
314 | if ( (*i).name == VCARD_ADR ) { | 312 | if ( (*i).name == VCARD_ADR ) { |
315 | int type = 0; | 313 | int type = 0; |
316 | if ( (*i).qualified ) { | 314 | if ( (*i).qualified ) { |
317 | if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) | 315 | if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) |