diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/irc/ircchannelcontact.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-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/irc/ircchannelcontact.cpp')
-rw-r--r-- | kopete/protocols/irc/ircchannelcontact.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kopete/protocols/irc/ircchannelcontact.cpp b/kopete/protocols/irc/ircchannelcontact.cpp index cab2748b..1835bb4b 100644 --- a/kopete/protocols/irc/ircchannelcontact.cpp +++ b/kopete/protocols/irc/ircchannelcontact.cpp @@ -66,7 +66,7 @@ IRCChannelContact::IRCChannelContact(IRCContactManager *contactManager, const TQ actionModeI = new KToggleAction(i18n("&Invite Only"), 0, this, TQT_SLOT(slotModeChanged()), this ); actionHomePage = 0L; - updateStatus(); + updatetqStatus(); } IRCChannelContact::~IRCChannelContact() @@ -77,10 +77,10 @@ void IRCChannelContact::slotUpdateInfo() { /** This woudl be nice, but it generates server errors too often - if( !manager(Kopete::Contact::CannotCreate) && onlineStatus() == m_protocol->m_ChannelStatusOnline ) - kircEngine()->writeMessage( TQString::fromLatin1("LIST %1").arg(m_nickName) ); + if( !manager(Kopete::Contact::CannotCreate) && onlinetqStatus() == m_protocol->m_ChannelStatusOnline ) + kircEngine()->writeMessage( TQString::tqfromLatin1("LIST %1").tqarg(m_nickName) ); else - setProperty( TQString::fromLatin1("channelMembers"), i18n("Members"), manager()->members().count() ); + setProperty( TQString::tqfromLatin1("channelMembers"), i18n("Members"), manager()->members().count() ); */ KIRC::Engine *engine = kircEngine(); @@ -88,7 +88,7 @@ void IRCChannelContact::slotUpdateInfo() if (manager(Kopete::Contact::CannotCreate)) { setProperty(m_protocol->propChannelMembers, manager()->members().count()); - engine->writeMessage(TQString::fromLatin1("WHO %1").arg(m_nickName)); + engine->writeMessage(TQString::tqfromLatin1("WHO %1").tqarg(m_nickName)); } else { @@ -102,7 +102,7 @@ void IRCChannelContact::slotUpdateInfo() void IRCChannelContact::slotChannelListed( const TQString &channel, uint members, const TQString &topic ) { if (!manager(Kopete::Contact::CannotCreate) && - onlineStatus() == m_protocol->m_ChannelStatusOnline && + onlinetqStatus() == m_protocol->m_ChannelStatusOnline && channel.lower() == m_nickName.lower()) { mTopic = topic; @@ -126,9 +126,9 @@ void IRCChannelContact::toggleOperatorActions(bool enabled) actionModeI->setEnabled(enabled); } -void IRCChannelContact::slotOnlineStatusChanged(Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus) +void IRCChannelContact::slotOnlineStatusChanged(Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldtqStatus) { - Q_UNUSED(oldStatus); + Q_UNUSED(oldtqStatus); if (c == account()->myself()) { if (status.internalStatus() & IRCProtocol::Operator) { @@ -141,9 +141,9 @@ void IRCChannelContact::slotOnlineStatusChanged(Kopete::Contact *c, const Kopete } } -void IRCChannelContact::updateStatus() +void IRCChannelContact::updatetqStatus() { - KIRC::Engine::Status status = kircEngine()->status(); + KIRC::Engine::tqStatus status = kircEngine()->status(); switch (status) { case KIRC::Engine::Idle: @@ -200,7 +200,7 @@ void IRCChannelContact::namesList(const TQStringList &nicknames) void IRCChannelContact::endOfNames() { - setMode(TQString::null); + setMode(TQString()); slotUpdateInfo(); } @@ -251,7 +251,7 @@ void IRCChannelContact::slotAddNicknames() else if( firstChar == '+') status = m_protocol->m_UserStatusVoice; else - status = user->onlineStatus(); + status = user->onlinetqStatus(); if( user != account->mySelf() ) manager()->addContact(user , status, true); @@ -272,12 +272,12 @@ void IRCChannelContact::channelTopic(const TQString &topic) if (mTopic.isEmpty()) { Kopete::Message msg((Kopete::Contact*)this, mMyself, - i18n("Topic for %1 is set empty.").arg(m_nickName), + i18n("Topic for %1 is set empty.").tqarg(m_nickName), Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW); appendMessage(msg); } else { Kopete::Message msg((Kopete::Contact*)this, mMyself, - i18n("Topic for %1 is %2").arg(m_nickName).arg(mTopic), + i18n("Topic for %1 is %2").tqarg(m_nickName).tqarg(mTopic), Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW); appendMessage(msg); } @@ -292,7 +292,7 @@ void IRCChannelContact::channelHomePage(const TQString &url) void IRCChannelContact::join() { if (!manager(Kopete::Contact::CannotCreate) && - onlineStatus().status() == Kopete::OnlineStatus::Online) + onlinetqStatus().status() == Kopete::OnlineStatus::Online) { kdDebug() << k_funcinfo << "My nickname:" << m_nickName << endl; kdDebug() << k_funcinfo << "My manager:" << manager(Kopete::Contact::CannotCreate) << endl; @@ -329,7 +329,7 @@ void IRCChannelContact::slotIncomingUserIsAway( const TQString &nick, const TQSt if( nick.lower() == account->mySelf()->nickName().lower() ) { IRCUserContact *c = account->mySelf(); - if (manager() && manager()->members().contains(c)) + if (manager() && manager()->members().tqcontains(c)) { Kopete::OnlineStatus status = manager()->contactOnlineStatus(c); if (status == m_protocol->m_UserStatusOp) @@ -362,7 +362,7 @@ void IRCChannelContact::userJoinedChannel(const TQString &nickname) kdDebug() << k_funcinfo << "My view:" << manager(Kopete::Contact::CannotCreate)->view(false) << endl; Kopete::Message msg((Kopete::Contact *)this, mMyself, - i18n("You have joined channel %1").arg(m_nickName), + i18n("You have joined channel %1").tqarg(m_nickName), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW); msg.setImportance( Kopete::Message::Low); //set the importance manualy to low @@ -378,7 +378,7 @@ void IRCChannelContact::userJoinedChannel(const TQString &nickname) contact->setOnlineStatus( m_protocol->m_UserStatusOnline ); manager()->addContact((Kopete::Contact *)contact, true); Kopete::Message msg((Kopete::Contact *)this, mMyself, - i18n("User <b>%1</b> joined channel %2").arg(nickname).arg(m_nickName), + i18n("User <b>%1</b> joined channel %2").tqarg(nickname).tqarg(m_nickName), Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW); msg.setImportance( Kopete::Message::Low); //set the importance manualy to low manager()->appendMessage(msg); @@ -413,9 +413,9 @@ void IRCChannelContact::userKicked(const TQString &nick, const TQString &nickKic TQString r; if ((reason != nick) && (reason != nickKicked)) { - r = i18n( "%1 was kicked by %2. Reason: %3" ).arg(nickKicked, nick, reason); + r = i18n( "%1 was kicked by %2. Reason: %3" ).tqarg(nickKicked, nick, reason); } else { - r = i18n( "%1 was kicked by %2." ).arg(nickKicked, nick); + r = i18n( "%1 was kicked by %2." ).tqarg(nickKicked, nick); } manager()->removeContact( c, r ); @@ -434,9 +434,9 @@ void IRCChannelContact::userKicked(const TQString &nick, const TQString &nickKic TQString r; if ((reason != nick) && (reason != nickKicked)) { - r = i18n( "You were kicked from %1 by %2. Reason: %3" ).arg(m_nickName, nickKicked, reason); + r = i18n( "You were kicked from %1 by %2. Reason: %3" ).tqarg(m_nickName, nickKicked, reason); } else { - r = i18n( "You were kicked from %1 by %2." ).arg(m_nickName, nickKicked); + r = i18n( "You were kicked from %1 by %2." ).tqarg(m_nickName, nickKicked); } KMessageBox::error(Kopete::UI::Global::mainWidget(), r, i18n("IRC Plugin")); @@ -468,7 +468,7 @@ void IRCChannelContact::setTopic(const TQString &topic) else { Kopete::Message msg(account->myServer(), manager()->members(), - i18n("You must be a channel operator on %1 to do that.").arg(m_nickName), + i18n("You must be a channel operator on %1 to do that.").tqarg(m_nickName), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW); manager()->appendMessage(msg); } @@ -483,7 +483,7 @@ void IRCChannelContact::topicChanged(const TQString &nick, const TQString &newto setProperty( m_protocol->propChannelTopic, mTopic ); manager()->setDisplayName( caption() ); Kopete::Message msg(account->myServer(), mMyself, - i18n("%1 has changed the topic to: %2").arg(nick).arg(newtopic), + i18n("%1 has changed the topic to: %2").tqarg(nick).tqarg(newtopic), Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW); msg.setImportance(Kopete::Message::Low); //set the importance manualy to low appendMessage(msg); @@ -494,7 +494,7 @@ void IRCChannelContact::topicUser(const TQString &nick, const TQDateTime &time) IRCAccount *account = ircAccount(); Kopete::Message msg(account->myServer(), mMyself, - i18n("Topic set by %1 at %2").arg(nick).arg( + i18n("Topic set by %1 at %2").tqarg(nick).tqarg( KGlobal::locale()->formatDateTime(time, true) ), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW); msg.setImportance(Kopete::Message::Low); //set the importance manualy to low @@ -503,13 +503,13 @@ void IRCChannelContact::topicUser(const TQString &nick, const TQDateTime &time) void IRCChannelContact::incomingModeChange( const TQString &nick, const TQString &mode ) { - Kopete::Message msg(this, mMyself, i18n("%1 sets mode %2 on %3").arg(nick).arg(mode).arg(m_nickName), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW); + Kopete::Message msg(this, mMyself, i18n("%1 sets mode %2 on %3").tqarg(nick).tqarg(mode).tqarg(m_nickName), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW); msg.setImportance( Kopete::Message::Low); //set the importance manualy to low appendMessage(msg); bool inParams = false; bool modeEnabled = false; - TQString params = TQString::null; + TQString params = TQString(); for( uint i=0; i < mode.length(); i++ ) { switch( mode[i] ) @@ -564,7 +564,7 @@ void IRCChannelContact::failedChanBanned() { manager()->deleteLater(); KMessageBox::error( Kopete::UI::Global::mainWidget(), - i18n("<qt>You can not join %1 because you have been banned.</qt>").arg(m_nickName), + i18n("<qt>You can not join %1 because you have been banned.</qt>").tqarg(m_nickName), i18n("IRC Plugin") ); } @@ -572,14 +572,14 @@ void IRCChannelContact::failedChanInvite() { manager()->deleteLater(); KMessageBox::error( Kopete::UI::Global::mainWidget(), - i18n("<qt>You can not join %1 because it is set to invite only, and no one has invited you.</qt>").arg(m_nickName), i18n("IRC Plugin") ); + i18n("<qt>You can not join %1 because it is set to invite only, and no one has invited you.</qt>").tqarg(m_nickName), i18n("IRC Plugin") ); } void IRCChannelContact::failedChanFull() { manager()->deleteLater(); KMessageBox::error( Kopete::UI::Global::mainWidget(), - i18n("<qt>You can not join %1 because it has reached its user limit.</qt>").arg(m_nickName), + i18n("<qt>You can not join %1 because it has reached its user limit.</qt>").tqarg(m_nickName), i18n("IRC Plugin") ); } @@ -587,8 +587,8 @@ void IRCChannelContact::failedChankey() { bool ok; TQString diaPassword = KInputDialog::getText( i18n( "IRC Plugin" ), - i18n( "Please enter key for channel %1: ").arg(m_nickName), - TQString::null, + i18n( "Please enter key for channel %1: ").tqarg(m_nickName), + TQString(), &ok ); if ( !ok ) @@ -636,9 +636,9 @@ void IRCChannelContact::toggleMode( TQChar mode, bool enabled, bool update ) if( modeMap[mode] != enabled ) { if( enabled ) - setMode( TQString::fromLatin1("+") + mode ); + setMode( TQString::tqfromLatin1("+") + mode ); else - setMode( TQString::fromLatin1("-") + mode ); + setMode( TQString::tqfromLatin1("-") + mode ); } } @@ -717,9 +717,9 @@ void IRCChannelContact::slotHomepage() const TQString IRCChannelContact::caption() const { - TQString cap = TQString::fromLatin1("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost()); + TQString cap = TQString::tqfromLatin1("%1 @ %2").tqarg(m_nickName).tqarg(kircEngine()->currentHost()); if(!mTopic.isEmpty()) - cap.append( TQString::fromLatin1(" - %1").arg(Kopete::Message::unescape(mTopic)) ); + cap.append( TQString::tqfromLatin1(" - %1").tqarg(Kopete::Message::unescape(mTopic)) ); return cap; } |