summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/jabberbasecontact.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/jabber/jabberbasecontact.cpp')
-rw-r--r--kopete/protocols/jabber/jabberbasecontact.cpp68
1 files changed, 34 insertions, 34 deletions
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 <klocale.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
-#include <qtimer.h>
-#include <qimage.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqimage.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kio/netaccess.h>
@@ -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 = "<table cellspacing=\"0\">";
+ TQString resourceListStr = "<table cellspacing=\"0\">";
for ( JabberResourcePool::ResourceList::iterator it = resourceList.begin (); it != resourceList.end (); ++it )
{
// icon, resource name and priority
- resourceListStr += QString ( "<tr><td><img src=\"kopete-onlinestatus-icon:%1\" /> <b>%2</b> (Priority: %3)</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td><img src=\"kopete-onlinestatus-icon:%1\" /> <b>%2</b> (Priority: %3)</td></tr>" ).
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 ( "<tr><td>%1: %2 (%3)</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td>%1: %2 (%3)</td></tr>" ).
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( "<tr><td>Supported Features:" );
+ resourceListStr += TQString( "<tr><td>Supported Features:" );
for( featuresIt = supportedFeatures.constBegin(); featuresIt != featuresItEnd; ++featuresIt )
{
XMPP::Features tempFeature(*featuresIt);
- resourceListStr += QString("\n<br>");
+ resourceListStr += TQString("\n<br>");
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( "</td></tr>" );
+ resourceListStr += TQString( "</td></tr>" );
#endif
// resource timestamp
- resourceListStr += QString ( "<tr><td>%1: %2</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td>%1: %2</td></tr>" ).
arg ( i18n ( "Timestamp" ), KGlobal::locale()->formatDateTime ( (*it)->resource().status().timeStamp(), true, true ) );
// message, if any
if ( !(*it)->resource().status().status().stripWhiteSpace().isEmpty () )
{
- resourceListStr += QString ( "<tr><td>%1: %2</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td>%1: %2</td></tr>" ).
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 );
}