diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:59:34 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:59:34 -0600 |
commit | 83677e35509b4dafac63b76995652bdf3b49f209 (patch) | |
tree | 591f1dc22278addb439726c42896376b17bb42bd /kopete/protocols/irc/ircusercontact.cpp | |
parent | 808e453c56036211f57482ed847d54aca01bba68 (diff) | |
download | tdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.tar.gz tdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 808e453c56036211f57482ed847d54aca01bba68.
Diffstat (limited to 'kopete/protocols/irc/ircusercontact.cpp')
-rw-r--r-- | kopete/protocols/irc/ircusercontact.cpp | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/kopete/protocols/irc/ircusercontact.cpp b/kopete/protocols/irc/ircusercontact.cpp index c4607cb9..bec7c4b7 100644 --- a/kopete/protocols/irc/ircusercontact.cpp +++ b/kopete/protocols/irc/ircusercontact.cpp @@ -53,39 +53,39 @@ IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const TQString mInfo.away = false; mInfo.online = metaContact()->isTemporary(); - updateStatus(); + updatetqStatus(); } -void IRCUserContact::updateStatus() +void IRCUserContact::updatetqStatus() { //kdDebug(14120) << k_funcinfo << endl; - Kopete::OnlineStatus newStatus; + Kopete::OnlineStatus newtqStatus; switch (kircEngine()->status()) { case KIRC::Engine::Idle: - newStatus = m_protocol->m_UserStatusOffline; + newtqStatus = m_protocol->m_UserStatusOffline; break; case KIRC::Engine::Connecting: case KIRC::Engine::Authentifying: if (this == ircAccount()->mySelf()) - newStatus = m_protocol->m_UserStatusConnecting; + newtqStatus = m_protocol->m_UserStatusConnecting; else - newStatus = m_protocol->m_UserStatusOffline; + newtqStatus = m_protocol->m_UserStatusOffline; break; case KIRC::Engine::Connected: case KIRC::Engine::Closing: if (mInfo.away) - newStatus = m_protocol->m_UserStatusAway; + newtqStatus = m_protocol->m_UserStatusAway; else if (mInfo.online) - newStatus = m_protocol->m_UserStatusOnline; + newtqStatus = m_protocol->m_UserStatusOnline; break; default: - newStatus = m_protocol->m_StatusUnknown; + newtqStatus = m_protocol->m_StatusUnknown; } // Try hard not to emit several onlineStatusChanged() signals. @@ -105,31 +105,31 @@ void IRCUserContact::updateStatus() for( TQValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it ) { IRCChannelContact *channel = *it; - Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this); + Kopete::OnlineStatus currenttqStatus = channel->manager()->contactOnlineStatus(this); - //kdDebug(14120) << k_funcinfo << "iterating channel " << channel->nickName() << " internal status: " << currentStatus.internalStatus() << endl; + //kdDebug(14120) << k_funcinfo << "iterating channel " << channel->nickName() << " internal status: " << currenttqStatus.internalStatus() << endl; - if( currentStatus.internalStatus() >= IRCProtocol::Online ) + if( currenttqStatus.internalStatus() >= IRCProtocol::Online ) { onlineStatusChanged = true; - if( !(currentStatus.internalStatus() & IRCProtocol::Away) && newStatus == m_protocol->m_UserStatusAway ) + if( !(currenttqStatus.internalStatus() & IRCProtocol::Away) && newtqStatus == m_protocol->m_UserStatusAway ) { - setOnlineStatus( newStatus ); + setOnlineStatus( newtqStatus ); //kdDebug(14120) << k_funcinfo << "was NOT away, but is now, channel " << channel->nickName() << endl; adjustInternalOnlineStatusBits(channel, IRCProtocol::Away, AddBits); } - else if( (currentStatus.internalStatus() & IRCProtocol::Away) && newStatus == m_protocol->m_UserStatusOnline ) + else if( (currenttqStatus.internalStatus() & IRCProtocol::Away) && newtqStatus == m_protocol->m_UserStatusOnline ) { - setOnlineStatus( newStatus ); + setOnlineStatus( newtqStatus ); //kdDebug(14120) << k_funcinfo << "was away, but not anymore, channel " << channel->nickName() << endl; adjustInternalOnlineStatusBits(channel, IRCProtocol::Away, RemoveBits); } - else if( newStatus.internalStatus() < IRCProtocol::Away ) + else if( newtqStatus.internalStatus() < IRCProtocol::Away ) { //kdDebug(14120) << k_funcinfo << "offline or connecting?" << endl; - channel->manager()->setContactOnlineStatus( this, newStatus ); + channel->manager()->setContactOnlineStatus( this, newtqStatus ); } } } @@ -137,7 +137,7 @@ void IRCUserContact::updateStatus() if (!onlineStatusChanged) { //kdDebug(14120) << k_funcinfo << "setting status at last" << endl; - setOnlineStatus( newStatus ); + setOnlineStatus( newtqStatus ); } } @@ -162,10 +162,10 @@ void IRCUserContact::slotUserOffline() mInfo.online = false; mInfo.away = false; - updateStatus(); + updatetqStatus(); if( !metaContact()->isTemporary() ) - kircEngine()->writeMessage( TQString::fromLatin1("WHOWAS %1").arg(m_nickName) ); + kircEngine()->writeMessage( TQString::tqfromLatin1("WHOWAS %1").tqarg(m_nickName) ); removeProperty( m_protocol->propUserInfo ); removeProperty( m_protocol->propServer ); @@ -177,7 +177,7 @@ void IRCUserContact::setAway(bool isAway) //kdDebug(14120) << k_funcinfo << isAway << endl; mInfo.away = isAway; - updateStatus(); + updatetqStatus(); } void IRCUserContact::incomingUserIsAway(const TQString &reason) @@ -185,7 +185,7 @@ void IRCUserContact::incomingUserIsAway(const TQString &reason) if( manager( Kopete::Contact::CannotCreate ) ) { Kopete::Message msg( (Kopete::Contact*)ircAccount()->myServer(), mMyself, - i18n("%1 is away (%2)").arg( m_nickName ).arg( reason ), + i18n("%1 is away (%2)").tqarg( m_nickName ).tqarg( reason ), Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW ); manager(Kopete::Contact::CanCreate)->appendMessage(msg); } @@ -194,7 +194,7 @@ void IRCUserContact::incomingUserIsAway(const TQString &reason) void IRCUserContact::userOnline() { mInfo.online = true; - updateStatus(); + updatetqStatus(); if (this != ircAccount()->mySelf() && !metaContact()->isTemporary() && ircAccount()->isConnected()) { mOnlineTimer->start( 45000, true ); @@ -216,27 +216,27 @@ void IRCUserContact::slotUserInfo() const TQString IRCUserContact::caption() const { - return i18n("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost()); + return i18n("%1 @ %2").tqarg(m_nickName).tqarg(kircEngine()->currentHost()); } void IRCUserContact::slotOp() { - contactMode( TQString::fromLatin1("+o") ); + contactMode( TQString::tqfromLatin1("+o") ); } void IRCUserContact::slotDeop() { - contactMode( TQString::fromLatin1("-o") ); + contactMode( TQString::tqfromLatin1("-o") ); } void IRCUserContact::slotVoice() { - contactMode( TQString::fromLatin1("+v") ); + contactMode( TQString::tqfromLatin1("+v") ); } void IRCUserContact::slotDevoice() { - contactMode( TQString::fromLatin1("-v") ); + contactMode( TQString::tqfromLatin1("-v") ); } void IRCUserContact::slotBanHost() @@ -260,7 +260,7 @@ void IRCUserContact::slotBanHostOnce() Kopete::ContactPtrList members = mActiveManager->members(); TQString channelName = static_cast<IRCContact*>(members.first())->nickName(); - kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@%1").arg(mInfo.hostName)); + kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*@%1").tqarg(mInfo.hostName)); } void IRCUserContact::slotBanUserHost() @@ -284,7 +284,7 @@ void IRCUserContact::slotBanUserHostOnce() Kopete::ContactPtrList members = mActiveManager->members(); TQString channelName = static_cast<IRCContact*>(members.first())->nickName(); - kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName)); + kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*%1@%2").tqarg(mInfo.userName, mInfo.hostName)); } void IRCUserContact::slotBanDomain() @@ -310,7 +310,7 @@ void IRCUserContact::slotBanDomainOnce() TQString domain = mInfo.hostName.section('.', 1); - kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@*.%1").arg(domain)); + kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*@*.%1").tqarg(domain)); } void IRCUserContact::slotBanUserDomain() @@ -336,7 +336,7 @@ void IRCUserContact::slotBanUserDomainOnce() TQString domain = mInfo.hostName.section('.', 1); - kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain)); + kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*%1@*.%2").tqarg(mInfo.userName, domain)); } void IRCUserContact::slotKick() @@ -350,7 +350,7 @@ void IRCUserContact::contactMode(const TQString &mode) { Kopete::ContactPtrList members = mActiveManager->members(); TQString channelName = static_cast<IRCContact*>(members.first())->nickName(); - kircEngine()->mode(channelName, TQString::fromLatin1("%1 %2").arg(mode).arg(m_nickName)); + kircEngine()->mode(channelName, TQString::tqfromLatin1("%1 %2").tqarg(mode).tqarg(m_nickName)); } void IRCUserContact::slotCtcpPing() @@ -370,10 +370,10 @@ void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &host mInfo.hostName = hostname; mInfo.realName = realname; - if( onlineStatus().status() == Kopete::OnlineStatus::Offline ) + if( onlinetqStatus().status() == Kopete::OnlineStatus::Offline ) { - setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2") - .arg(mInfo.userName).arg(mInfo.hostName) ); + setProperty( m_protocol->propUserInfo, TQString::tqfromLatin1("%1@%2") + .tqarg(mInfo.userName).tqarg(mInfo.hostName) ); setProperty( m_protocol->propServer, mInfo.serverName ); setProperty( m_protocol->propFullName, mInfo.realName ); } @@ -382,8 +382,8 @@ void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &host void IRCUserContact::newWhoIsServer(const TQString &servername, const TQString &serverinfo) { mInfo.serverName = servername; - if( metaContact()->isTemporary() || onlineStatus().status() == Kopete::OnlineStatus::Online - || onlineStatus().status() == Kopete::OnlineStatus::Away ) + if( metaContact()->isTemporary() || onlinetqStatus().status() == Kopete::OnlineStatus::Online + || onlinetqStatus().status() == Kopete::OnlineStatus::Away ) mInfo.serverInfo = serverinfo; else { @@ -433,26 +433,26 @@ void IRCUserContact::whoIsComplete() { //User info TQString msg = i18n("%1 is (%2@%3): %4<br/>") - .arg(m_nickName) - .arg(mInfo.userName) - .arg(mInfo.hostName) - .arg(mInfo.realName); + .tqarg(m_nickName) + .tqarg(mInfo.userName) + .tqarg(mInfo.hostName) + .tqarg(mInfo.realName); if( mInfo.isIdentified ) - msg += i18n("%1 is authenticated with NICKSERV<br/>").arg(m_nickName); + msg += i18n("%1 is authenticated with NICKSERV<br/>").tqarg(m_nickName); if( mInfo.isOperator ) - msg += i18n("%1 is an IRC operator<br/>").arg(m_nickName); + msg += i18n("%1 is an IRC operator<br/>").tqarg(m_nickName); //Channels - msg += i18n("on channels %1<br/>").arg(mInfo.channels.join(" ; ")); + msg += i18n("on channels %1<br/>").tqarg(mInfo.channels.join(" ; ")); //Server - msg += i18n("on IRC via server %1 ( %2 )<br/>").arg(mInfo.serverName).arg(mInfo.serverInfo); + msg += i18n("on IRC via server %1 ( %2 )<br/>").tqarg(mInfo.serverName).tqarg(mInfo.serverInfo); //Idle TQString idleTime = formattedIdleTime(); - msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? TQString::number(0) : idleTime ); + msg += i18n("idle: %2<br/>").tqarg( idleTime.isEmpty() ? TQString::number(0) : idleTime ); //End ircAccount()->appendMessage(msg, IRCAccount::InfoReply ); @@ -466,12 +466,12 @@ void IRCUserContact::whoWasComplete() { //User info TQString msg = i18n("%1 was (%2@%3): %4\n") - .arg(m_nickName) - .arg(mInfo.userName) - .arg(mInfo.hostName) - .arg(mInfo.realName); + .tqarg(m_nickName) + .tqarg(mInfo.userName) + .tqarg(mInfo.hostName) + .tqarg(mInfo.realName); - msg += i18n("Last Online: %1\n").arg( + msg += i18n("Last Online: %1\n").tqarg( KGlobal::locale()->formatDateTime( property( m_protocol->propLastSeen ).value().toDateTime() ) @@ -489,8 +489,8 @@ TQString IRCUserContact::formattedName() const void IRCUserContact::updateInfo() { - setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2") - .arg(mInfo.userName).arg(mInfo.hostName) ); + setProperty( m_protocol->propUserInfo, TQString::tqfromLatin1("%1@%2") + .tqarg(mInfo.userName).tqarg(mInfo.hostName) ); setProperty( m_protocol->propServer, mInfo.serverName ); setProperty( m_protocol->propChannels, mInfo.channels.join(" ") ); setProperty( m_protocol->propHops, TQString::number(mInfo.hops) ); @@ -667,32 +667,32 @@ void IRCUserContact::slotIncomingModeChange( const TQString &channel, const TQSt void IRCUserContact::adjustInternalOnlineStatusBits(IRCChannelContact *channel, unsigned statusAdjustment, bitAdjustment adj) { - Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this); - Kopete::OnlineStatus newStatus; + Kopete::OnlineStatus currenttqStatus = channel->manager()->contactOnlineStatus(this); + Kopete::OnlineStatus newtqStatus; if (adj == RemoveBits) { // If the bit is not set in the current internal status, stop here. - if ((currentStatus.internalStatus() & ~statusAdjustment) == currentStatus.internalStatus()) + if ((currenttqStatus.internalStatus() & ~statusAdjustment) == currenttqStatus.internalStatus()) return; - newStatus = m_protocol->statusLookup( - (IRCProtocol::IRCStatus)(currentStatus.internalStatus() & ~statusAdjustment) + newtqStatus = m_protocol->statusLookup( + (IRCProtocol::IRCtqStatus)(currenttqStatus.internalStatus() & ~statusAdjustment) ); } else if (adj == AddBits) { // If the bit is already set in the current internal status, stop here. - if ((currentStatus.internalStatus() | statusAdjustment) == currentStatus.internalStatus()) + if ((currenttqStatus.internalStatus() | statusAdjustment) == currenttqStatus.internalStatus()) return; - newStatus = m_protocol->statusLookup( - (IRCProtocol::IRCStatus)(currentStatus.internalStatus() | statusAdjustment) + newtqStatus = m_protocol->statusLookup( + (IRCProtocol::IRCtqStatus)(currenttqStatus.internalStatus() | statusAdjustment) ); } - channel->manager()->setContactOnlineStatus(this, newStatus); + channel->manager()->setContactOnlineStatus(this, newtqStatus); } void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message) |