From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: 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 --- .../protocols/jabber/jingle/jinglevoicecaller.cpp | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'kopete/protocols/jabber/jingle/jinglevoicecaller.cpp') diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp index 12e4b93d..344071c6 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp @@ -41,29 +41,29 @@ // ---------------------------------------------------------------------------- -class JingleIQResponder : public XMPP::Task +class JingleITQResponder : public XMPP::Task { public: - JingleIQResponder(XMPP::Task *); - ~JingleIQResponder(); + JingleITQResponder(XMPP::Task *); + ~JingleITQResponder(); bool take(const TQDomElement &); }; /** - * \class JingleIQResponder + * \class JingleITQResponder * \brief A task that responds to jingle candidate queries with an empty reply. */ -JingleIQResponder::JingleIQResponder(Task *parent) :Task(parent) +JingleITQResponder::JingleITQResponder(Task *tqparent) :Task(tqparent) { } -JingleIQResponder::~JingleIQResponder() +JingleITQResponder::~JingleITQResponder() { } -bool JingleIQResponder::take(const TQDomElement &e) +bool JingleITQResponder::take(const TQDomElement &e) { if(e.tagName() != "iq") return false; @@ -114,7 +114,7 @@ void JingleClientSlots::callDestroyed(cricket::Call *call) qDebug("JingleClientSlots: Call destroyed"); Jid jid(call->sessions()[0]->remote_address().c_str()); if (voiceCaller_->calling(jid)) { - qDebug(TQString("Removing unterminated call to %1").arg(jid.full())); + qDebug(TQString("Removing unterminated call to %1").tqarg(jid.full())); voiceCaller_->removeCall(jid); emit voiceCaller_->terminated(jid); } @@ -123,8 +123,8 @@ void JingleClientSlots::callDestroyed(cricket::Call *call) void JingleClientSlots::sendStanza(cricket::SessionClient*, const buzz::XmlElement *stanza) { TQString st(stanza->Str().c_str()); - st.replace("cli:iq","iq"); - st.replace(":cli=","="); + st.tqreplace("cli:iq","iq"); + st.tqreplace(":cli=","="); fprintf(stderr,"bling\n"); voiceCaller_->sendStanza(st.latin1()); fprintf(stderr,"blong\n"); @@ -138,7 +138,7 @@ void JingleClientSlots::requestSignaling() void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *session, cricket::Session::State state) { - qDebug(TQString("jinglevoicecaller.cpp: State changed (%1)").arg(state)); + qDebug(TQString("jinglevoicecaller.cpp: State changed (%1)").tqarg(state)); // Why is c_str() stuff needed to make it compile on OS X ? Jid jid(session->remote_address().c_str()); @@ -156,7 +156,7 @@ void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *sess } else if (state == cricket::Session::STATE_SENTMODIFY) { } else if (state == cricket::Session::STATE_RECEIVEDMODIFY) { - qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full())); + qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").tqarg(jid.full())); } else if (state == cricket::Session::STATE_SENTREJECT) { } else if (state == cricket::Session::STATE_RECEIVEDREJECT) { @@ -195,7 +195,7 @@ void JingleVoiceCaller::initialize() return; TQString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full(); - qDebug(TQString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid)); + qDebug(TQString("jinglevoicecaller.cpp: Creating new caller for %1").tqarg(jid)); if (jid.isEmpty()) { qWarning("jinglevoicecaller.cpp: Empty JID"); return; @@ -230,7 +230,7 @@ void JingleVoiceCaller::initialize() phone_client_->SignalSendStanza.connect(slots_, &JingleClientSlots::sendStanza); // IQ Responder - new JingleIQResponder(account()->client()->rootTask()); + new JingleITQResponder(account()->client()->rootTask()); // Listen to incoming packets connect(account()->client()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),TQT_SLOT(receiveStanza(const TQString&))); @@ -266,12 +266,12 @@ JingleVoiceCaller::~JingleVoiceCaller() bool JingleVoiceCaller::calling(const Jid& jid) { - return calls_.contains(jid.full()); + return calls_.tqcontains(jid.full()); } void JingleVoiceCaller::call(const Jid& jid) { - qDebug(TQString("jinglevoicecaller.cpp: Calling %1").arg(jid.full())); + qDebug(TQString("jinglevoicecaller.cpp: Calling %1").tqarg(jid.full())); cricket::Call *c = ((cricket::PhoneSessionClient*)(phone_client_))->CreateCall(); c->InitiateSession(buzz::Jid(jid.full().ascii())); phone_client_->SetFocus(c); @@ -299,7 +299,7 @@ void JingleVoiceCaller::reject(const Jid& j) void JingleVoiceCaller::terminate(const Jid& j) { - qDebug(TQString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full())); + qDebug(TQString("jinglevoicecaller.cpp: Terminating call to %1").tqarg(j.full())); cricket::Call* call = calls_[j.full()]; if (call != NULL) { call->Terminate(); @@ -316,7 +316,7 @@ void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call) { qDebug("jinglevoicecaller.cpp: Registering call\n"); kdDebug(14000) << k_funcinfo << jid.full() << endl; - if (!calls_.contains(jid.full())) { + if (!calls_.tqcontains(jid.full())) { calls_[jid.full()] = call; } // else { @@ -327,7 +327,7 @@ void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call) void JingleVoiceCaller::removeCall(const Jid& j) { - qDebug(TQString("JingleVoiceCaller: Removing call to %1").arg(j.full())); + qDebug(TQString("JingleVoiceCaller: Removing call to %1").tqarg(j.full())); calls_.remove(j.full()); } @@ -340,7 +340,7 @@ void JingleVoiceCaller::receiveStanza(const TQString& stanza) if (doc.documentElement().tagName() == "presence") { Jid from = Jid(doc.documentElement().attribute("from")); TQString type = doc.documentElement().attribute("type"); - if (type == "unavailable" && calls_.contains(from.full())) { + if (type == "unavailable" && calls_.tqcontains(from.full())) { qDebug("JingleVoiceCaller: User went offline without closing a call."); removeCall(from); emit terminated(from); @@ -363,7 +363,7 @@ void JingleVoiceCaller::receiveStanza(const TQString& stanza) // Spread the word if (ok) { - qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").arg(stanza)); + qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").tqarg(stanza)); buzz::XmlElement *e = buzz::XmlElement::ForStr(stanza.ascii()); phone_client_->OnIncomingStanza(e); } -- cgit v1.2.1