summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc/ircprotocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/irc/ircprotocol.cpp')
-rw-r--r--kopete/protocols/irc/ircprotocol.cpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/kopete/protocols/irc/ircprotocol.cpp b/kopete/protocols/irc/ircprotocol.cpp
index a8b39299..b60f5a58 100644
--- a/kopete/protocols/irc/ircprotocol.cpp
+++ b/kopete/protocols/irc/ircprotocol.cpp
@@ -72,7 +72,7 @@ IRCProtocol *IRCProtocol::s_protocol = 0L;
IRCProtocolHandler::IRCProtocolHandler() : Kopete::MimeTypeHandler( false )
{
- registerAsProtocolHandler( TQString::fromLatin1("irc") );
+ registerAsProtocolHandler( TQString::tqfromLatin1("irc") );
}
void IRCProtocolHandler::handleURL( const KURL &url ) const
@@ -90,7 +90,7 @@ void IRCProtocolHandler::handleURL( const KURL &url ) const
return;
KUser user( getuid() );
- TQString accountId = TQString::fromLatin1("%1@%2:%3").arg(
+ TQString accountId = TQString::tqfromLatin1("%1@%2:%3").tqarg(
user.loginName(),
url.host(),
TQString::number(port)
@@ -149,141 +149,141 @@ IRCProtocol::IRCProtocol( TQObject *parent, const char *name, const TQStringList
m_StatusUnknown(Kopete::OnlineStatus::Unknown,
999, this, 999, "status_unknown", i18n("Status not available")),
- propChannelTopic(TQString::fromLatin1("channelTopic"), i18n("Topic"), TQString(), false, true ),
- propChannelMembers(TQString::fromLatin1("channelMembers"), i18n("Members")),
- propHomepage(TQString::fromLatin1("homePage"), i18n("Home Page")),
+ propChannelTopic(TQString::tqfromLatin1("channelTopic"), i18n("Topic"), TQString(), false, true ),
+ propChannelMembers(TQString::tqfromLatin1("channelMembers"), i18n("Members")),
+ propHomepage(TQString::tqfromLatin1("homePage"), i18n("Home Page")),
propLastSeen(Kopete::Global::Properties::self()->lastSeen()),
- propUserInfo(TQString::fromLatin1("userInfo"), i18n("IRC User")),
- propServer(TQString::fromLatin1("ircServer"), i18n("IRC Server")),
- propChannels( TQString::fromLatin1("ircChannels"), i18n("IRC Channels")),
- propHops(TQString::fromLatin1("ircHops"), i18n("IRC Hops")),
- propFullName(TQString::fromLatin1("FormattedName"), i18n("Full Name")),
- propIsIdentified(TQString::fromLatin1("identifiedUser"), i18n("User Is Authenticated"))
+ propUserInfo(TQString::tqfromLatin1("userInfo"), i18n("IRC User")),
+ propServer(TQString::tqfromLatin1("ircServer"), i18n("IRC Server")),
+ propChannels( TQString::tqfromLatin1("ircChannels"), i18n("IRC Channels")),
+ propHops(TQString::tqfromLatin1("ircHops"), i18n("IRC Hops")),
+ propFullName(TQString::tqfromLatin1("FormattedName"), i18n("Full Name")),
+ propIsIdentified(TQString::tqfromLatin1("identifiedUser"), i18n("User Is Authenticated"))
{
// kdDebug(14120) << k_funcinfo << endl;
s_protocol = this;
- //m_status = m_unknownStatus = m_Unknown;
+ //m_status = m_unknowntqStatus = m_Unknown;
addAddressBookField("messaging/irc", Kopete::Plugin::MakeIndexField);
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("raw"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("raw"),
TQT_SLOT( slotRawCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /raw <text> - Sends the text in raw form to the server."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("quote"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("quote"),
TQT_SLOT( slotQuoteCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /quote <text> - Sends the text in quoted form to the server."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ctcp"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("ctcp"),
TQT_SLOT( slotCtcpCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ctcp <nick> <message> - Send the CTCP message to nick<action>."), 2 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ping"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("ping"),
TQT_SLOT( slotPingCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ping <nickname> - Alias for /CTCP <nickname> PING."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("motd"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("motd"),
TQT_SLOT( slotMotdCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /motd [<server>] - Shows the message of the day for the current or the given server.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("list"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("list"),
TQT_SLOT( slotListCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /list - List the public channels on the server.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("join"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("join"),
TQT_SLOT( slotJoinCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /join <#channel 1> [<password>] - Joins the specified channel."), 1, 2 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("topic"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("topic"),
TQT_SLOT( slotTopicCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /topic [<topic>] - Sets and/or displays the topic for the active channel.") );
//FIXME: Update help text
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("whois"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("whois"),
TQT_SLOT( slotWhoisCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /whois <nickname> - Display whois info on this user."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("whowas"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("whowas"),
TQT_SLOT( slotWhoWasCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /whowas <nickname> - Display whowas info on this user."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("who"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("who"),
TQT_SLOT( slotWhoCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /who <nickname|channel> - Display who info on this user/channel."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("query"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("query"),
TQT_SLOT( slotQueryCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /query <nickname> [<message>] - Open a private chat with this user."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("mode"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("mode"),
TQT_SLOT( slotModeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /mode <channel> <modes> - Set modes on the given channel."), 2 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("nick"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("nick"),
TQT_SLOT( slotNickCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /nick <nickname> - Change your nickname to the given one."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("me"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("me"),
TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /me <action> - Do something."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ame"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("ame"),
TQT_SLOT( slotAllMeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ame <action> - Do something in every open chat."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("kick"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("kick"),
TQT_SLOT( slotKickCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /kick <nickname> [<reason>] - Kick someone from the channel (requires operator status).")
, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ban"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("ban"),
TQT_SLOT( slotBanCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ban <mask> - Add someone to this channel's ban list. (requires operator status)."),
1, 1 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("bannick"),
- TQString::fromLatin1("ban %1!*@*"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::tqfromLatin1("bannick"),
+ TQString::tqfromLatin1("ban %1!*@*"),
i18n("USAGE: /bannick <nickname> - Add someone to this channel's ban list. Uses the hostmask nickname!*@* (requires operator status)."), Kopete::CommandHandler::SystemAlias, 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("op"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("op"),
TQT_SLOT( slotOpCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /op <nickname 1> [<nickname 2> <...>] - Give channel operator status to someone (requires operator status)."),
1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("deop"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("deop"),
TQT_SLOT( slotDeopCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /deop <nickname> [<nickname 2> <...>]- Remove channel operator status from someone (requires operator status)."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("voice"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("voice"),
TQT_SLOT( slotVoiceCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /voice <nickname> [<nickname 2> <...>]- Give channel voice status to someone (requires operator status)."),
1);
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("devoice"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("devoice"),
TQT_SLOT( slotDevoiceCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /devoice <nickname> [<nickname 2> <...>]- Remove channel voice status from someone (requires operator status)."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("quit"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("quit"),
TQT_SLOT( slotQuitCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /quit [<reason>] - Disconnect from IRC, optionally leaving a message.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("part"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("part"),
TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /part [<reason>] - Part from a channel, optionally leaving a message.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("invite"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("invite"),
TQT_SLOT( slotInviteCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /invite <nickname> [<channel>] - Invite a user to join a channel."), 1 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("j"),
- TQString::fromLatin1("join %1"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::tqfromLatin1("j"),
+ TQString::tqfromLatin1("join %1"),
i18n("USAGE: /j <#channel 1> [<password>] - Alias for JOIN."), Kopete::CommandHandler::SystemAlias,
1, 2 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("msg"),
- TQString::fromLatin1("query %s"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::tqfromLatin1("msg"),
+ TQString::tqfromLatin1("query %s"),
i18n("USAGE: /msg <nickname> [<message>] - Alias for TQUERY <nickname> <message>."), Kopete::CommandHandler::SystemAlias, 1 );
TQObject::connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL(aboutToDisplay(Kopete::Message &)),
@@ -313,7 +313,7 @@ IRCProtocol::~IRCProtocol()
delete m_protocolHandler;
}
-const Kopete::OnlineStatus IRCProtocol::statusLookup( IRCStatus status ) const
+const Kopete::OnlineStatus IRCProtocol::statusLookup( IRCtqStatus status ) const
{
kdDebug(14120) << k_funcinfo << "Looking up status for " << status << endl;
@@ -376,7 +376,7 @@ void IRCProtocol::slotMessageFilter( Kopete::Message &msg )
TQString messageText = msg.escapedBody();
//Add right click for channels, only replace text not in HTML tags
- messageText.replace( TQRegExp( TQString::fromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), TQString::fromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") );
+ messageText.replace( TQRegExp( TQString::tqfromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), TQString::tqfromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") );
msg.setBody( messageText, Kopete::Message::RichText );
}
@@ -391,7 +391,7 @@ TQPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Mes
{
activeNode = n;
activeAccount = static_cast<IRCAccount*>( m.from()->account() );
- if( e.getAttribute( TQString::fromLatin1("type") ) == TQString::fromLatin1("IRCChannel") )
+ if( e.getAttribute( TQString::tqfromLatin1("type") ) == TQString::tqfromLatin1("IRCChannel") )
return activeAccount->contactManager()->findChannel(
e.innerText().string() )->customContextMenuActions();
}
@@ -512,7 +512,7 @@ void IRCProtocol::slotTopicCommand( const TQString &args, Kopete::ChatSession *m
else
{
static_cast<IRCAccount*>(manager->account())->engine()->
- writeRawMessage(TQString::fromLatin1("TOPIC %1").arg(chan->nickName()));
+ writeRawMessage(TQString::tqfromLatin1("TOPIC %1").tqarg(chan->nickName()));
}
}
else
@@ -536,7 +536,7 @@ void IRCProtocol::slotJoinCommand( const TQString &arg, Kopete::ChatSession *man
{
static_cast<IRCAccount*>( manager->account() )->appendMessage(
i18n("\"%1\" is an invalid channel. Channels must start with '#', '!', '+', or '&'.")
- .arg(args[0]), IRCAccount::ErrorReply );
+ .tqarg(args[0]), IRCAccount::ErrorReply );
}
}
@@ -556,7 +556,7 @@ void IRCProtocol::slotInviteCommand( const TQString &args, Kopete::ChatSession *
{
static_cast<IRCAccount*>( manager->account() )->appendMessage(
i18n("\"%1\" is an invalid channel. Channels must start with '#', '!', '+', or '&'.")
- .arg(argsList[1]), IRCAccount::ErrorReply );
+ .tqarg(argsList[1]), IRCAccount::ErrorReply );
}
}
else
@@ -568,7 +568,7 @@ void IRCProtocol::slotInviteCommand( const TQString &args, Kopete::ChatSession *
if( c && c->manager()->contactOnlineStatus( manager->myself() ) == m_UserStatusOp )
{
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- TQString::fromLatin1("INVITE %1 %2").arg( argsList[0] ).
+ TQString::tqfromLatin1("INVITE %1 %2").tqarg( argsList[0] ).
arg( c->nickName() )
);
}
@@ -599,7 +599,7 @@ void IRCProtocol::slotQueryCommand( const TQString &args, Kopete::ChatSession *m
else
{
static_cast<IRCAccount*>( manager->account() )->appendMessage(
- i18n("\"%1\" is an invalid nickname. Nicknames must not start with '#','!','+', or '&'.").arg(user),
+ i18n("\"%1\" is an invalid nickname. Nicknames must not start with '#','!','+', or '&'.").tqarg(user),
IRCAccount::ErrorReply );
}
}
@@ -614,7 +614,7 @@ void IRCProtocol::slotWhoCommand( const TQString &args, Kopete::ChatSession *man
{
TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- TQString::fromLatin1("WHO %1").arg( argsList.first() ) );
+ TQString::tqfromLatin1("WHO %1").tqarg( argsList.first() ) );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
@@ -622,7 +622,7 @@ void IRCProtocol::slotWhoWasCommand( const TQString &args, Kopete::ChatSession *
{
TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- TQString::fromLatin1("WHOWAS %1").arg( argsList.first() ) );
+ TQString::tqfromLatin1("WHOWAS %1").tqarg( argsList.first() ) );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
@@ -641,7 +641,7 @@ void IRCProtocol::slotModeCommand(const TQString &args, Kopete::ChatSession *man
{
TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->mode( argsList.front(),
- args.section( TQRegExp(TQString::fromLatin1("\\s+")), 1 ) );
+ args.section( TQRegExp(TQString::tqfromLatin1("\\s+")), 1 ) );
}
void IRCProtocol::slotMeCommand(const TQString &args, Kopete::ChatSession *manager)
@@ -668,7 +668,7 @@ void IRCProtocol::slotKickCommand(const TQString &args, Kopete::ChatSession *man
{
if (manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp)
{
- TQRegExp spaces(TQString::fromLatin1("\\s+"));
+ TQRegExp spaces(TQString::tqfromLatin1("\\s+"));
TQString nick = args.section( spaces, 0, 0);
TQString reason = args.section( spaces, 1);
Kopete::ContactPtrList members = manager->members();
@@ -691,7 +691,7 @@ void IRCProtocol::slotBanCommand( const TQString &args, Kopete::ChatSession *man
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = static_cast<IRCChannelContact*>( members.first() );
if( chan && chan->locateUser( argsList.front() ) )
- chan->setMode( TQString::fromLatin1("+b %1").arg( argsList.front() ) );
+ chan->setMode( TQString::tqfromLatin1("+b %1").tqarg( argsList.front() ) );
}
else
{
@@ -724,22 +724,22 @@ void IRCProtocol::slotPartCommand( const TQString &args, Kopete::ChatSession *ma
void IRCProtocol::slotOpCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, TQString::fromLatin1("+o") );
+ simpleModeChange( args, manager, TQString::tqfromLatin1("+o") );
}
void IRCProtocol::slotDeopCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, TQString::fromLatin1("-o") );
+ simpleModeChange( args, manager, TQString::tqfromLatin1("-o") );
}
void IRCProtocol::slotVoiceCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, TQString::fromLatin1("+v") );
+ simpleModeChange( args, manager, TQString::tqfromLatin1("+v") );
}
void IRCProtocol::slotDevoiceCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, TQString::fromLatin1("-v") );
+ simpleModeChange( args, manager, TQString::tqfromLatin1("-v") );
}
void IRCProtocol::simpleModeChange( const TQString &args, Kopete::ChatSession *manager, const TQString &mode )
@@ -754,7 +754,7 @@ void IRCProtocol::simpleModeChange( const TQString &args, Kopete::ChatSession *m
for( TQStringList::iterator it = argsList.begin(); it != argsList.end(); ++it )
{
if( chan->locateUser( *it ) )
- chan->setMode( TQString::fromLatin1("%1 %2").arg( mode ).arg( *it ) );
+ chan->setMode( TQString::tqfromLatin1("%1 %2").tqarg( mode ).tqarg( *it ) );
}
}
}
@@ -770,7 +770,7 @@ void IRCProtocol::editNetworks( const TQString &networkName )
if( !netConf )
{
netConf = new NetworkConfig( Kopete::UI::Global::mainWidget(), "network_config", true );
- netConf->host->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[\\w-\\.]*$"), TQT_TQOBJECT(netConf) ) );
+ netConf->host->setValidator( new TQRegExpValidator( TQString::tqfromLatin1("^[\\w-\\.]*$"), TQT_TQOBJECT(netConf) ) );
netConf->upButton->setIconSet( SmallIconSet( "up" ) );
netConf->downButton->setIconSet( SmallIconSet( "down" ) );
@@ -827,7 +827,7 @@ void IRCProtocol::slotUpdateNetworkConfig()
netConf->hostList->clear();
for( TQValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
- netConf->hostList->insertItem( (*it)->host + TQString::fromLatin1(":") + TQString::number((*it)->port) );
+ netConf->hostList->insertItem( (*it)->host + TQString::tqfromLatin1(":") + TQString::number((*it)->port) );
// prevent nested event loop crash
disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
@@ -871,7 +871,7 @@ void IRCProtocol::storeCurrentHost()
void IRCProtocol::slotHostPortChanged( int value )
{
- TQString entryText = m_uiCurrentHostSelection + TQString::fromLatin1(":") + TQString::number( value );
+ TQString entryText = m_uiCurrentHostSelection + TQString::tqfromLatin1(":") + TQString::number( value );
// changeItem causes a take() and insert, and we don't want a selectionChanged() signal that sets all this off again.
disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
netConf->hostList->changeItem( entryText, netConf->hostList->currentItem() );
@@ -918,8 +918,8 @@ void IRCProtocol::slotDeleteNetwork()
if( KMessageBox::warningContinueCancel(
Kopete::UI::Global::mainWidget(), i18n("<qt>Are you sure you want to delete the network <b>%1</b>?<br>"
"Any accounts which use this network will have to be modified.</qt>")
- .arg(network), i18n("Deleting Network"),
- KGuiItem(i18n("&Delete Network"),"editdelete"), TQString::fromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue )
+ .tqarg(network), i18n("Deleting Network"),
+ KGuiItem(i18n("&Delete Network"),"editdelete"), TQString::tqfromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue )
{
disconnect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
@@ -944,14 +944,14 @@ void IRCProtocol::slotDeleteHost()
TQString hostName = netConf->host->text();
if ( KMessageBox::warningContinueCancel(
Kopete::UI::Global::mainWidget(), i18n("<qt>Are you sure you want to delete the host <b>%1</b>?</qt>")
- .arg(hostName), i18n("Deleting Host"),
- KGuiItem(i18n("&Delete Host"),"editdelete"), TQString::fromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue )
+ .tqarg(hostName), i18n("Deleting Host"),
+ KGuiItem(i18n("&Delete Host"),"editdelete"), TQString::tqfromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue )
{
IRCHost *host = m_hosts[ hostName ];
if ( host )
{
disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
- TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port);
+ TQString entryText = host->host + TQString::tqfromLatin1(":") + TQString::number(host->port);
TQListBoxItem * justAdded = netConf->hostList->findItem( entryText );
netConf->hostList->removeItem( netConf->hostList->index( justAdded ) );
connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
@@ -971,12 +971,12 @@ void IRCProtocol::slotNewNetwork()
// create a new network struct
IRCNetwork *net = new IRCNetwork;
// give it the name of 'New Network' (incrementing number if needed)
- TQString netName = TQString::fromLatin1( "New Network" );
+ TQString netName = TQString::tqfromLatin1( "New Network" );
if ( m_networks.find( netName ) )
{
int newIdx = 1;
do {
- netName = TQString::fromLatin1( "New Network #%1" ).arg( newIdx++ );
+ netName = TQString::tqfromLatin1( "New Network #%1" ).tqarg( newIdx++ );
}
while ( m_networks.find( netName ) && newIdx < 100 );
if ( newIdx == 100 ) // pathological case
@@ -1019,7 +1019,7 @@ void IRCProtocol::slotNewHost()
IRCNetwork *net = m_networks[ netConf->networkList->currentText() ];
net->hosts.append( host );
// add it to the gui
- TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port);
+ TQString entryText = host->host + TQString::tqfromLatin1(":") + TQString::number(host->port);
netConf->hostList->insertItem( entryText );
// select it in the gui
TQListBoxItem * justAdded = netConf->hostList->findItem( entryText );
@@ -1203,7 +1203,7 @@ void IRCProtocol::slotMoveServerUp()
if( currentPos > 0 )
{
netConf->hostList->removeItem( currentPos );
- TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port );
+ TQString entryText = selectedHost->host + TQString::tqfromLatin1(":") + TQString::number( selectedHost->port );
netConf->hostList->insertItem( entryText, --currentPos );
netConf->hostList->setSelected( currentPos, true );
}
@@ -1228,7 +1228,7 @@ void IRCProtocol::slotMoveServerDown()
if( currentPos < ( netConf->hostList->count() - 1 ) )
{
netConf->hostList->removeItem( currentPos );
- TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port );
+ TQString entryText = selectedHost->host + TQString::tqfromLatin1(":") + TQString::number( selectedHost->port );
netConf->hostList->insertItem( entryText, ++currentPos );
netConf->hostList->setSelected( currentPos, true );
}