summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/jabber/jabbercapabilitiesmanager.cpp')
-rw-r--r--kopete/protocols/jabber/jabbercapabilitiesmanager.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp b/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
index 9d9dd770..eb5efabf 100644
--- a/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
+++ b/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
@@ -113,11 +113,11 @@ TQStringList JabberCapabilitiesManager::CapabilitiesInformation::jids() const
{
TQStringList jids;
- TQValueList<QPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
+ TQValueList<TQPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
for( ; it != itEnd; ++it)
{
TQString jid( (*it).first );
- if( !jids.contains(jid) )
+ if( !jids.tqcontains(jid) )
jids.push_back(jid);
}
@@ -143,12 +143,12 @@ void JabberCapabilitiesManager::CapabilitiesInformation::reset()
void JabberCapabilitiesManager::CapabilitiesInformation::removeAccount(JabberAccount *account)
{
- TQValueList<QPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin();
+ TQValueList<TQPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin();
while( it != m_jids.end() )
{
if( (*it).second == account)
{
- TQValueList<QPair<TQString,JabberAccount*> >::Iterator otherIt = it;
+ TQValueList<TQPair<TQString,JabberAccount*> >::Iterator otherIt = it;
it++;
m_jids.remove(otherIt);
}
@@ -161,9 +161,9 @@ void JabberCapabilitiesManager::CapabilitiesInformation::removeAccount(JabberAcc
void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid, JabberAccount* account)
{
- QPair<TQString,JabberAccount*> jidAccountPair(jid.full(),account);
+ TQPair<TQString,JabberAccount*> jidAccountPair(jid.full(),account);
- if( !m_jids.contains(jidAccountPair) )
+ if( !m_jids.tqcontains(jidAccountPair) )
{
m_jids.push_back(jidAccountPair);
updateLastSeen();
@@ -172,14 +172,14 @@ void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid,
void JabberCapabilitiesManager::CapabilitiesInformation::removeJid(const Jid& jid)
{
- kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Unregistering " << TQString(jid.full()).replace('%',"%%") << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Unregistering " << TQString(jid.full()).tqreplace('%',"%%") << endl;
- TQValueList<QPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin();
+ TQValueList<TQPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin();
while( it != m_jids.end() )
{
if( (*it).first == jid.full() )
{
- TQValueList<QPair<TQString,JabberAccount*> >::Iterator otherIt = it;
+ TQValueList<TQPair<TQString,JabberAccount*> >::Iterator otherIt = it;
it++;
m_jids.remove(otherIt);
}
@@ -190,11 +190,11 @@ void JabberCapabilitiesManager::CapabilitiesInformation::removeJid(const Jid& ji
}
}
-QPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::nextJid(const Jid& jid, const Task* t)
+TQPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::nextJid(const Jid& jid, const Task* t)
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Looking for next JID" << endl;
- TQValueList<QPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
+ TQValueList<TQPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
for( ; it != itEnd; ++it)
{
if( (*it).first == jid.full() && (*it).second->client()->rootTask() == t)
@@ -204,18 +204,18 @@ QPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::ne
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "No more JIDs" << endl;
- return QPair<Jid,JabberAccount*>(Jid(),0L);
+ return TQPair<Jid,JabberAccount*>(Jid(),0L);
}
else if( (*it).second->isConnected() )
{
//qDebug("caps.cpp: Account isn't active");
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Account isn't connected." << endl;
- return QPair<Jid,JabberAccount*>( (*it).first,(*it).second );
+ return TQPair<Jid,JabberAccount*>( (*it).first,(*it).second );
}
}
}
- return QPair<Jid,JabberAccount*>(Jid(),0L);
+ return TQPair<Jid,JabberAccount*>(Jid(),0L);
}
void JabberCapabilitiesManager::CapabilitiesInformation::setDiscovered(bool value)
@@ -240,7 +240,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::setFeatures(const TQStr
void JabberCapabilitiesManager::CapabilitiesInformation::updateLastSeen()
{
- m_lastSeen = TQDate::currentDate();
+ m_lastSeen = TQDate::tqcurrentDate();
}
TQDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(TQDomDocument *doc) const
@@ -351,7 +351,7 @@ void JabberCapabilitiesManager::removeAccount(JabberAccount *account)
}
}
-void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const XMPP::Jid &jid, const XMPP::Status &status )
+void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const XMPP::Jid &jid, const XMPP::tqStatus &status )
{
if( !account->client() || !account->client()->rootTask() )
return;
@@ -400,7 +400,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
{
if( !d->capabilitiesInformationMap[*newCapsIt].discovered() && d->capabilitiesInformationMap[*newCapsIt].pendingRequests() == 0 )
{
- kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << TQString("Sending disco request to %1, node=%2").arg(TQString(jid.full()).replace('%',"%%")).arg(node + "#" + (*newCapsIt).extensions()) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << TQString("Sending disco request to %1, node=%2").tqarg(TQString(jid.full()).tqreplace('%',"%%")).tqarg(node + "#" + (*newCapsIt).extensions()) << endl;
d->capabilitiesInformationMap[*newCapsIt].setPendingRequests(1);
requestDiscoInfo(account, jid, node + "#" + (*newCapsIt).extensions());
@@ -410,7 +410,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
else
{
// Remove all caps specifications
- kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Illegal caps info from %1: node=%2, ver=%3").arg(TQString(jid.full()).replace('%',"%%")).arg(node).arg(version) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Illegal caps info from %1: node=%2, ver=%3").tqarg(TQString(jid.full()).tqreplace('%',"%%")).tqarg(node).tqarg(version) << endl;
d->jidCapabilitiesMap.remove( jid.full() );
}
@@ -448,7 +448,7 @@ void JabberCapabilitiesManager::discoRequestFinished()
DiscoItem item = discoInfo->item();
Jid jid = discoInfo->jid();
- kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Disco response from %1, node=%2, success=%3").arg(TQString(jid.full()).replace('%',"%%")).arg(discoInfo->node()).arg(discoInfo->success()) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Disco response from %1, node=%2, success=%3").tqarg(TQString(jid.full()).tqreplace('%',"%%")).tqarg(discoInfo->node()).tqarg(discoInfo->success()) << endl;
TQStringList tokens = TQStringList::split("#",discoInfo->node());
@@ -483,10 +483,10 @@ void JabberCapabilitiesManager::discoRequestFinished()
}
else
{
- QPair<Jid,JabberAccount*> jidAccountPair = d->capabilitiesInformationMap[capabilities].nextJid(jid,discoInfo->parent());
+ TQPair<Jid,JabberAccount*> jidAccountPair = d->capabilitiesInformationMap[capabilities].nextJid(jid,discoInfo->tqparent());
if( jidAccountPair.second )
{
- kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Falling back on %1.").arg(TQString(jidAccountPair.first.full()).replace('%',"%%")) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Falling back on %1.").tqarg(TQString(jidAccountPair.first.full()).tqreplace('%',"%%")) << endl;
requestDiscoInfo( jidAccountPair.second, jidAccountPair.first, discoInfo->node() );
}
else
@@ -497,7 +497,7 @@ void JabberCapabilitiesManager::discoRequestFinished()
}
}
else
- kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Current client node '%1' does not match response '%2'").arg(jidCapabilities.node()).arg(node) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Current client node '%1' does not match response '%2'").tqarg(jidCapabilities.node()).tqarg(node) << endl;
//for (unsigned int i = 0; i < item.features().list().count(); i++)
// printf(" Feature: %s\n",item.features().list()[i].latin1());
@@ -563,7 +563,7 @@ void JabberCapabilitiesManager::loadCachedInformation()
bool JabberCapabilitiesManager::capabilitiesEnabled(const Jid &jid) const
{
- return d->jidCapabilitiesMap.contains( jid.full() );
+ return d->jidCapabilitiesMap.tqcontains( jid.full() );
}
XMPP::Features JabberCapabilitiesManager::features(const Jid& jid) const
@@ -599,7 +599,7 @@ TQString JabberCapabilitiesManager::clientName(const Jid& jid) const
if (name.startsWith("www."))
name = name.right(name.length() - 4);
- int cut_pos = name.find(".");
+ int cut_pos = name.tqfind(".");
if (cut_pos != -1) {
name = name.left(cut_pos);
}
@@ -646,7 +646,7 @@ void JabberCapabilitiesManager::saveInformation()
}
TQTextStream textStream;
- textStream.setDevice(&capsFile);
+ textStream.setDevice(TQT_TQIODEVICE(&capsFile));
textStream.setEncoding(TQTextStream::UnicodeUTF8);
textStream << doc.toString();
textStream.unsetDevice();