diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-05 08:45:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-05 08:45:53 +0000 |
commit | 5527e01e0675fbb06b632ccdae423756fbff622b (patch) | |
tree | c2dd1a478a7789d3b01e77fdf31f9011a96a81c5 /kopete/protocols/yahoo/libkyahoo/yabentry.cpp | |
parent | 1fc8db48741fae272e2d29078b266a3d0f2e2dd1 (diff) | |
download | tdenetwork-5527e01e0675fbb06b632ccdae423756fbff622b.tar.gz tdenetwork-5527e01e0675fbb06b632ccdae423756fbff622b.zip |
Many fixes to the Yahoo protocol, courtesy of Serghei Amelian
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1146108 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/yahoo/libkyahoo/yabentry.cpp')
-rw-r--r-- | kopete/protocols/yahoo/libkyahoo/yabentry.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/yabentry.cpp b/kopete/protocols/yahoo/libkyahoo/yabentry.cpp index 9eab5ef1..d726d6d6 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabentry.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yabentry.cpp @@ -1,7 +1,7 @@ /* yabcpp - Encapsulate Yahoo Adressbook information - Copyright (c) 2005 André Duffeck <[email protected]> + Copyright (c) 2005 André Duffeck <[email protected]> Kopete (c) 2002-2006 by the Kopete developers <[email protected]> ************************************************************************* @@ -48,9 +48,9 @@ void YABEntry::fromQDomElement( const QDomElement &e ) privateZIP = e.attribute("hz"); privateCountry = e.attribute("hn"); QString birtday = e.attribute("bi"); - birthday = QDate( birtday.section("/",2,2).toInt(), birtday.section("/",1,1).toInt(), birtday.section("/",0,0).toInt() ); + birthday = QDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); QString an = e.attribute("an"); - anniversary = QDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); + anniversary = QDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); additional1 = e.attribute("c1"); additional2 = e.attribute("c2"); additional3 = e.attribute("c3"); @@ -67,8 +67,8 @@ void YABEntry::fromQDomElement( const QDomElement &e ) void YABEntry::fromQDomDocument( const QDomDocument &d ) { - kdDebug() << d.toString() << - d.elementsByTagName("yi").item(0).toElement().text(); + kdDebug() << d.toString() << + d.elementsByTagName("yi").item(0).toElement().text() << endl; yahooId = d.elementsByTagName("yi").item(0).toElement().text(); firstName = d.elementsByTagName("fn").item(0).toElement().text(); secondName = d.elementsByTagName("mn").item(0).toElement().text(); @@ -98,9 +98,9 @@ void YABEntry::fromQDomDocument( const QDomDocument &d ) privateZIP = d.elementsByTagName("hz").item(0).toElement().text(); privateCountry = d.elementsByTagName("hn").item(0).toElement().text(); QString birtday = d.elementsByTagName("bi").item(0).toElement().text(); - birthday = QDate( birtday.section("/",2,2).toInt(), birtday.section("/",1,1).toInt(), birtday.section("/",0,0).toInt() ); + birthday = QDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); QString an = d.elementsByTagName("an").item(0).toElement().text(); - anniversary = QDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); + anniversary = QDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); additional1 = d.elementsByTagName("c1").item(0).toElement().text(); additional2 = d.elementsByTagName("c2").item(0).toElement().text(); additional3 = d.elementsByTagName("c3").item(0).toElement().text(); @@ -135,13 +135,13 @@ void YABEntry::fillQDomElement( QDomElement &e ) const e.setAttribute( "pu", privateURL ); e.setAttribute( "ti", title ); e.setAttribute( "co", corporation ); - e.setAttribute( "wa", QString( workAdress ).replace( "\n", "
" ) ); + e.setAttribute( "wa", QString( workAdress ).replace( '\n', "
" ) ); e.setAttribute( "wc", workCity ); e.setAttribute( "ws", workState ); e.setAttribute( "wz", workZIP ); e.setAttribute( "wn", workCountry ); e.setAttribute( "wu", workURL ); - e.setAttribute( "ha", QString( privateAdress ).replace( "\n", "
" ) ); + e.setAttribute( "ha", QString( privateAdress ).replace( '\n', "
" ) ); e.setAttribute( "hc", privateCity ); e.setAttribute( "hs", privateState ); e.setAttribute( "hz", privateZIP ); @@ -152,7 +152,7 @@ void YABEntry::fillQDomElement( QDomElement &e ) const e.setAttribute( "c2", additional2 ); e.setAttribute( "c3", additional3 ); e.setAttribute( "c4", additional4 ); - e.setAttribute( "cm", QString( notes ).replace( "\n", "
" ) ); + e.setAttribute( "cm", QString( notes ).replace( '\n', "
" ) ); e.setAttribute( "ima", imAIM ); e.setAttribute( "img", imGoogleTalk ); e.setAttribute( "imq", imICQ ); @@ -164,38 +164,38 @@ void YABEntry::fillQDomElement( QDomElement &e ) const void YABEntry::dump() const { - kdDebug() << "firstName: " << firstName << endl << - "secondName: " << secondName << endl << - "lastName: " << lastName << endl << - "nickName: " << nickName << endl << - "title: " << title << endl << - "phoneMobile: " << phoneMobile << endl << - "email: " << email << endl << - "yahooId: " << yahooId << endl << - "pager: " << pager << endl << - "fax: " << fax << endl << - "additionalNumber: " << additionalNumber << endl << - "altEmail1: " << altEmail1 << endl << - "altEmail2: " << altEmail2 << endl << - "privateAdress: " << privateAdress << endl << - "privateCity: " << privateCity << endl << - "privateState: " << privateState << endl << - "privateZIP: " << privateZIP << endl << - "privateCountry: " << privateCountry << endl << - "privatePhone: " << privatePhone << endl << - "privateURL: " << privateURL << endl << - "corporation: " << corporation << endl << - "workAdress: " << workAdress << endl << - "workCity: " << workCity << endl << - "workState: " << workState << endl << - "workZIP: " << workZIP << endl << - "workCountry: " << workCountry << endl << - "workURL: " << workURL << endl << - "birthday: " << birthday.toString() << endl << - "anniversary: " << anniversary.toString() << endl << - "notes: " << notes << endl << - "additional1: " << additional1 << endl << - "additional2: " << additional2 << endl << - "additional3: " << additional3 << endl << + kdDebug() << "firstName: " << firstName << endl << + "secondName: " << secondName << endl << + "lastName: " << lastName << endl << + "nickName: " << nickName << endl << + "title: " << title << endl << + "phoneMobile: " << phoneMobile << endl << + "email: " << email << endl << + "yahooId: " << yahooId << endl << + "pager: " << pager << endl << + "fax: " << fax << endl << + "additionalNumber: " << additionalNumber << endl << + "altEmail1: " << altEmail1 << endl << + "altEmail2: " << altEmail2 << endl << + "privateAdress: " << privateAdress << endl << + "privateCity: " << privateCity << endl << + "privateState: " << privateState << endl << + "privateZIP: " << privateZIP << endl << + "privateCountry: " << privateCountry << endl << + "privatePhone: " << privatePhone << endl << + "privateURL: " << privateURL << endl << + "corporation: " << corporation << endl << + "workAdress: " << workAdress << endl << + "workCity: " << workCity << endl << + "workState: " << workState << endl << + "workZIP: " << workZIP << endl << + "workCountry: " << workCountry << endl << + "workURL: " << workURL << endl << + "birthday: " << birthday.toString() << endl << + "anniversary: " << anniversary.toString() << endl << + "notes: " << notes << endl << + "additional1: " << additional1 << endl << + "additional2: " << additional2 << endl << + "additional3: " << additional3 << endl << "additional4: " << additional4 << endl; } |