-rw-r--r-- | kabc/vcardformatimpl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index bffaa64..2d6eb3d 100644 --- a/kabc/vcardformatimpl.cpp +++ b/kabc/vcardformatimpl.cpp @@ -562,96 +562,98 @@ void VCardFormatImpl::readNValue( ContentLine *cl, Addressee &a ) NValue *v = (NValue *)cl->value(); a.setFamilyName( QString::fromUtf8( v->family() ) ); a.setGivenName( QString::fromUtf8( v->given() ) ); a.setAdditionalName( QString::fromUtf8( v->middle() ) ); a.setPrefix( QString::fromUtf8( v->prefix() ) ); a.setSuffix( QString::fromUtf8( v->suffix() ) ); } void VCardFormatImpl::addTelephoneValue( VCard *v, const PhoneNumber &p ) { if ( p.number().isEmpty() ) return; ContentLine cl; cl.setName(EntityTypeToParamName(EntityTelephone)); cl.setValue(new TelValue( p.number().utf8() )); ParamList params; if( p.type() & PhoneNumber::Home ) params.append( new Param( "TYPE", "home" ) ); if( p.type() & PhoneNumber::Work ) params.append( new Param( "TYPE", "work" ) ); if( p.type() & PhoneNumber::Msg ) params.append( new Param( "TYPE", "msg" ) ); if( p.type() & PhoneNumber::Pref ) params.append( new Param( "TYPE", "pref" ) ); if( p.type() & PhoneNumber::Voice ) params.append( new Param( "TYPE", "voice" ) ); if( p.type() & PhoneNumber::Fax ) params.append( new Param( "TYPE", "fax" ) ); if( p.type() & PhoneNumber::Cell ) params.append( new Param( "TYPE", "cell" ) ); if( p.type() & PhoneNumber::Video ) params.append( new Param( "TYPE", "video" ) ); if( p.type() & PhoneNumber::Bbs ) params.append( new Param( "TYPE", "bbs" ) ); if( p.type() & PhoneNumber::Modem ) params.append( new Param( "TYPE", "modem" ) ); if( p.type() & PhoneNumber::Car ) params.append( new Param( "TYPE", "car" ) ); if( p.type() & PhoneNumber::Isdn ) params.append( new Param( "TYPE", "isdn" ) ); if( p.type() & PhoneNumber::Pcs ) params.append( new Param( "TYPE", "pcs" ) ); if( p.type() & PhoneNumber::Pager ) params.append( new Param( "TYPE", "pager" ) ); + if( p.type() & PhoneNumber::Sip ) params.append( new Param( "TYPE", "sip" ) ); cl.setParamList( params ); v->add(cl); } PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) { PhoneNumber p; TelValue *value = (TelValue *)cl->value(); p.setNumber( QString::fromUtf8( value->asString() ) ); int type = 0; ParamList params = cl->paramList(); ParamListIterator it( params ); QCString tmpStr; for( ; it.current(); ++it ) { if ( (*it)->name() == "TYPE" ) { tmpStr = (*it)->value().lower(); if ( tmpStr == "home" ) type |= PhoneNumber::Home; else if ( tmpStr == "work" ) type |= PhoneNumber::Work; else if ( tmpStr == "msg" ) type |= PhoneNumber::Msg; else if ( tmpStr == "pref" ) type |= PhoneNumber::Pref; else if ( tmpStr == "voice" ) type |= PhoneNumber::Voice; else if ( tmpStr == "fax" ) type |= PhoneNumber::Fax; else if ( tmpStr == "cell" ) type |= PhoneNumber::Cell; else if ( tmpStr == "video" ) type |= PhoneNumber::Video; else if ( tmpStr == "bbs" ) type |= PhoneNumber::Bbs; else if ( tmpStr == "modem" ) type |= PhoneNumber::Modem; else if ( tmpStr == "car" ) type |= PhoneNumber::Car; else if ( tmpStr == "isdn" ) type |= PhoneNumber::Isdn; else if ( tmpStr == "pcs" ) type |= PhoneNumber::Pcs; else if ( tmpStr == "pager" ) type |= PhoneNumber::Pager; + else if ( tmpStr == "sip" ) type |= PhoneNumber::Sip; } } p.setType( type ); return p; } QString VCardFormatImpl::readTextValue( ContentLine *cl ) { VCARD::Value *value = cl->value(); if ( value ) { return QString::fromUtf8( value->asString() ); } else { kdDebug(5700) << "No value: " << cl->asString() << endl; return QString::null; } } QDate VCardFormatImpl::readDateValue( ContentLine *cl ) { DateValue *dateValue = (DateValue *)cl->value(); if ( dateValue ) return dateValue->qdate(); else return QDate(); } QDateTime VCardFormatImpl::readDateTimeValue( ContentLine *cl ) { DateValue *dateValue = (DateValue *)cl->value(); if ( dateValue ) return dateValue->qdt(); |