From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/jabber/jabberbasecontact.cpp | 68 +++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'kopete/protocols/jabber/jabberbasecontact.cpp') diff --git a/kopete/protocols/jabber/jabberbasecontact.cpp b/kopete/protocols/jabber/jabberbasecontact.cpp index 56cc1de4..cffc65f9 100644 --- a/kopete/protocols/jabber/jabberbasecontact.cpp +++ b/kopete/protocols/jabber/jabberbasecontact.cpp @@ -20,9 +20,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -48,7 +48,7 @@ /** * JabberBaseContact constructor */ -JabberBaseContact::JabberBaseContact (const XMPP::RosterItem &rosterItem, Kopete::Account *account, Kopete::MetaContact * mc, const QString &legacyId) +JabberBaseContact::JabberBaseContact (const XMPP::RosterItem &rosterItem, Kopete::Account *account, Kopete::MetaContact * mc, const TQString &legacyId) : Kopete::Contact (account, legacyId.isEmpty() ? rosterItem.jid().full() : legacyId , mc ) { setDontSync ( false ); @@ -112,8 +112,8 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item ) // only update the alias if its not empty if ( !item.name().isEmpty () && item.name() != item.jid().bare() ) { - QString newName = item.name (); - QString oldName = metaContact()->displayName(); + TQString newName = item.name (); + TQString oldName = metaContact()->displayName(); Kopete::Contact *source=metaContact()->displayNameSourceContact(); // kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "setting display name of " << contactId () << " to " << newName << endl; metaContact()->setDisplayName ( newName ); @@ -217,7 +217,7 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item ) setDontSync ( false ); //can't do it now because it's called from contructor at a point some virtual function are not available - QTimer::singleShot(0, this, SLOT(reevaluateStatus())); + TQTimer::singleShot(0, this, TQT_SLOT(reevaluateStatus())); } @@ -239,50 +239,50 @@ void JabberBaseContact::updateResourceList () return; } - QString resourceListStr = ""; + TQString resourceListStr = "
"; for ( JabberResourcePool::ResourceList::iterator it = resourceList.begin (); it != resourceList.end (); ++it ) { // icon, resource name and priority - resourceListStr += QString ( "" ). + resourceListStr += TQString ( "" ). arg ( protocol()->resourceToKOS((*it)->resource()).mimeSourceFor ( account () ), - (*it)->resource().name (), QString::number ( (*it)->resource().priority () ) ); + (*it)->resource().name (), TQString::number ( (*it)->resource().priority () ) ); // client name, version, OS if ( !(*it)->clientName().isEmpty () ) { - resourceListStr += QString ( "" ). + resourceListStr += TQString ( "" ). arg ( i18n ( "Client" ), (*it)->clientName (), (*it)->clientSystem () ); } // Supported features #if 0 //disabled because it's just an ugly and long list of incomprehensible namespaces to the user - QStringList supportedFeatures = (*it)->features().list(); - QStringList::ConstIterator featuresIt, featuresItEnd = supportedFeatures.constEnd(); + TQStringList supportedFeatures = (*it)->features().list(); + TQStringList::ConstIterator featuresIt, featuresItEnd = supportedFeatures.constEnd(); if( !supportedFeatures.empty() ) - resourceListStr += QString( "" ); + resourceListStr += TQString( "" ); #endif // resource timestamp - resourceListStr += QString ( "" ). + resourceListStr += TQString ( "" ). arg ( i18n ( "Timestamp" ), KGlobal::locale()->formatDateTime ( (*it)->resource().status().timeStamp(), true, true ) ); // message, if any if ( !(*it)->resource().status().status().stripWhiteSpace().isEmpty () ) { - resourceListStr += QString ( "" ). + resourceListStr += TQString ( "" ). arg ( i18n ( "Message" ), Kopete::Message::escape( (*it)->resource().status().status () ) @@ -313,7 +313,7 @@ void JabberBaseContact::reevaluateStatus () status.weight() , protocol() , status.internalStatus() | 0x0100, - status.overlayIcons() + QStringList("status_unknown_overlay") , //FIXME: find better icon + status.overlayIcons() + TQStringList("status_unknown_overlay") , //FIXME: find better icon status.description() ); } @@ -338,7 +338,7 @@ void JabberBaseContact::reevaluateStatus () } -QString JabberBaseContact::fullAddress () +TQString JabberBaseContact::fullAddress () { XMPP::Jid jid = rosterItem().jid(); @@ -384,13 +384,13 @@ bool JabberBaseContact::dontSync () } -void JabberBaseContact::serialize (QMap < QString, QString > &serializedData, QMap < QString, QString > & /* addressBookData */ ) +void JabberBaseContact::serialize (TQMap < TQString, TQString > &serializedData, TQMap < TQString, TQString > & /* addressBookData */ ) { // Contact id and display name are already set for us, only add the rest serializedData["JID"] = mRosterItem.jid().full(); - serializedData["groups"] = mRosterItem.groups ().join (QString::fromLatin1 (",")); + serializedData["groups"] = mRosterItem.groups ().join (TQString::fromLatin1 (",")); } void JabberBaseContact::slotUserInfo( ) @@ -414,7 +414,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) // update vCard cache timestamp if this is not a temporary contact if ( metaContact() && !metaContact()->isTemporary () ) { - setProperty ( protocol()->propVCardCacheTimeStamp, QDateTime::currentDateTime().toString ( Qt::ISODate ) ); + setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::currentDateTime().toString ( Qt::ISODate ) ); } @@ -449,8 +449,8 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) if ( !vCard.fullName().isEmpty () && vCard.givenName().isEmpty () && vCard.familyName().isEmpty () ) { - QString lastName = vCard.fullName().section ( ' ', 0, -1 ); - QString firstName = vCard.fullName().left(vCard.fullName().length () - lastName.length ()).stripWhiteSpace (); + TQString lastName = vCard.fullName().section ( ' ', 0, -1 ); + TQString firstName = vCard.fullName().left(vCard.fullName().length () - lastName.length ()).stripWhiteSpace (); setProperty ( protocol()->propFirstName, firstName ); setProperty ( protocol()->propLastName, lastName ); @@ -628,22 +628,22 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) */ removeProperty( protocol()->propPhoto ); - QImage contactPhoto; - QString fullJid = mRosterItem.jid().full(); - QString finalPhotoPath = locateLocal("appdata", "jabberphotos/" + fullJid.replace(QRegExp("[./~]"),"-") +".png"); + TQImage contactPhoto; + TQString fullJid = mRosterItem.jid().full(); + TQString finalPhotoPath = locateLocal("appdata", "jabberphotos/" + fullJid.replace(TQRegExp("[./~]"),"-") +".png"); // photo() is a QByteArray if ( !vCard.photo().isEmpty() ) { kdDebug( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Contact has a photo embedded into his vCard." << endl; - // QImage is used to save to disk in PNG later. - contactPhoto = QImage( vCard.photo() ); + // TQImage is used to save to disk in PNG later. + contactPhoto = TQImage( vCard.photo() ); } // Contact photo is a URI. else if( !vCard.photoURI().isEmpty() ) { - QString tempPhotoPath = 0; + TQString tempPhotoPath = 0; // Downalod photo from URI. if( !KIO::NetAccess::download( vCard.photoURI(), tempPhotoPath, 0) ) @@ -654,7 +654,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) kdDebug( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Contact photo is a URI." << endl; - contactPhoto = QImage( tempPhotoPath ); + contactPhoto = TQImage( tempPhotoPath ); KIO::NetAccess::removeTempFile( tempPhotoPath ); } -- cgit v1.2.1
%2 (Priority: %3)
%2 (Priority: %3)
%1: %2 (%3)
%1: %2 (%3)
Supported Features:" ); + resourceListStr += TQString( "
Supported Features:" ); for( featuresIt = supportedFeatures.constBegin(); featuresIt != featuresItEnd; ++featuresIt ) { XMPP::Features tempFeature(*featuresIt); - resourceListStr += QString("\n
"); + resourceListStr += TQString("\n
"); if ( tempFeature.id() > XMPP::Features::FID_None ) - resourceListStr += tempFeature.name() + QString(" ("); + resourceListStr += tempFeature.name() + TQString(" ("); resourceListStr += *featuresIt; if ( tempFeature.id() > Features::FID_None ) - resourceListStr += QString(")"); + resourceListStr += TQString(")"); } if( !supportedFeatures.empty() ) - resourceListStr += QString( "
%1: %2
%1: %2
%1: %2
%1: %2