diff options
Diffstat (limited to 'kresources/groupwise/soap/contactconverter.cpp')
-rw-r--r-- | kresources/groupwise/soap/contactconverter.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kresources/groupwise/soap/contactconverter.cpp b/kresources/groupwise/soap/contactconverter.cpp index a971e56a1..2abb8f452 100644 --- a/kresources/groupwise/soap/contactconverter.cpp +++ b/kresources/groupwise/soap/contactconverter.cpp @@ -110,10 +110,10 @@ ngwt__Contact* ContactConverter::convertToContact( const KABC::Addressee &addr ) ngwt__EmailAddressList* emailList = soap_new_ngwt__EmailAddressList( soap(), -1 ); std::vector<std::string>* list = soap_new_std__vectorTemplateOfstd__string( soap(), -1 ); - QStringList emails = addr.emails(); + TQStringList emails = addr.emails(); emailList->primary = qStringToString( emails.first() ); - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = emails.begin(); it != emails.end(); ++it ) list->push_back( std::string( (*it).utf8() ) ); @@ -284,7 +284,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) if ( fullName->displayName ) addr.setFormattedName( stringToQString( fullName->displayName ) ); else - addr.setFormattedName( QString::null ); + addr.setFormattedName( TQString::null ); if ( fullName->namePrefix ) addr.setPrefix( stringToQString( fullName->namePrefix ) ); @@ -304,7 +304,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) // Emails if ( contact->emailList ) { - QStringList emails; + TQStringList emails; if ( contact->emailList->primary ) emails.append( stringToQString( contact->emailList->primary ) ); @@ -324,7 +324,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) // Phone numbers if ( contact->phoneList && !contact->phoneList->phone.empty() ) { - QString defaultNumber = stringToQString( contact->phoneList->default_ ); + TQString defaultNumber = stringToQString( contact->phoneList->default_ ); std::vector<class ngwt__PhoneNumber*> list = contact->phoneList->phone; std::vector<class ngwt__PhoneNumber*>::const_iterator it; @@ -371,7 +371,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) ngwt__PersonalInfo* info = contact->personalInfo; if ( info->birthday ) { - QDate date = stringToQDate( info->birthday ); + TQDate date = stringToQDate( info->birthday ); if ( date.isValid() ) addr.setBirthday( date ); } @@ -383,28 +383,28 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) // IM addresses if ( contact->imList ) { // put all the im addresses on the same service into the same qstringlist - QMap<QString, QStringList> addressMap; + TQMap<TQString, TQStringList> addressMap; std::vector<ngwt__ImAddress*> list = contact->imList->im; std::vector<ngwt__ImAddress*>::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { - QStringList addressesForService = addressMap[ stringToQString( (*it)->service ) ]; + TQStringList addressesForService = addressMap[ stringToQString( (*it)->service ) ]; addressesForService.append( stringToQString( (*it)->address ) ); addressMap.insert( stringToQString( (*it)->service ), addressesForService ); } // then construct a custom field from each qstringlist - QMap<QString, QStringList>::Iterator addrIt; + TQMap<TQString, TQStringList>::Iterator addrIt; for ( addrIt = addressMap.begin(); addrIt != addressMap.end(); ++addrIt ) { - QString protocol = addrIt.key(); - QStringList addresses = addrIt.data(); + TQString protocol = addrIt.key(); + TQStringList addresses = addrIt.data(); //kdDebug() << "got IM addresses for '" << protocol << "' : " << addresses << endl; // TODO: map protocol to KDE's set of known protocol names (need to know the set of services in use elsewhere) if ( protocol == "nov" ) protocol = "groupwise"; - addr.insertCustom( QString::fromLatin1("messaging/%1").arg( protocol ), - QString::fromLatin1( "All" ), - addresses.join( QChar( 0xE000 ) ) ); + addr.insertCustom( TQString::fromLatin1("messaging/%1").arg( protocol ), + TQString::fromLatin1( "All" ), + addresses.join( TQChar( 0xE000 ) ) ); } } @@ -576,23 +576,23 @@ ngwt__ImAddressList* ContactConverter::convertImAddresses( const KABC::Addressee // if it contains IM addresses // extract each one and add it to imList - const QStringList customs = addr.customs(); - QStringList::ConstIterator it; + const TQStringList customs = addr.customs(); + TQStringList::ConstIterator it; bool isSet = false; for ( it = customs.begin(); it != customs.end(); ++it ) { - QString app, name, value; + TQString app, name, value; splitField( *it, app, name, value ); - if ( app.startsWith( QString::fromLatin1( "messaging/" ) ) && name == QString::fromLatin1( "All" ) ) { + if ( app.startsWith( TQString::fromLatin1( "messaging/" ) ) && name == TQString::fromLatin1( "All" ) ) { // get the protocol for this field - QString protocol = app.section( '/', 1, 1 ); + TQString protocol = app.section( '/', 1, 1 ); if ( !protocol.isEmpty() ) { if ( protocol == "groupwise" ) protocol = "novell"; - QStringList addresses = QStringList::split( QChar( 0xE000 ), value ); - QStringList::iterator end = addresses.end(); + TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), value ); + TQStringList::iterator end = addresses.end(); // extract each address for this protocol, and create an ngwt__ImAddress for it, and append it to list. - for ( QStringList::ConstIterator it = addresses.begin(); it != end; ++it ) { + for ( TQStringList::ConstIterator it = addresses.begin(); it != end; ++it ) { ngwt__ImAddress* address = soap_new_ngwt__ImAddress( soap(), -1 ); address->service = soap_new_std__string( soap(), -1 ); address->address = soap_new_std__string( soap(), -1 ); @@ -616,11 +616,11 @@ ngwt__ImAddressList* ContactConverter::convertImAddresses( const KABC::Addressee } } -void ContactConverter::splitField( const QString &str, QString &app, QString &name, QString &value ) +void ContactConverter::splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { int colon = str.find( ':' ); if ( colon != -1 ) { - QString tmp = str.left( colon ); + TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); int dash = tmp.find( '-' ); |