summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc/ircprotocol.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/irc/ircprotocol.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/irc/ircprotocol.cpp')
-rw-r--r--kopete/protocols/irc/ircprotocol.cpp488
1 files changed, 244 insertions, 244 deletions
diff --git a/kopete/protocols/irc/ircprotocol.cpp b/kopete/protocols/irc/ircprotocol.cpp
index 176c74d7..6112429b 100644
--- a/kopete/protocols/irc/ircprotocol.cpp
+++ b/kopete/protocols/irc/ircprotocol.cpp
@@ -53,14 +53,14 @@
#include <kstandarddirs.h>
#include <kuser.h>
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qspinbox.h>
-#include <qvalidator.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqspinbox.h>
+#include <tqvalidator.h>
#include <dom/html_element.h>
#include <unistd.h>
@@ -72,7 +72,7 @@ IRCProtocol *IRCProtocol::s_protocol = 0L;
IRCProtocolHandler::IRCProtocolHandler() : Kopete::MimeTypeHandler( false )
{
- registerAsProtocolHandler( QString::fromLatin1("irc") );
+ registerAsProtocolHandler( TQString::fromLatin1("irc") );
}
void IRCProtocolHandler::handleURL( const KURL &url ) const
@@ -85,15 +85,15 @@ void IRCProtocolHandler::handleURL( const KURL &url ) const
if( port == 0 )
port = 6667;
- QString chan = url.url().section('/',3);
+ TQString chan = url.url().section('/',3);
if( chan.isEmpty() )
return;
KUser user( getuid() );
- QString accountId = QString::fromLatin1("%1@%2:%3").arg(
+ TQString accountId = TQString::fromLatin1("%1@%2:%3").arg(
user.loginName(),
url.host(),
- QString::number(port)
+ TQString::number(port)
);
kdDebug(14120) << accountId << endl;
@@ -104,39 +104,39 @@ void IRCProtocolHandler::handleURL( const KURL &url ) const
newAccount->connect();
}
-IRCProtocol::IRCProtocol( QObject *parent, const char *name, const QStringList & /* args */ )
+IRCProtocol::IRCProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Protocol( IRCProtocolFactory::instance(), parent, name ),
m_ServerStatusOnline(Kopete::OnlineStatus::Online,
- 100, this, OnlineServer, QString::null, i18n("Online")),
+ 100, this, OnlineServer, TQString::null, i18n("Online")),
m_ServerStatusOffline(Kopete::OnlineStatus::Offline,
- 90, this, OfflineServer, QString::null, i18n("Offline")),
+ 90, this, OfflineServer, TQString::null, i18n("Offline")),
m_ChannelStatusOnline(Kopete::OnlineStatus::Online,
- 80, this, OnlineChannel, QString::null, i18n("Online")),
+ 80, this, OnlineChannel, TQString::null, i18n("Online")),
m_ChannelStatusOffline(Kopete::OnlineStatus::Offline,
- 70, this, OfflineChannel, QString::null, i18n("Offline")),
+ 70, this, OfflineChannel, TQString::null, i18n("Offline")),
m_UserStatusOpVoice(Kopete::OnlineStatus::Online,
- 60, this, Online | Operator | Voiced, QStringList::split(' ',"irc_voice irc_op"), i18n("Op")),
+ 60, this, Online | Operator | Voiced, TQStringList::split(' ',"irc_voice irc_op"), i18n("Op")),
m_UserStatusOpVoiceAway(Kopete::OnlineStatus::Away,
55, this, Online | Operator | Voiced | Away,
- QStringList::split(' ',"irc_voice irc_op contact_away_overlay"), i18n("Away")),
+ TQStringList::split(' ',"irc_voice irc_op contact_away_overlay"), i18n("Away")),
m_UserStatusOp(Kopete::OnlineStatus::Online,
50, this, Online | Operator, "irc_op", i18n("Op")),
m_UserStatusOpAway(Kopete::OnlineStatus::Away,
45, this, Online | Operator | Away,
- QStringList::split(' ',"irc_op contact_away_overlay"), i18n("Away")),
+ TQStringList::split(' ',"irc_op contact_away_overlay"), i18n("Away")),
m_UserStatusVoice(Kopete::OnlineStatus::Online,
40, this, Online | Voiced, "irc_voice", i18n("Voice")),
m_UserStatusVoiceAway(Kopete::OnlineStatus::Away,
35, this, Online | Voiced | Away,
- QStringList::split(' ',"irc_voice contact_away_overlay"), i18n("Away")),
+ TQStringList::split(' ',"irc_voice contact_away_overlay"), i18n("Away")),
m_UserStatusOnline(Kopete::OnlineStatus::Online,
- 25, this, Online, QString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online),
+ 25, this, Online, TQString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online),
m_UserStatusAway(Kopete::OnlineStatus::Away,
2, this, Online | Away, "contact_away_overlay",
@@ -144,21 +144,21 @@ IRCProtocol::IRCProtocol( QObject *parent, const char *name, const QStringList &
m_UserStatusConnecting(Kopete::OnlineStatus::Connecting,
1, this, Connecting, "irc_connecting", i18n("Connecting")),
m_UserStatusOffline(Kopete::OnlineStatus::Offline,
- 0, this, Offline, QString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline),
+ 0, this, Offline, TQString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline),
m_StatusUnknown(Kopete::OnlineStatus::Unknown,
999, this, 999, "status_unknown", i18n("Status not available")),
- propChannelTopic(QString::fromLatin1("channelTopic"), i18n("Topic"), QString::null, false, true ),
- propChannelMembers(QString::fromLatin1("channelMembers"), i18n("Members")),
- propHomepage(QString::fromLatin1("homePage"), i18n("Home Page")),
+ propChannelTopic(TQString::fromLatin1("channelTopic"), i18n("Topic"), TQString::null, false, true ),
+ propChannelMembers(TQString::fromLatin1("channelMembers"), i18n("Members")),
+ propHomepage(TQString::fromLatin1("homePage"), i18n("Home Page")),
propLastSeen(Kopete::Global::Properties::self()->lastSeen()),
- propUserInfo(QString::fromLatin1("userInfo"), i18n("IRC User")),
- propServer(QString::fromLatin1("ircServer"), i18n("IRC Server")),
- propChannels( QString::fromLatin1("ircChannels"), i18n("IRC Channels")),
- propHops(QString::fromLatin1("ircHops"), i18n("IRC Hops")),
- propFullName(QString::fromLatin1("FormattedName"), i18n("Full Name")),
- propIsIdentified(QString::fromLatin1("identifiedUser"), i18n("User Is Authenticated"))
+ 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"))
{
// kdDebug(14120) << k_funcinfo << endl;
@@ -168,129 +168,129 @@ IRCProtocol::IRCProtocol( QObject *parent, const char *name, const QStringList &
addAddressBookField("messaging/irc", Kopete::Plugin::MakeIndexField);
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("raw"),
- SLOT( slotRawCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("quote"),
- SLOT( slotQuoteCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("ctcp"),
- SLOT( slotCtcpCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("ping"),
- SLOT( slotPingCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ping"),
+ TQT_SLOT( slotPingCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ping <nickname> - Alias for /CTCP <nickname> PING."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("motd"),
- SLOT( slotMotdCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("list"),
- SLOT( slotListCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("list"),
+ TQT_SLOT( slotListCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /list - List the public channels on the server.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("join"),
- SLOT( slotJoinCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("topic"),
- SLOT( slotTopicCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("whois"),
- SLOT( slotWhoisCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("whois"),
+ TQT_SLOT( slotWhoisCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /whois <nickname> - Display whois info on this user."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("whowas"),
- SLOT( slotWhoWasCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("who"),
- SLOT( slotWhoCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("query"),
- SLOT( slotQueryCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("mode"),
- SLOT( slotModeCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("nick"),
- SLOT( slotNickCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("me"),
- SLOT( slotMeCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("me"),
+ TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /me <action> - Do something."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("ame"),
- SLOT( slotAllMeCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ame"),
+ TQT_SLOT( slotAllMeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ame <action> - Do something in every open chat."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("kick"),
- SLOT( slotKickCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("ban"),
- SLOT( slotBanCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("bannick"),
- QString::fromLatin1("ban %1!*@*"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("bannick"),
+ TQString::fromLatin1("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, QString::fromLatin1("op"),
- SLOT( slotOpCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("deop"),
- SLOT( slotDeopCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("voice"),
- SLOT( slotVoiceCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("devoice"),
- SLOT( slotDevoiceCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("quit"),
- SLOT( slotQuitCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("quit"),
+ TQT_SLOT( slotQuitCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /quit [<reason>] - Disconnect from IRC, optionally leaving a message.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("part"),
- SLOT( slotPartCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("invite"),
- SLOT( slotInviteCommand( const QString &, Kopete::ChatSession*) ),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("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, QString::fromLatin1("j"),
- QString::fromLatin1("join %1"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("j"),
+ TQString::fromLatin1("join %1"),
i18n("USAGE: /j <#channel 1> [<password>] - Alias for JOIN."), Kopete::CommandHandler::SystemAlias,
1, 2 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, QString::fromLatin1("msg"),
- QString::fromLatin1("query %s"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("msg"),
+ TQString::fromLatin1("query %s"),
i18n("USAGE: /msg <nickname> [<message>] - Alias for QUERY <nickname> <message>."), Kopete::CommandHandler::SystemAlias, 1 );
- QObject::connect( Kopete::ChatSessionManager::self(), SIGNAL(aboutToDisplay(Kopete::Message &)),
- this, SLOT(slotMessageFilter(Kopete::Message &)) );
+ TQObject::connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL(aboutToDisplay(Kopete::Message &)),
+ this, TQT_SLOT(slotMessageFilter(Kopete::Message &)) );
- QObject::connect( Kopete::ChatSessionManager::self(), SIGNAL( viewCreated( KopeteView* ) ),
- this, SLOT( slotViewCreated( KopeteView* ) ) );
+ TQObject::connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( viewCreated( KopeteView* ) ),
+ this, TQT_SLOT( slotViewCreated( KopeteView* ) ) );
setCapabilities( Kopete::Protocol::RichBFormatting | Kopete::Protocol::RichUFormatting | Kopete::Protocol::RichColor );
@@ -373,16 +373,16 @@ void IRCProtocol::slotMessageFilter( Kopete::Message &msg )
{
if( msg.from()->protocol() == this )
{
- QString messageText = msg.escapedBody();
+ TQString messageText = msg.escapedBody();
//Add right click for channels, only replace text not in HTML tags
- messageText.replace( QRegExp( QString::fromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), QString::fromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") );
+ messageText.replace( TQRegExp( TQString::fromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), TQString::fromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") );
msg.setBody( messageText, Kopete::Message::RichText );
}
}
-QPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Message &m, DOM::Node &n )
+TQPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Message &m, DOM::Node &n )
{
DOM::HTMLElement e = n;
@@ -391,7 +391,7 @@ QPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Mess
{
activeNode = n;
activeAccount = static_cast<IRCAccount*>( m.from()->account() );
- if( e.getAttribute( QString::fromLatin1("type") ) == QString::fromLatin1("IRCChannel") )
+ if( e.getAttribute( TQString::fromLatin1("type") ) == TQString::fromLatin1("IRCChannel") )
return activeAccount->contactManager()->findChannel(
e.innerText().string() )->customContextMenuActions();
}
@@ -399,33 +399,33 @@ QPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Mess
return 0L;
}
-AddContactPage *IRCProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account)
+AddContactPage *IRCProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account)
{
return new IRCAddContactPage(parent,static_cast<IRCAccount*>(account));
}
-KopeteEditAccountWidget *IRCProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent)
+KopeteEditAccountWidget *IRCProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent)
{
return new IRCEditAccountWidget(this, static_cast<IRCAccount*>(account),parent);
}
-Kopete::Account *IRCProtocol::createNewAccount(const QString &accountId)
+Kopete::Account *IRCProtocol::createNewAccount(const TQString &accountId)
{
return new IRCAccount( this, accountId );
}
-Kopete::Contact *IRCProtocol::deserializeContact( Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData,
- const QMap<QString, QString> & /* addressBookData */ )
+Kopete::Contact *IRCProtocol::deserializeContact( Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> & /* addressBookData */ )
{
kdDebug(14120) << k_funcinfo << endl;
- QString contactId = serializedData[ "contactId" ];
- QString displayName = serializedData[ "displayName" ];
+ TQString contactId = serializedData[ "contactId" ];
+ TQString displayName = serializedData[ "displayName" ];
if( displayName.isEmpty() )
displayName = contactId;
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
if( !accounts.isEmpty() )
{
Kopete::Account *a = accounts[ serializedData[ "accountId" ] ];
@@ -444,7 +444,7 @@ Kopete::Contact *IRCProtocol::deserializeContact( Kopete::MetaContact *metaConta
return 0;
}
-void IRCProtocol::slotRawCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotRawCommand( const TQString &args, Kopete::ChatSession *manager )
{
IRCAccount *account = static_cast<IRCAccount*>( manager->account() );
@@ -459,7 +459,7 @@ void IRCProtocol::slotRawCommand( const QString &args, Kopete::ChatSession *mana
}
}
-void IRCProtocol::slotQuoteCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotQuoteCommand( const TQString &args, Kopete::ChatSession *manager )
{
IRCAccount *account = static_cast<IRCAccount*>( manager->account() );
@@ -474,34 +474,34 @@ void IRCProtocol::slotQuoteCommand( const QString &args, Kopete::ChatSession *ma
}
}
-void IRCProtocol::slotCtcpCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotCtcpCommand( const TQString &args, Kopete::ChatSession *manager )
{
if( !args.isEmpty() )
{
- QString user = args.section( ' ', 0, 0 );
- QString message = args.section( ' ', 1 );
- static_cast<IRCAccount*>( manager->account() )->engine()->writeCtcpQueryMessage( user, QString::null, message );
+ TQString user = args.section( ' ', 0, 0 );
+ TQString message = args.section( ' ', 1 );
+ static_cast<IRCAccount*>( manager->account() )->engine()->writeCtcpQueryMessage( user, TQString::null, message );
}
}
-void IRCProtocol::slotMotdCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotMotdCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->motd(argsList.front());
}
-void IRCProtocol::slotPingCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotPingCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments(args);
+ TQStringList argsList = Kopete::CommandHandler::parseArguments(args);
static_cast<IRCAccount*>( manager->account() )->engine()->CtcpRequest_ping(argsList.front());
}
-void IRCProtocol::slotListCommand( const QString &/*args*/, Kopete::ChatSession *manager )
+void IRCProtocol::slotListCommand( const TQString &/*args*/, Kopete::ChatSession *manager )
{
static_cast<IRCAccount*>( manager->account() )->listChannels();
}
-void IRCProtocol::slotTopicCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotTopicCommand( const TQString &args, Kopete::ChatSession *manager )
{
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = dynamic_cast<IRCChannelContact*>( members.first() );
@@ -512,7 +512,7 @@ void IRCProtocol::slotTopicCommand( const QString &args, Kopete::ChatSession *ma
else
{
static_cast<IRCAccount*>(manager->account())->engine()->
- writeRawMessage(QString::fromLatin1("TOPIC %1").arg(chan->nickName()));
+ writeRawMessage(TQString::fromLatin1("TOPIC %1").arg(chan->nickName()));
}
}
else
@@ -522,9 +522,9 @@ void IRCProtocol::slotTopicCommand( const QString &args, Kopete::ChatSession *ma
}
}
-void IRCProtocol::slotJoinCommand( const QString &arg, Kopete::ChatSession *manager )
+void IRCProtocol::slotJoinCommand( const TQString &arg, Kopete::ChatSession *manager )
{
- QStringList args = Kopete::CommandHandler::parseArguments( arg );
+ TQStringList args = Kopete::CommandHandler::parseArguments( arg );
if( KIRC::Entity::isChannel(args[0]) )
{
IRCChannelContact *chan = static_cast<IRCAccount*>( manager->account() )->contactManager()->findChannel( args[0] );
@@ -540,10 +540,10 @@ void IRCProtocol::slotJoinCommand( const QString &arg, Kopete::ChatSession *mana
}
}
-void IRCProtocol::slotInviteCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotInviteCommand( const TQString &args, Kopete::ChatSession *manager )
{
IRCChannelContact *c = 0L;
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
if( argsList.count() > 1 )
{
@@ -568,7 +568,7 @@ void IRCProtocol::slotInviteCommand( const QString &args, Kopete::ChatSession *m
if( c && c->manager()->contactOnlineStatus( manager->myself() ) == m_UserStatusOp )
{
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- QString::fromLatin1("INVITE %1 %2").arg( argsList[0] ).
+ TQString::fromLatin1("INVITE %1 %2").arg( argsList[0] ).
arg( c->nickName() )
);
}
@@ -579,10 +579,10 @@ void IRCProtocol::slotInviteCommand( const QString &args, Kopete::ChatSession *m
}
}
-void IRCProtocol::slotQueryCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotQueryCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QString user = args.section( ' ', 0, 0 );
- QString rest = args.section( ' ', 1 );
+ TQString user = args.section( ' ', 0, 0 );
+ TQString rest = args.section( ' ', 1 );
if( !KIRC::Entity::isChannel(user) )
{
@@ -604,47 +604,47 @@ void IRCProtocol::slotQueryCommand( const QString &args, Kopete::ChatSession *ma
}
}
-void IRCProtocol::slotWhoisCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotWhoisCommand( const TQString &args, Kopete::ChatSession *manager )
{
static_cast<IRCAccount*>( manager->account() )->engine()->whois( args );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
-void IRCProtocol::slotWhoCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotWhoCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- QString::fromLatin1("WHO %1").arg( argsList.first() ) );
+ TQString::fromLatin1("WHO %1").arg( argsList.first() ) );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
-void IRCProtocol::slotWhoWasCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotWhoWasCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- QString::fromLatin1("WHOWAS %1").arg( argsList.first() ) );
+ TQString::fromLatin1("WHOWAS %1").arg( argsList.first() ) );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
-void IRCProtocol::slotQuitCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotQuitCommand( const TQString &args, Kopete::ChatSession *manager )
{
static_cast<IRCAccount*>( manager->account() )->quit( args );
}
-void IRCProtocol::slotNickCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotNickCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->nick( argsList.front() );
}
-void IRCProtocol::slotModeCommand(const QString &args, Kopete::ChatSession *manager)
+void IRCProtocol::slotModeCommand(const TQString &args, Kopete::ChatSession *manager)
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->mode( argsList.front(),
- args.section( QRegExp(QString::fromLatin1("\\s+")), 1 ) );
+ args.section( TQRegExp(TQString::fromLatin1("\\s+")), 1 ) );
}
-void IRCProtocol::slotMeCommand(const QString &args, Kopete::ChatSession *manager)
+void IRCProtocol::slotMeCommand(const TQString &args, Kopete::ChatSession *manager)
{
Kopete::ContactPtrList members = manager->members();
static_cast<IRCAccount*>( manager->account() )->engine()->CtcpRequest_action(
@@ -652,11 +652,11 @@ void IRCProtocol::slotMeCommand(const QString &args, Kopete::ChatSession *manage
);
}
-void IRCProtocol::slotAllMeCommand(const QString &args, Kopete::ChatSession *)
+void IRCProtocol::slotAllMeCommand(const TQString &args, Kopete::ChatSession *)
{
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for( QValueList<Kopete::ChatSession*>::iterator it = sessions.begin(); it != sessions.end(); ++it )
+ for( TQValueList<Kopete::ChatSession*>::iterator it = sessions.begin(); it != sessions.end(); ++it )
{
Kopete::ChatSession *session = *it;
if( session->protocol() == this )
@@ -664,15 +664,15 @@ void IRCProtocol::slotAllMeCommand(const QString &args, Kopete::ChatSession *)
}
}
-void IRCProtocol::slotKickCommand(const QString &args, Kopete::ChatSession *manager)
+void IRCProtocol::slotKickCommand(const TQString &args, Kopete::ChatSession *manager)
{
if (manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp)
{
- QRegExp spaces(QString::fromLatin1("\\s+"));
- QString nick = args.section( spaces, 0, 0);
- QString reason = args.section( spaces, 1);
+ TQRegExp spaces(TQString::fromLatin1("\\s+"));
+ TQString nick = args.section( spaces, 0, 0);
+ TQString reason = args.section( spaces, 1);
Kopete::ContactPtrList members = manager->members();
- QString channel = static_cast<IRCContact*>( members.first() )->nickName();
+ TQString channel = static_cast<IRCContact*>( members.first() )->nickName();
if (KIRC::Entity::isChannel(channel))
static_cast<IRCAccount*>(manager->account())->engine()->kick(nick, channel, reason);
}
@@ -683,15 +683,15 @@ void IRCProtocol::slotKickCommand(const QString &args, Kopete::ChatSession *mana
}
}
-void IRCProtocol::slotBanCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotBanCommand( const TQString &args, Kopete::ChatSession *manager )
{
if( manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = static_cast<IRCChannelContact*>( members.first() );
if( chan && chan->locateUser( argsList.front() ) )
- chan->setMode( QString::fromLatin1("+b %1").arg( argsList.front() ) );
+ chan->setMode( TQString::fromLatin1("+b %1").arg( argsList.front() ) );
}
else
{
@@ -700,9 +700,9 @@ void IRCProtocol::slotBanCommand( const QString &args, Kopete::ChatSession *mana
}
}
-void IRCProtocol::slotPartCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotPartCommand( const TQString &args, Kopete::ChatSession *manager )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments(args);
+ TQStringList argsList = Kopete::CommandHandler::parseArguments(args);
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = static_cast<IRCChannelContact*>(members.first());
@@ -722,39 +722,39 @@ void IRCProtocol::slotPartCommand( const QString &args, Kopete::ChatSession *man
}
}
-void IRCProtocol::slotOpCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotOpCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, QString::fromLatin1("+o") );
+ simpleModeChange( args, manager, TQString::fromLatin1("+o") );
}
-void IRCProtocol::slotDeopCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotDeopCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, QString::fromLatin1("-o") );
+ simpleModeChange( args, manager, TQString::fromLatin1("-o") );
}
-void IRCProtocol::slotVoiceCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotVoiceCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, QString::fromLatin1("+v") );
+ simpleModeChange( args, manager, TQString::fromLatin1("+v") );
}
-void IRCProtocol::slotDevoiceCommand( const QString &args, Kopete::ChatSession *manager )
+void IRCProtocol::slotDevoiceCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, QString::fromLatin1("-v") );
+ simpleModeChange( args, manager, TQString::fromLatin1("-v") );
}
-void IRCProtocol::simpleModeChange( const QString &args, Kopete::ChatSession *manager, const QString &mode )
+void IRCProtocol::simpleModeChange( const TQString &args, Kopete::ChatSession *manager, const TQString &mode )
{
if( manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp )
{
- QStringList argsList = Kopete::CommandHandler::parseArguments( args );
+ TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = static_cast<IRCChannelContact*>( members.first() );
if( chan )
{
- for( QStringList::iterator it = argsList.begin(); it != argsList.end(); ++it )
+ for( TQStringList::iterator it = argsList.begin(); it != argsList.end(); ++it )
{
if( chan->locateUser( *it ) )
- chan->setMode( QString::fromLatin1("%1 %2").arg( mode ).arg( *it ) );
+ chan->setMode( TQString::fromLatin1("%1 %2").arg( mode ).arg( *it ) );
}
}
}
@@ -765,37 +765,37 @@ void IRCProtocol::simpleModeChange( const QString &args, Kopete::ChatSession *ma
}
}
-void IRCProtocol::editNetworks( const QString &networkName )
+void IRCProtocol::editNetworks( const TQString &networkName )
{
if( !netConf )
{
netConf = new NetworkConfig( Kopete::UI::Global::mainWidget(), "network_config", true );
- netConf->host->setValidator( new QRegExpValidator( QString::fromLatin1("^[\\w-\\.]*$"), netConf ) );
+ netConf->host->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[\\w-\\.]*$"), netConf ) );
netConf->upButton->setIconSet( SmallIconSet( "up" ) );
netConf->downButton->setIconSet( SmallIconSet( "down" ) );
- connect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
- connect( netConf, SIGNAL( accepted() ), this, SLOT( slotSaveNetworkConfig() ) );
- connect( netConf, SIGNAL( rejected() ), this, SLOT( slotReadNetworks() ) );
- connect( netConf->upButton, SIGNAL( clicked() ), this, SLOT( slotMoveServerUp() ) );
- connect( netConf->downButton, SIGNAL( clicked() ), this, SLOT( slotMoveServerDown() ) );
- connect( netConf->removeNetwork, SIGNAL( clicked() ), this, SLOT( slotDeleteNetwork() ) );
- connect( netConf->removeHost, SIGNAL( clicked() ), this, SLOT( slotDeleteHost() ) );
- connect( netConf->newHost, SIGNAL( clicked() ), this, SLOT( slotNewHost() ) );
- connect( netConf->newNetwork, SIGNAL( clicked() ), this, SLOT( slotNewNetwork() ) );
- connect( netConf->renameNetwork, SIGNAL( clicked() ), this, SLOT( slotRenameNetwork() ) );
- connect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
- connect( netConf->networkList, SIGNAL( doubleClicked ( QListBoxItem * )), SLOT(slotRenameNetwork()));
+ connect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf, TQT_SIGNAL( accepted() ), this, TQT_SLOT( slotSaveNetworkConfig() ) );
+ connect( netConf, TQT_SIGNAL( rejected() ), this, TQT_SLOT( slotReadNetworks() ) );
+ connect( netConf->upButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveServerUp() ) );
+ connect( netConf->downButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveServerDown() ) );
+ connect( netConf->removeNetwork, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDeleteNetwork() ) );
+ connect( netConf->removeHost, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDeleteHost() ) );
+ connect( netConf->newHost, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNewHost() ) );
+ connect( netConf->newNetwork, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNewNetwork() ) );
+ connect( netConf->renameNetwork, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRenameNetwork() ) );
+ connect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
+ connect( netConf->networkList, TQT_SIGNAL( doubleClicked ( TQListBoxItem * )), TQT_SLOT(slotRenameNetwork()));
}
- disconnect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ disconnect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
netConf->networkList->clear();
- for( QDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it )
+ for( TQDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it )
{
IRCNetwork *net = it.current();
netConf->networkList->insertItem( net->name );
@@ -803,8 +803,8 @@ void IRCProtocol::editNetworks( const QString &networkName )
netConf->networkList->sort();
- connect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
if( !networkName.isEmpty() )
netConf->networkList->setSelected( netConf->networkList->findItem( networkName ), true );
@@ -826,14 +826,14 @@ void IRCProtocol::slotUpdateNetworkConfig()
netConf->description->setText( net->description );
netConf->hostList->clear();
- for( QValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
- netConf->hostList->insertItem( (*it)->host + QString::fromLatin1(":") + QString::number((*it)->port) );
+ for( TQValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
+ netConf->hostList->insertItem( (*it)->host + TQString::fromLatin1(":") + TQString::number((*it)->port) );
// prevent nested event loop crash
- disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
netConf->hostList->setSelected( 0, true );
slotUpdateNetworkHostConfig();
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
}
// record the current selection
@@ -871,11 +871,11 @@ void IRCProtocol::storeCurrentHost()
void IRCProtocol::slotHostPortChanged( int value )
{
- QString entryText = m_uiCurrentHostSelection + QString::fromLatin1(":") + QString::number( value );
+ TQString entryText = m_uiCurrentHostSelection + TQString::fromLatin1(":") + 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, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
netConf->hostList->changeItem( entryText, netConf->hostList->currentItem() );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
}
void IRCProtocol::slotUpdateNetworkHostConfig()
@@ -891,9 +891,9 @@ void IRCProtocol::slotUpdateNetworkHostConfig()
{
netConf->host->setText( host->host );
netConf->password->setText( host->password );
- disconnect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
+ disconnect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
netConf->port->setValue( host->port );
- connect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
+ connect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
netConf->useSSL->setChecked( host->ssl );
netConf->upButton->setEnabled( netConf->hostList->currentItem() > 0 );
@@ -902,29 +902,29 @@ void IRCProtocol::slotUpdateNetworkHostConfig()
}
else
{
- m_uiCurrentHostSelection = QString();
- disconnect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
+ m_uiCurrentHostSelection = TQString();
+ disconnect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
netConf->host->clear();
netConf->password->clear();
netConf->port->setValue( 6667 );
netConf->useSSL->setChecked( false );
- connect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) );
+ connect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) );
}
}
void IRCProtocol::slotDeleteNetwork()
{
- QString network = netConf->networkList->currentText();
+ TQString network = netConf->networkList->currentText();
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"), QString::fromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue )
+ KGuiItem(i18n("&Delete Network"),"editdelete"), TQString::fromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue )
{
- disconnect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ disconnect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
IRCNetwork *net = m_networks[ network ];
- for( QValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
+ for( TQValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
{
m_hosts.remove( (*it)->host );
delete (*it);
@@ -932,8 +932,8 @@ void IRCProtocol::slotDeleteNetwork()
m_networks.remove( network );
delete net;
netConf->networkList->removeItem( netConf->networkList->currentItem() );
- connect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
slotUpdateNetworkHostConfig();
}
@@ -941,20 +941,20 @@ void IRCProtocol::slotDeleteNetwork()
void IRCProtocol::slotDeleteHost()
{
- QString hostName = netConf->host->text();
+ 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"), QString::fromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue )
+ KGuiItem(i18n("&Delete Host"),"editdelete"), TQString::fromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue )
{
IRCHost *host = m_hosts[ hostName ];
if ( host )
{
- disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
- QString entryText = host->host + QString::fromLatin1(":") + QString::number(host->port);
- QListBoxItem * justAdded = netConf->hostList->findItem( entryText );
+ disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
+ TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port);
+ TQListBoxItem * justAdded = netConf->hostList->findItem( entryText );
netConf->hostList->removeItem( netConf->hostList->index( justAdded ) );
- connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) );
+ connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
// remove from network as well
IRCNetwork *net = m_networks[ m_uiCurrentNetworkSelection ];
@@ -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)
- QString netName = QString::fromLatin1( "New Network" );
+ TQString netName = TQString::fromLatin1( "New Network" );
if ( m_networks.find( netName ) )
{
int newIdx = 1;
do {
- netName = QString::fromLatin1( "New Network #%1" ).arg( newIdx++ );
+ netName = TQString::fromLatin1( "New Network #%1" ).arg( newIdx++ );
}
while ( m_networks.find( netName ) && newIdx < 100 );
if ( newIdx == 100 ) // pathological case
@@ -986,7 +986,7 @@ void IRCProtocol::slotNewNetwork()
// and add it to the networks dict and list
m_networks.insert( net->name, net );
netConf->networkList->insertItem( net->name );
- QListBoxItem * justAdded = netConf->networkList->findItem( net->name );
+ TQListBoxItem * justAdded = netConf->networkList->findItem( net->name );
netConf->networkList->setSelected( justAdded, true );
netConf->networkList->setBottomItem( netConf->networkList->index( justAdded ) );
}
@@ -997,10 +997,10 @@ void IRCProtocol::slotNewHost()
IRCHost *host = new IRCHost;
// prompt for a name
bool ok;
- QString name = KInputDialog::getText(
+ TQString name = KInputDialog::getText(
i18n("New Host"),
i18n("Enter the hostname of the new server:"),
- QString::null, &ok, Kopete::UI::Global::mainWidget() );
+ TQString::null, &ok, Kopete::UI::Global::mainWidget() );
if ( ok )
{
// dupe check
@@ -1019,10 +1019,10 @@ void IRCProtocol::slotNewHost()
IRCNetwork *net = m_networks[ netConf->networkList->currentText() ];
net->hosts.append( host );
// add it to the gui
- QString entryText = host->host + QString::fromLatin1(":") + QString::number(host->port);
+ TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port);
netConf->hostList->insertItem( entryText );
// select it in the gui
- QListBoxItem * justAdded = netConf->hostList->findItem( entryText );
+ TQListBoxItem * justAdded = netConf->hostList->findItem( entryText );
netConf->hostList->setSelected( justAdded, true );
//netConf->hostList->setBottomItem( netConf->hostList->index( justAdded ) );
}
@@ -1035,7 +1035,7 @@ void IRCProtocol::slotRenameNetwork()
{
bool ok;
// popup up a dialog containing the current name
- QString name = KInputDialog::getText(
+ TQString name = KInputDialog::getText(
i18n("Rename Network"),
i18n("Enter the new name for this network:"),
m_uiCurrentNetworkSelection, &ok,
@@ -1078,43 +1078,43 @@ void IRCProtocol::slotSaveNetworkConfig()
kdDebug( 14120 ) << k_funcinfo << m_uiCurrentHostSelection << endl;
storeCurrentHost();
- QDomDocument doc("irc-networks");
- QDomNode root = doc.appendChild( doc.createElement("networks") );
+ TQDomDocument doc("irc-networks");
+ TQDomNode root = doc.appendChild( doc.createElement("networks") );
- for( QDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it )
+ for( TQDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it )
{
IRCNetwork *net = it.current();
- QDomNode networkNode = root.appendChild( doc.createElement("network") );
- QDomNode nameNode = networkNode.appendChild( doc.createElement("name") );
+ TQDomNode networkNode = root.appendChild( doc.createElement("network") );
+ TQDomNode nameNode = networkNode.appendChild( doc.createElement("name") );
nameNode.appendChild( doc.createTextNode( net->name ) );
- QDomNode descNode = networkNode.appendChild( doc.createElement("description") );
+ TQDomNode descNode = networkNode.appendChild( doc.createElement("description") );
descNode.appendChild( doc.createTextNode( net->description ) );
- QDomNode serversNode = networkNode.appendChild( doc.createElement("servers") );
+ TQDomNode serversNode = networkNode.appendChild( doc.createElement("servers") );
- for( QValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 )
+ for( TQValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 )
{
- QDomNode serverNode = serversNode.appendChild( doc.createElement("server") );
+ TQDomNode serverNode = serversNode.appendChild( doc.createElement("server") );
- QDomNode hostNode = serverNode.appendChild( doc.createElement("host") );
+ TQDomNode hostNode = serverNode.appendChild( doc.createElement("host") );
hostNode.appendChild( doc.createTextNode( (*it2)->host ) );
- QDomNode portNode = serverNode.appendChild( doc.createElement("port" ) );
- portNode.appendChild( doc.createTextNode( QString::number( (*it2)->port ) ) );
+ TQDomNode portNode = serverNode.appendChild( doc.createElement("port" ) );
+ portNode.appendChild( doc.createTextNode( TQString::number( (*it2)->port ) ) );
- QDomNode sslNode = serverNode.appendChild( doc.createElement("useSSL") );
+ TQDomNode sslNode = serverNode.appendChild( doc.createElement("useSSL") );
sslNode.appendChild( doc.createTextNode( (*it2)->ssl ? "true" : "false" ) );
}
}
// kdDebug(14121) << k_funcinfo << doc.toString(4) << endl;
- QFile xmlFile( locateLocal( "appdata", "ircnetworks.xml" ) );
+ TQFile xmlFile( locateLocal( "appdata", "ircnetworks.xml" ) );
if (xmlFile.open(IO_WriteOnly))
{
- QTextStream stream(&xmlFile);
+ TQTextStream stream(&xmlFile);
stream << doc.toString(4);
xmlFile.close();
}
@@ -1130,17 +1130,17 @@ void IRCProtocol::slotReadNetworks()
m_networks.clear();
m_hosts.clear();
- QFile xmlFile( locate( "appdata", "ircnetworks.xml" ) );
+ TQFile xmlFile( locate( "appdata", "ircnetworks.xml" ) );
xmlFile.open( IO_ReadOnly );
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &xmlFile );
- QDomElement networkNode = doc.documentElement().firstChild().toElement();
+ TQDomElement networkNode = doc.documentElement().firstChild().toElement();
while( !networkNode.isNull () )
{
IRCNetwork *net = new IRCNetwork;
- QDomElement networkChild = networkNode.firstChild().toElement();
+ TQDomElement networkChild = networkNode.firstChild().toElement();
while( !networkChild.isNull() )
{
if( networkChild.tagName() == "name" )
@@ -1149,12 +1149,12 @@ void IRCProtocol::slotReadNetworks()
net->description = networkChild.text();
else if( networkChild.tagName() == "servers" )
{
- QDomElement server = networkChild.firstChild().toElement();
+ TQDomElement server = networkChild.firstChild().toElement();
while( !server.isNull() )
{
IRCHost *host = new IRCHost;
- QDomElement serverChild = server.firstChild().toElement();
+ TQDomElement serverChild = server.firstChild().toElement();
while( !serverChild.isNull() )
{
if( serverChild.tagName() == "host" )
@@ -1190,10 +1190,10 @@ void IRCProtocol::slotMoveServerUp()
if( !selectedNetwork || !selectedHost )
return;
- QValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
+ TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
if( pos != selectedNetwork->hosts.begin() )
{
- QValueList<IRCHost*>::iterator lastPos = pos;
+ TQValueList<IRCHost*>::iterator lastPos = pos;
lastPos--;
selectedNetwork->hosts.insert( lastPos, selectedHost );
selectedNetwork->hosts.remove( pos );
@@ -1203,7 +1203,7 @@ void IRCProtocol::slotMoveServerUp()
if( currentPos > 0 )
{
netConf->hostList->removeItem( currentPos );
- QString entryText = selectedHost->host + QString::fromLatin1(":") + QString::number( selectedHost->port );
+ TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port );
netConf->hostList->insertItem( entryText, --currentPos );
netConf->hostList->setSelected( currentPos, true );
}
@@ -1217,10 +1217,10 @@ void IRCProtocol::slotMoveServerDown()
if( !selectedNetwork || !selectedHost )
return;
- QValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
+ TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
if( *pos != selectedNetwork->hosts.back() )
{
- QValueList<IRCHost*>::iterator nextPos = selectedNetwork->hosts.remove( pos );
+ TQValueList<IRCHost*>::iterator nextPos = selectedNetwork->hosts.remove( pos );
selectedNetwork->hosts.insert( ++nextPos, selectedHost );
}
@@ -1228,7 +1228,7 @@ void IRCProtocol::slotMoveServerDown()
if( currentPos < ( netConf->hostList->count() - 1 ) )
{
netConf->hostList->removeItem( currentPos );
- QString entryText = selectedHost->host + QString::fromLatin1(":") + QString::number( selectedHost->port );
+ TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port );
netConf->hostList->insertItem( entryText, ++currentPos );
netConf->hostList->setSelected( currentPos, true );
}