From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kresources/kolab/kabc/contact.cpp | 296 +++++++++++++++++++------------------- 1 file changed, 148 insertions(+), 148 deletions(-) (limited to 'kresources/kolab/kabc/contact.cpp') diff --git a/kresources/kolab/kabc/contact.cpp b/kresources/kolab/kabc/contact.cpp index c5e819b3f..fc9087316 100644 --- a/kresources/kolab/kabc/contact.cpp +++ b/kresources/kolab/kabc/contact.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include using namespace Kolab; @@ -56,7 +56,7 @@ Contact::Contact( const KABC::Addressee* addr ) } // loading (xml->addressee) -Contact::Contact( const QString& xml, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum ) +Contact::Contact( const TQString& xml, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum ) : mHasGeo( false ) { load( xml ); @@ -72,252 +72,252 @@ Contact::~Contact() { } -void Contact::setGivenName( const QString& name ) +void Contact::setGivenName( const TQString& name ) { mGivenName = name; } -QString Contact::givenName() const +TQString Contact::givenName() const { return mGivenName; } -void Contact::setMiddleNames( const QString& names ) +void Contact::setMiddleNames( const TQString& names ) { mMiddleNames = names; } -QString Contact::middleNames() const +TQString Contact::middleNames() const { return mMiddleNames; } -void Contact::setLastName( const QString& name ) +void Contact::setLastName( const TQString& name ) { mLastName = name; } -QString Contact::lastName() const +TQString Contact::lastName() const { return mLastName; } -void Contact::setFullName( const QString& name ) +void Contact::setFullName( const TQString& name ) { mFullName = name; } -QString Contact::fullName() const +TQString Contact::fullName() const { return mFullName; } -void Contact::setInitials( const QString& initials ) +void Contact::setInitials( const TQString& initials ) { mInitials = initials; } -QString Contact::initials() const +TQString Contact::initials() const { return mInitials; } -void Contact::setPrefix( const QString& prefix ) +void Contact::setPrefix( const TQString& prefix ) { mPrefix = prefix; } -QString Contact::prefix() const +TQString Contact::prefix() const { return mPrefix; } -void Contact::setSuffix( const QString& suffix ) +void Contact::setSuffix( const TQString& suffix ) { mSuffix = suffix; } -QString Contact::suffix() const +TQString Contact::suffix() const { return mSuffix; } -void Contact::setRole( const QString& role ) +void Contact::setRole( const TQString& role ) { mRole = role; } -QString Contact::role() const +TQString Contact::role() const { return mRole; } -void Contact::setFreeBusyUrl( const QString& fbUrl ) +void Contact::setFreeBusyUrl( const TQString& fbUrl ) { mFreeBusyUrl = fbUrl; } -QString Contact::freeBusyUrl() const +TQString Contact::freeBusyUrl() const { return mFreeBusyUrl; } -void Contact::setOrganization( const QString& organization ) +void Contact::setOrganization( const TQString& organization ) { mOrganization = organization; } -QString Contact::organization() const +TQString Contact::organization() const { return mOrganization; } -void Contact::setWebPage( const QString& url ) +void Contact::setWebPage( const TQString& url ) { mWebPage = url; } -QString Contact::webPage() const +TQString Contact::webPage() const { return mWebPage; } -void Contact::setIMAddress( const QString& imAddress ) +void Contact::setIMAddress( const TQString& imAddress ) { mIMAddress = imAddress; } -QString Contact::imAddress() const +TQString Contact::imAddress() const { return mIMAddress; } -void Contact::setDepartment( const QString& department ) +void Contact::setDepartment( const TQString& department ) { mDepartment = department; } -QString Contact::department() const +TQString Contact::department() const { return mDepartment; } -void Contact::setOfficeLocation( const QString& location ) +void Contact::setOfficeLocation( const TQString& location ) { mOfficeLocation = location; } -QString Contact::officeLocation() const +TQString Contact::officeLocation() const { return mOfficeLocation; } -void Contact::setProfession( const QString& profession ) +void Contact::setProfession( const TQString& profession ) { mProfession = profession; } -QString Contact::profession() const +TQString Contact::profession() const { return mProfession; } -// void Contact::setJobTitle( const QString& title ) +// void Contact::setJobTitle( const TQString& title ) // { // mJobTitle = title; // } -// QString Contact::jobTitle() const +// TQString Contact::jobTitle() const // { // return mJobTitle; // } -void Contact::setManagerName( const QString& name ) +void Contact::setManagerName( const TQString& name ) { mManagerName = name; } -QString Contact::managerName() const +TQString Contact::managerName() const { return mManagerName; } -void Contact::setAssistant( const QString& name ) +void Contact::setAssistant( const TQString& name ) { mAssistant = name; } -QString Contact::assistant() const +TQString Contact::assistant() const { return mAssistant; } -void Contact::setNickName( const QString& name ) +void Contact::setNickName( const TQString& name ) { mNickName = name; } -QString Contact::nickName() const +TQString Contact::nickName() const { return mNickName; } -void Contact::setSpouseName( const QString& name ) +void Contact::setSpouseName( const TQString& name ) { mSpouseName = name; } -QString Contact::spouseName() const +TQString Contact::spouseName() const { return mSpouseName; } -void Contact::setBirthday( const QDate& date ) +void Contact::setBirthday( const TQDate& date ) { mBirthday = date; } -QDate Contact::birthday() const +TQDate Contact::birthday() const { return mBirthday; } -void Contact::setAnniversary( const QDate& date ) +void Contact::setAnniversary( const TQDate& date ) { mAnniversary = date; } -QDate Contact::anniversary() const +TQDate Contact::anniversary() const { return mAnniversary; } -void Contact::setChildren( const QString& children ) +void Contact::setChildren( const TQString& children ) { mChildren = children; } -QString Contact::children() const +TQString Contact::children() const { return mChildren; } -void Contact::setGender( const QString& gender ) +void Contact::setGender( const TQString& gender ) { mGender = gender; } -QString Contact::gender() const +TQString Contact::gender() const { return mGender; } -void Contact::setLanguage( const QString& language ) +void Contact::setLanguage( const TQString& language ) { mLanguage = language; } -QString Contact::language() const +TQString Contact::language() const { return mLanguage; } @@ -327,12 +327,12 @@ void Contact::addPhoneNumber( const PhoneNumber& number ) mPhoneNumbers.append( number ); } -QValueList& Contact::phoneNumbers() +TQValueList& Contact::phoneNumbers() { return mPhoneNumbers; } -const QValueList& Contact::phoneNumbers() const +const TQValueList& Contact::phoneNumbers() const { return mPhoneNumbers; } @@ -342,12 +342,12 @@ void Contact::addEmail( const Email& email ) mEmails.append( email ); } -QValueList& Contact::emails() +TQValueList& Contact::emails() { return mEmails; } -const QValueList& Contact::emails() const +const TQValueList& Contact::emails() const { return mEmails; } @@ -357,34 +357,34 @@ void Contact::addAddress( const Contact::Address& address ) mAddresses.append( address ); } -QValueList& Contact::addresses() +TQValueList& Contact::addresses() { return mAddresses; } -const QValueList& Contact::addresses() const +const TQValueList& Contact::addresses() const { return mAddresses; } -void Contact::setPreferredAddress( const QString& address ) +void Contact::setPreferredAddress( const TQString& address ) { mPreferredAddress = address; } -QString Contact::preferredAddress() const +TQString Contact::preferredAddress() const { return mPreferredAddress; } -bool Contact::loadNameAttribute( QDomElement& element ) +bool Contact::loadNameAttribute( TQDomElement& element ) { - for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); - QString tagName = e.tagName(); + TQDomElement e = n.toElement(); + TQString tagName = e.tagName(); if ( tagName == "given-name" ) setGivenName( e.text() ); @@ -410,9 +410,9 @@ bool Contact::loadNameAttribute( QDomElement& element ) return true; } -void Contact::saveNameAttribute( QDomElement& element ) const +void Contact::saveNameAttribute( TQDomElement& element ) const { - QDomElement e = element.ownerDocument().createElement( "name" ); + TQDomElement e = element.ownerDocument().createElement( "name" ); element.appendChild( e ); writeString( e, "given-name", givenName() ); @@ -424,15 +424,15 @@ void Contact::saveNameAttribute( QDomElement& element ) const writeString( e, "suffix", suffix() ); } -bool Contact::loadPhoneAttribute( QDomElement& element ) +bool Contact::loadPhoneAttribute( TQDomElement& element ) { PhoneNumber number; - for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); - QString tagName = e.tagName(); + TQDomElement e = n.toElement(); + TQString tagName = e.tagName(); if ( tagName == "type" ) number.type = e.text(); @@ -449,11 +449,11 @@ bool Contact::loadPhoneAttribute( QDomElement& element ) return true; } -void Contact::savePhoneAttributes( QDomElement& element ) const +void Contact::savePhoneAttributes( TQDomElement& element ) const { - QValueList::ConstIterator it = mPhoneNumbers.begin(); + TQValueList::ConstIterator it = mPhoneNumbers.begin(); for ( ; it != mPhoneNumbers.end(); ++it ) { - QDomElement e = element.ownerDocument().createElement( "phone" ); + TQDomElement e = element.ownerDocument().createElement( "phone" ); element.appendChild( e ); const PhoneNumber& p = *it; writeString( e, "type", p.type ); @@ -461,14 +461,14 @@ void Contact::savePhoneAttributes( QDomElement& element ) const } } -void Contact::saveEmailAttributes( QDomElement& element ) const +void Contact::saveEmailAttributes( TQDomElement& element ) const { - QValueList::ConstIterator it = mEmails.begin(); + TQValueList::ConstIterator it = mEmails.begin(); for ( ; it != mEmails.end(); ++it ) saveEmailAttribute( element, *it ); } -void Contact::loadCustomAttributes( QDomElement& element ) +void Contact::loadCustomAttributes( TQDomElement& element ) { Custom custom; custom.app = element.attribute( "app" ); @@ -477,16 +477,16 @@ void Contact::loadCustomAttributes( QDomElement& element ) mCustomList.append( custom ); } -void Contact::saveCustomAttributes( QDomElement& element ) const +void Contact::saveCustomAttributes( TQDomElement& element ) const { - QValueList::ConstIterator it = mCustomList.begin(); + TQValueList::ConstIterator it = mCustomList.begin(); for ( ; it != mCustomList.end(); ++it ) { Q_ASSERT( !(*it).name.isEmpty() ); if ( (*it).app == s_unhandledTagAppName ) { writeString( element, (*it).name, (*it).value ); } else { // Let's use attributes so that other tag-preserving-code doesn't need sub-elements - QDomElement e = element.ownerDocument().createElement( "x-custom" ); + TQDomElement e = element.ownerDocument().createElement( "x-custom" ); element.appendChild( e ); e.setAttribute( "app", (*it).app ); e.setAttribute( "name", (*it).name ); @@ -495,16 +495,16 @@ void Contact::saveCustomAttributes( QDomElement& element ) const } } -bool Contact::loadAddressAttribute( QDomElement& element ) +bool Contact::loadAddressAttribute( TQDomElement& element ) { Address address; - for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); - QString tagName = e.tagName(); + TQDomElement e = n.toElement(); + TQString tagName = e.tagName(); if ( tagName == "type" ) address.type = e.text(); @@ -533,15 +533,15 @@ bool Contact::loadAddressAttribute( QDomElement& element ) return true; } -void Contact::saveAddressAttributes( QDomElement& element ) const +void Contact::saveAddressAttributes( TQDomElement& element ) const { - QValueList
::ConstIterator it = mAddresses.begin(); + TQValueList
::ConstIterator it = mAddresses.begin(); for ( ; it != mAddresses.end(); ++it ) { - QDomElement e = element.ownerDocument().createElement( "address" ); + TQDomElement e = element.ownerDocument().createElement( "address" ); element.appendChild( e ); const Address& a = *it; writeString( e, "type", a.type ); - writeString( e, "x-kde-type", QString::number( a.kdeAddressType ) ); + writeString( e, "x-kde-type", TQString::number( a.kdeAddressType ) ); if ( !a.street.isEmpty() ) writeString( e, "street", a.street ); if ( !a.pobox.isEmpty() ) @@ -558,15 +558,15 @@ void Contact::saveAddressAttributes( QDomElement& element ) const } -void Kolab::Contact::loadDistrListMember( const QDomElement& element ) +void Kolab::Contact::loadDistrListMember( const TQDomElement& element ) { Member member; - for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); - QString tagName = e.tagName(); + TQDomElement e = n.toElement(); + TQString tagName = e.tagName(); if ( tagName == "display-name" ) member.displayName = e.text(); else if ( tagName == "smtp-address" ) @@ -576,11 +576,11 @@ void Kolab::Contact::loadDistrListMember( const QDomElement& element ) mDistrListMembers.append( member ); } -void Contact::saveDistrListMembers( QDomElement& element ) const +void Contact::saveDistrListMembers( TQDomElement& element ) const { - QValueList::ConstIterator it = mDistrListMembers.begin(); + TQValueList::ConstIterator it = mDistrListMembers.begin(); for( ; it != mDistrListMembers.end(); ++it ) { - QDomElement e = element.ownerDocument().createElement( "member" ); + TQDomElement e = element.ownerDocument().createElement( "member" ); element.appendChild( e ); const Member& m = *it; writeString( e, "display-name", m.displayName ); @@ -588,9 +588,9 @@ void Contact::saveDistrListMembers( QDomElement& element ) const } } -bool Contact::loadAttribute( QDomElement& element ) +bool Contact::loadAttribute( TQDomElement& element ) { - const QString tagName = element.tagName(); + const TQString tagName = element.tagName(); switch ( tagName[0].latin1() ) { case 'a': if ( tagName == "address" ) @@ -762,7 +762,7 @@ bool Contact::loadAttribute( QDomElement& element ) return KolabBase::loadAttribute( element ); } -bool Contact::saveAttributes( QDomElement& element ) const +bool Contact::saveAttributes( TQDomElement& element ) const { // Save the base class elements KolabBase::saveAttributes( element ); @@ -804,8 +804,8 @@ bool Contact::saveAttributes( QDomElement& element ) const saveAddressAttributes( element ); writeString( element, "preferred-address", preferredAddress() ); if ( mHasGeo ) { - writeString( element, "latitude", QString::number( latitude(), 'g', DBL_DIG ) ); - writeString( element, "longitude", QString::number( longitude(), 'g', DBL_DIG ) ); + writeString( element, "latitude", TQString::number( latitude(), 'g', DBL_DIG ) ); + writeString( element, "longitude", TQString::number( longitude(), 'g', DBL_DIG ) ); } } saveCustomAttributes( element ); @@ -813,9 +813,9 @@ bool Contact::saveAttributes( QDomElement& element ) const return true; } -bool Contact::loadXML( const QDomDocument& document ) +bool Contact::loadXML( const TQDomDocument& document ) { - QDomElement top = document.documentElement(); + TQDomElement top = document.documentElement(); mIsDistributionList = top.tagName() == "distribution-list"; if ( top.tagName() != "contact" && !mIsDistributionList ) { @@ -825,11 +825,11 @@ bool Contact::loadXML( const QDomDocument& document ) } - for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( !loadAttribute( e ) ) { // Unhandled tag - save for later storage //kdDebug() << "Saving unhandled tag " << e.tagName() << endl; @@ -846,10 +846,10 @@ bool Contact::loadXML( const QDomDocument& document ) return true; } -QString Contact::saveXML() const +TQString Contact::saveXML() const { - QDomDocument document = domTree(); - QDomElement element = document.createElement( + TQDomDocument document = domTree(); + TQDomElement element = document.createElement( mIsDistributionList ? "distribution-list" : "contact" ); element.setAttribute( "version", "1.0" ); saveAttributes( element ); @@ -857,7 +857,7 @@ QString Contact::saveXML() const return document.toString(); } -static QString addressTypeToString( int /*KABC::Address::Type*/ type ) +static TQString addressTypeToString( int /*KABC::Address::Type*/ type ) { if ( type & KABC::Address::Home ) return "home"; @@ -866,7 +866,7 @@ static QString addressTypeToString( int /*KABC::Address::Type*/ type ) return "other"; } -static int addressTypeFromString( const QString& type ) +static int addressTypeFromString( const TQString& type ) { if ( type == "home" ) return KABC::Address::Home; @@ -876,12 +876,12 @@ static int addressTypeFromString( const QString& type ) return KABC::Address::Dom | KABC::Address::Intl | KABC::Address::Postal | KABC::Address::Parcel; } -static QStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type ) +static TQStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type ) { // KABC has a bitfield, i.e. the same phone number can be used for work and home // and fax and cellphone etc. etc. // So when saving we need to create as many tags as bits that were set. - QStringList types; + TQStringList types; if ( type & KABC::PhoneNumber::Fax ) { if ( type & KABC::PhoneNumber::Home ) types << "homefax"; @@ -936,7 +936,7 @@ static QStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type ) return types; } -static int /*KABC::PhoneNumber::Types*/ phoneTypeFromString( const QString& type ) +static int /*KABC::PhoneNumber::Types*/ phoneTypeFromString( const TQString& type ) { if ( type == "homefax" ) return KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax; @@ -1030,15 +1030,15 @@ void Contact::setFields( const KABC::Addressee* addressee ) setSpouseName( addressee->custom( "KADDRESSBOOK", "X-SpousesName" ) ); if ( !addressee->birthday().isNull() ) setBirthday( addressee->birthday().date() ); - const QString& anniversary = addressee->custom( "KADDRESSBOOK", "X-Anniversary" ); + const TQString& anniversary = addressee->custom( "KADDRESSBOOK", "X-Anniversary" ); if ( !anniversary.isEmpty() ) setAnniversary( stringToDate( anniversary ) ); - const QStringList emails = addressee->emails(); + const TQStringList emails = addressee->emails(); // Conversion problem here: // KABC::Addressee has only one full name and N addresses, but the XML format // has N times (fullname+address). So we just copy the fullname over and ignore it on loading. - for ( QStringList::ConstIterator it = emails.begin(); it != emails.end(); ++it ) { + for ( TQStringList::ConstIterator it = emails.begin(); it != emails.end(); ++it ) { Email email; email.displayName = fullName(); email.smtpAddress = *it; @@ -1046,7 +1046,7 @@ void Contact::setFields( const KABC::Addressee* addressee ) } // Now the real-world addresses - QString preferredAddress = "home"; + TQString preferredAddress = "home"; const KABC::Address::List addresses = addressee->addresses(); for ( KABC::Address::List::ConstIterator it = addresses.begin() ; it != addresses.end(); ++it ) { Address address; @@ -1070,8 +1070,8 @@ void Contact::setFields( const KABC::Addressee* addressee ) const KABC::PhoneNumber::List phones = addressee->phoneNumbers(); for ( KABC::PhoneNumber::List::ConstIterator it = phones.begin(); it != phones.end(); ++it ) { // Create a tag per phone type set in the bitfield - QStringList types = phoneTypeToString( (*it).type() ); - for( QStringList::Iterator typit = types.begin(); typit != types.end(); ++typit ) { + TQStringList types = phoneTypeToString( (*it).type() ); + for( TQStringList::Iterator typit = types.begin(); typit != types.end(); ++typit ) { PhoneNumber phoneNumber; phoneNumber.type = *typit; phoneNumber.number = (*it).number(); @@ -1102,21 +1102,21 @@ void Contact::setFields( const KABC::Addressee* addressee ) // Other KADDRESSBOOK custom fields than those already handled // (includes e.g. crypto settings, and extra im addresses) - QStringList knownCustoms; + TQStringList knownCustoms; for ( const char** p = s_knownCustomFields; *p; ++p ) - knownCustoms << QString::fromLatin1( *p ); - QStringList customs = addressee->customs(); - for( QStringList::Iterator it = customs.begin(); it != customs.end(); ++it ) { + knownCustoms << TQString::fromLatin1( *p ); + TQStringList customs = addressee->customs(); + for( TQStringList::Iterator it = customs.begin(); it != customs.end(); ++it ) { // KABC::Addressee doesn't offer a real way to iterate over customs, other than splitting strings ourselves // The format is "app-name:value". int pos = (*it).find( '-' ); if ( pos == -1 ) continue; - QString app = (*it).left( pos ); + TQString app = (*it).left( pos ); if ( app == "KOLAB" ) continue; - QString name = (*it).mid( pos + 1 ); + TQString name = (*it).mid( pos + 1 ); pos = name.find( ':' ); if ( pos == -1 ) continue; - QString value = name.mid( pos + 1 ); + TQString value = name.mid( pos + 1 ); name = name.left( pos ); if ( !knownCustoms.contains( name ) ) { //kdDebug() << k_funcinfo << "app=" << app << " name=" << name << " value=" << value << endl; @@ -1150,9 +1150,9 @@ void Contact::saveTo( KABC::Addressee* addressee ) if ( mIsDistributionList ) { KPIM::DistributionList distrList( *addressee ); distrList.setName( fullName() ); - QValueList::ConstIterator mit = mDistrListMembers.begin(); + TQValueList::ConstIterator mit = mDistrListMembers.begin(); for ( ; mit != mDistrListMembers.end(); ++mit ) { - QString displayName = (*mit).displayName; + TQString displayName = (*mit).displayName; // fixup the display name DistributionList::assumes neither ',' nor ';' is present displayName.replace( ',', ' ' ); displayName.replace( ';', ' ' ); @@ -1183,7 +1183,7 @@ void Contact::saveTo( KABC::Addressee* addressee ) addressee->setNickName( nickName() ); addressee->insertCustom( "KADDRESSBOOK", "X-SpousesName", spouseName() ); if ( birthday().isValid() ) - addressee->setBirthday( QDateTime( birthday() ) ); + addressee->setBirthday( TQDateTime( birthday() ) ); if ( anniversary().isValid() ) addressee->insertCustom( "KADDRESSBOOK", "X-Anniversary", @@ -1208,14 +1208,14 @@ void Contact::saveTo( KABC::Addressee* addressee ) if ( mHasGeo ) addressee->setGeo( KABC::Geo( mLatitude, mLongitude ) ); - QStringList emailAddresses; - for ( QValueList::ConstIterator it = mEmails.begin(); it != mEmails.end(); ++it ) { + TQStringList emailAddresses; + for ( TQValueList::ConstIterator it = mEmails.begin(); it != mEmails.end(); ++it ) { // we can't do anything with (*it).displayName emailAddresses.append( (*it).smtpAddress ); } addressee->setEmails( emailAddresses ); - for ( QValueList
::ConstIterator it = mAddresses.begin(); it != mAddresses.end(); ++it ) { + for ( TQValueList
::ConstIterator it = mAddresses.begin(); it != mAddresses.end(); ++it ) { KABC::Address address; int type = (*it).kdeAddressType; if ( type == -1 ) { // no kde-specific type available @@ -1233,37 +1233,37 @@ void Contact::saveTo( KABC::Addressee* addressee ) addressee->insertAddress( address ); } - for ( QValueList::ConstIterator it = mPhoneNumbers.begin(); it != mPhoneNumbers.end(); ++it ) { + for ( TQValueList::ConstIterator it = mPhoneNumbers.begin(); it != mPhoneNumbers.end(); ++it ) { KABC::PhoneNumber number; number.setType( phoneTypeFromString( (*it).type ) ); number.setNumber( (*it).number ); addressee->insertPhoneNumber( number ); } - for( QValueList::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) { - QString app = (*it).app.isEmpty() ? QString::fromLatin1( "KADDRESSBOOK" ) : (*it).app; + for( TQValueList::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) { + TQString app = (*it).app.isEmpty() ? TQString::fromLatin1( "KADDRESSBOOK" ) : (*it).app; addressee->insertCustom( app, (*it).name, (*it).value ); } //kdDebug(5006) << addressee->customs() << endl; } -QImage Contact::loadPictureFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum ) +TQImage Contact::loadPictureFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum ) { - QImage img; + TQImage img; KURL url; if ( resource->kmailGetAttachment( url, subResource, sernum, attachmentName ) && !url.isEmpty() ) { - const QString path = url.path(); + const TQString path = url.path(); img.load( path ); - QFile::remove(path); + TQFile::remove(path); } return img; } -QImage Contact::loadPictureFromAddressee( const KABC::Picture& picture ) +TQImage Contact::loadPictureFromAddressee( const KABC::Picture& picture ) { - QImage img; + TQImage img; if ( !picture.isIntern() && !picture.url().isEmpty() ) { - QString tmpFile; + TQString tmpFile; if ( KIO::NetAccess::download( picture.url(), tmpFile, 0 /*no widget known*/ ) ) { img.load( tmpFile ); KIO::NetAccess::removeTempFile( tmpFile ); @@ -1273,12 +1273,12 @@ QImage Contact::loadPictureFromAddressee( const KABC::Picture& picture ) return img; } -QByteArray Kolab::Contact::loadDataFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum ) +TQByteArray Kolab::Contact::loadDataFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum ) { - QByteArray data; + TQByteArray data; KURL url; if ( resource->kmailGetAttachment( url, subResource, sernum, attachmentName ) && !url.isEmpty() ) { - QFile f( url.path() ); + TQFile f( url.path() ); if ( f.open( IO_ReadOnly ) ) { data = f.readAll(); f.close(); @@ -1288,13 +1288,13 @@ QByteArray Kolab::Contact::loadDataFromKMail( const QString& attachmentName, KAB return data; } -QByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound ) +TQByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound ) { - QByteArray data; + TQByteArray data; if ( !sound.isIntern() && !sound.url().isEmpty() ) { - QString tmpFile; + TQString tmpFile; if ( KIO::NetAccess::download( sound.url(), tmpFile, 0 /*no widget known*/ ) ) { - QFile f( tmpFile ); + TQFile f( tmpFile ); if ( f.open( IO_ReadOnly ) ) { data = f.readAll(); f.close(); @@ -1306,7 +1306,7 @@ QByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound ) return data; } -QString Kolab::Contact::productID() const +TQString Kolab::Contact::productID() const { // TODO: When KAB has the version number in a header file, don't hardcode (Bo) // Or we could use Addressee::productID? (David) -- cgit v1.2.1