summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/irc')
-rw-r--r--kopete/protocols/irc/ircaccount.cpp224
-rw-r--r--kopete/protocols/irc/ircaccount.h108
-rw-r--r--kopete/protocols/irc/ircaddcontactpage.cpp30
-rw-r--r--kopete/protocols/irc/ircaddcontactpage.h6
-rw-r--r--kopete/protocols/irc/ircchannelcontact.cpp122
-rw-r--r--kopete/protocols/irc/ircchannelcontact.h60
-rw-r--r--kopete/protocols/irc/irccontact.cpp134
-rw-r--r--kopete/protocols/irc/irccontact.h38
-rw-r--r--kopete/protocols/irc/irccontactmanager.cpp90
-rw-r--r--kopete/protocols/irc/irccontactmanager.h48
-rw-r--r--kopete/protocols/irc/ircguiclient.cpp18
-rw-r--r--kopete/protocols/irc/ircguiclient.h6
-rw-r--r--kopete/protocols/irc/ircprotocol.cpp488
-rw-r--r--kopete/protocols/irc/ircprotocol.h86
-rw-r--r--kopete/protocols/irc/ircservercontact.cpp64
-rw-r--r--kopete/protocols/irc/ircservercontact.h22
-rw-r--r--kopete/protocols/irc/ircsignalhandler.cpp88
-rw-r--r--kopete/protocols/irc/ircsignalhandler.h100
-rw-r--r--kopete/protocols/irc/irctransferhandler.cpp36
-rw-r--r--kopete/protocols/irc/irctransferhandler.h6
-rw-r--r--kopete/protocols/irc/ircusercontact.cpp146
-rw-r--r--kopete/protocols/irc/ircusercontact.h52
-rw-r--r--kopete/protocols/irc/kcodecaction.cpp38
-rw-r--r--kopete/protocols/irc/kcodecaction.h14
-rw-r--r--kopete/protocols/irc/ksparser.cpp96
-rw-r--r--kopete/protocols/irc/ksparser.h38
-rw-r--r--kopete/protocols/irc/libkirc/kircengine.cpp110
-rw-r--r--kopete/protocols/irc/libkirc/kircengine.h336
-rw-r--r--kopete/protocols/irc/libkirc/kircengine_commands.cpp102
-rw-r--r--kopete/protocols/irc/libkirc/kircengine_ctcp.cpp134
-rw-r--r--kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp132
-rw-r--r--kopete/protocols/irc/libkirc/kircentity.cpp34
-rw-r--r--kopete/protocols/irc/libkirc/kircentity.h52
-rw-r--r--kopete/protocols/irc/libkirc/kircmessage.cpp118
-rw-r--r--kopete/protocols/irc/libkirc/kircmessage.h84
-rw-r--r--kopete/protocols/irc/libkirc/kircmessageredirector.cpp16
-rw-r--r--kopete/protocols/irc/libkirc/kircmessageredirector.h24
-rw-r--r--kopete/protocols/irc/libkirc/kirctransfer.cpp100
-rw-r--r--kopete/protocols/irc/libkirc/kirctransfer.h58
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferhandler.cpp22
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferhandler.h24
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferserver.cpp44
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferserver.h16
-rw-r--r--kopete/protocols/irc/libkirc/ksslsocket.cpp82
-rw-r--r--kopete/protocols/irc/libkirc/ksslsocket.h12
-rw-r--r--kopete/protocols/irc/ui/channellist.cpp166
-rw-r--r--kopete/protocols/irc/ui/channellist.h38
-rw-r--r--kopete/protocols/irc/ui/channellistdialog.cpp16
-rw-r--r--kopete/protocols/irc/ui/channellistdialog.h4
-rw-r--r--kopete/protocols/irc/ui/irceditaccountwidget.cpp116
-rw-r--r--kopete/protocols/irc/ui/irceditaccountwidget.h12
-rw-r--r--kopete/protocols/irc/ui/networkconfig.ui.h4
52 files changed, 2007 insertions, 2007 deletions
diff --git a/kopete/protocols/irc/ircaccount.cpp b/kopete/protocols/irc/ircaccount.cpp
index 1a1bf75f..09d0db3c 100644
--- a/kopete/protocols/irc/ircaccount.cpp
+++ b/kopete/protocols/irc/ircaccount.cpp
@@ -54,16 +54,16 @@
#include <knotifyclient.h>
#include <kpopupmenu.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
-const QString IRCAccount::CONFIG_CODECMIB = QString::fromLatin1("Codec");
-const QString IRCAccount::CONFIG_NETWORKNAME = QString::fromLatin1("NetworkName");
-const QString IRCAccount::CONFIG_NICKNAME = QString::fromLatin1("NickName");
-const QString IRCAccount::CONFIG_USERNAME = QString::fromLatin1("UserName");
-const QString IRCAccount::CONFIG_REALNAME = QString::fromLatin1("RealName");
+const TQString IRCAccount::CONFIG_CODECMIB = TQString::fromLatin1("Codec");
+const TQString IRCAccount::CONFIG_NETWORKNAME = TQString::fromLatin1("NetworkName");
+const TQString IRCAccount::CONFIG_NICKNAME = TQString::fromLatin1("NickName");
+const TQString IRCAccount::CONFIG_USERNAME = TQString::fromLatin1("UserName");
+const TQString IRCAccount::CONFIG_REALNAME = TQString::fromLatin1("RealName");
-IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QString &autoChan, const QString& netName, const QString &nickName)
+IRCAccount::IRCAccount(IRCProtocol *protocol, const TQString &accountId, const TQString &autoChan, const TQString& netName, const TQString &nickName)
: Kopete::PasswordedAccount(protocol, accountId, 0, true), autoConnect( autoChan ), commandSource(0)
{
m_manager = 0L;
@@ -75,49 +75,49 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS
m_contactManager = 0;
m_engine = new KIRC::Engine(this);
- QMap< QString, QString> replies = customCtcpReplies();
- for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
+ TQMap< TQString, TQString> replies = customCtcpReplies();
+ for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
m_engine->addCustomCtcp( it.key(), it.data() );
- QString version=i18n("Kopete IRC Plugin %1 [http://kopete.kde.org]").arg(kapp->aboutData()->version());
+ TQString version=i18n("Kopete IRC Plugin %1 [http://kopete.kde.org]").arg(kapp->aboutData()->version());
m_engine->setVersionString( version );
- QObject::connect(m_engine, SIGNAL(successfullyChangedNick(const QString &, const QString &)),
- this, SLOT(successfullyChangedNick(const QString &, const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)),
+ this, TQT_SLOT(successfullyChangedNick(const TQString &, const TQString &)));
- QObject::connect(m_engine, SIGNAL(incomingFailedServerPassword()),
- this, SLOT(slotFailedServerPassword()));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingFailedServerPassword()),
+ this, TQT_SLOT(slotFailedServerPassword()));
- QObject::connect(m_engine, SIGNAL(incomingNickInUse(const QString &)),
- this, SLOT(slotNickInUseAlert( const QString &)) );
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingNickInUse(const TQString &)),
+ this, TQT_SLOT(slotNickInUseAlert( const TQString &)) );
- QObject::connect(m_engine, SIGNAL(incomingFailedNickOnLogin(const QString &)),
- this, SLOT(slotNickInUse( const QString &)) );
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingFailedNickOnLogin(const TQString &)),
+ this, TQT_SLOT(slotNickInUse( const TQString &)) );
- QObject::connect(m_engine, SIGNAL(incomingJoinedChannel(const QString &, const QString &)),
- this, SLOT(slotJoinedUnknownChannel(const QString &, const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingJoinedChannel(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotJoinedUnknownChannel(const TQString &, const TQString &)));
- QObject::connect(m_engine, SIGNAL(incomingCtcpReply(const QString &, const QString &, const QString &)),
- this, SLOT( slotNewCtcpReply(const QString&, const QString &, const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingCtcpReply(const TQString &, const TQString &, const TQString &)),
+ this, TQT_SLOT( slotNewCtcpReply(const TQString&, const TQString &, const TQString &)));
- QObject::connect(m_engine, SIGNAL(statusChanged(KIRC::Engine::Status)),
- this, SLOT(engineStatusChanged(KIRC::Engine::Status)));
+ TQObject::connect(m_engine, TQT_SIGNAL(statusChanged(KIRC::Engine::Status)),
+ this, TQT_SLOT(engineStatusChanged(KIRC::Engine::Status)));
- QObject::connect(m_engine, SIGNAL(incomingServerLoadTooHigh()),
- this, SLOT(slotServerBusy()));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingServerLoadTooHigh()),
+ this, TQT_SLOT(slotServerBusy()));
- QObject::connect(m_engine, SIGNAL(incomingNoSuchNickname(const QString &)),
- this, SLOT(slotNoSuchNickname(const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingNoSuchNickname(const TQString &)),
+ this, TQT_SLOT(slotNoSuchNickname(const TQString &)));
mAwayAction = new Kopete::AwayAction ( i18n("Set Away"),
m_protocol->m_UserStatusAway.iconFor( this ), 0, this,
- SLOT(slotGoAway( const QString & )), this );
+ TQT_SLOT(slotGoAway( const TQString & )), this );
currentHost = 0;
KConfigGroup *config = configGroup();
- QString networkName = netName;
+ TQString networkName = netName;
if (networkName.isNull())
networkName = config->readEntry(CONFIG_NETWORKNAME);
@@ -126,7 +126,7 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS
else
mNickName = config->readEntry(CONFIG_NICKNAME);
- QString codecMib = config->readEntry(CONFIG_CODECMIB);
+ TQString codecMib = config->readEntry(CONFIG_CODECMIB);
// int codecMib = config->readNumEntry(CONFIG_CODECMIB, UTF-8);
m_serverNotices = (MessageDestination)config->readNumEntry( "ServerNotices", ServerWindow );
@@ -137,25 +137,25 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS
if( !codecMib.isEmpty() )
{
- mCodec = QTextCodec::codecForMib( codecMib.toInt() );
+ mCodec = TQTextCodec::codecForMib( codecMib.toInt() );
m_engine->setDefaultCodec( mCodec );
}
else
mCodec = 0;
- QString m_accountId = this->accountId();
- if( networkName.isEmpty() && QRegExp( "[^#+&\\s]+@[\\w-\\.]+:\\d+" ).exactMatch( m_accountId ) )
+ TQString m_accountId = this->accountId();
+ if( networkName.isEmpty() && TQRegExp( "[^#+&\\s]+@[\\w-\\.]+:\\d+" ).exactMatch( m_accountId ) )
{
kdDebug(14120) << "Creating account from " << m_accountId << endl;
mNickName = m_accountId.section('@',0,0);
- QString serverInfo = m_accountId.section('@',1);
- QString hostName = serverInfo.section(':',0,0);
+ TQString serverInfo = m_accountId.section('@',1);
+ TQString hostName = serverInfo.section(':',0,0);
- for( QDictIterator<IRCNetwork> it( m_protocol->networks() ); it.current(); ++it )
+ for( TQDictIterator<IRCNetwork> it( m_protocol->networks() ); it.current(); ++it )
{
IRCNetwork *net = it.current();
- 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 )
{
if( (*it2)->host == hostName )
{
@@ -204,13 +204,13 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS
m_contactManager = new IRCContactManager(mNickName, this);
setMyself( m_contactManager->mySelf() );
- setAccountLabel( QString::fromLatin1("%1@%2").arg(mNickName,networkName) );
+ setAccountLabel( TQString::fromLatin1("%1@%2").arg(mNickName,networkName) );
m_myServer = m_contactManager->myServer();
- m_joinChannelAction = new KAction ( i18n("Join Channel..."), QString::null, 0, this,
- SLOT(slotJoinChannel()), this);
- m_searchChannelAction = new KAction ( i18n("Search Channels..."), QString::null, 0, this,
- SLOT(slotSearchChannels()), this);
+ m_joinChannelAction = new KAction ( i18n("Join Channel..."), TQString::null, 0, this,
+ TQT_SLOT(slotJoinChannel()), this);
+ m_searchChannelAction = new KAction ( i18n("Search Channels..."), TQString::null, 0, this,
+ TQT_SLOT(slotSearchChannels()), this);
}
IRCAccount::~IRCAccount()
@@ -219,12 +219,12 @@ IRCAccount::~IRCAccount()
m_engine->quit(i18n("Plugin Unloaded"), true);
}
-void IRCAccount::slotNickInUse( const QString &nick )
+void IRCAccount::slotNickInUse( const TQString &nick )
{
- QString altNickName = altNick();
+ TQString altNickName = altNick();
if( triedAltNick || altNickName.isEmpty() )
{
- QString newNick = KInputDialog::getText(
+ TQString newNick = KInputDialog::getText(
i18n("IRC Plugin"),
i18n("The nickname %1 is already in use. Please enter an alternate nickname:").arg(nick),
nick);
@@ -241,28 +241,28 @@ void IRCAccount::slotNickInUse( const QString &nick )
}
}
-void IRCAccount::slotNickInUseAlert( const QString &nick )
+void IRCAccount::slotNickInUseAlert( const TQString &nick )
{
KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("The nickname %1 is already in use").arg(nick), i18n("IRC Plugin"));
}
-void IRCAccount::setAltNick( const QString &altNick )
+void IRCAccount::setAltNick( const TQString &altNick )
{
- configGroup()->writeEntry(QString::fromLatin1( "altNick" ), altNick);
+ configGroup()->writeEntry(TQString::fromLatin1( "altNick" ), altNick);
}
-const QString IRCAccount::altNick() const
+const TQString IRCAccount::altNick() const
{
- return configGroup()->readEntry(QString::fromLatin1("altNick"));
+ return configGroup()->readEntry(TQString::fromLatin1("altNick"));
}
void IRCAccount::setAutoShowServerWindow( bool show )
{
autoShowServerWindow = show;
- configGroup()->writeEntry(QString::fromLatin1( "AutoShowServerWindow" ), autoShowServerWindow);
+ configGroup()->writeEntry(TQString::fromLatin1( "AutoShowServerWindow" ), autoShowServerWindow);
}
-const QString IRCAccount::networkName() const
+const TQString IRCAccount::networkName() const
{
if( m_network )
return m_network->name;
@@ -270,29 +270,29 @@ const QString IRCAccount::networkName() const
return i18n("Unknown");
}
-void IRCAccount::setUserName( const QString &userName )
+void IRCAccount::setUserName( const TQString &userName )
{
m_engine->setUserName(userName);
configGroup()->writeEntry(CONFIG_USERNAME, userName);
}
-const QString IRCAccount::userName() const
+const TQString IRCAccount::userName() const
{
return configGroup()->readEntry(CONFIG_USERNAME);
}
-void IRCAccount::setRealName( const QString &userName )
+void IRCAccount::setRealName( const TQString &userName )
{
m_engine->setRealName(userName);
configGroup()->writeEntry(CONFIG_REALNAME, userName);
}
-const QString IRCAccount::realName() const
+const TQString IRCAccount::realName() const
{
return configGroup()->readEntry(CONFIG_REALNAME);
}
-void IRCAccount::setNetwork( const QString &network )
+void IRCAccount::setNetwork( const TQString &network )
{
IRCNetwork *net = m_protocol->networks()[ network ];
if( net )
@@ -311,7 +311,7 @@ void IRCAccount::setNetwork( const QString &network )
}
}
-void IRCAccount::setNickName( const QString &nick )
+void IRCAccount::setNickName( const TQString &nick )
{
mNickName = nick;
configGroup()->writeEntry(CONFIG_NICKNAME, mNickName);
@@ -321,7 +321,7 @@ void IRCAccount::setNickName( const QString &nick )
}
// FIXME: Possible null pointer usage here
-void IRCAccount::setCodec( QTextCodec *codec )
+void IRCAccount::setCodec( TQTextCodec *codec )
{
mCodec = codec;
configGroup()->writeEntry(CONFIG_CODECMIB, codec->mibEnum());
@@ -330,71 +330,71 @@ void IRCAccount::setCodec( QTextCodec *codec )
m_engine->setDefaultCodec( mCodec );
}
-QTextCodec *IRCAccount::codec() const
+TQTextCodec *IRCAccount::codec() const
{
return mCodec;
}
// FIXME: Move this to a dictionnary
-void IRCAccount::setDefaultPart( const QString &defaultPart )
+void IRCAccount::setDefaultPart( const TQString &defaultPart )
{
- configGroup()->writeEntry( QString::fromLatin1( "defaultPart" ), defaultPart );
+ configGroup()->writeEntry( TQString::fromLatin1( "defaultPart" ), defaultPart );
}
// FIXME: Move this to a dictionnary
-void IRCAccount::setDefaultQuit( const QString &defaultQuit )
+void IRCAccount::setDefaultQuit( const TQString &defaultQuit )
{
- configGroup()->writeEntry( QString::fromLatin1( "defaultQuit" ), defaultQuit );
+ configGroup()->writeEntry( TQString::fromLatin1( "defaultQuit" ), defaultQuit );
}
// FIXME: Move this to a dictionnary
-const QString IRCAccount::defaultPart() const
+const TQString IRCAccount::defaultPart() const
{
- QString partMsg = configGroup()->readEntry(QString::fromLatin1("defaultPart"));
+ TQString partMsg = configGroup()->readEntry(TQString::fromLatin1("defaultPart"));
if( partMsg.isEmpty() )
- return QString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg( kapp->aboutData()->version() );
+ return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg( kapp->aboutData()->version() );
return partMsg;
}
-const QString IRCAccount::defaultQuit() const
+const TQString IRCAccount::defaultQuit() const
{
- QString quitMsg = configGroup()->readEntry(QString::fromLatin1("defaultQuit"));
+ TQString quitMsg = configGroup()->readEntry(TQString::fromLatin1("defaultQuit"));
if( quitMsg.isEmpty() )
- return QString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg(kapp->aboutData()->version());
+ return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg(kapp->aboutData()->version());
return quitMsg;
}
-void IRCAccount::setCustomCtcpReplies( const QMap< QString, QString > &replies ) const
+void IRCAccount::setCustomCtcpReplies( const TQMap< TQString, TQString > &replies ) const
{
- QStringList val;
- for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
+ TQStringList val;
+ for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
{
m_engine->addCustomCtcp( it.key(), it.data() );
- val.append( QString::fromLatin1("%1=%2").arg( it.key() ).arg( it.data() ) );
+ val.append( TQString::fromLatin1("%1=%2").arg( it.key() ).arg( it.data() ) );
}
configGroup()->writeEntry( "CustomCtcp", val );
}
-const QMap< QString, QString > IRCAccount::customCtcpReplies() const
+const TQMap< TQString, TQString > IRCAccount::customCtcpReplies() const
{
- QMap< QString, QString > replies;
- QStringList replyList;
+ TQMap< TQString, TQString > replies;
+ TQStringList replyList;
replyList = configGroup()->readListEntry( "CustomCtcp" );
- for( QStringList::Iterator it = replyList.begin(); it != replyList.end(); ++it )
+ for( TQStringList::Iterator it = replyList.begin(); it != replyList.end(); ++it )
replies[ (*it).section('=', 0, 0 ) ] = (*it).section('=', 1 );
return replies;
}
-void IRCAccount::setConnectCommands( const QStringList &commands ) const
+void IRCAccount::setConnectCommands( const TQStringList &commands ) const
{
configGroup()->writeEntry( "ConnectCommands", commands );
}
-const QStringList IRCAccount::connectCommands() const
+const TQStringList IRCAccount::connectCommands() const
{
return configGroup()->readListEntry( "ConnectCommands" );
}
@@ -416,7 +416,7 @@ void IRCAccount::setMessageDestinations( int serverNotices, int serverMessages,
KActionMenu *IRCAccount::actionMenu()
{
- QString menuTitle = QString::fromLatin1( " %1 <%2> " ).arg( accountId() ).arg( myself()->onlineStatus().description() );
+ TQString menuTitle = TQString::fromLatin1( " %1 <%2> " ).arg( accountId() ).arg( myself()->onlineStatus().description() );
KActionMenu *mActionMenu = Kopete::Account::actionMenu();
@@ -426,18 +426,18 @@ KActionMenu *IRCAccount::actionMenu()
mActionMenu->popupMenu()->insertSeparator();
mActionMenu->insert(m_joinChannelAction);
mActionMenu->insert(m_searchChannelAction);
- mActionMenu->insert( new KAction ( i18n("Show Server Window"), QString::null, 0, this, SLOT(slotShowServerWindow()), mActionMenu ) );
+ mActionMenu->insert( new KAction ( i18n("Show Server Window"), TQString::null, 0, this, TQT_SLOT(slotShowServerWindow()), mActionMenu ) );
if( m_engine->isConnected() && m_engine->useSSL() )
{
mActionMenu->insert( new KAction ( i18n("Show Security Information"), "", 0, m_engine,
- SLOT(showInfoDialog()), mActionMenu ) );
+ TQT_SLOT(showInfoDialog()), mActionMenu ) );
}
return mActionMenu;
}
-void IRCAccount::connectWithPassword(const QString &password)
+void IRCAccount::connectWithPassword(const TQString &password)
{
//TODO: honor the initial status
@@ -450,7 +450,7 @@ void IRCAccount::connectWithPassword(const QString &password)
{
if( m_network )
{
- QValueList<IRCHost*> &hosts = m_network->hosts;
+ TQValueList<IRCHost*> &hosts = m_network->hosts;
if( hosts.count() == 0 )
{
KMessageBox::queuedMessageBox(
@@ -472,7 +472,7 @@ void IRCAccount::connectWithPassword(const QString &password)
// if prefer SSL is set, sort by SSL first
if (configGroup()->readBoolEntry("PreferSSL"))
{
- typedef QValueList<IRCHost*> IRCHostList;
+ typedef TQValueList<IRCHost*> IRCHostList;
IRCHostList sslFirst;
IRCHostList::iterator it;
for ( it = hosts.begin(); it != hosts.end(); ++it )
@@ -534,7 +534,7 @@ void IRCAccount::engineStatusChanged(KIRC::Engine::Status newStatus)
// after the 001 is sent, you need to wait until all the init junk is done.
// Unfortunatly, there is no way for us to know when it is done (it could be
// spewing out any number of replies), so just try delaying it
- QTimer::singleShot( 250, this, SLOT( slotPerformOnConnectCommands() ) );
+ TQTimer::singleShot( 250, this, TQT_SLOT( slotPerformOnConnectCommands() ) );
}
break;
case KIRC::Engine::Closing:
@@ -563,14 +563,14 @@ void IRCAccount::slotPerformOnConnectCommands()
return;
if (!autoConnect.isEmpty())
- Kopete::CommandHandler::commandHandler()->processMessage( QString::fromLatin1("/join %1").arg(autoConnect), manager);
+ Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/join %1").arg(autoConnect), manager);
- QStringList commands(connectCommands());
- for (QStringList::Iterator it=commands.begin(); it != commands.end(); ++it)
+ TQStringList commands(connectCommands());
+ for (TQStringList::Iterator it=commands.begin(); it != commands.end(); ++it)
Kopete::CommandHandler::commandHandler()->processMessage(*it, manager);
}
-void IRCAccount::slotJoinedUnknownChannel(const QString &channel, const QString &nick)
+void IRCAccount::slotJoinedUnknownChannel(const TQString &channel, const TQString &nick)
{
if ( nick.lower() == m_contactManager->mySelf()->nickName().lower() )
{
@@ -598,7 +598,7 @@ void IRCAccount::slotSearchChannels()
{
m_channelList = new ChannelListDialog( m_engine,
i18n("Channel List for %1").arg( m_engine->currentHost() ), this,
- SLOT( slotJoinNamedChannel( const QString & ) ) );
+ TQT_SLOT( slotJoinNamedChannel( const TQString & ) ) );
}
else
m_channelList->clear();
@@ -612,7 +612,7 @@ void IRCAccount::listChannels()
m_channelList->search();
}
-void IRCAccount::quit( const QString &quitMessage )
+void IRCAccount::quit( const TQString &quitMessage )
{
kdDebug(14120) << "Quitting IRC: " << quitMessage << endl;
@@ -622,7 +622,7 @@ void IRCAccount::quit( const QString &quitMessage )
m_engine->quit( quitMessage );
}
-void IRCAccount::setAway(bool isAway, const QString &awayMessage)
+void IRCAccount::setAway(bool isAway, const TQString &awayMessage)
{
kdDebug(14120) << k_funcinfo << isAway << " " << awayMessage << endl;
if(m_engine->isConnected())
@@ -641,7 +641,7 @@ void IRCAccount::slotFailedServerPassword()
password().setWrong();
connect();
}
-void IRCAccount::slotGoAway( const QString &reason )
+void IRCAccount::slotGoAway( const TQString &reason )
{
setAway( true, reason );
}
@@ -657,7 +657,7 @@ bool IRCAccount::isConnected()
return m_engine->isConnected();
}
-void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason )
+void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason )
{
if ( status.status() == Kopete::OnlineStatus::Online &&
myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline )
@@ -672,7 +672,7 @@ void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QSt
}
-void IRCAccount::successfullyChangedNick(const QString &oldnick, const QString &newnick)
+void IRCAccount::successfullyChangedNick(const TQString &oldnick, const TQString &newnick)
{
kdDebug(14120) << k_funcinfo << "Changing nick to " << newnick << endl;
mNickName = newnick;
@@ -681,7 +681,7 @@ void IRCAccount::successfullyChangedNick(const QString &oldnick, const QString &
m_contactManager->addToNotifyList( newnick );
}
-bool IRCAccount::createContact( const QString &contactId, Kopete::MetaContact *m )
+bool IRCAccount::createContact( const TQString &contactId, Kopete::MetaContact *m )
{
kdDebug(14120) << k_funcinfo << contactManager() << endl;
IRCContact *c;
@@ -700,7 +700,7 @@ bool IRCAccount::createContact( const QString &contactId, Kopete::MetaContact *m
return false;
}
- else if (contactId.startsWith(QString::fromLatin1("#")))
+ else if (contactId.startsWith(TQString::fromLatin1("#")))
{
c = static_cast<IRCContact*>(contactManager()->findChannel(contactId, m));
}
@@ -724,7 +724,7 @@ bool IRCAccount::createContact( const QString &contactId, Kopete::MetaContact *m
return true;
}
-void IRCAccount::slotJoinNamedChannel(const QString &chan)
+void IRCAccount::slotJoinNamedChannel(const TQString &chan)
{
contactManager()->findChannel(chan)->startChat();
}
@@ -744,12 +744,12 @@ void IRCAccount::slotJoinChannel()
if (!isConnected())
return;
- QStringList chans = configGroup()->readListEntry( "Recent Channel list" );
+ TQStringList chans = configGroup()->readListEntry( "Recent Channel list" );
//kdDebug(14120) << "Recent channel list from config: " << chans << endl;
KLineEditDlg dlg(
i18n("Please enter name of the channel you want to join:"),
- QString::null,
+ TQString::null,
Kopete::UI::Global::mainWidget()
);
@@ -761,10 +761,10 @@ void IRCAccount::slotJoinChannel()
while( true )
{
- if( dlg.exec() != QDialog::Accepted )
+ if( dlg.exec() != TQDialog::Accepted )
break;
- QString chan = dlg.text();
+ TQString chan = dlg.text();
if( chan.isNull() )
break;
@@ -787,12 +787,12 @@ void IRCAccount::slotJoinChannel()
}
}
-void IRCAccount::slotNewCtcpReply(const QString &type, const QString &/*target*/, const QString &messageReceived)
+void IRCAccount::slotNewCtcpReply(const TQString &type, const TQString &/*target*/, const TQString &messageReceived)
{
appendMessage( i18n("CTCP %1 REPLY: %2").arg(type).arg(messageReceived), InfoReply );
}
-void IRCAccount::slotNoSuchNickname( const QString &nick )
+void IRCAccount::slotNoSuchNickname( const TQString &nick )
{
if( KIRC::Entity::isChannel(nick) )
appendMessage( i18n("The channel \"%1\" does not exist").arg(nick), UnknownReply );
@@ -800,7 +800,7 @@ void IRCAccount::slotNoSuchNickname( const QString &nick )
appendMessage( i18n("The nickname \"%1\" does not exist").arg(nick), UnknownReply );
}
-void IRCAccount::appendMessage( const QString &message, MessageType type )
+void IRCAccount::appendMessage( const TQString &message, MessageType type )
{
// TODO: Impliment a UI where people can pick multiple destinations
// for a message type, and make codethis handle it
@@ -852,7 +852,7 @@ void IRCAccount::appendMessage( const QString &message, MessageType type )
if( destination == KNotify )
{
KNotifyClient::event(
- Kopete::UI::Global::mainWidget()->winId(), QString::fromLatin1("irc_event"), message
+ Kopete::UI::Global::mainWidget()->winId(), TQString::fromLatin1("irc_event"), message
);
}
}
@@ -867,7 +867,7 @@ IRCServerContact *IRCAccount::myServer() const
return m_myServer;
}
-IRCContact *IRCAccount::getContact(const QString &name, Kopete::MetaContact *metac)
+IRCContact *IRCAccount::getContact(const TQString &name, Kopete::MetaContact *metac)
{
return getContact(m_engine->getEntity(name), metac);
}
@@ -889,7 +889,7 @@ IRCContact *IRCAccount::getContact(KIRC::EntityPtr entity, Kopete::MetaContact *
m_contacts.append(contact);
}
- QObject::connect(contact, SIGNAL(destroyed(IRCContact *)), SLOT(destroyed(IRCContact *)));
+ TQObject::connect(contact, TQT_SIGNAL(destroyed(IRCContact *)), TQT_SLOT(destroyed(IRCContact *)));
return contact;
}
diff --git a/kopete/protocols/irc/ircaccount.h b/kopete/protocols/irc/ircaccount.h
index e5917360..1aa4072e 100644
--- a/kopete/protocols/irc/ircaccount.h
+++ b/kopete/protocols/irc/ircaccount.h
@@ -27,8 +27,8 @@
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class ChannelListDialog;
@@ -53,17 +53,17 @@ class KActionMenu;
struct IRCHost
{
- QString host;
+ TQString host;
uint port;
- QString password;
+ TQString password;
bool ssl;
};
struct IRCNetwork
{
- QString name;
- QString description;
- QValueList<IRCHost*> hosts;
+ TQString name;
+ TQString description;
+ TQValueList<IRCHost*> hosts;
};
class IRCAccount
@@ -75,11 +75,11 @@ class IRCAccount
Q_OBJECT
public:
- static const QString CONFIG_CODECMIB;
- static const QString CONFIG_NETWORKNAME;
- static const QString CONFIG_NICKNAME;
- static const QString CONFIG_USERNAME;
- static const QString CONFIG_REALNAME;
+ static const TQString CONFIG_CODECMIB;
+ static const TQString CONFIG_NETWORKNAME;
+ static const TQString CONFIG_NICKNAME;
+ static const TQString CONFIG_USERNAME;
+ static const TQString CONFIG_REALNAME;
enum MessageType
{
@@ -100,69 +100,69 @@ public:
Ignore = 5
};
- IRCAccount(IRCProtocol *p, const QString &accountid, const QString &autoConnect = QString::null,
- const QString& networkName = QString::null, const QString &nickName = QString::null);
+ IRCAccount(IRCProtocol *p, const TQString &accountid, const TQString &autoConnect = TQString::null,
+ const TQString& networkName = TQString::null, const TQString &nickName = TQString::null);
virtual ~IRCAccount();
- void setNickName( const QString & );
+ void setNickName( const TQString & );
void setAutoShowServerWindow( bool show );
- void setAltNick( const QString & );
- const QString altNick() const;
+ void setAltNick( const TQString & );
+ const TQString altNick() const;
- void setUserName( const QString & );
- const QString userName() const;
+ void setUserName( const TQString & );
+ const TQString userName() const;
- void setRealName( const QString & );
- const QString realName() const;
+ void setRealName( const TQString & );
+ const TQString realName() const;
- const QStringList connectCommands() const;
+ const TQStringList connectCommands() const;
- void setConnectCommands( const QStringList & ) const;
+ void setConnectCommands( const TQStringList & ) const;
- void setDefaultPart( const QString & );
+ void setDefaultPart( const TQString & );
- void setNetwork( const QString & );
+ void setNetwork( const TQString & );
- void setDefaultQuit( const QString & );
+ void setDefaultQuit( const TQString & );
- void setCodec( QTextCodec *codec );
+ void setCodec( TQTextCodec *codec );
void setMessageDestinations( int serverNotices, int serverMessages,
int informationReplies, int errorMessages );
- QTextCodec *codec() const;
+ TQTextCodec *codec() const;
- const QString defaultPart() const;
+ const TQString defaultPart() const;
- const QString defaultQuit() const;
+ const TQString defaultQuit() const;
- const QString networkName() const;
+ const TQString networkName() const;
- QMap< QString, QString > customCtcp() const;
+ TQMap< TQString, TQString > customCtcp() const;
- void setCustomCtcpReplies( const QMap< QString, QString > &replys ) const;
+ void setCustomCtcpReplies( const TQMap< TQString, TQString > &replys ) const;
- const QMap<QString, QString> customCtcpReplies() const;
+ const TQMap<TQString, TQString> customCtcpReplies() const;
void setCurrentCommandSource( Kopete::ChatSession *session );
Kopete::ChatSession *currentCommandSource();
- IRCContact *getContact(const QString &name, Kopete::MetaContact *metac=0);
+ IRCContact *getContact(const TQString &name, Kopete::MetaContact *metac=0);
IRCContact *getContact(KIRC::EntityPtr entity, Kopete::MetaContact *metac=0);
public slots:
virtual KActionMenu *actionMenu();
- virtual void setAway( bool isAway, const QString &awayMessage = QString::null );
+ virtual void setAway( bool isAway, const TQString &awayMessage = TQString::null );
virtual bool isConnected();
/** Reimplemented from Kopete::Account */
- void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null);
+ void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null);
// Returns the KIRC engine instance
KIRC::Engine *engine() const { return m_engine; }
@@ -178,19 +178,19 @@ public slots:
// Returns the Kopete::Contact of the server of the user
IRCServerContact *myServer() const;
- void successfullyChangedNick(const QString &, const QString &);
+ void successfullyChangedNick(const TQString &, const TQString &);
- virtual void connectWithPassword( const QString & );
+ virtual void connectWithPassword( const TQString & );
virtual void disconnect();
- void quit( const QString &quitMessage = QString::null );
+ void quit( const TQString &quitMessage = TQString::null );
void listChannels();
- void appendMessage( const QString &message, MessageType type = Default );
+ void appendMessage( const TQString &message, MessageType type = Default );
protected:
- virtual bool createContact( const QString &contactId, Kopete::MetaContact *parentContact ) ;
+ virtual bool createContact( const TQString &contactId, Kopete::MetaContact *parentContact ) ;
private slots:
void engineStatusChanged(KIRC::Engine::Status newStatus);
@@ -198,31 +198,31 @@ private slots:
void destroyed(IRCContact *contact);
void slotFailedServerPassword();
- void slotGoAway( const QString &reason );
- void slotJoinNamedChannel( const QString &channel );
+ void slotGoAway( const TQString &reason );
+ void slotJoinNamedChannel( const TQString &channel );
void slotJoinChannel();
void slotShowServerWindow();
- void slotNickInUse( const QString &nick );
- void slotNickInUseAlert( const QString &nick );
+ void slotNickInUse( const TQString &nick );
+ void slotNickInUseAlert( const TQString &nick );
void slotServerBusy();
- void slotNoSuchNickname( const QString &nick );
+ void slotNoSuchNickname( const TQString &nick );
void slotSearchChannels();
- void slotNewCtcpReply(const QString &type, const QString &target, const QString &messageReceived);
- void slotJoinedUnknownChannel( const QString &channel, const QString &nick );
+ void slotNewCtcpReply(const TQString &type, const TQString &target, const TQString &messageReceived);
+ void slotJoinedUnknownChannel( const TQString &channel, const TQString &nick );
void slotPerformOnConnectCommands();
private:
Kopete::ChatSession *m_manager;
- QString mNickName;
+ TQString mNickName;
Kopete::AwayAction *mAwayAction;
bool triedAltNick;
bool autoShowServerWindow;
- QString autoConnect;
+ TQString autoConnect;
KIRC::Engine *m_engine;
IRCNetwork *m_network;
uint currentHost;
- QTextCodec *mCodec;
+ TQTextCodec *mCodec;
MessageDestination m_serverNotices;
MessageDestination m_serverMessages;
@@ -231,11 +231,11 @@ private:
ChannelListDialog *m_channelList;
- QValueList<IRCContact *> m_contacts;
+ TQValueList<IRCContact *> m_contacts;
IRCContactManager *m_contactManager;
IRCServerContact *m_myServer;
- QMap< QString, QString > m_customCtcp;
+ TQMap< TQString, TQString > m_customCtcp;
Kopete::ChatSession *commandSource;
KAction *m_joinChannelAction;
diff --git a/kopete/protocols/irc/ircaddcontactpage.cpp b/kopete/protocols/irc/ircaddcontactpage.cpp
index db4ca3b2..6b19721c 100644
--- a/kopete/protocols/irc/ircaddcontactpage.cpp
+++ b/kopete/protocols/irc/ircaddcontactpage.cpp
@@ -23,38 +23,38 @@
#include "ircaccount.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qframe.h>
-#include <qtabwidget.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqframe.h>
+#include <tqtabwidget.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-IRCAddContactPage::IRCAddContactPage( QWidget *parent, IRCAccount *a ) : AddContactPage(parent, 0)
+IRCAddContactPage::IRCAddContactPage( TQWidget *parent, IRCAccount *a ) : AddContactPage(parent, 0)
{
- (new QVBoxLayout(this))->setAutoAdd(true);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
ircdata = new ircAddUI(this);
- mSearch = new ChannelList( (QWidget*)ircdata->hbox, a->engine() );
+ mSearch = new ChannelList( (TQWidget*)ircdata->hbox, a->engine() );
mAccount = a;
- connect( mSearch, SIGNAL( channelSelected( const QString & ) ),
- this, SLOT( slotChannelSelected( const QString & ) ) );
+ connect( mSearch, TQT_SIGNAL( channelSelected( const TQString & ) ),
+ this, TQT_SLOT( slotChannelSelected( const TQString & ) ) );
- connect( mSearch, SIGNAL( channelDoubleClicked( const QString & ) ),
- this, SLOT( slotChannelDoubleClicked( const QString & ) ) );
+ connect( mSearch, TQT_SIGNAL( channelDoubleClicked( const TQString & ) ),
+ this, TQT_SLOT( slotChannelDoubleClicked( const TQString & ) ) );
}
IRCAddContactPage::~IRCAddContactPage()
{
}
-void IRCAddContactPage::slotChannelSelected( const QString &channel )
+void IRCAddContactPage::slotChannelSelected( const TQString &channel )
{
ircdata->addID->setText( channel );
}
-void IRCAddContactPage::slotChannelDoubleClicked( const QString &channel )
+void IRCAddContactPage::slotChannelDoubleClicked( const TQString &channel )
{
ircdata->addID->setText( channel );
ircdata->tabWidget3->setCurrentPage(0);
@@ -62,13 +62,13 @@ void IRCAddContactPage::slotChannelDoubleClicked( const QString &channel )
bool IRCAddContactPage::apply(Kopete::Account *account , Kopete::MetaContact *m)
{
- QString name = ircdata->addID->text();
+ TQString name = ircdata->addID->text();
return account->addContact(name, m, Kopete::Account::ChangeKABC );
}
bool IRCAddContactPage::validateData()
{
- QString name = ircdata->addID->text();
+ TQString name = ircdata->addID->text();
if (name.isEmpty() == true)
{
KMessageBox::sorry(this, i18n("<qt>You need to specify a channel to join, or query to open.</qt>"), i18n("You Must Specify a Channel"));
diff --git a/kopete/protocols/irc/ircaddcontactpage.h b/kopete/protocols/irc/ircaddcontactpage.h
index c6b897ff..8f5a0bec 100644
--- a/kopete/protocols/irc/ircaddcontactpage.h
+++ b/kopete/protocols/irc/ircaddcontactpage.h
@@ -33,7 +33,7 @@ class IRCAddContactPage : public AddContactPage
{
Q_OBJECT
public:
- IRCAddContactPage(QWidget *parent=0, IRCAccount* account = 0);
+ IRCAddContactPage(TQWidget *parent=0, IRCAccount* account = 0);
~IRCAddContactPage();
ircAddUI *ircdata;
@@ -42,8 +42,8 @@ public slots:
private slots:
virtual bool validateData();
- void slotChannelSelected( const QString &channel );
- void slotChannelDoubleClicked( const QString &channel );
+ void slotChannelSelected( const TQString &channel );
+ void slotChannelDoubleClicked( const TQString &channel );
private:
IRCAccount *mAccount;
ChannelList *mSearch;
diff --git a/kopete/protocols/irc/ircchannelcontact.cpp b/kopete/protocols/irc/ircchannelcontact.cpp
index cc99acf3..cab2748b 100644
--- a/kopete/protocols/irc/ircchannelcontact.cpp
+++ b/kopete/protocols/irc/ircchannelcontact.cpp
@@ -37,33 +37,33 @@
#include <kglobal.h>
#include <kmessagebox.h>
-#include <qtimer.h>
+#include <tqtimer.h>
//This is the number of nicknames we will process concurrently when joining a channel
//Lower numbers ensure less GUI blocking, but take marginally longer to complete.
//Higher numbers are absolute fastest, but block GUI until all members are added
#define NICK_BATCH_LENGTH 1
-IRCChannelContact::IRCChannelContact(IRCContactManager *contactManager, const QString &channel, Kopete::MetaContact *metac)
+IRCChannelContact::IRCChannelContact(IRCContactManager *contactManager, const TQString &channel, Kopete::MetaContact *metac)
: IRCContact(contactManager, channel, metac, "irc_channel")
{
KIRC::Engine *engine = kircEngine();
- mInfoTimer = new QTimer( this );
- QObject::connect(mInfoTimer, SIGNAL(timeout()), this, SLOT( slotUpdateInfo() ) );
+ mInfoTimer = new TQTimer( this );
+ TQObject::connect(mInfoTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( slotUpdateInfo() ) );
- QObject::connect(engine, SIGNAL(incomingUserIsAway(const QString &, const QString &)),
- this, SLOT(slotIncomingUserIsAway(const QString &, const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingUserIsAway(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotIncomingUserIsAway(const TQString &, const TQString &)));
- QObject::connect(engine, SIGNAL(incomingListedChan(const QString &, uint, const QString &)),
- this, SLOT(slotChannelListed(const QString &, uint, const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingListedChan(const TQString &, uint, const TQString &)),
+ this, TQT_SLOT(slotChannelListed(const TQString &, uint, const TQString &)));
actionJoin = 0L;
- actionModeT = new KToggleAction(i18n("Only Operators Can Change &Topic"), 0, this, SLOT(slotModeChanged()), this );
- actionModeN = new KToggleAction(i18n("&No Outside Messages"), 0, this, SLOT(slotModeChanged()), this );
- actionModeS = new KToggleAction(i18n("&Secret"), 0, this, SLOT(slotModeChanged()), this );
- actionModeM = new KToggleAction(i18n("&Moderated"), 0, this, SLOT(slotModeChanged()), this );
- actionModeI = new KToggleAction(i18n("&Invite Only"), 0, this, SLOT(slotModeChanged()), this );
+ actionModeT = new KToggleAction(i18n("Only Operators Can Change &Topic"), 0, this, TQT_SLOT(slotModeChanged()), this );
+ actionModeN = new KToggleAction(i18n("&No Outside Messages"), 0, this, TQT_SLOT(slotModeChanged()), this );
+ actionModeS = new KToggleAction(i18n("&Secret"), 0, this, TQT_SLOT(slotModeChanged()), this );
+ actionModeM = new KToggleAction(i18n("&Moderated"), 0, this, TQT_SLOT(slotModeChanged()), this );
+ actionModeI = new KToggleAction(i18n("&Invite Only"), 0, this, TQT_SLOT(slotModeChanged()), this );
actionHomePage = 0L;
updateStatus();
@@ -78,9 +78,9 @@ 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( QString::fromLatin1("LIST %1").arg(m_nickName) );
+ kircEngine()->writeMessage( TQString::fromLatin1("LIST %1").arg(m_nickName) );
else
- setProperty( QString::fromLatin1("channelMembers"), i18n("Members"), manager()->members().count() );
+ setProperty( TQString::fromLatin1("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(QString::fromLatin1("WHO %1").arg(m_nickName));
+ engine->writeMessage(TQString::fromLatin1("WHO %1").arg(m_nickName));
}
else
{
@@ -99,7 +99,7 @@ void IRCChannelContact::slotUpdateInfo()
mInfoTimer->start( 45000, true );
}
-void IRCChannelContact::slotChannelListed( const QString &channel, uint members, const QString &topic )
+void IRCChannelContact::slotChannelListed( const TQString &channel, uint members, const TQString &topic )
{
if (!manager(Kopete::Contact::CannotCreate) &&
onlineStatus() == m_protocol->m_ChannelStatusOnline &&
@@ -191,7 +191,7 @@ void IRCChannelContact::slotConnectedToServer()
kircEngine()->join(m_nickName, password());
}
-void IRCChannelContact::namesList(const QStringList &nicknames)
+void IRCChannelContact::namesList(const TQStringList &nicknames)
{
mInfoTimer->stop();
mJoinedNicks += nicknames;
@@ -200,7 +200,7 @@ void IRCChannelContact::namesList(const QStringList &nicknames)
void IRCChannelContact::endOfNames()
{
- setMode(QString::null);
+ setMode(TQString::null);
slotUpdateInfo();
}
@@ -217,8 +217,8 @@ void IRCChannelContact::slotAddNicknames()
{
// Pick a nick from the front of the list.
- QString nickToAdd = mJoinedNicks.front();
- QChar firstChar = nickToAdd[0];
+ TQString nickToAdd = mJoinedNicks.front();
+ TQChar firstChar = nickToAdd[0];
if( firstChar == '@' || firstChar == '%' || firstChar == '+' )
nickToAdd = nickToAdd.remove(0, 1);
@@ -261,10 +261,10 @@ void IRCChannelContact::slotAddNicknames()
mJoinedNicks.pop_front();
}
- QTimer::singleShot( 0, this, SLOT( slotAddNicknames() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotAddNicknames() ) );
}
-void IRCChannelContact::channelTopic(const QString &topic)
+void IRCChannelContact::channelTopic(const TQString &topic)
{
mTopic = topic;
setProperty( m_protocol->propChannelTopic, mTopic );
@@ -283,7 +283,7 @@ void IRCChannelContact::channelTopic(const QString &topic)
}
}
-void IRCChannelContact::channelHomePage(const QString &url)
+void IRCChannelContact::channelHomePage(const TQString &url)
{
kdDebug(14120) << k_funcinfo << endl;
setProperty( m_protocol->propHomepage, url );
@@ -303,9 +303,9 @@ void IRCChannelContact::join()
if (manager()) {
connect(manager(),
- SIGNAL(onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &,
+ TQT_SIGNAL(onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &,
const Kopete::OnlineStatus &)),
- SLOT(slotOnlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &,
+ TQT_SLOT(slotOnlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &,
const Kopete::OnlineStatus &)));
}
}
@@ -322,7 +322,7 @@ void IRCChannelContact::part()
kircEngine()->part(m_nickName, ircAccount()->defaultPart());
}
-void IRCChannelContact::slotIncomingUserIsAway( const QString &nick, const QString & )
+void IRCChannelContact::slotIncomingUserIsAway( const TQString &nick, const TQString & )
{
IRCAccount *account = ircAccount();
@@ -348,7 +348,7 @@ void IRCChannelContact::slotIncomingUserIsAway( const QString &nick, const QStri
}
}
-void IRCChannelContact::userJoinedChannel(const QString &nickname)
+void IRCChannelContact::userJoinedChannel(const TQString &nickname)
{
IRCAccount *account = ircAccount();
@@ -385,7 +385,7 @@ void IRCChannelContact::userJoinedChannel(const QString &nickname)
}
}
-void IRCChannelContact::userPartedChannel(const QString &nickname,const QString &reason)
+void IRCChannelContact::userPartedChannel(const TQString &nickname,const TQString &reason)
{
IRCAccount *account = ircAccount();
@@ -401,7 +401,7 @@ void IRCChannelContact::userPartedChannel(const QString &nickname,const QString
}
}
-void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicked, const QString &reason)
+void IRCChannelContact::userKicked(const TQString &nick, const TQString &nickKicked, const TQString &reason)
{
IRCAccount *account = ircAccount();
@@ -410,7 +410,7 @@ void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicke
Kopete::Contact *c = locateUser( nickKicked );
if (c)
{
- QString r;
+ TQString r;
if ((reason != nick) && (reason != nickKicked)) {
r = i18n( "%1 was kicked by %2. Reason: %3" ).arg(nickKicked, nick, reason);
@@ -431,7 +431,7 @@ void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicke
}
else
{
- QString r;
+ TQString r;
if ((reason != nick) && (reason != nickKicked)) {
r = i18n( "You were kicked from %1 by %2. Reason: %3" ).arg(m_nickName, nickKicked, reason);
@@ -444,7 +444,7 @@ void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicke
}
}
-void IRCChannelContact::setTopic(const QString &topic)
+void IRCChannelContact::setTopic(const TQString &topic)
{
IRCAccount *account = ircAccount();
@@ -454,7 +454,7 @@ void IRCChannelContact::setTopic(const QString &topic)
m_protocol->m_UserStatusOp || !modeEnabled('t') )
{
bool okPressed = true;
- QString newTopic = topic;
+ TQString newTopic = topic;
if( newTopic.isNull() )
newTopic = KInputDialog::getText( i18n("New Topic"), i18n("Enter the new topic:"),
Kopete::Message::unescape(mTopic), &okPressed, 0L );
@@ -475,7 +475,7 @@ void IRCChannelContact::setTopic(const QString &topic)
}
}
-void IRCChannelContact::topicChanged(const QString &nick, const QString &newtopic)
+void IRCChannelContact::topicChanged(const TQString &nick, const TQString &newtopic)
{
IRCAccount *account = ircAccount();
@@ -489,7 +489,7 @@ void IRCChannelContact::topicChanged(const QString &nick, const QString &newtopi
appendMessage(msg);
}
-void IRCChannelContact::topicUser(const QString &nick, const QDateTime &time)
+void IRCChannelContact::topicUser(const TQString &nick, const TQDateTime &time)
{
IRCAccount *account = ircAccount();
@@ -501,7 +501,7 @@ void IRCChannelContact::topicUser(const QString &nick, const QDateTime &time)
appendMessage(msg);
}
-void IRCChannelContact::incomingModeChange( const QString &nick, const QString &mode )
+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);
msg.setImportance( Kopete::Message::Low); //set the importance manualy to low
@@ -509,7 +509,7 @@ void IRCChannelContact::incomingModeChange( const QString &nick, const QString &
bool inParams = false;
bool modeEnabled = false;
- QString params = QString::null;
+ TQString params = TQString::null;
for( uint i=0; i < mode.length(); i++ )
{
switch( mode[i] )
@@ -535,8 +535,8 @@ void IRCChannelContact::incomingModeChange( const QString &nick, const QString &
}
}
-void IRCChannelContact::incomingChannelMode( const QString &mode,
- const QString &/*params*/ )
+void IRCChannelContact::incomingChannelMode( const TQString &mode,
+ const TQString &/*params*/ )
{
for( uint i=1; i < mode.length(); i++ )
{
@@ -545,7 +545,7 @@ void IRCChannelContact::incomingChannelMode( const QString &mode,
}
}
-void IRCChannelContact::setMode(const QString &mode)
+void IRCChannelContact::setMode(const TQString &mode)
{
if (manager(Kopete::Contact::CannotCreate))
kircEngine()->mode(m_nickName, mode);
@@ -586,9 +586,9 @@ void IRCChannelContact::failedChanFull()
void IRCChannelContact::failedChankey()
{
bool ok;
- QString diaPassword = KInputDialog::getText( i18n( "IRC Plugin" ),
+ TQString diaPassword = KInputDialog::getText( i18n( "IRC Plugin" ),
i18n( "Please enter key for channel %1: ").arg(m_nickName),
- QString::null,
+ TQString::null,
&ok );
if ( !ok )
@@ -600,7 +600,7 @@ void IRCChannelContact::failedChankey()
}
}
-void IRCChannelContact::toggleMode( QChar mode, bool enabled, bool update )
+void IRCChannelContact::toggleMode( TQChar mode, bool enabled, bool update )
{
if( manager(Kopete::Contact::CannotCreate) )
{
@@ -636,16 +636,16 @@ void IRCChannelContact::toggleMode( QChar mode, bool enabled, bool update )
if( modeMap[mode] != enabled )
{
if( enabled )
- setMode( QString::fromLatin1("+") + mode );
+ setMode( TQString::fromLatin1("+") + mode );
else
- setMode( QString::fromLatin1("-") + mode );
+ setMode( TQString::fromLatin1("-") + mode );
}
}
modeMap[mode] = enabled;
}
-bool IRCChannelContact::modeEnabled( QChar mode, QString *value )
+bool IRCChannelContact::modeEnabled( TQChar mode, TQString *value )
{
if( !value )
return modeMap[mode];
@@ -653,20 +653,20 @@ bool IRCChannelContact::modeEnabled( QChar mode, QString *value )
return false;
}
-QPtrList<KAction> *IRCChannelContact::customContextMenuActions()
+TQPtrList<KAction> *IRCChannelContact::customContextMenuActions()
{
- QPtrList<KAction> *mCustomActions = new QPtrList<KAction>();
+ TQPtrList<KAction> *mCustomActions = new TQPtrList<KAction>();
if( !actionJoin )
{
- actionJoin = new KAction(i18n("&Join"), 0, this, SLOT(join()), this, "actionJoin");
- actionPart = new KAction(i18n("&Part"), 0, this, SLOT(partAction()), this, "actionPart");
- actionTopic = new KAction(i18n("Change &Topic..."), 0, this, SLOT(setTopic()), this, "actionTopic");
+ actionJoin = new KAction(i18n("&Join"), 0, this, TQT_SLOT(join()), this, "actionJoin");
+ actionPart = new KAction(i18n("&Part"), 0, this, TQT_SLOT(partAction()), this, "actionPart");
+ actionTopic = new KAction(i18n("Change &Topic..."), 0, this, TQT_SLOT(setTopic()), this, "actionTopic");
actionModeMenu = new KActionMenu(i18n("Channel Modes"), 0, this, "actionModeMenu");
if( !property(m_protocol->propHomepage).value().isNull() )
{
actionHomePage = new KAction( i18n("Visit &Homepage"), 0, this,
- SLOT(slotHomepage()), this, "actionHomepage");
+ TQT_SLOT(slotHomepage()), this, "actionHomepage");
}
else if( actionHomePage )
{
@@ -681,8 +681,8 @@ QPtrList<KAction> *IRCChannelContact::customContextMenuActions()
actionModeMenu->setEnabled( true );
codecAction = new KCodecAction( i18n("&Encoding"), 0, this, "selectcharset" );
- connect( codecAction, SIGNAL( activated( const QTextCodec * ) ),
- this, SLOT( setCodec( const QTextCodec *) ) );
+ connect( codecAction, TQT_SIGNAL( activated( const TQTextCodec * ) ),
+ this, TQT_SLOT( setCodec( const TQTextCodec *) ) );
codecAction->setCodec( codec() );
}
@@ -708,23 +708,23 @@ QPtrList<KAction> *IRCChannelContact::customContextMenuActions()
void IRCChannelContact::slotHomepage()
{
- QString homePage = property(m_protocol->propHomepage).value().toString();
+ TQString homePage = property(m_protocol->propHomepage).value().toString();
if( !homePage.isEmpty() )
{
new KRun( KURL( homePage ), 0, false);
}
}
-const QString IRCChannelContact::caption() const
+const TQString IRCChannelContact::caption() const
{
- QString cap = QString::fromLatin1("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost());
+ TQString cap = TQString::fromLatin1("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost());
if(!mTopic.isEmpty())
- cap.append( QString::fromLatin1(" - %1").arg(Kopete::Message::unescape(mTopic)) );
+ cap.append( TQString::fromLatin1(" - %1").arg(Kopete::Message::unescape(mTopic)) );
return cap;
}
-void IRCChannelContact::privateMessage(IRCContact *from, IRCContact *to, const QString &message)
+void IRCChannelContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message)
{
if(to == this)
{
@@ -734,7 +734,7 @@ void IRCChannelContact::privateMessage(IRCContact *from, IRCContact *to, const Q
}
}
-void IRCChannelContact::newAction(const QString &from, const QString &action)
+void IRCChannelContact::newAction(const TQString &from, const TQString &action)
{
IRCAccount *account = ircAccount();
diff --git a/kopete/protocols/irc/ircchannelcontact.h b/kopete/protocols/irc/ircchannelcontact.h
index 15a72e17..0febd30b 100644
--- a/kopete/protocols/irc/ircchannelcontact.h
+++ b/kopete/protocols/irc/ircchannelcontact.h
@@ -49,50 +49,50 @@ class IRCChannelContact
Q_OBJECT
public:
- IRCChannelContact(IRCContactManager *, const QString &channel, Kopete::MetaContact *metac);
+ IRCChannelContact(IRCContactManager *, const TQString &channel, Kopete::MetaContact *metac);
~IRCChannelContact();
/**
* Returns the current topic for this channel.
*/
- const QString &topic() const { return mTopic; };
+ const TQString &topic() const { return mTopic; };
/* Set password for a channel */
- void setPassword(const QString &password) { mPassword = password; }
+ void setPassword(const TQString &password) { mPassword = password; }
/* Get password for a channel */
- const QString &password() const { return mPassword; }
+ const TQString &password() const { return mPassword; }
/**
* Returns if a mode is enabled for this channel.
* @param mode The mode you want to check ( 't', 'n', etc. )
- * @param value This is a pointer to a QString which is set to
+ * @param value This is a pointer to a TQString which is set to
* the value of the mode if it has one. Example, the mode 'l' or
* the mode 'k'. If the mode has no such value then the pointer
* is always returned null.
*/
- bool modeEnabled( QChar mode, QString *value = 0 );
+ bool modeEnabled( TQChar mode, TQString *value = 0 );
// Kopete::Contact stuff
- virtual QPtrList<KAction> *customContextMenuActions();
- virtual const QString caption() const;
+ virtual TQPtrList<KAction> *customContextMenuActions();
+ virtual const TQString caption() const;
//Methods handled by the signal mapper
- void userJoinedChannel(const QString &user);
- void userPartedChannel(const QString &user, const QString &reason);
- void userKicked(const QString &nick, const QString &nickKicked, const QString &reason);
- void channelTopic(const QString &topic);
- void channelHomePage(const QString &url);
- void topicChanged(const QString &nick, const QString &newtopic);
- void topicUser(const QString &nick, const QDateTime &time);
- void namesList(const QStringList &nicknames);
+ void userJoinedChannel(const TQString &user);
+ void userPartedChannel(const TQString &user, const TQString &reason);
+ void userKicked(const TQString &nick, const TQString &nickKicked, const TQString &reason);
+ void channelTopic(const TQString &topic);
+ void channelHomePage(const TQString &url);
+ void topicChanged(const TQString &nick, const TQString &newtopic);
+ void topicUser(const TQString &nick, const TQDateTime &time);
+ void namesList(const TQStringList &nicknames);
void endOfNames();
- void incomingModeChange(const QString &nick, const QString &mode);
- void incomingChannelMode(const QString &mode, const QString &params );
+ void incomingModeChange(const TQString &nick, const TQString &mode);
+ void incomingChannelMode(const TQString &mode, const TQString &params );
void failedChankey();
void failedChanBanned();
void failedChanInvite();
void failedChanFull();
- void newAction(const QString &from, const QString &action);
+ void newAction(const TQString &from, const TQString &action);
public slots:
void updateStatus();
@@ -101,13 +101,13 @@ public slots:
* Sets the topic of this channel
* @param topic The topic you want set
*/
- void setTopic( const QString &topic = QString::null );
+ void setTopic( const TQString &topic = TQString::null );
/**
* Sets or unsets a mode on this channel
* @param mode The full text of the mode change you want performed
*/
- void setMode( const QString &mode = QString::null );
+ void setMode( const TQString &mode = TQString::null );
void part();
void partAction();
@@ -116,17 +116,17 @@ public slots:
protected slots:
void chatSessionDestroyed();
- virtual void privateMessage(IRCContact *from, IRCContact *to, const QString &message);
+ virtual void privateMessage(IRCContact *from, IRCContact *to, const TQString &message);
virtual void initConversation();
private slots:
- void slotIncomingUserIsAway( const QString &nick, const QString &reason );
+ void slotIncomingUserIsAway( const TQString &nick, const TQString &reason );
void slotModeChanged();
void slotAddNicknames();
void slotConnectedToServer();
void slotUpdateInfo();
void slotHomepage();
- void slotChannelListed(const QString &channel, uint members, const QString &topic);
+ void slotChannelListed(const TQString &channel, uint members, const TQString &topic);
void slotOnlineStatusChanged(Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus);
private:
@@ -143,13 +143,13 @@ private:
KToggleAction *actionModeI; // Invite Only
KToggleAction *actionModeM; // Moderated
- QString mTopic;
- QString mPassword;
- QStringList mJoinedNicks;
- QMap<QString, bool> modeMap;
- QTimer *mInfoTimer;
+ TQString mTopic;
+ TQString mPassword;
+ TQStringList mJoinedNicks;
+ TQMap<TQString, bool> modeMap;
+ TQTimer *mInfoTimer;
- void toggleMode( QChar mode, bool enabled, bool update );
+ void toggleMode( TQChar mode, bool enabled, bool update );
void toggleOperatorActions( bool enabled );
};
diff --git a/kopete/protocols/irc/irccontact.cpp b/kopete/protocols/irc/irccontact.cpp
index 64f89322..349fba60 100644
--- a/kopete/protocols/irc/irccontact.cpp
+++ b/kopete/protocols/irc/irccontact.cpp
@@ -19,10 +19,10 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
#include "ircaccount.h"
#include "kopeteglobal.h"
@@ -36,13 +36,13 @@
#include "irccontactmanager.h"
#include "ksparser.h"
-IRCContact::IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const QString& icon)
+IRCContact::IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const TQString& icon)
: Kopete::Contact(account, entity->name(), metac, icon),
m_chatSession(0)
{
}
-IRCContact::IRCContact(IRCContactManager *contactManager, const QString &nick, Kopete::MetaContact *metac, const QString& icon)
+IRCContact::IRCContact(IRCContactManager *contactManager, const TQString &nick, Kopete::MetaContact *metac, const TQString& icon)
: Kopete::Contact(contactManager->account(), nick, metac, icon),
m_nickName(nick),
m_chatSession(0)
@@ -53,22 +53,22 @@ IRCContact::IRCContact(IRCContactManager *contactManager, const QString &nick, K
setProperty( Kopete::Global::Properties::self()->nickName(), m_nickName );
// IRCContactManager stuff
- QObject::connect(contactManager, SIGNAL(privateMessage(IRCContact *, IRCContact *, const QString &)),
- this, SLOT(privateMessage(IRCContact *, IRCContact *, const QString &)));
+ TQObject::connect(contactManager, TQT_SIGNAL(privateMessage(IRCContact *, IRCContact *, const TQString &)),
+ this, TQT_SLOT(privateMessage(IRCContact *, IRCContact *, const TQString &)));
// Kopete::ChatSessionManager stuff
mMyself.append( static_cast<Kopete::Contact*>( this ) );
// KIRC stuff
- QObject::connect(engine, SIGNAL(incomingNickChange(const QString &, const QString &)),
- this, SLOT( slotNewNickChange(const QString&, const QString&)));
- QObject::connect(engine, SIGNAL(successfullyChangedNick(const QString &, const QString &)),
- this, SLOT(slotNewNickChange(const QString &, const QString &)));
- QObject::connect(engine, SIGNAL(incomingQuitIRC(const QString &, const QString &)),
- this, SLOT( slotUserDisconnected(const QString&, const QString&)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingNickChange(const TQString &, const TQString &)),
+ this, TQT_SLOT( slotNewNickChange(const TQString&, const TQString&)));
+ TQObject::connect(engine, TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotNewNickChange(const TQString &, const TQString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingQuitIRC(const TQString &, const TQString &)),
+ this, TQT_SLOT( slotUserDisconnected(const TQString&, const TQString&)));
- QObject::connect(engine, SIGNAL(statusChanged(KIRC::Engine::Status)),
- this, SLOT(updateStatus()));
+ TQObject::connect(engine, TQT_SIGNAL(statusChanged(KIRC::Engine::Status)),
+ this, TQT_SLOT(updateStatus()));
engine->setCodec( m_nickName, codec() );
}
@@ -101,43 +101,43 @@ bool IRCContact::isReachable()
return false;
}
-const QString IRCContact::caption() const
+const TQString IRCContact::caption() const
{
- return QString::null;
+ return TQString::null;
}
/*
-const QString IRCContact::formatedName() const
+const TQString IRCContact::formatedName() const
{
- return QString::null;
+ return TQString::null;
}
*/
void IRCContact::updateStatus()
{
}
-void IRCContact::privateMessage(IRCContact *, IRCContact *, const QString &)
+void IRCContact::privateMessage(IRCContact *, IRCContact *, const TQString &)
{
}
-void IRCContact::setCodec(const QTextCodec *codec)
+void IRCContact::setCodec(const TQTextCodec *codec)
{
kircEngine()->setCodec(m_nickName, codec);
- metaContact()->setPluginData(m_protocol, QString::fromLatin1("Codec"), QString::number(codec->mibEnum()));
+ metaContact()->setPluginData(m_protocol, TQString::fromLatin1("Codec"), TQString::number(codec->mibEnum()));
}
-const QTextCodec *IRCContact::codec()
+const TQTextCodec *IRCContact::codec()
{
- QString codecId = metaContact()->pluginData(m_protocol, QString::fromLatin1("Codec"));
- QTextCodec *codec = ircAccount()->codec();
+ TQString codecId = metaContact()->pluginData(m_protocol, TQString::fromLatin1("Codec"));
+ TQTextCodec *codec = ircAccount()->codec();
if( !codecId.isEmpty() )
{
bool test = true;
uint mib = codecId.toInt(&test);
if (test)
- codec = QTextCodec::codecForMib(mib);
+ codec = TQTextCodec::codecForMib(mib);
else
- codec = QTextCodec::codecForName(codecId.latin1());
+ codec = TQTextCodec::codecForName(codecId.latin1());
}
if( !codec )
@@ -159,10 +159,10 @@ Kopete::ChatSession *IRCContact::manager(Kopete::Contact::CanCreateFlags canCrea
m_chatSession = Kopete::ChatSessionManager::self()->create(account->myself(), mMyself, account->protocol());
m_chatSession->setDisplayName(caption());
- QObject::connect(m_chatSession, SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession *)),
- this, SLOT(slotSendMsg(Kopete::Message&, Kopete::ChatSession *)));
- QObject::connect(m_chatSession, SIGNAL(closing(Kopete::ChatSession *)),
- this, SLOT(chatSessionDestroyed()));
+ TQObject::connect(m_chatSession, TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession *)),
+ this, TQT_SLOT(slotSendMsg(Kopete::Message&, Kopete::ChatSession *)));
+ TQObject::connect(m_chatSession, TQT_SIGNAL(closing(Kopete::ChatSession *)),
+ this, TQT_SLOT(chatSessionDestroyed()));
initConversation();
}
@@ -178,11 +178,11 @@ void IRCContact::chatSessionDestroyed()
deleteLater();
}
-void IRCContact::slotUserDisconnected(const QString &user, const QString &reason)
+void IRCContact::slotUserDisconnected(const TQString &user, const TQString &reason)
{
if (m_chatSession)
{
- QString nickname = user.section('!', 0, 0);
+ TQString nickname = user.section('!', 0, 0);
Kopete::Contact *c = locateUser( nickname );
if ( c )
{
@@ -192,14 +192,14 @@ void IRCContact::slotUserDisconnected(const QString &user, const QString &reason
}
}
-void IRCContact::setNickName( const QString &nickname )
+void IRCContact::setNickName( const TQString &nickname )
{
kdDebug(14120) << k_funcinfo << m_nickName << " changed to " << nickname << endl;
m_nickName = nickname;
Kopete::Contact::setNickName( nickname );
}
-void IRCContact::slotNewNickChange(const QString &oldnickname, const QString &newnickname)
+void IRCContact::slotNewNickChange(const TQString &oldnickname, const TQString &newnickname)
{
IRCAccount *account = ircAccount();
@@ -219,7 +219,7 @@ void IRCContact::slotNewNickChange(const QString &oldnickname, const QString &ne
void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
{
- QString htmlString = message.escapedBody();
+ TQString htmlString = message.escapedBody();
// Messages we get with RichText enabled:
//
@@ -229,9 +229,9 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
// Two-liner in color:
// <span style="color:#403897">Hello<br />World</span>
- if (htmlString.find(QString::fromLatin1("</span")) > -1)
+ if (htmlString.find(TQString::fromLatin1("</span")) > -1)
{
- QRegExp findTags( QString::fromLatin1("<span style=\"(.*)\">(.*)</span>") );
+ TQRegExp findTags( TQString::fromLatin1("<span style=\"(.*)\">(.*)</span>") );
findTags.setMinimal( true );
int pos = 0;
@@ -240,29 +240,29 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
pos = findTags.search(htmlString);
if (pos > -1)
{
- QString styleHTML = findTags.cap(1);
- QString replacement = findTags.cap(2);
- QStringList styleAttrs = QStringList::split(';', styleHTML);
+ TQString styleHTML = findTags.cap(1);
+ TQString replacement = findTags.cap(2);
+ TQStringList styleAttrs = TQStringList::split(';', styleHTML);
- for (QStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair)
+ for (TQStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair)
{
- QString attribute = (*attrPair).section(':',0,0);
- QString value = (*attrPair).section(':',1);
+ TQString attribute = (*attrPair).section(':',0,0);
+ TQString value = (*attrPair).section(':',1);
- if( attribute == QString::fromLatin1("color") )
+ if( attribute == TQString::fromLatin1("color") )
{
int ircColor = KSParser::colorForHTML( value );
if( ircColor > -1 )
- replacement.prepend( QString( QChar(0x03) ).append( QString::number(ircColor) ) ).append( QChar( 0x03 ) );
+ replacement.prepend( TQString( TQChar(0x03) ).append( TQString::number(ircColor) ) ).append( TQChar( 0x03 ) );
}
- else if( attribute == QString::fromLatin1("font-weight") &&
- value == QString::fromLatin1("600") ) {
+ else if( attribute == TQString::fromLatin1("font-weight") &&
+ value == TQString::fromLatin1("600") ) {
// Bolding
- replacement.prepend( QChar(0x02) ).append( QChar(0x02) );
+ replacement.prepend( TQChar(0x02) ).append( TQChar(0x02) );
}
- else if( attribute == QString::fromLatin1("text-decoration") &&
- value == QString::fromLatin1("underline") ) {
- replacement.prepend( QChar(31) ).append( QChar(31) );
+ else if( attribute == TQString::fromLatin1("text-decoration") &&
+ value == TQString::fromLatin1("underline") ) {
+ replacement.prepend( TQChar(31) ).append( TQChar(31) );
}
}
@@ -273,9 +273,9 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
htmlString = Kopete::Message::unescape(htmlString);
- QStringList messages = QStringList::split( '\n', htmlString );
+ TQStringList messages = TQStringList::split( '\n', htmlString );
- for( QStringList::Iterator it = messages.begin(); it != messages.end(); ++it )
+ for( TQStringList::Iterator it = messages.begin(); it != messages.end(); ++it )
{
// Dont use the resulting string(s). The problem is that we'd have to parse them
// back to format that would be suitable for appendMessage().
@@ -290,25 +290,25 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
Kopete::Message msg(message.from(), message.to(), message.escapedBody(), message.direction(),
Kopete::Message::RichText, CHAT_VIEW, message.type());
- msg.setBg(QColor());
- msg.setFg(QColor());
+ msg.setBg(TQColor());
+ msg.setFg(TQColor());
appendMessage(msg);
} else {
// Lets not modify the given message object.
Kopete::Message msg = message;
- msg.setBg(QColor());
+ msg.setBg(TQColor());
appendMessage(msg);
}
manager(Kopete::Contact::CanCreate)->messageSucceeded();
}
-QStringList IRCContact::sendMessage( const QString &msg )
+TQStringList IRCContact::sendMessage( const TQString &msg )
{
- QStringList messages;
+ TQStringList messages;
- QString newMessage = msg;
+ TQString newMessage = msg;
// IRC limits the message size to 512 characters. So split the given
// message into pieces.
@@ -324,14 +324,14 @@ QStringList IRCContact::sendMessage( const QString &msg )
newMessage.remove(0, l);
} while (!newMessage.isEmpty());
- for (QStringList::const_iterator it = messages.begin();
+ for (TQStringList::const_iterator it = messages.begin();
it != messages.end(); ++it)
kircEngine()->privmsg(m_nickName, *it);
return messages;
}
-Kopete::Contact *IRCContact::locateUser(const QString &nick)
+Kopete::Contact *IRCContact::locateUser(const TQString &nick)
{
IRCAccount *account = ircAccount();
@@ -359,8 +359,8 @@ bool IRCContact::isChatting(const Kopete::ChatSession *avoid) const
if (!account)
return false;
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueList<Kopete::ChatSession*>::Iterator it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueList<Kopete::ChatSession*>::Iterator it= sessions.begin(); it!=sessions.end() ; ++it)
{
if( (*it) != avoid && (*it)->account() == account &&
(*it)->members().contains(this) )
@@ -402,16 +402,16 @@ KopeteView *IRCContact::view()
return m_chatSession->view(false);
return 0L;
}
-void IRCContact::serialize(QMap<QString, QString> & /*serializedData*/, QMap<QString, QString> &addressBookData)
+void IRCContact::serialize(TQMap<TQString, TQString> & /*serializedData*/, TQMap<TQString, TQString> &addressBookData)
{
// write the
- addressBookData[ protocol()->addressBookIndexField() ] = ( contactId() + QChar(0xE120) + account()->accountId() );
+ addressBookData[ protocol()->addressBookIndexField() ] = ( contactId() + TQChar(0xE120) + account()->accountId() );
}
void IRCContact::receivedMessage( KIRC::Engine::ServerMessageType type,
const KIRC::EntityPtr &from,
const KIRC::EntityPtrList &to,
- const QString &msg)
+ const TQString &msg)
{
if (to.contains(m_entity))
{
diff --git a/kopete/protocols/irc/irccontact.h b/kopete/protocols/irc/irccontact.h
index 058315fb..9005f015 100644
--- a/kopete/protocols/irc/irccontact.h
+++ b/kopete/protocols/irc/irccontact.h
@@ -27,8 +27,8 @@
#include "kopetecontact.h"
#include "kopetemessage.h"
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
class IRCProtocol;
class IRCAccount;
@@ -63,8 +63,8 @@ class IRCContact
Q_OBJECT
public:
- IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const QString& icon = QString::null);
- IRCContact(IRCContactManager *contactManager, const QString &nick, Kopete::MetaContact *metac, const QString& icon = QString::null);
+ IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const TQString& icon = TQString::null);
+ IRCContact(IRCContactManager *contactManager, const TQString &nick, Kopete::MetaContact *metac, const TQString& icon = TQString::null);
virtual ~IRCContact();
IRCAccount *ircAccount() const;
@@ -74,12 +74,12 @@ public:
* Sets the nickname of this contact. The nickname is distinct from the displayName
* in case trackNameChanges is disabled.
*/
- void setNickName(const QString &nickname);
+ void setNickName(const TQString &nickname);
/**
* Returns the nickname / channel name
*/
- const QString &nickName() const { return m_nickName; }
+ const TQString &nickName() const { return m_nickName; }
/**
* This function attempts to find the nickname specified within the current chat
@@ -87,7 +87,7 @@ public:
* exist in this session. More useful for channels. Calling IRCChannelContact::locateUser()
* for example tells you if a user is in a certain channel.
*/
- Kopete::Contact *locateUser( const QString &nickName );
+ Kopete::Contact *locateUser( const TQString &nickName );
virtual bool isReachable();
@@ -97,14 +97,14 @@ public:
*/
bool isChatting( const Kopete::ChatSession *avoid = 0L ) const;
- virtual const QString caption() const;
-// virtual const QString formatedName() const;
+ virtual const TQString caption() const;
+// virtual const TQString formatedName() const;
virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate);
virtual void appendMessage( Kopete::Message & );
- const QTextCodec *codec();
+ const TQTextCodec *codec();
KopeteView *view();
@@ -113,40 +113,40 @@ public:
* so that other IRC programs reading this from KAddressBook have a chance of figuring
* which server the contact relates to
*/
- virtual void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData );
+ virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData );
signals:
void destroyed(IRCContact *self);
public slots:
- void setCodec( const QTextCodec *codec );
+ void setCodec( const TQTextCodec *codec );
virtual void updateStatus();
protected slots:
virtual void slotSendMsg(Kopete::Message &message, Kopete::ChatSession *);
- QStringList sendMessage( const QString &msg );
+ TQStringList sendMessage( const TQString &msg );
virtual void chatSessionDestroyed();
- void slotNewNickChange( const QString &oldnickname, const QString &newnickname);
- void slotUserDisconnected( const QString &nickname, const QString &reason);
+ void slotNewNickChange( const TQString &oldnickname, const TQString &newnickname);
+ void slotUserDisconnected( const TQString &nickname, const TQString &reason);
virtual void deleteContact();
- virtual void privateMessage(IRCContact *from, IRCContact *to, const QString &message);
+ virtual void privateMessage(IRCContact *from, IRCContact *to, const TQString &message);
virtual void initConversation() {};
void receivedMessage( KIRC::Engine::ServerMessageType type,
const KIRC::EntityPtr &from,
const KIRC::EntityPtrList &to,
- const QString &msg);
+ const TQString &msg);
protected:
KIRC::EntityPtr m_entity;
- QString m_nickName;
+ TQString m_nickName;
Kopete::ChatSession *m_chatSession;
- QPtrList<Kopete::Contact> mMyself;
+ TQPtrList<Kopete::Contact> mMyself;
Kopete::Message::MessageDirection execDir;
};
diff --git a/kopete/protocols/irc/irccontactmanager.cpp b/kopete/protocols/irc/irccontactmanager.cpp
index 7808668b..fb49e08e 100644
--- a/kopete/protocols/irc/irccontactmanager.cpp
+++ b/kopete/protocols/irc/irccontactmanager.cpp
@@ -34,12 +34,12 @@
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-IRCContactManager::IRCContactManager(const QString &nickName, IRCAccount *account, const char *name)
- : QObject(account, name),
- m_channels( QDict<IRCChannelContact>( 17, false ) ),
- m_users( QDict<IRCUserContact>( 577, false ) ),
+IRCContactManager::IRCContactManager(const TQString &nickName, IRCAccount *account, const char *name)
+ : TQObject(account, name),
+ m_channels( TQDict<IRCChannelContact>( 17, false ) ),
+ m_users( TQDict<IRCUserContact>( 577, false ) ),
m_account( account )
{
m_mySelf = findUser(nickName);
@@ -48,41 +48,41 @@ IRCContactManager::IRCContactManager(const QString &nickName, IRCAccount *accoun
// m->setTemporary( true );
m_myServer = new IRCServerContact(this, account->networkName(), m);
- QObject::connect(account->engine(), SIGNAL(incomingMessage(const QString &, const QString &, const QString &)),
- this, SLOT(slotNewMessage(const QString &, const QString &, const QString &)));
+ TQObject::connect(account->engine(), TQT_SIGNAL(incomingMessage(const TQString &, const TQString &, const TQString &)),
+ this, TQT_SLOT(slotNewMessage(const TQString &, const TQString &, const TQString &)));
- QObject::connect(account->engine(), SIGNAL(incomingPrivMessage(const QString &, const QString &, const QString &)),
- this, SLOT(slotNewPrivMessage(const QString &, const QString &, const QString &)));
+ TQObject::connect(account->engine(), TQT_SIGNAL(incomingPrivMessage(const TQString &, const TQString &, const TQString &)),
+ this, TQT_SLOT(slotNewPrivMessage(const TQString &, const TQString &, const TQString &)));
- QObject::connect(account->engine(), SIGNAL(incomingNickChange(const QString &, const QString &)),
- this, SLOT( slotNewNickChange(const QString&, const QString&)));
+ TQObject::connect(account->engine(), TQT_SIGNAL(incomingNickChange(const TQString &, const TQString &)),
+ this, TQT_SLOT( slotNewNickChange(const TQString&, const TQString&)));
- QObject::connect(account->engine(), SIGNAL(successfullyChangedNick(const QString &, const QString &)),
- this, SLOT( slotNewNickChange(const QString &, const QString &)));
+ TQObject::connect(account->engine(), TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)),
+ this, TQT_SLOT( slotNewNickChange(const TQString &, const TQString &)));
- QObject::connect(account->engine(), SIGNAL(incomingUserOnline(const QString &)),
- this, SLOT( slotIsonRecieved()));
+ TQObject::connect(account->engine(), TQT_SIGNAL(incomingUserOnline(const TQString &)),
+ this, TQT_SLOT( slotIsonRecieved()));
- QObject::connect(Kopete::ContactList::self(), SIGNAL(metaContactAdded( Kopete::MetaContact * )),
- this, SLOT( slotContactAdded( Kopete::MetaContact* )));
+ TQObject::connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactAdded( Kopete::MetaContact * )),
+ this, TQT_SLOT( slotContactAdded( Kopete::MetaContact* )));
socketTimeout = 15000;
- QString timeoutPath = locate( "config", "kioslaverc" );
+ TQString timeoutPath = locate( "config", "kioslaverc" );
if( !timeoutPath.isEmpty() )
{
KConfig config( timeoutPath );
socketTimeout = config.readNumEntry( "ReadTimeout", 15 ) * 1000;
}
- m_NotifyTimer = new QTimer(this);
- QObject::connect(m_NotifyTimer, SIGNAL(timeout()),
- this, SLOT(checkOnlineNotifyList()));
+ m_NotifyTimer = new TQTimer(this);
+ TQObject::connect(m_NotifyTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(checkOnlineNotifyList()));
m_NotifyTimer->start(30000); // check online every 30sec
new IRCSignalHandler(this);
}
-void IRCContactManager::slotNewNickChange(const QString &oldnick, const QString &newnick)
+void IRCContactManager::slotNewNickChange(const TQString &oldnick, const TQString &newnick)
{
IRCUserContact *c = m_users[ oldnick ];
if( c )
@@ -92,14 +92,14 @@ void IRCContactManager::slotNewNickChange(const QString &oldnick, const QString
}
}
-void IRCContactManager::slotNewMessage(const QString &originating, const QString &channel, const QString &message)
+void IRCContactManager::slotNewMessage(const TQString &originating, const TQString &channel, const TQString &message)
{
IRCContact *from = findUser(originating);
IRCChannelContact *to = findChannel(channel);
emit privateMessage(from, to, message);
}
-void IRCContactManager::slotNewPrivMessage(const QString &originating, const QString &user, const QString &message)
+void IRCContactManager::slotNewPrivMessage(const TQString &originating, const TQString &user, const TQString &message)
{
IRCContact *from = findUser(originating);
IRCUserContact *to = findUser(user);
@@ -112,10 +112,10 @@ void IRCContactManager::unregister(Kopete::Contact *contact)
unregisterUser(contact, true);
}
-QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserContact *contact )
+TQValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserContact *contact )
{
- QValueList<IRCChannelContact*> retVal;
- for( QDictIterator<IRCChannelContact> it(m_channels); it.current(); ++it )
+ TQValueList<IRCChannelContact*> retVal;
+ for( TQDictIterator<IRCChannelContact> it(m_channels); it.current(); ++it )
{
if( it.current()->manager(Kopete::Contact::CannotCreate) )
{
@@ -126,7 +126,7 @@ QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserC
bool c = true;
Kopete::ContactPtrList members = it.current()->manager()->members();
- for( QPtrListIterator<Kopete::Contact> it2( members ); c && it2.current(); ++it2 )
+ for( TQPtrListIterator<Kopete::Contact> it2( members ); c && it2.current(); ++it2 )
{
if( it2.current() == contact )
{
@@ -141,7 +141,7 @@ QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserC
return retVal;
}
-IRCChannelContact *IRCContactManager::findChannel(const QString &name, Kopete::MetaContact *m)
+IRCChannelContact *IRCContactManager::findChannel(const TQString &name, Kopete::MetaContact *m)
{
IRCChannelContact *channel = m_channels[ name ];
@@ -155,14 +155,14 @@ IRCChannelContact *IRCContactManager::findChannel(const QString &name, Kopete::M
channel = new IRCChannelContact(this, name, m);
m_channels.insert( name, channel );
- QObject::connect(channel, SIGNAL(contactDestroyed(Kopete::Contact *)),
- this, SLOT(unregister(Kopete::Contact *)));
+ TQObject::connect(channel, TQT_SIGNAL(contactDestroyed(Kopete::Contact *)),
+ this, TQT_SLOT(unregister(Kopete::Contact *)));
}
return channel;
}
-IRCChannelContact *IRCContactManager::existChannel( const QString &channel ) const
+IRCChannelContact *IRCContactManager::existChannel( const TQString &channel ) const
{
return m_channels[ channel ];
}
@@ -179,7 +179,7 @@ void IRCContactManager::unregisterChannel(Kopete::Contact *contact, bool force )
}
}
-IRCUserContact *IRCContactManager::findUser(const QString &name, Kopete::MetaContact *m)
+IRCUserContact *IRCContactManager::findUser(const TQString &name, Kopete::MetaContact *m)
{
IRCUserContact *user = m_users[name.section('!', 0, 0)];
@@ -193,19 +193,19 @@ IRCUserContact *IRCContactManager::findUser(const QString &name, Kopete::MetaCon
user = new IRCUserContact(this, name, m);
m_users.insert( name, user );
- QObject::connect(user, SIGNAL(contactDestroyed(Kopete::Contact *)),
- this, SLOT(unregister(Kopete::Contact *)));
+ TQObject::connect(user, TQT_SIGNAL(contactDestroyed(Kopete::Contact *)),
+ this, TQT_SLOT(unregister(Kopete::Contact *)));
}
return user;
}
-IRCUserContact *IRCContactManager::existUser( const QString &user ) const
+IRCUserContact *IRCContactManager::existUser( const TQString &user ) const
{
return m_users[user];
}
-IRCContact *IRCContactManager::findContact( const QString &id, Kopete::MetaContact *m )
+IRCContact *IRCContactManager::findContact( const TQString &id, Kopete::MetaContact *m )
{
if( KIRC::Entity::isChannel(id) )
return findChannel( id, m );
@@ -213,10 +213,10 @@ IRCContact *IRCContactManager::findContact( const QString &id, Kopete::MetaConta
return findUser( id, m );
}
-IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const QString &id )
+IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const TQString &id )
{
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( IRCProtocol::protocol() );
- QDictIterator<Kopete::Account> it(accounts);
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( IRCProtocol::protocol() );
+ TQDictIterator<Kopete::Account> it(accounts);
for( ; it.current(); ++it )
{
IRCAccount *account = (IRCAccount *)it.current();
@@ -226,7 +226,7 @@ IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const Q
return 0L;
}
-IRCContact *IRCContactManager::existContact( const QString &id ) const
+IRCContact *IRCContactManager::existContact( const TQString &id ) const
{
if( KIRC::Entity::isChannel(id) )
return existChannel( id );
@@ -249,7 +249,7 @@ void IRCContactManager::unregisterUser(Kopete::Contact *contact, bool force )
void IRCContactManager::slotContactAdded( Kopete::MetaContact *contact )
{
- for( QPtrListIterator<Kopete::Contact> it( contact->contacts() ); it.current(); ++it )
+ for( TQPtrListIterator<Kopete::Contact> it( contact->contacts() ); it.current(); ++it )
{
if( it.current()->account() == m_account )
{
@@ -258,7 +258,7 @@ void IRCContactManager::slotContactAdded( Kopete::MetaContact *contact )
}
}
-void IRCContactManager::addToNotifyList(const QString &nick)
+void IRCContactManager::addToNotifyList(const TQString &nick)
{
if (!m_NotifyList.contains(nick.lower()))
{
@@ -267,7 +267,7 @@ void IRCContactManager::addToNotifyList(const QString &nick)
}
}
-void IRCContactManager::removeFromNotifyList(const QString &nick)
+void IRCContactManager::removeFromNotifyList(const TQString &nick)
{
if (m_NotifyList.contains(nick.lower()))
m_NotifyList.remove(nick.lower());
@@ -279,7 +279,7 @@ void IRCContactManager::checkOnlineNotifyList()
{
isonRecieved = false;
m_account->engine()->ison( m_NotifyList );
- //QTimer::singleShot( socketTimeout, this, SLOT( slotIsonTimeout() ) );
+ //TQTimer::singleShot( socketTimeout, this, TQT_SLOT( slotIsonTimeout() ) );
}
}
diff --git a/kopete/protocols/irc/irccontactmanager.h b/kopete/protocols/irc/irccontactmanager.h
index 4a8ae05f..18a30111 100644
--- a/kopete/protocols/irc/irccontactmanager.h
+++ b/kopete/protocols/irc/irccontactmanager.h
@@ -18,10 +18,10 @@
#ifndef IRCCONTACTMANAGER_H
#define IRCCONTACTMANAGER_H
-#include <qdict.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class IRCContact;
class IRCAccount;
@@ -57,60 +57,60 @@ class IRCContactManager
Q_OBJECT
public:
- IRCContactManager(const QString &nickName, IRCAccount *account, const char *name=0);
+ IRCContactManager(const TQString &nickName, IRCAccount *account, const char *name=0);
IRCAccount *account() const { return m_account; }
IRCServerContact *myServer() const { return m_myServer; }
IRCUserContact *mySelf() const { return m_mySelf; }
- IRCChannelContact *findChannel(const QString &channel, Kopete::MetaContact *m=0);
- IRCChannelContact *existChannel(const QString &channel) const;
+ IRCChannelContact *findChannel(const TQString &channel, Kopete::MetaContact *m=0);
+ IRCChannelContact *existChannel(const TQString &channel) const;
- IRCUserContact *findUser(const QString &nick, Kopete::MetaContact *m=0);
- IRCUserContact *existUser(const QString &nick) const;
+ IRCUserContact *findUser(const TQString &nick, Kopete::MetaContact *m=0);
+ IRCUserContact *existUser(const TQString &nick) const;
- IRCContact *findContact(const QString &nick, Kopete::MetaContact *m=0);
- IRCContact *existContact( const QString &id ) const;
+ IRCContact *findContact(const TQString &nick, Kopete::MetaContact *m=0);
+ IRCContact *existContact( const TQString &id ) const;
- QValueList<IRCChannelContact*> findChannelsByMember( IRCUserContact *contact );
+ TQValueList<IRCChannelContact*> findChannelsByMember( IRCUserContact *contact );
- static IRCContact *existContact(const KIRC::Engine *engine, const QString &nick);
+ static IRCContact *existContact(const KIRC::Engine *engine, const TQString &nick);
public slots:
void unregister(Kopete::Contact *contact);
void unregisterUser(Kopete::Contact *contact, bool force = false );
void unregisterChannel(Kopete::Contact *contact, bool force = false );
- void addToNotifyList(const QString &nick);
- void removeFromNotifyList(const QString &nick);
+ void addToNotifyList(const TQString &nick);
+ void removeFromNotifyList(const TQString &nick);
void checkOnlineNotifyList();
signals:
- void privateMessage(IRCContact *from, IRCContact *to, const QString &message);
+ void privateMessage(IRCContact *from, IRCContact *to, const TQString &message);
private slots:
- void slotNewMessage(const QString &originating, const QString &channel, const QString &message);
- void slotNewPrivMessage(const QString &originating, const QString &, const QString &message);
+ void slotNewMessage(const TQString &originating, const TQString &channel, const TQString &message);
+ void slotNewPrivMessage(const TQString &originating, const TQString &, const TQString &message);
void slotIsonRecieved();
void slotIsonTimeout();
- void slotNewNickChange(const QString &oldnick, const QString &newnick);
+ void slotNewNickChange(const TQString &oldnick, const TQString &newnick);
void slotContactAdded( Kopete::MetaContact *contact );
private:
- QDict<IRCChannelContact> m_channels;
- QDict<IRCUserContact> m_users;
+ TQDict<IRCChannelContact> m_channels;
+ TQDict<IRCUserContact> m_users;
IRCAccount *m_account;
IRCServerContact *m_myServer;
IRCUserContact *m_mySelf;
- QStringList m_NotifyList;
- QTimer *m_NotifyTimer;
+ TQStringList m_NotifyList;
+ TQTimer *m_NotifyTimer;
bool isonRecieved;
int socketTimeout;
- static const QRegExp isChannel;
+ static const TQRegExp isChannel;
};
#endif
diff --git a/kopete/protocols/irc/ircguiclient.cpp b/kopete/protocols/irc/ircguiclient.cpp
index b4c36973..d9d5f8e2 100644
--- a/kopete/protocols/irc/ircguiclient.cpp
+++ b/kopete/protocols/irc/ircguiclient.cpp
@@ -30,9 +30,9 @@
// ------------------------------------------------------------
#endif
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "kopetechatsession.h"
#include "kcodecaction.h"
@@ -40,7 +40,7 @@
#include "ircaccount.h"
#include "irccontact.h"
-IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : QObject(parent) , KXMLGUIClient(parent)
+IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : TQObject(parent) , KXMLGUIClient(parent)
{
Kopete::ContactPtrList members = parent->members();
if( members.count() > 0 )
@@ -53,22 +53,22 @@ IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : QObject(parent) , KX
setXMLFile("ircchatui.rc");
unplugActionList( "irccontactactionlist" );
- QPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
+ TQPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
plugActionList( "irccontactactionlist", *actions );
delete actions;
*/
setXMLFile("ircchatui.rc");
- QDomDocument doc = domDocument();
- QDomNode menu = doc.documentElement().firstChild().firstChild();
- QPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
+ TQDomDocument doc = domDocument();
+ TQDomNode menu = doc.documentElement().firstChild().firstChild();
+ TQPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
if( actions )
{
for( KAction *a = actions->first(); a; a = actions->next() )
{
actionCollection()->insert( a );
- QDomElement newNode = doc.createElement( "Action" );
+ TQDomElement newNode = doc.createElement( "Action" );
newNode.setAttribute( "name", a->name() );
menu.appendChild( newNode );
}
@@ -92,7 +92,7 @@ IRCGUIClient::~IRCGUIClient()
{
}
-void IRCGUIClient::slotSelectCodec( const QTextCodec *codec )
+void IRCGUIClient::slotSelectCodec( const TQTextCodec *codec )
{
m_user->setCodec( codec );
}
diff --git a/kopete/protocols/irc/ircguiclient.h b/kopete/protocols/irc/ircguiclient.h
index b81aa632..fed65dd4 100644
--- a/kopete/protocols/irc/ircguiclient.h
+++ b/kopete/protocols/irc/ircguiclient.h
@@ -16,7 +16,7 @@
#ifndef IRCGUICLIENT_H
#define IRCGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Kopete { class ChatSession; }
@@ -25,7 +25,7 @@ class IRCContact;
/**
*@author Jason Keirstead
*/
-class IRCGUIClient : public QObject , public KXMLGUIClient
+class IRCGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
public:
@@ -33,7 +33,7 @@ class IRCGUIClient : public QObject , public KXMLGUIClient
~IRCGUIClient();
private slots:
- void slotSelectCodec( const QTextCodec *codec );
+ void slotSelectCodec( const TQTextCodec *codec );
private:
IRCContact *m_user;
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 );
}
diff --git a/kopete/protocols/irc/ircprotocol.h b/kopete/protocols/irc/ircprotocol.h
index 2a1700e5..0028e60b 100644
--- a/kopete/protocols/irc/ircprotocol.h
+++ b/kopete/protocols/irc/ircprotocol.h
@@ -24,7 +24,7 @@
#include "kopetemimetypehandler.h"
#include <dom/dom_node.h>
-#include <qdict.h>
+#include <tqdict.h>
#define m_protocol (IRCProtocol::protocol())
@@ -56,7 +56,7 @@ class IRCProtocolHandler : public Kopete::MimeTypeHandler
void handleURL( const KURL &url ) const;
};
-static const QString CHAT_VIEW( QString::fromLatin1("kopete_chatwindow") );
+static const TQString CHAT_VIEW( TQString::fromLatin1("kopete_chatwindow") );
/**
* @author Nick Betcher <nbetcher@kde.org>
@@ -81,23 +81,23 @@ public:
OnlineServer = 32768 //! This server is online.
};
- IRCProtocol( QObject *parent, const char *name, const QStringList &args );
+ IRCProtocol( TQObject *parent, const char *name, const TQStringList &args );
~IRCProtocol();
/** Kopete::Protocol reimplementation */
- virtual AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account);
+ virtual AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *account);
/**
* Deserialize contact data
*/
virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact,
- const QMap<QString, QString> &serializedData, const QMap<QString, QString> &addressBookData );
+ const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> &addressBookData );
- virtual KopeteEditAccountWidget* createEditAccountWidget(Kopete::Account *account, QWidget *parent);
+ virtual KopeteEditAccountWidget* createEditAccountWidget(Kopete::Account *account, TQWidget *parent);
- virtual Kopete::Account* createNewAccount(const QString &accountId);
+ virtual Kopete::Account* createNewAccount(const TQString &accountId);
- virtual QPtrList<KAction> *customChatWindowPopupActions( const Kopete::Message &, DOM::Node & );
+ virtual TQPtrList<KAction> *customChatWindowPopupActions( const Kopete::Message &, DOM::Node & );
static IRCProtocol *protocol();
@@ -142,13 +142,13 @@ public:
bool commandInProgress(){ return m_commandInProgress; }
void setCommandInProgress( bool ip ) { m_commandInProgress = ip; }
- QDict<IRCNetwork> &networks(){ return m_networks; }
+ TQDict<IRCNetwork> &networks(){ return m_networks; }
void addNetwork( IRCNetwork *network );
- void editNetworks( const QString &networkName = QString::null );
+ void editNetworks( const TQString &networkName = TQString::null );
signals:
- void networkConfigUpdated( const QString &selectedNetwork );
+ void networkConfigUpdated( const TQString &selectedNetwork );
private slots:
// FIXME: All the code for managing the networks list should be in another class - Will
@@ -168,48 +168,48 @@ private slots:
void slotMessageFilter( Kopete::Message &msg );
- void slotRawCommand( const QString &args, Kopete::ChatSession *manager );
- void slotQuoteCommand( const QString &args, Kopete::ChatSession *manager );
- void slotCtcpCommand( const QString &args, Kopete::ChatSession *manager );
- void slotPingCommand( const QString &args, Kopete::ChatSession *manager );
-
- void slotMotdCommand( const QString &args, Kopete::ChatSession *manager);
- void slotListCommand( const QString &args, Kopete::ChatSession *manager);
- void slotTopicCommand( const QString &args, Kopete::ChatSession *manager);
- void slotJoinCommand( const QString &args, Kopete::ChatSession *manager);
- void slotNickCommand( const QString &args, Kopete::ChatSession *manager);
- void slotWhoisCommand( const QString &args, Kopete::ChatSession *manager);
- void slotWhoWasCommand( const QString &args, Kopete::ChatSession *manager);
- void slotWhoCommand( const QString &args, Kopete::ChatSession *manager);
- void slotMeCommand( const QString &args, Kopete::ChatSession *manager);
- void slotAllMeCommand( const QString &args, Kopete::ChatSession *manager);
- void slotModeCommand( const QString &args, Kopete::ChatSession *manager);
- void slotQueryCommand( const QString &args, Kopete::ChatSession *manager);
-
- void slotKickCommand( const QString &args, Kopete::ChatSession *manager);
- void slotBanCommand( const QString &args, Kopete::ChatSession *manager);
- void slotOpCommand( const QString &args, Kopete::ChatSession *manager);
- void slotDeopCommand( const QString &args, Kopete::ChatSession *manager);
- void slotVoiceCommand( const QString &args, Kopete::ChatSession *manager);
- void slotDevoiceCommand( const QString &args, Kopete::ChatSession *manager);
- void slotQuitCommand( const QString &args, Kopete::ChatSession *manager);
- void slotPartCommand( const QString &args, Kopete::ChatSession *manager);
- void slotInviteCommand( const QString &args, Kopete::ChatSession *manager);
+ void slotRawCommand( const TQString &args, Kopete::ChatSession *manager );
+ void slotQuoteCommand( const TQString &args, Kopete::ChatSession *manager );
+ void slotCtcpCommand( const TQString &args, Kopete::ChatSession *manager );
+ void slotPingCommand( const TQString &args, Kopete::ChatSession *manager );
+
+ void slotMotdCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotListCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotTopicCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotJoinCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotNickCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotWhoisCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotWhoWasCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotWhoCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotMeCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotAllMeCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotModeCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotQueryCommand( const TQString &args, Kopete::ChatSession *manager);
+
+ void slotKickCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotBanCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotOpCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotDeopCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotVoiceCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotDevoiceCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotQuitCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotPartCommand( const TQString &args, Kopete::ChatSession *manager);
+ void slotInviteCommand( const TQString &args, Kopete::ChatSession *manager);
void slotViewCreated( KopeteView * );
private:
static IRCProtocol *s_protocol;
- void simpleModeChange( const QString &, Kopete::ChatSession *, const QString &mode );
+ void simpleModeChange( const TQString &, Kopete::ChatSession *, const TQString &mode );
// FIXME: All the code for managing the networks list should be in another class - Will
void storeCurrentNetwork();
void storeCurrentHost();
NetworkConfig *netConf;
- QString m_uiCurrentNetworkSelection;
- QString m_uiCurrentHostSelection;
+ TQString m_uiCurrentNetworkSelection;
+ TQString m_uiCurrentHostSelection;
// end of network list specific code
DOM::Node activeNode;
@@ -217,8 +217,8 @@ private:
bool m_commandInProgress;
- QDict<IRCNetwork> m_networks;
- QDict<IRCHost> m_hosts;
+ TQDict<IRCNetwork> m_networks;
+ TQDict<IRCHost> m_hosts;
IRCProtocolHandler *m_protocolHandler;
};
diff --git a/kopete/protocols/irc/ircservercontact.cpp b/kopete/protocols/irc/ircservercontact.cpp
index 3ca21643..5be40dff 100644
--- a/kopete/protocols/irc/ircservercontact.cpp
+++ b/kopete/protocols/irc/ircservercontact.cpp
@@ -28,40 +28,40 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-IRCServerContact::IRCServerContact(IRCContactManager *contactManager, const QString &servername, Kopete::MetaContact *m)
+IRCServerContact::IRCServerContact(IRCContactManager *contactManager, const TQString &servername, Kopete::MetaContact *m)
: IRCContact(contactManager, servername, m, "irc_server")
{
KIRC::Engine *engine = kircEngine();
- QObject::connect(engine, SIGNAL(internalError(KIRC::Engine::Error, KIRC::Message &)),
- this, SLOT(engineInternalError(KIRC::Engine::Error, KIRC::Message &)));
+ TQObject::connect(engine, TQT_SIGNAL(internalError(KIRC::Engine::Error, KIRC::Message &)),
+ this, TQT_SLOT(engineInternalError(KIRC::Engine::Error, KIRC::Message &)));
/*
//FIXME: Have some kind of a debug option for raw input/ouput display??
- QObject::connect(engine, SIGNAL(sentMessage(KIRC::Message &)),
- this, SLOT(engineSentMessage(KIRC::Message &)));
- QObject::connect(engine, SIGNAL(receivedMessage(KIRC::Message &)),
- this, SLOT(engineReceivedMessage(KIRC::Message &)));
+ TQObject::connect(engine, TQT_SIGNAL(sentMessage(KIRC::Message &)),
+ this, TQT_SLOT(engineSentMessage(KIRC::Message &)));
+ TQObject::connect(engine, TQT_SIGNAL(receivedMessage(KIRC::Message &)),
+ this, TQT_SLOT(engineReceivedMessage(KIRC::Message &)));
*/
- QObject::connect(engine, SIGNAL(incomingNotice(const QString &, const QString &)),
- this, SLOT(slotIncomingNotice(const QString &, const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingNotice(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotIncomingNotice(const TQString &, const TQString &)));
- QObject::connect(engine, SIGNAL(incomingCannotSendToChannel(const QString &, const QString &)),
- this, SLOT(slotCannotSendToChannel(const QString &, const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingCannotSendToChannel(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotCannotSendToChannel(const TQString &, const TQString &)));
- QObject::connect(engine, SIGNAL(incomingUnknown(const QString &)),
- this, SLOT(slotIncomingUnknown(const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingUnknown(const TQString &)),
+ this, TQT_SLOT(slotIncomingUnknown(const TQString &)));
- QObject::connect(engine, SIGNAL(incomingConnectString(const QString &)),
- this, SLOT(slotIncomingConnect(const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingConnectString(const TQString &)),
+ this, TQT_SLOT(slotIncomingConnect(const TQString &)));
- QObject::connect(engine, SIGNAL(incomingMotd(const QString &)),
- this, SLOT(slotIncomingMotd(const QString &)));
+ TQObject::connect(engine, TQT_SIGNAL(incomingMotd(const TQString &)),
+ this, TQT_SLOT(slotIncomingMotd(const TQString &)));
- 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*)) );
updateStatus();
}
@@ -90,7 +90,7 @@ void IRCServerContact::updateStatus()
}
}
-const QString IRCServerContact::caption() const
+const TQString IRCServerContact::caption() const
{
return i18n("%1 @ %2").arg(ircAccount()->mySelf()->nickName() ).arg(
kircEngine()->currentHost().isEmpty() ? ircAccount()->networkName() : kircEngine()->currentHost()
@@ -99,7 +99,7 @@ const QString IRCServerContact::caption() const
void IRCServerContact::engineInternalError(KIRC::Engine::Error engineError, KIRC::Message &ircmsg)
{
- QString error;
+ TQString error;
switch (engineError)
{
case KIRC::Engine::ParsingFailed:
@@ -121,7 +121,7 @@ void IRCServerContact::engineInternalError(KIRC::Engine::Error engineError, KIRC
error = i18n("KIRC Error - Unknown error: ");
}
- ircAccount()->appendMessage(error + QString(ircmsg.raw()), IRCAccount::ErrorReply);
+ ircAccount()->appendMessage(error + TQString(ircmsg.raw()), IRCAccount::ErrorReply);
}
void IRCServerContact::slotSendMsg(Kopete::Message &, Kopete::ChatSession *manager)
@@ -132,7 +132,7 @@ void IRCServerContact::slotSendMsg(Kopete::Message &, Kopete::ChatSession *manag
manager->appendMessage(msg);
}
-void IRCServerContact::appendMessage( const QString &message )
+void IRCServerContact::appendMessage( const TQString &message )
{
Kopete::ContactPtrList members;
members.append( this );
@@ -141,7 +141,7 @@ void IRCServerContact::appendMessage( const QString &message )
appendMessage(msg);
}
-void IRCServerContact::slotIncomingNotice( const QString &orig, const QString &notice )
+void IRCServerContact::slotIncomingNotice( const TQString &orig, const TQString &notice )
{
if (orig.isEmpty()) {
// Prefix missing.
@@ -167,24 +167,24 @@ void IRCServerContact::slotIncomingNotice( const QString &orig, const QString &n
}
}
-void IRCServerContact::slotIncomingUnknown(const QString &message)
+void IRCServerContact::slotIncomingUnknown(const TQString &message)
{
ircAccount()->appendMessage(message, IRCAccount::UnknownReply);
}
-void IRCServerContact::slotIncomingConnect(const QString &message)
+void IRCServerContact::slotIncomingConnect(const TQString &message)
{
ircAccount()->appendMessage(message, IRCAccount::ConnectReply);
}
-void IRCServerContact::slotIncomingMotd(const QString &message)
+void IRCServerContact::slotIncomingMotd(const TQString &message)
{
ircAccount()->appendMessage(message, IRCAccount::InfoReply);
}
-void IRCServerContact::slotCannotSendToChannel(const QString &channel, const QString &message)
+void IRCServerContact::slotCannotSendToChannel(const TQString &channel, const TQString &message)
{
- ircAccount()->appendMessage(QString::fromLatin1("%1: %2").arg(channel).arg(message), IRCAccount::ErrorReply);
+ ircAccount()->appendMessage(TQString::fromLatin1("%1: %2").arg(channel).arg(message), IRCAccount::ErrorReply);
}
void IRCServerContact::appendMessage(Kopete::Message &msg)
@@ -206,7 +206,7 @@ void IRCServerContact::slotDumpMessages()
{
manager()->appendMessage( mMsgBuffer.front() );
mMsgBuffer.pop_front();
- QTimer::singleShot( 0, this, SLOT( slotDumpMessages() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDumpMessages() ) );
}
}
@@ -214,7 +214,7 @@ void IRCServerContact::slotViewCreated( KopeteView *v )
{
kdDebug(14121) << k_funcinfo << "Created: " << v << ", mgr: " << v->msgManager() << ", Mine: " << m_chatSession << endl;
if (m_chatSession && v->msgManager() == m_chatSession)
- QTimer::singleShot(500, this, SLOT(slotDumpMessages()));
+ TQTimer::singleShot(500, this, TQT_SLOT(slotDumpMessages()));
}
#include "ircservercontact.moc"
diff --git a/kopete/protocols/irc/ircservercontact.h b/kopete/protocols/irc/ircservercontact.h
index 1ca1475b..4d9e378d 100644
--- a/kopete/protocols/irc/ircservercontact.h
+++ b/kopete/protocols/irc/ircservercontact.h
@@ -24,8 +24,8 @@
#include "kopetechatsessionmanager.h"
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
class KActionCollection;
class KAction;
@@ -48,12 +48,12 @@ class IRCServerContact
public:
// This class provides a Kopete::Contact for each server of a given IRC connection.
- IRCServerContact(IRCContactManager *, const QString &servername, Kopete::MetaContact *mc);
+ IRCServerContact(IRCContactManager *, const TQString &servername, Kopete::MetaContact *mc);
- virtual const QString caption() const;
+ virtual const TQString caption() const;
virtual void appendMessage(Kopete::Message &);
- void appendMessage( const QString &message );
+ void appendMessage( const TQString &message );
protected slots:
void engineInternalError(KIRC::Engine::Error error, KIRC::Message &ircmsg);
@@ -64,14 +64,14 @@ class IRCServerContact
void slotViewCreated( KopeteView* );
void slotDumpMessages();
- void slotIncomingUnknown( const QString &message );
- void slotIncomingConnect( const QString &message );
- void slotIncomingMotd( const QString &motd );
- void slotIncomingNotice( const QString &orig, const QString &notice );
- void slotCannotSendToChannel( const QString &channel, const QString &msg );
+ void slotIncomingUnknown( const TQString &message );
+ void slotIncomingConnect( const TQString &message );
+ void slotIncomingMotd( const TQString &motd );
+ void slotIncomingNotice( const TQString &orig, const TQString &notice );
+ void slotCannotSendToChannel( const TQString &channel, const TQString &msg );
private:
- QValueList<Kopete::Message> mMsgBuffer;
+ TQValueList<Kopete::Message> mMsgBuffer;
};
#endif
diff --git a/kopete/protocols/irc/ircsignalhandler.cpp b/kopete/protocols/irc/ircsignalhandler.cpp
index 5bfab0cc..db0acec2 100644
--- a/kopete/protocols/irc/ircsignalhandler.cpp
+++ b/kopete/protocols/irc/ircsignalhandler.cpp
@@ -23,147 +23,147 @@
#include "kircengine.h"
IRCSignalHandler::IRCSignalHandler(IRCContactManager *m)
- : QObject(m),
+ : TQObject(m),
manager(m)
{
KIRC::Engine *m_engine = static_cast<IRCAccount*>( manager->mySelf()->account() )->engine();
//Channel Connections to ourself
- QObject::connect(m_engine, SIGNAL(incomingNamesList(const QString &, const QStringList &)),
- this, SLOT(slotNamesList(const QString &, const QStringList &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingNamesList(const TQString &, const TQStringList &)),
+ this, TQT_SLOT(slotNamesList(const TQString &, const TQStringList &)));
- QObject::connect(m_engine, SIGNAL(incomingEndOfNames(const QString &)),
- this, SLOT(slotEndOfNames(const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingEndOfNames(const TQString &)),
+ this, TQT_SLOT(slotEndOfNames(const TQString &)));
- QObject::connect(m_engine, SIGNAL(incomingTopicUser(const QString &, const QString &, const QDateTime &)),
- this, SLOT(slotTopicUser(const QString&,const QString&,const QDateTime&)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingTopicUser(const TQString &, const TQString &, const TQDateTime &)),
+ this, TQT_SLOT(slotTopicUser(const TQString&,const TQString&,const TQDateTime&)));
//Channel String mappings
- map<IRCChannelContact>( m, SIGNAL(incomingFailedChankey(const QString &)),
+ map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChankey(const TQString &)),
&IRCChannelContact::failedChankey );
- map<IRCChannelContact>( m, SIGNAL(incomingFailedChanFull(const QString &)),
+ map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChanFull(const TQString &)),
&IRCChannelContact::failedChanInvite );
- map<IRCChannelContact>( m, SIGNAL(incomingFailedChanInvite(const QString &)),
+ map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChanInvite(const TQString &)),
&IRCChannelContact::failedChanInvite );
- map<IRCChannelContact>( m, SIGNAL(incomingFailedChanBanned(const QString &)),
+ map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChanBanned(const TQString &)),
&IRCChannelContact::failedChanBanned );
- mapSingle<IRCChannelContact>( m, SIGNAL(incomingJoinedChannel(const QString &, const QString &)),
+ mapSingle<IRCChannelContact>( m, TQT_SIGNAL(incomingJoinedChannel(const TQString &, const TQString &)),
&IRCChannelContact::userJoinedChannel );
- mapSingle<IRCChannelContact>( m, SIGNAL(incomingExistingTopic(const QString &, const QString &)),
+ mapSingle<IRCChannelContact>( m, TQT_SIGNAL(incomingExistingTopic(const TQString &, const TQString &)),
&IRCChannelContact::channelTopic );
- mapSingle<IRCChannelContact>( m, SIGNAL(incomingChannelHomePage(const QString &, const QString &)),
+ mapSingle<IRCChannelContact>( m, TQT_SIGNAL(incomingChannelHomePage(const TQString &, const TQString &)),
&IRCChannelContact::channelHomePage );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingPartedChannel(const QString &, const QString &,const QString &)),
+ TQT_SIGNAL(incomingPartedChannel(const TQString &, const TQString &,const TQString &)),
&IRCChannelContact::userPartedChannel );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingTopicChange(const QString &, const QString &,const QString &)),
+ TQT_SIGNAL(incomingTopicChange(const TQString &, const TQString &,const TQString &)),
&IRCChannelContact::topicChanged );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingChannelModeChange(const QString &, const QString &,const QString &)),
+ TQT_SIGNAL(incomingChannelModeChange(const TQString &, const TQString &,const TQString &)),
&IRCChannelContact::incomingModeChange );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingChannelMode(const QString &, const QString &,const QString &)),
+ TQT_SIGNAL(incomingChannelMode(const TQString &, const TQString &,const TQString &)),
&IRCChannelContact::incomingChannelMode );
mapTriple<IRCChannelContact>( m,
- SIGNAL(incomingKick(const QString &, const QString &,const QString &,const QString &)),
+ TQT_SIGNAL(incomingKick(const TQString &, const TQString &,const TQString &,const TQString &)),
&IRCChannelContact::userKicked );
//User connections to ourself
- QObject::connect(m_engine, SIGNAL(incomingWhoIsIdle(const QString &, unsigned long )),
- this, SLOT(slotNewWhoIsIdle(const QString &, unsigned long )));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingWhoIsIdle(const TQString &, unsigned long )),
+ this, TQT_SLOT(slotNewWhoIsIdle(const TQString &, unsigned long )));
- QObject::connect(m_engine, SIGNAL(incomingWhoReply(const QString &, const QString &, const QString &,
- const QString &, const QString &, bool, const QString &, uint, const QString & )),
- this, SLOT( slotNewWhoReply(const QString &, const QString &, const QString &, const QString &,
- const QString &, bool, const QString &, uint, const QString &)));
+ TQObject::connect(m_engine, TQT_SIGNAL(incomingWhoReply(const TQString &, const TQString &, const TQString &,
+ const TQString &, const TQString &, bool, const TQString &, uint, const TQString & )),
+ this, TQT_SLOT( slotNewWhoReply(const TQString &, const TQString &, const TQString &, const TQString &,
+ const TQString &, bool, const TQString &, uint, const TQString &)));
//User signal mappings
- map<IRCUserContact>( m, SIGNAL(incomingUserOnline( const QString & )), &IRCUserContact::userOnline );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingUserOnline( const TQString & )), &IRCUserContact::userOnline );
- map<IRCUserContact>( m, SIGNAL(incomingWhoIsOperator( const QString & )), &IRCUserContact::newWhoIsOperator );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingWhoIsOperator( const TQString & )), &IRCUserContact::newWhoIsOperator );
- map<IRCUserContact>( m, SIGNAL(incomingWhoIsIdentified( const QString & )), &IRCUserContact::newWhoIsIdentified );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingWhoIsIdentified( const TQString & )), &IRCUserContact::newWhoIsIdentified );
- map<IRCUserContact>( m, SIGNAL(incomingEndOfWhois( const QString & )), &IRCUserContact::whoIsComplete );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingEndOfWhois( const TQString & )), &IRCUserContact::whoIsComplete );
- map<IRCUserContact>( m, SIGNAL(incomingEndOfWhoWas( const QString & )), &IRCUserContact::whoWasComplete );
+ map<IRCUserContact>( m, TQT_SIGNAL(incomingEndOfWhoWas( const TQString & )), &IRCUserContact::whoWasComplete );
- mapSingle<IRCUserContact>( m, SIGNAL(incomingUserIsAway( const QString &, const QString & )),
+ mapSingle<IRCUserContact>( m, TQT_SIGNAL(incomingUserIsAway( const TQString &, const TQString & )),
&IRCUserContact::incomingUserIsAway );
- mapSingle<IRCUserContact>( m, SIGNAL(incomingWhoIsChannels( const QString &, const QString & )),
+ mapSingle<IRCUserContact>( m, TQT_SIGNAL(incomingWhoIsChannels( const TQString &, const TQString & )),
&IRCUserContact::newWhoIsChannels );
mapDouble<IRCUserContact>( m,
- SIGNAL(incomingWhoIsServer(const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingWhoIsServer(const TQString &, const TQString &, const TQString &)),
&IRCUserContact::newWhoIsServer );
mapDouble<IRCUserContact>( m,
- SIGNAL(incomingPrivAction(const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingPrivAction(const TQString &, const TQString &, const TQString &)),
&IRCUserContact::newAction );
mapDouble<IRCChannelContact>( m,
- SIGNAL(incomingAction(const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingAction(const TQString &, const TQString &, const TQString &)),
&IRCChannelContact::newAction );
mapTriple<IRCUserContact>( m,
- SIGNAL(incomingWhoIsUser(const QString &, const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingWhoIsUser(const TQString &, const TQString &, const TQString &, const TQString &)),
&IRCUserContact::newWhoIsUser );
mapTriple<IRCUserContact>( m,
- SIGNAL(incomingWhoWasUser(const QString &, const QString &, const QString &, const QString &)),
+ TQT_SIGNAL(incomingWhoWasUser(const TQString &, const TQString &, const TQString &, const TQString &)),
&IRCUserContact::newWhoIsUser );
}
IRCSignalHandler::~IRCSignalHandler()
{
//Delete our mapping pointers
- for( QValueList<IRCSignalMappingBase*>::iterator it = mappings.begin(); it != mappings.end(); ++it )
+ for( TQValueList<IRCSignalMappingBase*>::iterator it = mappings.begin(); it != mappings.end(); ++it )
delete *it;
}
-void IRCSignalHandler::slotNamesList( const QString &chan, const QStringList &list )
+void IRCSignalHandler::slotNamesList( const TQString &chan, const TQStringList &list )
{
IRCChannelContact *c = manager->existChannel( chan );
if( c )
c->namesList( list );
}
-void IRCSignalHandler::slotEndOfNames( const QString &chan )
+void IRCSignalHandler::slotEndOfNames( const TQString &chan )
{
IRCChannelContact *c = manager->existChannel( chan );
if ( c )
c->endOfNames();
}
-void IRCSignalHandler::slotTopicUser(const QString &chan, const QString &user,const QDateTime &time)
+void IRCSignalHandler::slotTopicUser(const TQString &chan, const TQString &user,const TQDateTime &time)
{
IRCChannelContact *c = manager->existChannel( chan );
if( c )
c->topicUser( user, time );
}
-void IRCSignalHandler::slotNewWhoIsIdle(const QString &nick, unsigned long val )
+void IRCSignalHandler::slotNewWhoIsIdle(const TQString &nick, unsigned long val )
{
IRCUserContact *c = manager->findUser( nick );
if( c )
c->newWhoIsIdle( val );
}
-void IRCSignalHandler::slotNewWhoReply(const QString &nick, const QString &arg1, const QString &arg2,
- const QString &arg3, const QString &arg4, bool arg5, const QString &arg6, uint arg7, const QString &arg8 )
+void IRCSignalHandler::slotNewWhoReply(const TQString &nick, const TQString &arg1, const TQString &arg2,
+ const TQString &arg3, const TQString &arg4, bool arg5, const TQString &arg6, uint arg7, const TQString &arg8 )
{
IRCUserContact *c = manager->findUser( nick );
if( c )
diff --git a/kopete/protocols/irc/ircsignalhandler.h b/kopete/protocols/irc/ircsignalhandler.h
index a87f814c..57732e07 100644
--- a/kopete/protocols/irc/ircsignalhandler.h
+++ b/kopete/protocols/irc/ircsignalhandler.h
@@ -19,9 +19,9 @@
#ifndef _IRC_SIGNAL_HANDLER_H
#define _IRC_SIGNAL_HANDLER_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include <kdebug.h>
@@ -54,30 +54,30 @@ struct IRCSignalMappingBase{};
struct IRCSignalMappingT : IRCSignalMappingBase
{
- virtual void exec( const QString & ) = 0;
+ virtual void exec( const TQString & ) = 0;
virtual ~IRCSignalMappingT() {};
};
struct IRCSignalMappingSingleT : IRCSignalMappingBase
{
- virtual void exec( const QString &, const QString & ) = 0;
+ virtual void exec( const TQString &, const TQString & ) = 0;
virtual ~IRCSignalMappingSingleT() {};
};
struct IRCSignalMappingDoubleT : IRCSignalMappingBase
{
- virtual void exec( const QString &, const QString &, const QString & ) = 0;
+ virtual void exec( const TQString &, const TQString &, const TQString & ) = 0;
virtual ~IRCSignalMappingDoubleT() {};
};
struct IRCSignalMappingTripleT : IRCSignalMappingBase
{
- virtual void exec( const QString &, const QString &, const QString &, const QString & ) = 0;
+ virtual void exec( const TQString &, const TQString &, const TQString &, const TQString & ) = 0;
virtual ~IRCSignalMappingTripleT() {};
};
/***
-QObject members, these connect to the KIRC signals and call
+TQObject members, these connect to the KIRC signals and call
the Mapping functions when they emit.
**/
@@ -86,10 +86,10 @@ class QMember : public QObject
Q_OBJECT
public:
- QMember( IRCSignalMappingT *m, QObject *p ) : QObject( p ), mapping( m ){};
+ QMember( IRCSignalMappingT *m, TQObject *p ) : TQObject( p ), mapping( m ){};
public slots:
- void slotEmit( const QString &id )
+ void slotEmit( const TQString &id )
{
//kdDebug(14120) << k_funcinfo << id << endl;
mapping->exec(id);
@@ -104,10 +104,10 @@ class QMemberSingle : public QObject
Q_OBJECT
public:
- QMemberSingle( IRCSignalMappingSingleT *m, QObject *p ) : QObject( p ), mapping( m ){}
+ QMemberSingle( IRCSignalMappingSingleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
public slots:
- void slotEmit( const QString &id, const QString &arg )
+ void slotEmit( const TQString &id, const TQString &arg )
{
//kdDebug(14120) << k_funcinfo << id << " : " << arg << endl;
mapping->exec(id,arg);
@@ -122,10 +122,10 @@ class QMemberDouble : public QObject
Q_OBJECT
public:
- QMemberDouble( IRCSignalMappingDoubleT *m, QObject *p ) : QObject( p ), mapping( m ){}
+ QMemberDouble( IRCSignalMappingDoubleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
public slots:
- void slotEmit( const QString &id, const QString &arg, const QString &arg2 )
+ void slotEmit( const TQString &id, const TQString &arg, const TQString &arg2 )
{
//kdDebug(14120) << k_funcinfo << id << " : " << arg << " : " << arg2 << endl;
mapping->exec(id,arg,arg2);
@@ -140,10 +140,10 @@ class QMemberTriple : public QObject
Q_OBJECT
public:
- QMemberTriple( IRCSignalMappingTripleT *m, QObject *p ) : QObject( p ), mapping( m ){}
+ QMemberTriple( IRCSignalMappingTripleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
public slots:
- void slotEmit( const QString &id, const QString &arg, const QString &arg2, const QString &arg3 )
+ void slotEmit( const TQString &id, const TQString &arg, const TQString &arg2, const TQString &arg3 )
{
//kdDebug(14120) << k_funcinfo << id << " : " << arg << " : " << arg2 << " : " << arg3 << endl;
mapping->exec(id,arg,arg2,arg3);
@@ -166,7 +166,7 @@ class IRCSignalMapping : public IRCSignalMappingT
IRCSignalMapping( IRCContactManager *mgr, const char * /*signal*/,
void (TClass::*m)() ) : manager(mgr), method(m){}
- void exec( const QString &id )
+ void exec( const TQString &id )
{
TClass *c = (TClass*)manager->findContact( id );
if( c )
@@ -186,21 +186,21 @@ class IRCSignalMappingSingle : public IRCSignalMappingSingleT
{
public:
IRCSignalMappingSingle<TClass>( IRCContactManager *mgr, const char * /*signal*/,
- void (TClass::*m)(const QString&) ) : manager(mgr), method(m){}
+ void (TClass::*m)(const TQString&) ) : manager(mgr), method(m){}
- void exec( const QString &id, const QString &arg )
+ void exec( const TQString &id, const TQString &arg )
{
TClass *c = (TClass*)manager->findContact( id );
if( c )
{
- void (TClass::*tmp)(const QString&) = (void (TClass::*)(const QString&))method;
+ void (TClass::*tmp)(const TQString&) = (void (TClass::*)(const TQString&))method;
(*c.*tmp)( arg );
}
}
private:
IRCContactManager *manager;
- void (TClass::*method)(const QString &);
+ void (TClass::*method)(const TQString &);
};
template <class TClass>
@@ -208,22 +208,22 @@ class IRCSignalMappingDouble : public IRCSignalMappingDoubleT
{
public:
IRCSignalMappingDouble<TClass>( IRCContactManager *mgr, const char * /*signal*/,
- void (TClass::*m)(const QString&,const QString&) ) : manager(mgr), method(m){}
+ void (TClass::*m)(const TQString&,const TQString&) ) : manager(mgr), method(m){}
- void exec( const QString &id,const QString &arg, const QString &arg2 )
+ void exec( const TQString &id,const TQString &arg, const TQString &arg2 )
{
TClass *c = (TClass*)manager->findContact( id );
if( c )
{
- void (TClass::*tmp)(const QString&,const QString&) =
- (void (TClass::*)(const QString&,const QString&))method;
+ void (TClass::*tmp)(const TQString&,const TQString&) =
+ (void (TClass::*)(const TQString&,const TQString&))method;
(*c.*tmp)(arg,arg2);
}
}
private:
IRCContactManager *manager;
- void (TClass::*method)(const QString &,const QString &);
+ void (TClass::*method)(const TQString &,const TQString &);
};
template <class TClass>
@@ -231,23 +231,23 @@ class IRCSignalMappingTriple : public IRCSignalMappingTripleT
{
public:
IRCSignalMappingTriple<TClass>( IRCContactManager *mgr, const char * /*signal*/,
- void (TClass::*m)(const QString&,const QString&,const QString&) )
+ void (TClass::*m)(const TQString&,const TQString&,const TQString&) )
: manager(mgr), method(m){}
- void exec( const QString &id,const QString&arg, const QString &arg2, const QString &arg3 )
+ void exec( const TQString &id,const TQString&arg, const TQString &arg2, const TQString &arg3 )
{
TClass *c = (TClass*)manager->findContact( id );
if( c )
{
- void (TClass::*tmp)(const QString&,const QString&,const QString&) =
- (void (TClass::*)(const QString&,const QString&,const QString&))method;
+ void (TClass::*tmp)(const TQString&,const TQString&,const TQString&) =
+ (void (TClass::*)(const TQString&,const TQString&,const TQString&))method;
(*c.*tmp)(arg,arg2,arg3);
}
}
private:
IRCContactManager *manager;
- void (TClass::*method)(const QString &,const QString &,const QString &);
+ void (TClass::*method)(const TQString &,const TQString &,const TQString &);
};
class IRCSignalHandler : public QObject
@@ -261,22 +261,22 @@ class IRCSignalHandler : public QObject
private slots:
/****
- Slots for signals with non-QString types
+ Slots for signals with non-TQString types
*/
//Channel contact slots
- void slotNamesList( const QString &, const QStringList & );
- void slotEndOfNames( const QString & );
- void slotTopicUser( const QString &, const QString&, const QDateTime &);
+ void slotNamesList( const TQString &, const TQStringList & );
+ void slotEndOfNames( const TQString & );
+ void slotTopicUser( const TQString &, const TQString&, const TQDateTime &);
//User contact slots
- void slotNewWhoIsIdle(const QString &, unsigned long );
- void slotNewWhoReply(const QString &, const QString &, const QString &, const QString &,
- const QString &, bool , const QString &, uint , const QString & );
+ void slotNewWhoIsIdle(const TQString &, unsigned long );
+ void slotNewWhoReply(const TQString &, const TQString &, const TQString &, const TQString &,
+ const TQString &, bool , const TQString &, uint , const TQString & );
private:
IRCContactManager *manager;
- QValueList<IRCSignalMappingBase*> mappings;
+ TQValueList<IRCSignalMappingBase*> mappings;
/****
Signal mapping functions
@@ -287,46 +287,46 @@ class IRCSignalHandler : public QObject
{
IRCSignalMappingT *mapping = new IRCSignalMapping<TClass>( m, signal, method );
mappings.append(mapping);
- QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
+ TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
new QMember( mapping, this),
- SLOT( slotEmit( const QString &) )
+ TQT_SLOT( slotEmit( const TQString &) )
);
}
template <class TClass>
inline void mapSingle( IRCContactManager *m,
- const char* signal, void (TClass::*method)(const QString&) )
+ const char* signal, void (TClass::*method)(const TQString&) )
{
IRCSignalMappingSingleT *mapping = new IRCSignalMappingSingle<TClass>( m, signal, method );
mappings.append(mapping);
- QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
+ TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
new QMemberSingle( mapping, this),
- SLOT( slotEmit( const QString &, const QString &) )
+ TQT_SLOT( slotEmit( const TQString &, const TQString &) )
);
}
template <class TClass>
inline void mapDouble( IRCContactManager *m,
- const char* signal, void (TClass::*method)(const QString&,const QString&) )
+ const char* signal, void (TClass::*method)(const TQString&,const TQString&) )
{
IRCSignalMappingDoubleT *mapping = new IRCSignalMappingDouble<TClass>( m, signal, method );
mappings.append(mapping);
- QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
+ TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
new QMemberDouble( mapping, this),
- SLOT( slotEmit( const QString &, const QString &,const QString &) )
+ TQT_SLOT( slotEmit( const TQString &, const TQString &,const TQString &) )
);
}
template <class TClass>
inline void mapTriple( IRCContactManager *m,
const char* signal,
- void (TClass::*method)(const QString&,const QString &, const QString &) )
+ void (TClass::*method)(const TQString&,const TQString &, const TQString &) )
{
IRCSignalMappingTripleT *mapping = new IRCSignalMappingTriple<TClass>( m, signal, method );
mappings.append(mapping);
- QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
+ TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
new QMemberTriple( mapping, this),
- SLOT( slotEmit( const QString &, const QString &,const QString &,const QString &) )
+ TQT_SLOT( slotEmit( const TQString &, const TQString &,const TQString &,const TQString &) )
);
}
};
diff --git a/kopete/protocols/irc/irctransferhandler.cpp b/kopete/protocols/irc/irctransferhandler.cpp
index 4715679e..e579e94a 100644
--- a/kopete/protocols/irc/irctransferhandler.cpp
+++ b/kopete/protocols/irc/irctransferhandler.cpp
@@ -41,13 +41,13 @@ KIRC::TransferHandler *IRCTransferHandler::handler()
IRCTransferHandler::IRCTransferHandler()
{
- connect(handler(), SIGNAL(transferCreated(KIRC::Transfer *)),
- this, SLOT(transferCreated(KIRC::Transfer *)));
+ connect(handler(), TQT_SIGNAL(transferCreated(KIRC::Transfer *)),
+ this, TQT_SLOT(transferCreated(KIRC::Transfer *)));
- connect(Kopete::TransferManager::transferManager(), SIGNAL(accepted(Kopete::Transfer *, const QString &)),
- this, SLOT(transferAccepted(Kopete::Transfer *, const QString&)));
- connect( Kopete::TransferManager::transferManager(), SIGNAL(refused(const Kopete::FileTransferInfo &)),
- this, SLOT(transferRefused(const Kopete::FileTransferInfo &)));
+ connect(Kopete::TransferManager::transferManager(), TQT_SIGNAL(accepted(Kopete::Transfer *, const TQString &)),
+ this, TQT_SLOT(transferAccepted(Kopete::Transfer *, const TQString&)));
+ connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL(refused(const Kopete::FileTransferInfo &)),
+ this, TQT_SLOT(transferRefused(const Kopete::FileTransferInfo &)));
}
void IRCTransferHandler::transferCreated(KIRC::Transfer *t)
@@ -55,7 +55,7 @@ void IRCTransferHandler::transferCreated(KIRC::Transfer *t)
kdDebug(14120) << k_funcinfo << endl;
IRCContact *contact = IRCContactManager::existContact(t->engine(), t->nick());
- QString fileName = t->fileName();
+ TQString fileName = t->fileName();
unsigned long fileSize = t->fileSize();
if(!contact)
@@ -88,7 +88,7 @@ void IRCTransferHandler::transferCreated(KIRC::Transfer *t)
}
}
-void IRCTransferHandler::transferAccepted(Kopete::Transfer *kt, const QString &file)
+void IRCTransferHandler::transferAccepted(Kopete::Transfer *kt, const TQString &file)
{
kdDebug(14120) << k_funcinfo << endl;
@@ -121,8 +121,8 @@ void IRCTransferHandler::connectKopeteTransfer(Kopete::Transfer *kt, KIRC::Trans
// case KIRC::Transfer::Chat:
case KIRC::Transfer::FileOutgoing:
case KIRC::Transfer::FileIncoming:
- connect(t , SIGNAL(fileSizeAcknowledge(unsigned int)),
- kt, SLOT(slotProcessed(unsigned int)));
+ connect(t , TQT_SIGNAL(fileSizeAcknowledge(unsigned int)),
+ kt, TQT_SLOT(slotProcessed(unsigned int)));
break;
default:
kdDebug(14120) << k_funcinfo << "Unknown transfer connections for type" << endl;
@@ -130,16 +130,16 @@ void IRCTransferHandler::connectKopeteTransfer(Kopete::Transfer *kt, KIRC::Trans
return;
}
- connect(t , SIGNAL(complete()),
- kt, SLOT(slotComplete()));
+ connect(t , TQT_SIGNAL(complete()),
+ kt, TQT_SLOT(slotComplete()));
-// connect(kt , SIGNAL(transferCanceled()),
-// t, SLOT(abort()));
-// connect(kt, SIGNAL(destroyed()),
-// t, SLOT(slotKopeteTransferDestroyed()));
+// connect(kt , TQT_SIGNAL(transferCanceled()),
+// t, TQT_SLOT(abort()));
+// connect(kt, TQT_SIGNAL(destroyed()),
+// t, TQT_SLOT(slotKopeteTransferDestroyed()));
- connect(kt, SIGNAL(result(KIO::Job *)),
- this , SLOT(kioresult(KIO::Job *)));
+ connect(kt, TQT_SIGNAL(result(KIO::Job *)),
+ this , TQT_SLOT(kioresult(KIO::Job *)));
t->initiate();
}
diff --git a/kopete/protocols/irc/irctransferhandler.h b/kopete/protocols/irc/irctransferhandler.h
index 17c419ae..7847464c 100644
--- a/kopete/protocols/irc/irctransferhandler.h
+++ b/kopete/protocols/irc/irctransferhandler.h
@@ -18,7 +18,7 @@
#ifndef IRCTRANSFERHANDLER_H
#define IRCTRANSFERHANDLER_H
-#include <qintdict.h>
+#include <tqintdict.h>
#include <kopetetransfermanager.h>
@@ -43,7 +43,7 @@ public:
private slots:
void transferCreated(KIRC::Transfer *);
- void transferAccepted(Kopete::Transfer *kt, const QString&file);
+ void transferAccepted(Kopete::Transfer *kt, const TQString&file);
void transferRefused(const Kopete::FileTransferInfo &info);
void kioresult(KIO::Job *job);
@@ -59,7 +59,7 @@ private:
KIRC::TransferHandler *handler();
- QIntDict<KIRC::Transfer> m_idMap;
+ TQIntDict<KIRC::Transfer> m_idMap;
};
#endif
diff --git a/kopete/protocols/irc/ircusercontact.cpp b/kopete/protocols/irc/ircusercontact.cpp
index dc9dcbf2..24e46c57 100644
--- a/kopete/protocols/irc/ircusercontact.cpp
+++ b/kopete/protocols/irc/ircusercontact.cpp
@@ -31,20 +31,20 @@
#include <kfiledialog.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const QString &nickname, Kopete::MetaContact *m )
+IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const TQString &nickname, Kopete::MetaContact *m )
: IRCContact(contactManager, nickname, m ),
actionCtcpMenu(0L)
{
setFileCapable(true);
- mOnlineTimer = new QTimer( this );
+ mOnlineTimer = new TQTimer( this );
- QObject::connect(mOnlineTimer, SIGNAL(timeout()), this, SLOT( slotUserOffline() ) );
+ TQObject::connect(mOnlineTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( slotUserOffline() ) );
- QObject::connect(kircEngine(), SIGNAL(incomingChannelModeChange(const QString&, const QString&, const QString&)),
- this, SLOT(slotIncomingModeChange(const QString&,const QString&, const QString&)));
+ TQObject::connect(kircEngine(), TQT_SIGNAL(incomingChannelModeChange(const TQString&, const TQString&, const TQString&)),
+ this, TQT_SLOT(slotIncomingModeChange(const TQString&,const TQString&, const TQString&)));
mInfo.isOperator = false;
mInfo.isIdentified = false;
@@ -100,9 +100,9 @@ void IRCUserContact::updateStatus()
// This may not be created yet ( for myself() on startup )
if( ircAccount()->contactManager() )
{
- QValueList<IRCChannelContact*> channels = ircAccount()->contactManager()->findChannelsByMember(this);
+ TQValueList<IRCChannelContact*> channels = ircAccount()->contactManager()->findChannelsByMember(this);
- for( QValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it )
+ for( TQValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it )
{
IRCChannelContact *channel = *it;
Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this);
@@ -141,13 +141,13 @@ void IRCUserContact::updateStatus()
}
}
-void IRCUserContact::sendFile(const KURL &sourceURL, const QString&, unsigned int)
+void IRCUserContact::sendFile(const KURL &sourceURL, const TQString&, unsigned int)
{
- QString filePath;
+ TQString filePath;
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
- filePath = KFileDialog::getOpenFileName(QString::null, "*", 0l , i18n("Kopete File Transfer"));
+ filePath = KFileDialog::getOpenFileName(TQString::null, "*", 0l , i18n("Kopete File Transfer"));
else
filePath = sourceURL.path(-1);
@@ -165,7 +165,7 @@ void IRCUserContact::slotUserOffline()
updateStatus();
if( !metaContact()->isTemporary() )
- kircEngine()->writeMessage( QString::fromLatin1("WHOWAS %1").arg(m_nickName) );
+ kircEngine()->writeMessage( TQString::fromLatin1("WHOWAS %1").arg(m_nickName) );
removeProperty( m_protocol->propUserInfo );
removeProperty( m_protocol->propServer );
@@ -180,7 +180,7 @@ void IRCUserContact::setAway(bool isAway)
updateStatus();
}
-void IRCUserContact::incomingUserIsAway(const QString &reason)
+void IRCUserContact::incomingUserIsAway(const TQString &reason)
{
if( manager( Kopete::Contact::CannotCreate ) )
{
@@ -214,29 +214,29 @@ void IRCUserContact::slotUserInfo()
}
}
-const QString IRCUserContact::caption() const
+const TQString IRCUserContact::caption() const
{
return i18n("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost());
}
void IRCUserContact::slotOp()
{
- contactMode( QString::fromLatin1("+o") );
+ contactMode( TQString::fromLatin1("+o") );
}
void IRCUserContact::slotDeop()
{
- contactMode( QString::fromLatin1("-o") );
+ contactMode( TQString::fromLatin1("-o") );
}
void IRCUserContact::slotVoice()
{
- contactMode( QString::fromLatin1("+v") );
+ contactMode( TQString::fromLatin1("+v") );
}
void IRCUserContact::slotDevoice()
{
- contactMode( QString::fromLatin1("-v") );
+ contactMode( TQString::fromLatin1("-v") );
}
void IRCUserContact::slotBanHost()
@@ -246,7 +246,7 @@ void IRCUserContact::slotBanHost()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanHostOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanHostOnce() ) );
}
} else {
slotBanHostOnce();
@@ -258,9 +258,9 @@ void IRCUserContact::slotBanHostOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*@%1").arg(mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@%1").arg(mInfo.hostName));
}
void IRCUserContact::slotBanUserHost()
@@ -270,7 +270,7 @@ void IRCUserContact::slotBanUserHost()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanUserHostOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanUserHostOnce() ) );
}
} else {
slotBanUserHostOnce();
@@ -282,9 +282,9 @@ void IRCUserContact::slotBanUserHostOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName));
}
void IRCUserContact::slotBanDomain()
@@ -294,7 +294,7 @@ void IRCUserContact::slotBanDomain()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanDomainOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanDomainOnce() ) );
}
} else {
slotBanDomainOnce();
@@ -306,11 +306,11 @@ void IRCUserContact::slotBanDomainOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- QString domain = mInfo.hostName.section('.', 1);
+ TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*@*.%1").arg(domain));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@*.%1").arg(domain));
}
void IRCUserContact::slotBanUserDomain()
@@ -320,7 +320,7 @@ void IRCUserContact::slotBanUserDomain()
if (mInfo.hostName.isEmpty()) {
if (kircEngine()->isConnected()) {
kircEngine()->whois(m_nickName);
- QTimer::singleShot( 750, this, SLOT( slotBanUserDomainOnce() ) );
+ TQTimer::singleShot( 750, this, TQT_SLOT( slotBanUserDomainOnce() ) );
}
} else {
slotBanUserDomainOnce();
@@ -332,25 +332,25 @@ void IRCUserContact::slotBanUserDomainOnce()
return;
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- QString domain = mInfo.hostName.section('.', 1);
+ TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, QString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain));
}
void IRCUserContact::slotKick()
{
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->kick(m_nickName, channelName, QString::null);
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ kircEngine()->kick(m_nickName, channelName, TQString::null);
}
-void IRCUserContact::contactMode(const QString &mode)
+void IRCUserContact::contactMode(const TQString &mode)
{
Kopete::ContactPtrList members = mActiveManager->members();
- QString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, QString::fromLatin1("%1 %2").arg(mode).arg(m_nickName));
+ TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
+ kircEngine()->mode(channelName, TQString::fromLatin1("%1 %2").arg(mode).arg(m_nickName));
}
void IRCUserContact::slotCtcpPing()
@@ -363,7 +363,7 @@ void IRCUserContact::slotCtcpVersion()
kircEngine()->CtcpRequest_version(m_nickName);
}
-void IRCUserContact::newWhoIsUser(const QString &username, const QString &hostname, const QString &realname)
+void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &hostname, const TQString &realname)
{
mInfo.channels.clear();
mInfo.userName = username;
@@ -372,14 +372,14 @@ void IRCUserContact::newWhoIsUser(const QString &username, const QString &hostna
if( onlineStatus().status() == Kopete::OnlineStatus::Offline )
{
- setProperty( m_protocol->propUserInfo, QString::fromLatin1("%1@%2")
+ setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
.arg(mInfo.userName).arg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propFullName, mInfo.realName );
}
}
-void IRCUserContact::newWhoIsServer(const QString &servername, const QString &serverinfo)
+void IRCUserContact::newWhoIsServer(const TQString &servername, const TQString &serverinfo)
{
mInfo.serverName = servername;
if( metaContact()->isTemporary() || onlineStatus().status() == Kopete::OnlineStatus::Online
@@ -395,7 +395,7 @@ void IRCUserContact::newWhoIsServer(const QString &servername, const QString &se
// 312 mynick othernick localhost.localdomain :FooNet Server
// 312 mynick othernick localhost.localdomain :Thu Jun 16 21:00:36 2005
- QDateTime lastSeen = QDateTime::fromString( serverinfo );
+ TQDateTime lastSeen = TQDateTime::fromString( serverinfo );
if( lastSeen.isValid() )
setProperty( m_protocol->propLastSeen, lastSeen );
}
@@ -417,7 +417,7 @@ void IRCUserContact::newWhoIsIdentified()
setProperty( m_protocol->propIsIdentified, i18n("True") );
}
-void IRCUserContact::newWhoIsChannels(const QString &channel)
+void IRCUserContact::newWhoIsChannels(const TQString &channel)
{
mInfo.channels.append( channel );
}
@@ -432,7 +432,7 @@ void IRCUserContact::whoIsComplete()
commandSource == manager(Kopete::Contact::CannotCreate) )
{
//User info
- QString msg = i18n("%1 is (%2@%3): %4<br/>")
+ TQString msg = i18n("%1 is (%2@%3): %4<br/>")
.arg(m_nickName)
.arg(mInfo.userName)
.arg(mInfo.hostName)
@@ -451,8 +451,8 @@ void IRCUserContact::whoIsComplete()
msg += i18n("on IRC via server %1 ( %2 )<br/>").arg(mInfo.serverName).arg(mInfo.serverInfo);
//Idle
- QString idleTime = formattedIdleTime();
- msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? QString::number(0) : idleTime );
+ TQString idleTime = formattedIdleTime();
+ msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? TQString::number(0) : idleTime );
//End
ircAccount()->appendMessage(msg, IRCAccount::InfoReply );
@@ -465,7 +465,7 @@ void IRCUserContact::whoWasComplete()
if( isChatting() && ircAccount()->currentCommandSource() == manager() )
{
//User info
- QString msg = i18n("%1 was (%2@%3): %4\n")
+ TQString msg = i18n("%1 was (%2@%3): %4\n")
.arg(m_nickName)
.arg(mInfo.userName)
.arg(mInfo.hostName)
@@ -482,27 +482,27 @@ void IRCUserContact::whoWasComplete()
}
}
-QString IRCUserContact::formattedName() const
+TQString IRCUserContact::formattedName() const
{
return mInfo.realName;
}
void IRCUserContact::updateInfo()
{
- setProperty( m_protocol->propUserInfo, QString::fromLatin1("%1@%2")
+ setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
.arg(mInfo.userName).arg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propChannels, mInfo.channels.join(" ") );
- setProperty( m_protocol->propHops, QString::number(mInfo.hops) );
+ setProperty( m_protocol->propHops, TQString::number(mInfo.hops) );
setProperty( m_protocol->propFullName, mInfo.realName );
setIdleTime( mInfo.idle );
- mInfo.lastUpdate = QTime::currentTime();
+ mInfo.lastUpdate = TQTime::currentTime();
}
-void IRCUserContact::newWhoReply( const QString &channel, const QString &user, const QString &host,
- const QString &server, bool away, const QString &flags, uint hops, const QString &realName )
+void IRCUserContact::newWhoReply( const TQString &channel, const TQString &user, const TQString &host,
+ const TQString &server, bool away, const TQString &flags, uint hops, const TQString &realName )
{
if( !mInfo.channels.contains( channel ) )
mInfo.channels.append( channel );
@@ -524,11 +524,11 @@ void IRCUserContact::newWhoReply( const QString &channel, const QString &user, c
}
}
-QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession *manager )
+TQPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession *manager )
{
if( manager )
{
- QPtrList<KAction> *mCustomActions = new QPtrList<KAction> ();
+ TQPtrList<KAction> *mCustomActions = new TQPtrList<KAction> ();
mActiveManager = manager;
Kopete::ContactPtrList members = mActiveManager->members();
IRCChannelContact *isChannel = dynamic_cast<IRCChannelContact*>( members.first() );
@@ -537,38 +537,38 @@ QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession
{
actionCtcpMenu = new KActionMenu(i18n("C&TCP"), 0, this );
actionCtcpMenu->insert( new KAction(i18n("&Version"), 0, this,
- SLOT(slotCtcpVersion()), actionCtcpMenu) );
+ TQT_SLOT(slotCtcpVersion()), actionCtcpMenu) );
actionCtcpMenu->insert( new KAction(i18n("&Ping"), 0, this,
- SLOT(slotCtcpPing()), actionCtcpMenu) );
+ TQT_SLOT(slotCtcpPing()), actionCtcpMenu) );
actionModeMenu = new KActionMenu(i18n("&Modes"), 0, this, "actionModeMenu");
actionModeMenu->insert( new KAction(i18n("&Op"), 0, this,
- SLOT(slotOp()), actionModeMenu, "actionOp") );
+ TQT_SLOT(slotOp()), actionModeMenu, "actionOp") );
actionModeMenu->insert( new KAction(i18n("&Deop"), 0, this,
- SLOT(slotDeop()), actionModeMenu, "actionDeop") );
+ TQT_SLOT(slotDeop()), actionModeMenu, "actionDeop") );
actionModeMenu->insert( new KAction(i18n("&Voice"), 0, this,
- SLOT(slotVoice()), actionModeMenu, "actionVoice") );
+ TQT_SLOT(slotVoice()), actionModeMenu, "actionVoice") );
actionModeMenu->insert( new KAction(i18n("Devoice"), 0, this,
- SLOT(slotDevoice()), actionModeMenu, "actionDevoice") );
+ TQT_SLOT(slotDevoice()), actionModeMenu, "actionDevoice") );
actionModeMenu->setEnabled( false );
- actionKick = new KAction(i18n("&Kick"), 0, this, SLOT(slotKick()), this);
+ actionKick = new KAction(i18n("&Kick"), 0, this, TQT_SLOT(slotKick()), this);
actionKick->setEnabled( false );
actionBanMenu = new KActionMenu(i18n("&Ban"), 0, this, "actionBanMenu");
actionBanMenu->insert( new KAction(i18n("Host (*!*@host.domain.net)"), 0, this,
- SLOT(slotBanHost()), actionBanMenu ) );
+ TQT_SLOT(slotBanHost()), actionBanMenu ) );
actionBanMenu->insert( new KAction(i18n("Domain (*!*@*.domain.net)"), 0, this,
- SLOT(slotBanDomain()), actionBanMenu ) );
+ TQT_SLOT(slotBanDomain()), actionBanMenu ) );
actionBanMenu->insert( new KAction(i18n("User@Host (*!*user@host.domain.net)"), 0, this,
- SLOT(slotBanUserHost()), actionBanMenu ) );
+ TQT_SLOT(slotBanUserHost()), actionBanMenu ) );
actionBanMenu->insert( new KAction(i18n("User@Domain (*!*user@*.domain.net)"), 0, this,
- SLOT(slotBanUserDomain()), actionBanMenu ) );
+ TQT_SLOT(slotBanUserDomain()), actionBanMenu ) );
actionBanMenu->setEnabled( false );
codecAction = new KCodecAction( i18n("&Encoding"), 0, this, "selectcharset" );
- connect( codecAction, SIGNAL( activated( const QTextCodec * ) ),
- this, SLOT( setCodec( const QTextCodec *) ) );
+ connect( codecAction, TQT_SIGNAL( activated( const TQTextCodec * ) ),
+ this, TQT_SLOT( setCodec( const TQTextCodec *) ) );
codecAction->setCodec( codec() );
}
@@ -594,7 +594,7 @@ QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession
return 0L;
}
-void IRCUserContact::slotIncomingModeChange( const QString &channel, const QString &, const QString &mode_ )
+void IRCUserContact::slotIncomingModeChange( const TQString &channel, const TQString &, const TQString &mode_ )
{
kdDebug(14120) << k_funcinfo << "channel: " << channel << " mode: " << mode_ << endl;
@@ -610,13 +610,13 @@ void IRCUserContact::slotIncomingModeChange( const QString &channel, const QStri
//
// irssi manual example: /MODE #channel +nto-o+v nick1 nick2 nick3
- QStringList users = QStringList::split(' ', mode_);
+ TQStringList users = TQStringList::split(' ', mode_);
users.pop_front();
- const QString mode = mode_.section(' ', 0, 0);
+ const TQString mode = mode_.section(' ', 0, 0);
bitAdjustment adjMode = RemoveBits;
- QStringList::iterator user = users.begin();
+ TQStringList::iterator user = users.begin();
//kdDebug(14120) << "me: " << m_nickName << " users: " << users << " mode: " << mode << endl;
@@ -695,7 +695,7 @@ void IRCUserContact::adjustInternalOnlineStatusBits(IRCChannelContact *channel,
channel->manager()->setContactOnlineStatus(this, newStatus);
}
-void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const QString &message)
+void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message)
{
if (to == this)
{
@@ -713,7 +713,7 @@ void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const QStr
}
}
-void IRCUserContact::newAction(const QString &to, const QString &action)
+void IRCUserContact::newAction(const TQString &to, const TQString &action)
{
IRCAccount *account = ircAccount();
diff --git a/kopete/protocols/irc/ircusercontact.h b/kopete/protocols/irc/ircusercontact.h
index 3373fa9c..b1cafa11 100644
--- a/kopete/protocols/irc/ircusercontact.h
+++ b/kopete/protocols/irc/ircusercontact.h
@@ -35,21 +35,21 @@ class IRCChannelContact;
struct IRCUserInfo
{
- QString userName;
- QString hostName;
- QString realName;
- QString serverName;
- QString serverInfo;
- QString flags;
- QStringList channels;
+ TQString userName;
+ TQString hostName;
+ TQString realName;
+ TQString serverName;
+ TQString serverInfo;
+ TQString flags;
+ TQStringList channels;
unsigned long idle;
bool isOperator;
bool isIdentified;
bool away;
bool online;
uint hops;
- QDateTime lastOnline;
- QTime lastUpdate;
+ TQDateTime lastOnline;
+ TQTime lastUpdate;
};
/**
@@ -64,41 +64,41 @@ class IRCUserContact : public IRCContact
public:
// This class provides a Kopete::Contact for each user on the channel.
- IRCUserContact(IRCContactManager *, const QString &nickname, Kopete::MetaContact *mc);
+ IRCUserContact(IRCContactManager *, const TQString &nickname, Kopete::MetaContact *mc);
// Kopete::Contact stuff
- virtual QPtrList<KAction> *customContextMenuActions( Kopete::ChatSession *manager );
- virtual const QString caption() const;
+ virtual TQPtrList<KAction> *customContextMenuActions( Kopete::ChatSession *manager );
+ virtual const TQString caption() const;
void setAway(bool isAway);
- QString formattedName() const;
+ TQString formattedName() const;
//Methods handled by the signal mapper
- void incomingUserIsAway(const QString &message );
+ void incomingUserIsAway(const TQString &message );
void userOnline();
- void newAction( const QString &from, const QString &action );
- void newWhoIsUser(const QString &username, const QString &hostname, const QString &realname);
- void newWhoIsServer(const QString &server, const QString &serverInfo);
+ void newAction( const TQString &from, const TQString &action );
+ void newWhoIsUser(const TQString &username, const TQString &hostname, const TQString &realname);
+ void newWhoIsServer(const TQString &server, const TQString &serverInfo);
void newWhoIsOperator();
void newWhoIsIdentified();
void newWhoIsIdle(unsigned long seconds);
- void newWhoIsChannels(const QString &channel);
+ void newWhoIsChannels(const TQString &channel);
void whoIsComplete();
void whoWasComplete();
- void newWhoReply( const QString &channel, const QString &user, const QString &host,
- const QString &server, bool away, const QString &flags, uint hops,
- const QString &realName );
+ void newWhoReply( const TQString &channel, const TQString &user, const TQString &host,
+ const TQString &server, bool away, const TQString &flags, uint hops,
+ const TQString &realName );
public slots:
/** \brief Updates online status for channels based on current internal status.
*/
virtual void updateStatus();
- virtual void sendFile(const KURL &sourceURL, const QString&, unsigned int);
+ virtual void sendFile(const KURL &sourceURL, const TQString&, unsigned int);
protected slots:
- virtual void privateMessage(IRCContact *from, IRCContact *to, const QString &message);
+ virtual void privateMessage(IRCContact *from, IRCContact *to, const TQString &message);
private slots:
void slotOp();
@@ -122,13 +122,13 @@ private slots:
virtual void slotUserInfo();
//This can't be handled by the contact manager since
- void slotIncomingModeChange(const QString &nick, const QString &channel, const QString &mode);
+ void slotIncomingModeChange(const TQString &nick, const TQString &channel, const TQString &mode);
private:
enum bitAdjustment { RemoveBits, AddBits };
void adjustInternalOnlineStatusBits(IRCChannelContact *channel, unsigned statusAdjustment, bitAdjustment adj);
- void contactMode(const QString &mode);
+ void contactMode(const TQString &mode);
void updateInfo();
KActionMenu *actionModeMenu;
@@ -137,7 +137,7 @@ private:
KActionMenu *actionBanMenu;
KCodecAction *codecAction;
Kopete::ChatSession *mActiveManager;
- QTimer *mOnlineTimer;
+ TQTimer *mOnlineTimer;
IRCUserInfo mInfo;
};
diff --git a/kopete/protocols/irc/kcodecaction.cpp b/kopete/protocols/irc/kcodecaction.cpp
index e32a1787..f7e4ee24 100644
--- a/kopete/protocols/irc/kcodecaction.cpp
+++ b/kopete/protocols/irc/kcodecaction.cpp
@@ -14,37 +14,37 @@
* *
*************************************************************************
*/
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include "kcodecaction.h"
-KCodecAction::KCodecAction( const QString &text, const KShortcut &cut,
- QObject *parent, const char *name ) : KSelectAction( text, "", cut, parent, name )
+KCodecAction::KCodecAction( const TQString &text, const KShortcut &cut,
+ TQObject *parent, const char *name ) : KSelectAction( text, "", cut, parent, name )
{
- QObject::connect( this, SIGNAL( activated( const QString & ) ),
- this, SLOT( slotActivated( const QString & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( slotActivated( const TQString & ) ) );
setItems( KCodecAction::supportedEncodings() );
}
-void KCodecAction::slotActivated( const QString & text )
+void KCodecAction::slotActivated( const TQString & text )
{
/* text is something like "Western European ( iso-8859-1 )", but we must give
* codecForName() only the "iso-8859-1" part.
*/
- QString encoding = KGlobal::charsets()->encodingForName(text);
+ TQString encoding = KGlobal::charsets()->encodingForName(text);
emit activated( KGlobal::charsets()->codecForName(encoding) );
}
-void KCodecAction::setCodec( const QTextCodec *codec )
+void KCodecAction::setCodec( const TQTextCodec *codec )
{
- QStringList items = this->items();
+ TQStringList items = this->items();
int i = 0;
- for (QStringList::ConstIterator it = items.begin(), end = items.end(); it != end; ++it, ++i) {
- QString encoding = KGlobal::charsets()->encodingForName(*it);
+ for (TQStringList::ConstIterator it = items.begin(), end = items.end(); it != end; ++it, ++i) {
+ TQString encoding = KGlobal::charsets()->encodingForName(*it);
if (KGlobal::charsets()->codecForName(encoding)->mibEnum() == codec->mibEnum()) {
setCurrentItem(i);
@@ -59,17 +59,17 @@ void KCodecAction::setCodec( const QTextCodec *codec )
* This piece of code from kdepim/kmail/kmmsgbase.cpp
*/
-QStringList KCodecAction::supportedEncodings(bool usAscii)
+TQStringList KCodecAction::supportedEncodings(bool usAscii)
{
- QStringList encodingNames = KGlobal::charsets()->availableEncodingNames();
- QStringList encodings;
- QMap<QString, bool> mimeNames;
+ TQStringList encodingNames = KGlobal::charsets()->availableEncodingNames();
+ TQStringList encodings;
+ TQMap<TQString, bool> mimeNames;
- for (QStringList::ConstIterator it = encodingNames.begin();
+ for (TQStringList::ConstIterator it = encodingNames.begin();
it != encodingNames.end(); ++it)
{
- QTextCodec *codec = KGlobal::charsets()->codecForName(*it);
- QString mimeName = (codec) ? QString(codec->mimeName()).lower() : (*it);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName(*it);
+ TQString mimeName = (codec) ? TQString(codec->mimeName()).lower() : (*it);
if (mimeNames.find(mimeName) == mimeNames.end())
{
encodings.append(KGlobal::charsets()->languageForEncoding(*it)
diff --git a/kopete/protocols/irc/kcodecaction.h b/kopete/protocols/irc/kcodecaction.h
index 93f9d6c1..3ebd5f4d 100644
--- a/kopete/protocols/irc/kcodecaction.h
+++ b/kopete/protocols/irc/kcodecaction.h
@@ -18,7 +18,7 @@
#define KCODECACTION_H
#include <kdeversion.h>
-#include <qintdict.h>
+#include <tqintdict.h>
#if KDE_IS_VERSION( 3, 1, 90 )
#include <kactionclasses.h>
@@ -30,18 +30,18 @@ class KCodecAction : public KSelectAction
{
Q_OBJECT
public:
- KCodecAction( const QString &text, const KShortcut &cut = KShortcut(),
- QObject *parent = 0, const char *name = 0 );
+ KCodecAction( const TQString &text, const KShortcut &cut = KShortcut(),
+ TQObject *parent = 0, const char *name = 0 );
- void setCodec( const QTextCodec *codec );
+ void setCodec( const TQTextCodec *codec );
- static QStringList supportedEncodings( bool usAscii = false );
+ static TQStringList supportedEncodings( bool usAscii = false );
signals:
- void activated( const QTextCodec * );
+ void activated( const TQTextCodec * );
private slots:
- void slotActivated( const QString & );
+ void slotActivated( const TQString & );
};
#endif
diff --git a/kopete/protocols/irc/ksparser.cpp b/kopete/protocols/irc/ksparser.cpp
index 66545688..f9029e84 100644
--- a/kopete/protocols/irc/ksparser.cpp
+++ b/kopete/protocols/irc/ksparser.cpp
@@ -23,15 +23,15 @@ Modified by Jason Keirstead <jason@keirstead.org>
#include <knotifyclient.h>
#include <kdebug.h>
-#include <qbuffer.h>
-#include <qdatastream.h>
-#include <qstylesheet.h>
+#include <tqbuffer.h>
+#include <tqdatastream.h>
+#include <tqstylesheet.h>
#include "ksparser.h"
#include <stdlib.h>
KSParser KSParser::m_parser;
-const QColor KSParser::IRC_Colors[17]=
+const TQColor KSParser::IRC_Colors[17]=
{
Qt::white,
Qt::black,
@@ -49,10 +49,10 @@ const QColor KSParser::IRC_Colors[17]=
Qt::magenta,
Qt::darkGray,
Qt::gray,
- QColor() // default invalid color, must be the last
+ TQColor() // default invalid color, must be the last
};
-const QRegExp KSParser::sm_colorsModeRegexp("(\\d{1,2})(?:,(\\d{1,2}))?");
+const TQRegExp KSParser::sm_colorsModeRegexp("(\\d{1,2})(?:,(\\d{1,2}))?");
template <typename _TYPE_>
inline void swap(_TYPE_ &o1, _TYPE_ &o2)
@@ -73,31 +73,31 @@ KSParser::~KSParser()
}
/* NOTE: If thread corruption are seen simply ad a qlock here */
-QCString KSParser::parse(const QCString &message)
+TQCString KSParser::parse(const TQCString &message)
{
return m_parser._parse(message);
}
-QCString KSParser::_parse(const QCString &message)
+TQCString KSParser::_parse(const TQCString &message)
{
- QCString data( message.size() * 2 );
- QBuffer buff( data );
+ TQCString data( message.size() * 2 );
+ TQBuffer buff( data );
buff.open( IO_WriteOnly );
m_tags.clear();
m_attributes.clear();
- QRegExp colorsModeRegexp(sm_colorsModeRegexp);
+ TQRegExp colorsModeRegexp(sm_colorsModeRegexp);
// should be set to the current default colors ....
- QColor fgColor; /*KopeteMesage::fg().name()*/
- QColor bgColor; /*KopeteMesage::bg().name()*/
+ TQColor fgColor; /*KopeteMesage::fg().name()*/
+ TQColor bgColor; /*KopeteMesage::bg().name()*/
uint chars = 0;
for(uint i = 0; i < message.length(); ++i)
{
- const QChar &cur = message[i];
- QString toAppend;
+ const TQChar &cur = message[i];
+ TQString toAppend;
switch (cur)
{
@@ -108,7 +108,7 @@ QCString KSParser::_parse(const QCString &message)
if (colorsModeRegexp.search(message, i+1) == (int)i+1)
{
i += colorsModeRegexp.matchedLength(); // + 1 will be added by ++
- QString tagStyle;
+ TQString tagStyle;
fgColor = ircColor(colorsModeRegexp.cap(1));
bgColor = ircColor(colorsModeRegexp.cap(2));
@@ -117,17 +117,17 @@ QCString KSParser::_parse(const QCString &message)
}
else
{
- toAppend = popTag(QString::fromLatin1("span"));
+ toAppend = popTag(TQString::fromLatin1("span"));
}
break;
case 0x07: //System bell: ^G
- KNotifyClient::beep( QString::fromLatin1("IRC beep event received in a message") );
+ KNotifyClient::beep( TQString::fromLatin1("IRC beep event received in a message") );
break;
case '\t': // 0x09
- toAppend = QString::fromLatin1("&nbsp;&nbsp;&nbsp;&nbsp;");
+ toAppend = TQString::fromLatin1("&nbsp;&nbsp;&nbsp;&nbsp;");
break;
case '\n': // 0x0D
- toAppend= QString::fromLatin1("<br/>");
+ toAppend= TQString::fromLatin1("<br/>");
break;
case 0x0D: // Italics: ^N
toAppend = toggleTag("i");
@@ -145,23 +145,23 @@ QCString KSParser::_parse(const QCString &message)
toAppend = toggleTag("u");
break;
case '<':
- toAppend = QString::fromLatin1("&lt;");
+ toAppend = TQString::fromLatin1("&lt;");
break;
case '>':
- toAppend = QString::fromLatin1("&gt;");
+ toAppend = TQString::fromLatin1("&gt;");
break;
default:
- if (cur < QChar(' ')) // search for control characters
- toAppend = QString::fromLatin1("&lt;%1&gt;").arg(cur, 2, 16).upper();
+ if (cur < TQChar(' ')) // search for control characters
+ toAppend = TQString::fromLatin1("&lt;%1&gt;").arg(cur, 2, 16).upper();
else
- toAppend = QStyleSheet::escape(cur);
+ toAppend = TQStyleSheet::escape(cur);
}
chars += toAppend.length();
buff.writeBlock( toAppend.latin1(), toAppend.length() );
}
- QString toAppend = popAll();
+ TQString toAppend = popAll();
chars += toAppend.length();
buff.writeBlock( toAppend.latin1(), toAppend.length() );
@@ -174,9 +174,9 @@ QCString KSParser::_parse(const QCString &message)
return data;
}
-QString KSParser::pushTag(const QString &tag, const QString &attributes)
+TQString KSParser::pushTag(const TQString &tag, const TQString &attributes)
{
- QString res;
+ TQString res;
m_tags.push(tag);
if(!m_attributes.contains(tag))
m_attributes.insert(tag, attributes);
@@ -188,28 +188,28 @@ QString KSParser::pushTag(const QString &tag, const QString &attributes)
return res + ">";
}
-QString KSParser::pushColorTag(const QColor &fgColor, const QColor &bgColor)
+TQString KSParser::pushColorTag(const TQColor &fgColor, const TQColor &bgColor)
{
- QString tagStyle;
+ TQString tagStyle;
if (fgColor.isValid())
- tagStyle += QString::fromLatin1("color:%1;").arg(fgColor.name());
+ tagStyle += TQString::fromLatin1("color:%1;").arg(fgColor.name());
if (bgColor.isValid())
- tagStyle += QString::fromLatin1("background-color:%1;").arg(bgColor.name());
+ tagStyle += TQString::fromLatin1("background-color:%1;").arg(bgColor.name());
if(!tagStyle.isEmpty())
- tagStyle = QString::fromLatin1("style=\"%1\"").arg(tagStyle);
+ tagStyle = TQString::fromLatin1("style=\"%1\"").arg(tagStyle);
- return pushTag(QString::fromLatin1("span"), tagStyle);;
+ return pushTag(TQString::fromLatin1("span"), tagStyle);;
}
-QString KSParser::popTag(const QString &tag)
+TQString KSParser::popTag(const TQString &tag)
{
if (!m_tags.contains(tag))
- return QString::null;
+ return TQString::null;
- QString res;
- QValueStack<QString> savedTags;
+ TQString res;
+ TQValueStack<TQString> savedTags;
while(m_tags.top() != tag)
{
savedTags.push(m_tags.pop());
@@ -222,21 +222,21 @@ QString KSParser::popTag(const QString &tag)
return res;
}
-QString KSParser::toggleTag(const QString &tag)
+TQString KSParser::toggleTag(const TQString &tag)
{
return m_attributes.contains(tag)?popTag(tag):pushTag(tag);
}
-QString KSParser::popAll()
+TQString KSParser::popAll()
{
- QString res;
+ TQString res;
while(!m_tags.isEmpty())
res.append("</" + m_tags.pop() + ">");
m_attributes.clear();
return res;
}
-QColor KSParser::ircColor(const QString &color)
+TQColor KSParser::ircColor(const TQString &color)
{
bool success;
unsigned int intColor = color.toUInt(&success);
@@ -244,19 +244,19 @@ QColor KSParser::ircColor(const QString &color)
if (success)
return ircColor(intColor);
else
- return QColor();
+ return TQColor();
}
-QColor KSParser::ircColor(unsigned int color)
+TQColor KSParser::ircColor(unsigned int color)
{
- unsigned int maxcolor = sizeof(IRC_Colors)/sizeof(QColor);
+ unsigned int maxcolor = sizeof(IRC_Colors)/sizeof(TQColor);
return color<=maxcolor?IRC_Colors[color]:IRC_Colors[maxcolor];
}
-int KSParser::colorForHTML(const QString &html)
+int KSParser::colorForHTML(const TQString &html)
{
- QColor color(html);
- for(uint i=0; i<sizeof(IRC_Colors)/sizeof(QColor); i++)
+ TQColor color(html);
+ for(uint i=0; i<sizeof(IRC_Colors)/sizeof(TQColor); i++)
{
if(IRC_Colors[i] == color)
return i;
diff --git a/kopete/protocols/irc/ksparser.h b/kopete/protocols/irc/ksparser.h
index dda7b7c1..cc9d9dc4 100644
--- a/kopete/protocols/irc/ksparser.h
+++ b/kopete/protocols/irc/ksparser.h
@@ -7,11 +7,11 @@
#ifndef __ksparser_h__
#define __ksparser_h__
-#include <qcolor.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qvaluestack.h>
+#include <tqcolor.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqvaluestack.h>
/*
* Helper class to parse IRC color/style codes and convert them to
@@ -25,30 +25,30 @@
class KSParser
{
public:
- static QCString parse(const QCString &);
- static int colorForHTML( const QString &html );
+ static TQCString parse(const TQCString &);
+ static int colorForHTML( const TQString &html );
- static QColor ircColor(const QString &color);
- static QColor ircColor(unsigned int color);
+ static TQColor ircColor(const TQString &color);
+ static TQColor ircColor(unsigned int color);
~KSParser();
private:
KSParser();
- QCString _parse(const QCString &);
- QString pushTag(const QString &, const QString & = QString::null);
- QString pushColorTag(const QColor &fgColor, const QColor &bgColor);
- QString popTag(const QString &);
- QString toggleTag(const QString &);
- QString popAll();
+ TQCString _parse(const TQCString &);
+ TQString pushTag(const TQString &, const TQString & = TQString::null);
+ TQString pushColorTag(const TQColor &fgColor, const TQColor &bgColor);
+ TQString popTag(const TQString &);
+ TQString toggleTag(const TQString &);
+ TQString popAll();
private:
static KSParser m_parser;
- static const QColor IRC_Colors[17];
- static const QRegExp sm_colorsModeRegexp;
+ static const TQColor IRC_Colors[17];
+ static const TQRegExp sm_colorsModeRegexp;
- QValueStack<QString> m_tags;
- QMap<QString, QString> m_attributes;
+ TQValueStack<TQString> m_tags;
+ TQMap<TQString, TQString> m_attributes;
};
#endif
diff --git a/kopete/protocols/irc/libkirc/kircengine.cpp b/kopete/protocols/irc/libkirc/kircengine.cpp
index 5b70d5fc..03936d5f 100644
--- a/kopete/protocols/irc/libkirc/kircengine.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine.cpp
@@ -30,8 +30,8 @@
#include <klocale.h>
#include <kstandarddirs.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
//Needed for getuid / getpwuid
#include <unistd.h>
@@ -48,13 +48,13 @@ using namespace KIRC;
// FIXME: Remove slotConnected() and error(int errCode) while going to KNetwork namespace
-/* Please note that the regular expression "[\\r\\n]*$" is used in a QString::replace statement many times.
+/* Please note that the regular expression "[\\r\\n]*$" is used in a TQString::replace statement many times.
* This gets rid of trailing \r\n, \r, \n, and \n\r characters.
*/
-const QRegExp Engine::m_RemoveLinefeeds( QString::fromLatin1("[\\r\\n]*$") );
+const TQRegExp Engine::m_RemoveLinefeeds( TQString::fromLatin1("[\\r\\n]*$") );
-Engine::Engine(QObject *parent, const char *name)
- : QObject(parent, QString::fromLatin1("[KIRC::Engine]%1").arg(name).latin1()),
+Engine::Engine(TQObject *parent, const char *name)
+ : TQObject(parent, TQString::fromLatin1("[KIRC::Engine]%1").arg(name).latin1()),
m_status(Idle),
m_FailedNickOnLogin(false),
m_useSSL(false),
@@ -64,7 +64,7 @@ Engine::Engine(QObject *parent, const char *name)
m_ctcpReplies(17, false),
codecs(577,false)
{
- setUserName(QString::null);
+ setUserName(TQString::null);
m_commands.setAutoDelete(true);
m_ctcpQueries.setAutoDelete(true);
@@ -74,11 +74,11 @@ Engine::Engine(QObject *parent, const char *name)
bindNumericReplies();
bindCtcp();
- m_VersionString = QString::fromLatin1("Anonymous client using the KIRC engine.");
- m_UserString = QString::fromLatin1("Response not supplied by user.");
- m_SourceString = QString::fromLatin1("Unknown client, known source.");
+ m_VersionString = TQString::fromLatin1("Anonymous client using the KIRC engine.");
+ m_UserString = TQString::fromLatin1("Response not supplied by user.");
+ m_SourceString = TQString::fromLatin1("Unknown client, known source.");
- defaultCodec = QTextCodec::codecForMib(106); // UTF8 mib is 106
+ defaultCodec = TQTextCodec::codecForMib(106); // UTF8 mib is 106
kdDebug(14120) << "Setting default engine codec, " << defaultCodec->name() << endl;
m_sock = 0L;
@@ -110,9 +110,9 @@ void Engine::setUseSSL( bool useSSL )
m_sock = new KSSLSocket;
m_sock->setSocketFlags( KExtendedSocket::inetSocket );
- connect(m_sock, SIGNAL(certificateAccepted()), SLOT(slotConnected()));
- connect(m_sock, SIGNAL(certificateRejected()), SLOT(slotConnectionClosed()));
- connect(m_sock, SIGNAL(sslFailure()), SLOT(slotConnectionClosed()));
+ connect(m_sock, TQT_SIGNAL(certificateAccepted()), TQT_SLOT(slotConnected()));
+ connect(m_sock, TQT_SIGNAL(certificateRejected()), TQT_SLOT(slotConnectionClosed()));
+ connect(m_sock, TQT_SIGNAL(sslFailure()), TQT_SLOT(slotConnectionClosed()));
}
else
#else
@@ -124,12 +124,12 @@ void Engine::setUseSSL( bool useSSL )
m_sock = new KExtendedSocket;
m_sock->setSocketFlags( KExtendedSocket::inputBufferedSocket | KExtendedSocket::inetSocket );
- connect(m_sock, SIGNAL(connectionSuccess()), SLOT(slotConnected()));
- connect(m_sock, SIGNAL(connectionFailed(int)), SLOT(error(int)));
+ connect(m_sock, TQT_SIGNAL(connectionSuccess()), TQT_SLOT(slotConnected()));
+ connect(m_sock, TQT_SIGNAL(connectionFailed(int)), TQT_SLOT(error(int)));
}
- connect(m_sock, SIGNAL(closed(int)), SLOT(slotConnectionClosed()));
- connect(m_sock, SIGNAL(readyRead()), SLOT(slotReadyRead()));
+ connect(m_sock, TQT_SIGNAL(closed(int)), TQT_SLOT(slotConnectionClosed()));
+ connect(m_sock, TQT_SIGNAL(readyRead()), TQT_SLOT(slotReadyRead()));
}
}
@@ -183,7 +183,7 @@ void Engine::setStatus(Engine::Status status)
}
}
-void Engine::connectToServer(const QString &host, Q_UINT16 port, const QString &nickname, bool useSSL )
+void Engine::connectToServer(const TQString &host, Q_UINT16 port, const TQString &nickname, bool useSSL )
{
setUseSSL(useSSL);
@@ -229,45 +229,45 @@ void Engine::error(int errCode)
}
}
-void Engine::setVersionString(const QString &newString)
+void Engine::setVersionString(const TQString &newString)
{
m_VersionString = newString;
m_VersionString.remove(m_RemoveLinefeeds);
}
-void Engine::setUserString(const QString &newString)
+void Engine::setUserString(const TQString &newString)
{
m_UserString = newString;
m_UserString.remove(m_RemoveLinefeeds);
}
-void Engine::setSourceString(const QString &newString)
+void Engine::setSourceString(const TQString &newString)
{
m_SourceString = newString;
m_SourceString.remove(m_RemoveLinefeeds);
}
-void Engine::setUserName(const QString &newName)
+void Engine::setUserName(const TQString &newName)
{
if(newName.isEmpty())
- m_Username = QString::fromLatin1(getpwuid(getuid())->pw_name);
+ m_Username = TQString::fromLatin1(getpwuid(getuid())->pw_name);
else
m_Username = newName;
m_Username.remove(m_RemoveLinefeeds);
}
-void Engine::setRealName(const QString &newName)
+void Engine::setRealName(const TQString &newName)
{
if(newName.isEmpty())
- m_realName = QString::fromLatin1(getpwuid(getuid())->pw_gecos);
+ m_realName = TQString::fromLatin1(getpwuid(getuid())->pw_gecos);
else
m_realName = newName;
m_realName.remove(m_RemoveLinefeeds);
}
-bool Engine::_bind(QDict<KIRC::MessageRedirector> &dict,
- QString command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::_bind(TQDict<KIRC::MessageRedirector> &dict,
+ TQString command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
// FIXME: Force upper case.
// FIXME: Force number format.
@@ -283,29 +283,29 @@ bool Engine::_bind(QDict<KIRC::MessageRedirector> &dict,
return mr->connect(object, member);
}
-bool Engine::bind(const QString &command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::bind(const TQString &command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
return _bind(m_commands, command, object, member,
minArgs, maxArgs, helpMessage);
}
-bool Engine::bind(int id, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::bind(int id, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
- return _bind(m_commands, QString::number(id), object, member,
+ return _bind(m_commands, TQString::number(id), object, member,
minArgs, maxArgs, helpMessage);
}
-bool Engine::bindCtcpQuery(const QString &command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::bindCtcpQuery(const TQString &command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
return _bind(m_ctcpQueries, command, object, member,
minArgs, maxArgs, helpMessage);
}
-bool Engine::bindCtcpReply(const QString &command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage)
+bool Engine::bindCtcpReply(const TQString &command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage)
{
return _bind(m_ctcpReplies, command, object, member,
minArgs, maxArgs, helpMessage);
@@ -313,32 +313,32 @@ bool Engine::bindCtcpReply(const QString &command, QObject *object, const char *
/* Message will be send as passed.
*/
-void Engine::writeRawMessage(const QString &rawMsg)
+void Engine::writeRawMessage(const TQString &rawMsg)
{
Message::writeRawMessage(this, defaultCodec, rawMsg);
}
/* Message will be quoted before beeing send.
*/
-void Engine::writeMessage(const QString &msg, const QTextCodec *codec)
+void Engine::writeMessage(const TQString &msg, const TQTextCodec *codec)
{
Message::writeMessage(this, codec ? codec : defaultCodec, msg);
}
-void Engine::writeMessage(const QString &command, const QStringList &args, const QString &suffix, const QTextCodec *codec)
+void Engine::writeMessage(const TQString &command, const TQStringList &args, const TQString &suffix, const TQTextCodec *codec)
{
Message::writeMessage(this, codec ? codec : defaultCodec, command, args, suffix );
}
-void Engine::writeCtcpMessage(const QString &command, const QString &to, const QString &ctcpMessage)
+void Engine::writeCtcpMessage(const TQString &command, const TQString &to, const TQString &ctcpMessage)
{
Message::writeCtcpMessage(this, defaultCodec, command, to, ctcpMessage);
}
-void Engine::writeCtcpMessage(const QString &command, const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs, const QString &ctcpSuffix, bool )
+void Engine::writeCtcpMessage(const TQString &command, const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix, bool )
{
- QString nick = Entity::userNick(to);
+ TQString nick = Entity::userNick(to);
Message::writeCtcpMessage(this, codecForNick( nick ), command, nick, suffix,
ctcpCommand, ctcpArgs, ctcpSuffix );
@@ -362,13 +362,13 @@ void Engine::slotReadyRead()
// mr = m_numericCommands[ msg.command().toInt() ];
// we do this conversion because some dummy servers sends 1 instead of 001
// numbers are stored as "1" instead of "001" to make convertion faster (no 0 pading).
- mr = m_commands[ QString::number(msg.command().toInt()) ];
+ mr = m_commands[ TQString::number(msg.command().toInt()) ];
else
mr = m_commands[ msg.command() ];
if (mr)
{
- QStringList errors = mr->operator()(msg);
+ TQStringList errors = mr->operator()(msg);
if (!errors.isEmpty())
{
@@ -393,19 +393,19 @@ void Engine::slotReadyRead()
emit internalError(ParsingFailed, msg);
}
- QTimer::singleShot( 0, this, SLOT( slotReadyRead() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotReadyRead() ) );
}
if(m_sock->socketStatus() != KExtendedSocket::connected)
error();
}
-const QTextCodec *Engine::codecForNick( const QString &nick ) const
+const TQTextCodec *Engine::codecForNick( const TQString &nick ) const
{
if( nick.isEmpty() )
return defaultCodec;
- QTextCodec *codec = codecs[ nick ];
+ TQTextCodec *codec = codecs[ nick ];
kdDebug(14120) << nick << " has codec " << codec << endl;
if( !codec )
@@ -427,7 +427,7 @@ void Engine::showInfoDialog()
* (Only missing the \n\r final characters)
* So applying the same parsing rules to the messages.
*/
-bool Engine::invokeCtcpCommandOfMessage(const QDict<MessageRedirector> &map, Message &msg)
+bool Engine::invokeCtcpCommandOfMessage(const TQDict<MessageRedirector> &map, Message &msg)
{
if(msg.hasCtcpMessage() && msg.ctcpMessage().isValid())
{
@@ -436,14 +436,14 @@ bool Engine::invokeCtcpCommandOfMessage(const QDict<MessageRedirector> &map, Mes
MessageRedirector *mr = map[ctcpMsg.command()];
if (mr)
{
- QStringList errors = mr->operator()(msg);
+ TQStringList errors = mr->operator()(msg);
if (errors.isEmpty())
return true;
kdDebug(14120) << "Method error for line:" << ctcpMsg.raw() << endl;
writeCtcpErrorMessage(msg.prefix(), msg.ctcpRaw(),
- QString::fromLatin1("%1 internal error(s)").arg(errors.size()));
+ TQString::fromLatin1("%1 internal error(s)").arg(errors.size()));
}
else
{
@@ -462,7 +462,7 @@ bool Engine::invokeCtcpCommandOfMessage(const QDict<MessageRedirector> &map, Mes
return false;
}
-EntityPtr Engine::getEntity(const QString &name)
+EntityPtr Engine::getEntity(const TQString &name)
{
Entity *entity = 0;
@@ -474,7 +474,7 @@ EntityPtr Engine::getEntity(const QString &name)
m_entities.append(entity);
}
- connect(entity, SIGNAL(destroyed(KIRC::Entity *)), SLOT(destroyed(KIRC::Entity *)));
+ connect(entity, TQT_SIGNAL(destroyed(KIRC::Entity *)), TQT_SLOT(destroyed(KIRC::Entity *)));
return EntityPtr(entity);
}
diff --git a/kopete/protocols/irc/libkirc/kircengine.h b/kopete/protocols/irc/libkirc/kircengine.h
index 50cb8f49..4fb381f1 100644
--- a/kopete/protocols/irc/libkirc/kircengine.h
+++ b/kopete/protocols/irc/libkirc/kircengine.h
@@ -33,12 +33,12 @@
#include <kdebugclasses.h>
#endif
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qintdict.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqintdict.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class QRegExp;
@@ -55,21 +55,21 @@ class Engine
{
Q_OBJECT
-// Q_PROPERTY(QUrl serverURL READ serverURL WRITE setServerURL)
+// Q_PROPERTY(TQUrl serverURL READ serverURL WRITE setServerURL)
// Extracted from the base of the serverURL.
// Q_PROPERTY(bool useSSL);
-// Q_PROPERTY(QString user READ user);
-// Q_PROPERTY(QString password);
-// Q_PROPERTY(QString host READ host);
+// Q_PROPERTY(TQString user READ user);
+// Q_PROPERTY(TQString password);
+// Q_PROPERTY(TQString host READ host);
// Q_PROPERTY(int port READ host);
// Extracted from the query of the serverURL.
// Q_PROPERTY(bool reqsPasswd);
-// Q_PROPERTY(QString name); // real name
-// Q_PROPERTY(QStringList nickList READ nickList WRITE setNickList)
-// Q_PROPERTY(QString nick READ nick)
-// Q_PROPERTY(QStringList portList)
+// Q_PROPERTY(TQString name); // real name
+// Q_PROPERTY(TQStringList nickList READ nickList WRITE setNickList)
+// Q_PROPERTY(TQString nick READ nick)
+// Q_PROPERTY(TQStringList portList)
Q_ENUMS(Status)
@@ -105,38 +105,38 @@ public:
MessageOfTheDayCondensedMessage
};
- Engine( QObject *parent = 0, const char* name = 0 );
+ Engine( TQObject *parent = 0, const char* name = 0 );
~Engine();
-// QString nick() const;
-// QStringList nickList() const;
-// void setNickList(const QStringList& nickList);
+// TQString nick() const;
+// TQStringList nickList() const;
+// void setNickList(const TQStringList& nickList);
-// QUrl serverURL() const;
-// bool setServerURL(const QUrl &url);
+// TQUrl serverURL() const;
+// bool setServerURL(const TQUrl &url);
- inline const QString &currentHost() const
+ inline const TQString &currentHost() const
{ return m_Host; };
inline Q_UINT16 currentPort()
{ return m_Port; }
- inline const QString &nickName() const
+ inline const TQString &nickName() const
{ return m_Nickname; };
- inline const QString &password() const
+ inline const TQString &password() const
{ return m_Passwd; }
- inline void setPassword(const QString &passwd)
+ inline void setPassword(const TQString &passwd)
{ m_Passwd = passwd; };
- inline const QString &userName() const
+ inline const TQString &userName() const
{ return m_Username; }
- void setUserName(const QString &newName);
+ void setUserName(const TQString &newName);
- void setRealName(const QString &newName);
- inline const QString &realName() const
+ void setRealName(const TQString &newName);
+ inline const TQString &realName() const
{ return m_realName; }
inline const bool reqsPassword() const
@@ -148,18 +148,18 @@ public:
const bool useSSL() const { return m_useSSL; };
void setUseSSL( bool useSSL );
- inline const QTextCodec *codec() const
+ inline const TQTextCodec *codec() const
{ return defaultCodec; };
- const QTextCodec *codecForNick( const QString &nick ) const;
+ const TQTextCodec *codecForNick( const TQString &nick ) const;
- inline void setDefaultCodec( QTextCodec* codec )
+ inline void setDefaultCodec( TQTextCodec* codec )
{ defaultCodec = codec; };
- void setVersionString(const QString &versionString);
- void setUserString(const QString &userString);
- void setSourceString(const QString &sourceString);
- void connectToServer(const QString &host, Q_UINT16 port, const QString &nickname, bool useSSL = false);
+ void setVersionString(const TQString &versionString);
+ void setUserString(const TQString &userString);
+ void setSourceString(const TQString &sourceString);
+ void connectToServer(const TQString &host, Q_UINT16 port, const TQString &nickname, bool useSSL = false);
KExtendedSocket *socket()
{ return m_sock; };
@@ -173,102 +173,102 @@ public:
inline bool isConnected() const
{ return m_status == Connected; }
- inline void setCodec( const QString &nick, const QTextCodec *codec )
+ inline void setCodec( const TQString &nick, const TQTextCodec *codec )
{ codecs.replace( nick, codec ); }
/* Custom CTCP replies handling */
- inline QString &customCtcp( const QString &s )
+ inline TQString &customCtcp( const TQString &s )
{ return customCtcpMap[s]; }
- inline void addCustomCtcp( const QString &ctcp, const QString &reply )
+ inline void addCustomCtcp( const TQString &ctcp, const TQString &reply )
{ customCtcpMap[ ctcp.lower() ] = reply; }
- KIRC::EntityPtr getEntity(const QString &name);
+ KIRC::EntityPtr getEntity(const TQString &name);
public slots:
//Message output
- void writeRawMessage(const QString &message);
+ void writeRawMessage(const TQString &message);
- void writeMessage(const QString &message, const QTextCodec *codec = 0 );
- void writeMessage(const QString &command, const QStringList &args,
- const QString &suffix = QString::null, const QTextCodec *codec = 0);
+ void writeMessage(const TQString &message, const TQTextCodec *codec = 0 );
+ void writeMessage(const TQString &command, const TQStringList &args,
+ const TQString &suffix = TQString::null, const TQTextCodec *codec = 0);
- void writeCtcpMessage(const QString &command, const QString &to, const QString &ctcpMessage);
+ void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &ctcpMessage);
- void writeCtcpMessage(const QString &command, const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs, const QString &ctcpSuffix = QString::null,
+ void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix = TQString::null,
bool emitRepliedCtcp = true);
- inline void writeCtcpQueryMessage(const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs = QStringList(), const QString &ctcpSuffix = QString::null,
+ inline void writeCtcpQueryMessage(const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null,
bool emitRepliedCtcp = true)
{ return writeCtcpMessage("PRIVMSG", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); }
- inline void writeCtcpReplyMessage(const QString &to, const QString &ctcpMessage)
+ inline void writeCtcpReplyMessage(const TQString &to, const TQString &ctcpMessage)
{ writeCtcpMessage("NOTICE", to, ctcpMessage); }
- inline void writeCtcpReplyMessage(const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs = QStringList(), const QString &ctcpSuffix = QString::null,
+ inline void writeCtcpReplyMessage(const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null,
bool emitRepliedCtcp = true)
{ return writeCtcpMessage("NOTICE", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); }
- inline void writeCtcpErrorMessage(const QString &to, const QString &ctcpLine, const QString &errorMsg,
+ inline void writeCtcpErrorMessage(const TQString &to, const TQString &ctcpLine, const TQString &errorMsg,
bool emitRepliedCtcp=true)
- { return writeCtcpReplyMessage(to, QString::null, "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); }
+ { return writeCtcpReplyMessage(to, TQString::null, "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); }
- bool bind(const QString &command, QObject *object, const char *member,
+ bool bind(const TQString &command, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
- bool bind(int id, QObject *object, const char *member,
+ bool bind(int id, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
- bool bindCtcpQuery(const QString &command, QObject *object, const char *member,
+ bool bindCtcpQuery(const TQString &command, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
- bool bindCtcpReply(const QString &command, QObject *object, const char *member,
+ bool bindCtcpReply(const TQString &command, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
- void away(bool isAway, const QString &awayMessage = QString::null);
- void ison(const QStringList &nickList);
- void join(const QString &name, const QString &key);
- void kick(const QString &user, const QString &channel, const QString &reason);
+ void away(bool isAway, const TQString &awayMessage = TQString::null);
+ void ison(const TQStringList &nickList);
+ void join(const TQString &name, const TQString &key);
+ void kick(const TQString &user, const TQString &channel, const TQString &reason);
void list();
- void mode(const QString &target, const QString &mode);
- void motd(const QString &server = QString::null);
- void nick(const QString &newNickname);
- void notice(const QString &target, const QString &message);
- void part(const QString &name, const QString &reason);
- void pass(const QString &password);
- void privmsg(const QString &contact, const QString &message);
+ void mode(const TQString &target, const TQString &mode);
+ void motd(const TQString &server = TQString::null);
+ void nick(const TQString &newNickname);
+ void notice(const TQString &target, const TQString &message);
+ void part(const TQString &name, const TQString &reason);
+ void pass(const TQString &password);
+ void privmsg(const TQString &contact, const TQString &message);
/**
* Send a quit message for the given reason.
* If now is set to true the connection is closed and no event message is sent.
* Therefore setting now to true should only be used while destroying the object.
*/
- void quit(const QString &reason, bool now=false);
+ void quit(const TQString &reason, bool now=false);
- void topic(const QString &channel, const QString &topic);
- void user(const QString &newUsername, const QString &hostname, const QString &newRealname);
- void user(const QString &newUsername, Q_UINT8 mode, const QString &newRealname);
- void whois(const QString &user);
+ void topic(const TQString &channel, const TQString &topic);
+ void user(const TQString &newUsername, const TQString &hostname, const TQString &newRealname);
+ void user(const TQString &newUsername, Q_UINT8 mode, const TQString &newRealname);
+ void whois(const TQString &user);
/* CTCP commands */
- void CtcpRequestCommand(const QString &contact, const QString &command);
- void CtcpRequest_action(const QString &contact, const QString &message);
- void CtcpRequest_dcc(const QString &, const QString &, unsigned int port, KIRC::Transfer::Type type);
- void CtcpRequest_ping(const QString &target);
- void CtcpRequest_version(const QString &target);
+ void CtcpRequestCommand(const TQString &contact, const TQString &command);
+ void CtcpRequest_action(const TQString &contact, const TQString &message);
+ void CtcpRequest_dcc(const TQString &, const TQString &, unsigned int port, KIRC::Transfer::Type type);
+ void CtcpRequest_ping(const TQString &target);
+ void CtcpRequest_version(const TQString &target);
public slots:
void showInfoDialog();
@@ -296,88 +296,88 @@ signals:
void receivedMessage( KIRC::Engine::ServerMessageType type,
const KIRC::EntityPtr &from,
const KIRC::EntityPtrList &to,
- const QString &msg);
+ const TQString &msg);
- void successfullyChangedNick(const QString &, const QString &);
+ void successfullyChangedNick(const TQString &, const TQString &);
//ServerContact Signals
- void incomingMotd(const QString &motd);
- void incomingNotice(const QString &originating, const QString &message);
- void incomingHostInfo(const QString &servername, const QString &version,
- const QString &userModes, const QString &channelModes);
- void incomingYourHostInfo(const QString &servername, const QString &version,
- const QString &userModes, const QString &channelModes);
- void incomingConnectString(const QString &clients);
+ void incomingMotd(const TQString &motd);
+ void incomingNotice(const TQString &originating, const TQString &message);
+ void incomingHostInfo(const TQString &servername, const TQString &version,
+ const TQString &userModes, const TQString &channelModes);
+ void incomingYourHostInfo(const TQString &servername, const TQString &version,
+ const TQString &userModes, const TQString &channelModes);
+ void incomingConnectString(const TQString &clients);
//Channel Contact Signals
- void incomingMessage(const QString &originating, const QString &target, const QString &message);
- void incomingTopicChange(const QString &, const QString &, const QString &);
- void incomingExistingTopic(const QString &, const QString &);
- void incomingTopicUser(const QString &channel, const QString &user, const QDateTime &time);
- void incomingJoinedChannel(const QString &channel,const QString &nick);
- void incomingPartedChannel(const QString &channel,const QString &nick, const QString &reason);
- void incomingNamesList(const QString &channel, const QStringList &nicknames);
- void incomingEndOfNames(const QString &channel);
- void incomingChannelMode(const QString &channel, const QString &mode, const QString &params);
- void incomingCannotSendToChannel(const QString &channel, const QString &message);
- void incomingChannelModeChange(const QString &channel, const QString &nick, const QString &mode);
- void incomingChannelHomePage(const QString &channel, const QString &url);
+ void incomingMessage(const TQString &originating, const TQString &target, const TQString &message);
+ void incomingTopicChange(const TQString &, const TQString &, const TQString &);
+ void incomingExistingTopic(const TQString &, const TQString &);
+ void incomingTopicUser(const TQString &channel, const TQString &user, const TQDateTime &time);
+ void incomingJoinedChannel(const TQString &channel,const TQString &nick);
+ void incomingPartedChannel(const TQString &channel,const TQString &nick, const TQString &reason);
+ void incomingNamesList(const TQString &channel, const TQStringList &nicknames);
+ void incomingEndOfNames(const TQString &channel);
+ void incomingChannelMode(const TQString &channel, const TQString &mode, const TQString &params);
+ void incomingCannotSendToChannel(const TQString &channel, const TQString &message);
+ void incomingChannelModeChange(const TQString &channel, const TQString &nick, const TQString &mode);
+ void incomingChannelHomePage(const TQString &channel, const TQString &url);
//Contact Signals
- void incomingPrivMessage(const QString &, const QString &, const QString &);
- void incomingQuitIRC(const QString &user, const QString &reason);
- void incomingUserModeChange(const QString &nick, const QString &mode);
- void incomingNoSuchNickname(const QString &nick);
+ void incomingPrivMessage(const TQString &, const TQString &, const TQString &);
+ void incomingQuitIRC(const TQString &user, const TQString &reason);
+ void incomingUserModeChange(const TQString &nick, const TQString &mode);
+ void incomingNoSuchNickname(const TQString &nick);
// CTCP Signals
-// void action(const QString &from, const QString &to, const QString &message);
- void incomingAction(const QString &channel, const QString &originating, const QString &message);
- void incomingPrivAction(const QString &target, const QString &originating, const QString &message);
+// void action(const TQString &from, const TQString &to, const TQString &message);
+ void incomingAction(const TQString &channel, const TQString &originating, const TQString &message);
+ void incomingPrivAction(const TQString &target, const TQString &originating, const TQString &message);
//Response Signals
- void incomingUserOnline(const QString &nick);
- void incomingWhoIsUser(const QString &nickname, const QString &username,
- const QString &hostname, const QString &realname);
- void incomingWhoWasUser(const QString &nickname, const QString &username,
- const QString &hostname, const QString &realname);
- void incomingWhoIsServer(const QString &nickname, const QString &server, const QString &serverInfo);
- void incomingWhoIsOperator(const QString &nickname);
- void incomingWhoIsIdentified(const QString &nickname);
- void incomingWhoIsChannels(const QString &nickname, const QString &channel);
- void incomingWhoIsIdle(const QString &nickname, unsigned long seconds); /* 317 */
- void incomingSignOnTime(const QString &nickname, unsigned long seconds); /* 317 */
- void incomingEndOfWhois(const QString &nickname);
- void incomingEndOfWhoWas(const QString &nickname);
-
- void incomingWhoReply( const QString &nick, const QString &channel, const QString &user, const QString &host,
- const QString &server,bool away, const QString &flag, uint hops, const QString &realName );
-
- void incomingEndOfWho( const QString &query );
+ void incomingUserOnline(const TQString &nick);
+ void incomingWhoIsUser(const TQString &nickname, const TQString &username,
+ const TQString &hostname, const TQString &realname);
+ void incomingWhoWasUser(const TQString &nickname, const TQString &username,
+ const TQString &hostname, const TQString &realname);
+ void incomingWhoIsServer(const TQString &nickname, const TQString &server, const TQString &serverInfo);
+ void incomingWhoIsOperator(const TQString &nickname);
+ void incomingWhoIsIdentified(const TQString &nickname);
+ void incomingWhoIsChannels(const TQString &nickname, const TQString &channel);
+ void incomingWhoIsIdle(const TQString &nickname, unsigned long seconds); /* 317 */
+ void incomingSignOnTime(const TQString &nickname, unsigned long seconds); /* 317 */
+ void incomingEndOfWhois(const TQString &nickname);
+ void incomingEndOfWhoWas(const TQString &nickname);
+
+ void incomingWhoReply( const TQString &nick, const TQString &channel, const TQString &user, const TQString &host,
+ const TQString &server,bool away, const TQString &flag, uint hops, const TQString &realName );
+
+ void incomingEndOfWho( const TQString &query );
//Error Message Signals
void incomingServerLoadTooHigh();
- void incomingNickInUse(const QString &usingNick);
- void incomingNickChange(const QString &, const QString &);
+ void incomingNickInUse(const TQString &usingNick);
+ void incomingNickChange(const TQString &, const TQString &);
void incomingFailedServerPassword();
- void incomingFailedChankey(const QString &);
- void incomingFailedChanBanned(const QString &);
- void incomingFailedChanInvite(const QString &);
- void incomingFailedChanFull(const QString &);
- void incomingFailedNickOnLogin(const QString &);
- void incomingNoNickChan(const QString &);
- void incomingWasNoNick(const QString &);
+ void incomingFailedChankey(const TQString &);
+ void incomingFailedChanBanned(const TQString &);
+ void incomingFailedChanInvite(const TQString &);
+ void incomingFailedChanFull(const TQString &);
+ void incomingFailedNickOnLogin(const TQString &);
+ void incomingNoNickChan(const TQString &);
+ void incomingWasNoNick(const TQString &);
//General Signals
- void incomingUnknown(const QString &);
- void incomingUnknownCtcp(const QString &);
- void incomingKick(const QString &channel, const QString &nick,
- const QString &nickKicked, const QString &reason);
+ void incomingUnknown(const TQString &);
+ void incomingUnknownCtcp(const TQString &);
+ void incomingKick(const TQString &channel, const TQString &nick,
+ const TQString &nickKicked, const TQString &reason);
- void incomingUserIsAway(const QString &nick, const QString &awayMessage);
- void incomingListedChan(const QString &chan, uint users, const QString &topic);
+ void incomingUserIsAway(const TQString &nick, const TQString &awayMessage);
+ void incomingListedChan(const TQString &chan, uint users, const TQString &topic);
void incomingEndOfList();
- void incomingCtcpReply(const QString &type, const QString &target, const QString &messageReceived);
+ void incomingCtcpReply(const TQString &type, const TQString &target, const TQString &messageReceived);
private slots:
void destroyed(KIRC::Entity *entity);
@@ -479,50 +479,50 @@ private:
void bindCtcp();
void setStatus(KIRC::Engine::Status status);
- bool invokeCtcpCommandOfMessage(const QDict<KIRC::MessageRedirector> &map, KIRC::Message &message);
+ bool invokeCtcpCommandOfMessage(const TQDict<KIRC::MessageRedirector> &map, KIRC::Message &message);
/*
* Methods that handles all the bindings creations.
* This methods is used by all the bind(...) methods.
*/
- bool _bind(QDict<KIRC::MessageRedirector> &dict,
- QString command, QObject *object, const char *member,
- int minArgs, int maxArgs, const QString &helpMessage);
+ bool _bind(TQDict<KIRC::MessageRedirector> &dict,
+ TQString command, TQObject *object, const char *member,
+ int minArgs, int maxArgs, const TQString &helpMessage);
//Static regexes
- static const QRegExp m_RemoveLinefeeds;
+ static const TQRegExp m_RemoveLinefeeds;
KIRC::Engine::Status m_status;
- QString m_Host;
+ TQString m_Host;
Q_UINT16 m_Port;
-// QUrl serverURL;
-// QUrl currentServerURL;
- QString m_Nickname;
- QString m_Username;
- QString m_realName;
- QString m_Passwd;
+// TQUrl serverURL;
+// TQUrl currentServerURL;
+ TQString m_Nickname;
+ TQString m_Username;
+ TQString m_realName;
+ TQString m_Passwd;
bool m_ReqsPasswd;
bool m_FailedNickOnLogin;
bool m_useSSL;
- QValueList<KIRC::Entity *> m_entities;
+ TQValueList<KIRC::Entity *> m_entities;
KIRC::EntityPtr m_server;
KIRC::EntityPtr m_self;
- QString m_VersionString;
- QString m_UserString;
- QString m_SourceString;
- QString m_PendingNick;
+ TQString m_VersionString;
+ TQString m_UserString;
+ TQString m_SourceString;
+ TQString m_PendingNick;
- QDict<KIRC::MessageRedirector> m_commands;
-// QIntDict<KIRC::MessageRedirector> m_numericCommands;
- QDict<KIRC::MessageRedirector> m_ctcpQueries;
- QDict<KIRC::MessageRedirector> m_ctcpReplies;
+ TQDict<KIRC::MessageRedirector> m_commands;
+// TQIntDict<KIRC::MessageRedirector> m_numericCommands;
+ TQDict<KIRC::MessageRedirector> m_ctcpQueries;
+ TQDict<KIRC::MessageRedirector> m_ctcpReplies;
- QMap<QString, QString> customCtcpMap;
- QDict<QTextCodec> codecs;
- QTextCodec *defaultCodec;
+ TQMap<TQString, TQString> customCtcpMap;
+ TQDict<TQTextCodec> codecs;
+ TQTextCodec *defaultCodec;
KExtendedSocket *m_sock;
};
diff --git a/kopete/protocols/irc/libkirc/kircengine_commands.cpp b/kopete/protocols/irc/libkirc/kircengine_commands.cpp
index 0a0f9002..21a90676 100644
--- a/kopete/protocols/irc/libkirc/kircengine_commands.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine_commands.cpp
@@ -21,36 +21,36 @@
#include <kextsock.h>
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KIRC;
void Engine::bindCommands()
{
- bind("ERROR", this, SLOT(error(KIRC::Message &)), 0, 0);
- bind("JOIN", this, SLOT(join(KIRC::Message &)), 0, 1);
- bind("KICK", this, SLOT(kick(KIRC::Message &)), 2, 2);
- bind("NICK", this, SLOT(nick(KIRC::Message &)), 0, 0);
- bind("MODE", this, SLOT(mode(KIRC::Message &)), 1, 1);
- bind("NOTICE", this, SLOT(notice(KIRC::Message &)), 1, 1);
- bind("PART", this, SLOT(part(KIRC::Message &)), 1, 1);
- bind("PING", this, SLOT(ping(KIRC::Message &)), 0, 0);
- bind("PONG", this, SLOT(pong(KIRC::Message &)), 0, 0);
- bind("PRIVMSG", this, SLOT(privmsg(KIRC::Message &)), 1, 1);
- bind("QUIT", this, SLOT(quit(KIRC::Message &)), 0, 0);
-// bind("SQUIT", this, SLOT(squit(KIRC::Message &)), 1, 1);
- bind("TOPIC", this, SLOT(topic(KIRC::Message &)), 1, 1);
+ bind("ERROR", this, TQT_SLOT(error(KIRC::Message &)), 0, 0);
+ bind("JOIN", this, TQT_SLOT(join(KIRC::Message &)), 0, 1);
+ bind("KICK", this, TQT_SLOT(kick(KIRC::Message &)), 2, 2);
+ bind("NICK", this, TQT_SLOT(nick(KIRC::Message &)), 0, 0);
+ bind("MODE", this, TQT_SLOT(mode(KIRC::Message &)), 1, 1);
+ bind("NOTICE", this, TQT_SLOT(notice(KIRC::Message &)), 1, 1);
+ bind("PART", this, TQT_SLOT(part(KIRC::Message &)), 1, 1);
+ bind("PING", this, TQT_SLOT(ping(KIRC::Message &)), 0, 0);
+ bind("PONG", this, TQT_SLOT(pong(KIRC::Message &)), 0, 0);
+ bind("PRIVMSG", this, TQT_SLOT(privmsg(KIRC::Message &)), 1, 1);
+ bind("QUIT", this, TQT_SLOT(quit(KIRC::Message &)), 0, 0);
+// bind("SQUIT", this, TQT_SLOT(squit(KIRC::Message &)), 1, 1);
+ bind("TOPIC", this, TQT_SLOT(topic(KIRC::Message &)), 1, 1);
}
-void Engine::away(bool isAway, const QString &awayMessage)
+void Engine::away(bool isAway, const TQString &awayMessage)
{
if(isAway)
if( !awayMessage.isEmpty() )
- writeMessage("AWAY", QString::null, awayMessage);
+ writeMessage("AWAY", TQString::null, awayMessage);
else
- writeMessage("AWAY", QString::null, QString::fromLatin1("I'm away."));
+ writeMessage("AWAY", TQString::null, TQString::fromLatin1("I'm away."));
else
- writeMessage("AWAY", QString::null);
+ writeMessage("AWAY", TQString::null);
}
// FIXME: Really handle this message
@@ -59,28 +59,28 @@ void Engine::error(Message &)
setStatus(Closing);
}
-void Engine::ison(const QStringList &nickList)
+void Engine::ison(const TQStringList &nickList)
{
if (!nickList.isEmpty())
{
- QString statement = QString::fromLatin1("ISON");
- for (QStringList::ConstIterator it = nickList.begin(); it != nickList.end(); ++it)
+ TQString statement = TQString::fromLatin1("ISON");
+ for (TQStringList::ConstIterator it = nickList.begin(); it != nickList.end(); ++it)
{
if ((statement.length()+(*it).length())>509) // 512(max buf)-2("\r\n")-1(<space separator>)
{
writeMessage(statement);
- statement = QString::fromLatin1("ISON ") + (*it);
+ statement = TQString::fromLatin1("ISON ") + (*it);
}
else
- statement.append(QChar(' ') + (*it));
+ statement.append(TQChar(' ') + (*it));
}
writeMessage(statement);
}
}
-void Engine::join(const QString &name, const QString &key)
+void Engine::join(const TQString &name, const TQString &key)
{
- QStringList args(name);
+ TQStringList args(name);
if ( !key.isNull() )
args << key;
@@ -101,9 +101,9 @@ void Engine::join(Message &msg)
emit incomingJoinedChannel(Kopete::Message::unescape(msg.suffix()), msg.nickFromPrefix());
}
-void Engine::kick(const QString &user, const QString &channel, const QString &reason)
+void Engine::kick(const TQString &user, const TQString &channel, const TQString &reason)
{
- writeMessage("KICK", QStringList(channel) << user << reason);
+ writeMessage("KICK", TQStringList(channel) << user << reason);
}
void Engine::kick(Message &msg)
@@ -114,9 +114,9 @@ void Engine::kick(Message &msg)
emit incomingKick( Kopete::Message::unescape(msg.arg(0)), msg.nickFromPrefix(), msg.arg(1), msg.suffix());
}
-void Engine::mode(const QString &target, const QString &mode)
+void Engine::mode(const TQString &target, const TQString &mode)
{
- writeMessage("MODE", QStringList(target) << mode);
+ writeMessage("MODE", TQStringList(target) << mode);
}
void Engine::mode(Message &msg)
@@ -124,7 +124,7 @@ void Engine::mode(Message &msg)
/* Change the mode of a user.
* "<nickname> *( ( "+" / "-" ) *( "i" / "w" / "o" / "O" / "r" ) )"
*/
- QStringList args = msg.args();
+ TQStringList args = msg.args();
args.pop_front();
if( Entity::isChannel( msg.arg(0) ) )
emit incomingChannelModeChange( msg.arg(0), msg.nickFromPrefix(), args.join(" "));
@@ -132,7 +132,7 @@ void Engine::mode(Message &msg)
emit incomingUserModeChange( msg.nickFromPrefix(), args.join(" "));
}
-void Engine::nick(const QString &newNickname)
+void Engine::nick(const TQString &newNickname)
{
m_PendingNick = newNickname;
writeMessage("NICK", newNickname);
@@ -142,12 +142,12 @@ void Engine::nick(Message &msg)
{
/* Nick name of a user changed
* "<nickname>" */
- QString oldNick = msg.prefix().section('!', 0, 0);
- QString newNick = msg.suffix();
+ TQString oldNick = msg.prefix().section('!', 0, 0);
+ TQString newNick = msg.suffix();
if( codecs[ oldNick ] )
{
- QTextCodec *c = codecs[ oldNick ];
+ TQTextCodec *c = codecs[ oldNick ];
codecs.remove( oldNick );
codecs.insert( newNick, c );
}
@@ -161,7 +161,7 @@ void Engine::nick(Message &msg)
emit incomingNickChange(oldNick, msg.suffix());
}
-void Engine::part(const QString &channel, const QString &reason)
+void Engine::part(const TQString &channel, const TQString &reason)
{
/* This will part a channel with 'reason' as the reason for parting
*/
@@ -177,7 +177,7 @@ void Engine::part(Message &msg)
emit incomingPartedChannel(msg.arg(0), msg.nickFromPrefix(), msg.suffix());
}
-void Engine::pass(const QString &password)
+void Engine::pass(const TQString &password)
{
writeMessage("PASS", password);
}
@@ -191,7 +191,7 @@ void Engine::pong(Message &/*msg*/)
{
}
-void Engine::quit(const QString &reason, bool /*now*/)
+void Engine::quit(const TQString &reason, bool /*now*/)
{
kdDebug(14120) << k_funcinfo << reason << endl;
@@ -199,7 +199,7 @@ void Engine::quit(const QString &reason, bool /*now*/)
return;
if (isConnected())
- writeMessage("QUIT", QString::null, reason);
+ writeMessage("QUIT", TQString::null, reason);
setStatus(Closing);
}
@@ -212,7 +212,7 @@ void Engine::quit(Message &msg)
emit incomingQuitIRC(msg.prefix(), msg.suffix());
}
-void Engine::user(const QString &newUserName, const QString &hostname, const QString &newRealName)
+void Engine::user(const TQString &newUserName, const TQString &hostname, const TQString &newRealName)
{
/* RFC1459: "<username> <hostname> <servername> <realname>"
* The USER command is used at the beginning of connection to specify
@@ -221,10 +221,10 @@ void Engine::user(const QString &newUserName, const QString &hostname, const QSt
m_Username = newUserName;
m_realName = newRealName;
- writeMessage("USER", QStringList(m_Username) << hostname << m_Host, m_realName);
+ writeMessage("USER", TQStringList(m_Username) << hostname << m_Host, m_realName);
}
-void Engine::user(const QString &newUserName, Q_UINT8 mode, const QString &newRealName)
+void Engine::user(const TQString &newUserName, Q_UINT8 mode, const TQString &newRealName)
{
/* RFC2812: "<user> <mode> <unused> <realname>"
* mode is a numeric value (from a bit mask).
@@ -234,10 +234,10 @@ void Engine::user(const QString &newUserName, Q_UINT8 mode, const QString &newRe
m_Username = newUserName;
m_realName = newRealName;
- writeMessage("USER", QStringList(m_Username) << QString::number(mode) << QChar('*'), m_realName);
+ writeMessage("USER", TQStringList(m_Username) << TQString::number(mode) << TQChar('*'), m_realName);
}
-void Engine::topic(const QString &channel, const QString &topic)
+void Engine::topic(const TQString &channel, const TQString &topic)
{
writeMessage("TOPIC", channel, topic);
}
@@ -252,15 +252,15 @@ void Engine::topic(Message &msg)
void Engine::list()
{
- writeMessage("LIST", QString::null);
+ writeMessage("LIST", TQString::null);
}
-void Engine::motd(const QString &server)
+void Engine::motd(const TQString &server)
{
writeMessage("MOTD", server);
}
-void Engine::privmsg(const QString &contact, const QString &message)
+void Engine::privmsg(const TQString &contact, const TQString &message)
{
writeMessage("PRIVMSG", contact, message, codecForNick( contact ) );
}
@@ -272,9 +272,9 @@ void Engine::privmsg(Message &msg)
Message m = msg;
if (!m.suffix().isEmpty())
{
- QString user = m.arg(0);
- QString message = m.suffix();
- const QTextCodec *codec = codecForNick( user );
+ TQString user = m.arg(0);
+ TQString message = m.suffix();
+ const TQTextCodec *codec = codecForNick( user );
if (codec != defaultCodec) {
m.decodeAgain( codec );
message = m.suffix();
@@ -292,7 +292,7 @@ void Engine::privmsg(Message &msg)
}
}
-void Engine::notice(const QString &target, const QString &message)
+void Engine::notice(const TQString &target, const TQString &message)
{
writeMessage("NOTICE", target, message);
}
@@ -306,7 +306,7 @@ void Engine::notice(Message &msg)
invokeCtcpCommandOfMessage(m_ctcpReplies, msg);
}
-void Engine::whois(const QString &user)
+void Engine::whois(const TQString &user)
{
writeMessage("WHOIS", user);
}
diff --git a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp
index db1903f3..7216dea7 100644
--- a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp
@@ -28,37 +28,37 @@
#include <arpa/inet.h>
#include <kextsock.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
using namespace KIRC;
void Engine::bindCtcp()
{
- bindCtcpQuery("ACTION", this, SLOT(CtcpQuery_action(KIRC::Message &)),
+ bindCtcpQuery("ACTION", this, TQT_SLOT(CtcpQuery_action(KIRC::Message &)),
-1, -1);
- bindCtcpQuery("CLIENTINFO", this, SLOT(CtcpQuery_clientinfo(KIRC::Message &)),
+ bindCtcpQuery("CLIENTINFO", this, TQT_SLOT(CtcpQuery_clientinfo(KIRC::Message &)),
-1, 1);
- bindCtcpQuery("DCC", this, SLOT(CtcpQuery_dcc(KIRC::Message &)),
+ bindCtcpQuery("DCC", this, TQT_SLOT(CtcpQuery_dcc(KIRC::Message &)),
4, 5);
- bindCtcpQuery("FINGER", this, SLOT(CtcpQuery_finger(KIRC::Message &)),
+ bindCtcpQuery("FINGER", this, TQT_SLOT(CtcpQuery_finger(KIRC::Message &)),
-1, 0);
- bindCtcpQuery("PING", this, SLOT(CtcpQuery_ping(KIRC::Message &)),
+ bindCtcpQuery("PING", this, TQT_SLOT(CtcpQuery_ping(KIRC::Message &)),
1, 1);
- bindCtcpQuery("SOURCE", this, SLOT(CtcpQuery_source(KIRC::Message &)),
+ bindCtcpQuery("SOURCE", this, TQT_SLOT(CtcpQuery_source(KIRC::Message &)),
-1, 0);
- bindCtcpQuery("TIME", this, SLOT(CtcpQuery_time(KIRC::Message &)),
+ bindCtcpQuery("TIME", this, TQT_SLOT(CtcpQuery_time(KIRC::Message &)),
-1, 0);
- bindCtcpQuery("USERINFO", this, SLOT(CtcpQuery_userinfo(KIRC::Message &)),
+ bindCtcpQuery("USERINFO", this, TQT_SLOT(CtcpQuery_userinfo(KIRC::Message &)),
-1, 0);
- bindCtcpQuery("VERSION", this, SLOT(CtcpQuery_version(KIRC::Message &)),
+ bindCtcpQuery("VERSION", this, TQT_SLOT(CtcpQuery_version(KIRC::Message &)),
-1, 0);
- bindCtcpReply("ERRMSG", this, SLOT(CtcpReply_errmsg(KIRC::Message &)),
+ bindCtcpReply("ERRMSG", this, TQT_SLOT(CtcpReply_errmsg(KIRC::Message &)),
1, -1);
- bindCtcpReply("PING", this, SLOT(CtcpReply_ping(KIRC::Message &)),
+ bindCtcpReply("PING", this, TQT_SLOT(CtcpReply_ping(KIRC::Message &)),
1, 1, "");
- bindCtcpReply("VERSION", this, SLOT(CtcpReply_version(KIRC::Message &)),
+ bindCtcpReply("VERSION", this, TQT_SLOT(CtcpReply_version(KIRC::Message &)),
-1, -1, "");
}
@@ -68,20 +68,20 @@ void Engine::bindCtcp()
// CtcpReply_* (if any)
/* Generic ctcp commnd for the /ctcp trigger */
-void Engine::CtcpRequestCommand(const QString &contact, const QString &command)
+void Engine::CtcpRequestCommand(const TQString &contact, const TQString &command)
{
if(m_status == Connected)
{
- writeCtcpQueryMessage(contact, QString::null, command);
+ writeCtcpQueryMessage(contact, TQString::null, command);
// emit ctcpCommandMessage( contact, command );
}
}
-void Engine::CtcpRequest_action(const QString &contact, const QString &message)
+void Engine::CtcpRequest_action(const TQString &contact, const TQString &message)
{
if(m_status == Connected)
{
- writeCtcpQueryMessage(contact, QString::null, "ACTION", message);
+ writeCtcpQueryMessage(contact, TQString::null, "ACTION", message);
if( Entity::isChannel(contact) )
emit incomingAction(Kopete::Message::unescape(contact), Kopete::Message::unescape(m_Nickname), message);
@@ -92,7 +92,7 @@ void Engine::CtcpRequest_action(const QString &contact, const QString &message)
void Engine::CtcpQuery_action(Message &msg)
{
- QString target = msg.arg(0);
+ TQString target = msg.arg(0);
if (target[0] == '#' || target[0] == '!' || target[0] == '&')
emit incomingAction(target, msg.nickFromPrefix(), msg.ctcpMessage().ctcpRaw());
else
@@ -109,18 +109,18 @@ bool Engine::CtcpReply_action(Message &msg)
// FIXME: the API can now answer to help commands.
void Engine::CtcpQuery_clientinfo(Message &msg)
{
- QString clientinfo = customCtcpMap[ QString::fromLatin1("clientinfo") ];
+ TQString clientinfo = customCtcpMap[ TQString::fromLatin1("clientinfo") ];
if (clientinfo.isNull())
- clientinfo = QString::fromLatin1("The following commands are supported, but "
+ clientinfo = TQString::fromLatin1("The following commands are supported, but "
"without sub-command help: VERSION, CLIENTINFO, USERINFO, TIME, SOURCE, PING,"
"ACTION.");
- writeCtcpReplyMessage( msg.nickFromPrefix(), QString::null,
- msg.ctcpMessage().command(), QString::null, clientinfo);
+ writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null,
+ msg.ctcpMessage().command(), TQString::null, clientinfo);
}
-void Engine::CtcpRequest_dcc(const QString &nickname, const QString &fileName, uint port, Transfer::Type type)
+void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName, uint port, Transfer::Type type)
{
if( m_status != Connected ||
m_sock->localAddress() == 0 ||
@@ -131,32 +131,32 @@ void Engine::CtcpRequest_dcc(const QString &nickname, const QString &fileName, u
{
case Transfer::Chat:
{
- writeCtcpQueryMessage(nickname, QString::null,
- QString::fromLatin1("DCC"),
- QStringList(QString::fromLatin1("CHAT")) << QString::fromLatin1("chat") <<
- m_sock->localAddress()->nodeName() << QString::number(port)
+ writeCtcpQueryMessage(nickname, TQString::null,
+ TQString::fromLatin1("DCC"),
+ TQStringList(TQString::fromLatin1("CHAT")) << TQString::fromLatin1("chat") <<
+ m_sock->localAddress()->nodeName() << TQString::number(port)
);
break;
}
case Transfer::FileOutgoing:
{
- QFileInfo file(fileName);
- QString noWhiteSpace = file.fileName();
+ TQFileInfo file(fileName);
+ TQString noWhiteSpace = file.fileName();
if (noWhiteSpace.contains(' ') > 0)
- noWhiteSpace.replace(QRegExp("\\s+"), "_");
+ noWhiteSpace.replace(TQRegExp("\\s+"), "_");
TransferServer *server = TransferHandler::self()->createServer(this, nickname, type, fileName, file.size());
- QString ip = m_sock->localAddress()->nodeName();
- QString ipNumber = QString::number( ntohl( inet_addr( ip.latin1() ) ) );
+ TQString ip = m_sock->localAddress()->nodeName();
+ TQString ipNumber = TQString::number( ntohl( inet_addr( ip.latin1() ) ) );
kdDebug(14120) << "Starting DCC file outgoing transfer." << endl;
- writeCtcpQueryMessage(nickname, QString::null,
- QString::fromLatin1("DCC"),
- QStringList(QString::fromLatin1("SEND")) << noWhiteSpace << ipNumber <<
- QString::number(server->port()) << QString::number(file.size())
+ writeCtcpQueryMessage(nickname, TQString::null,
+ TQString::fromLatin1("DCC"),
+ TQStringList(TQString::fromLatin1("SEND")) << noWhiteSpace << ipNumber <<
+ TQString::number(server->port()) << TQString::number(file.size())
);
break;
}
@@ -171,9 +171,9 @@ void Engine::CtcpRequest_dcc(const QString &nickname, const QString &fileName, u
void Engine::CtcpQuery_dcc(Message &msg)
{
Message &ctcpMsg = msg.ctcpMessage();
- QString dccCommand = ctcpMsg.arg(0).upper();
+ TQString dccCommand = ctcpMsg.arg(0).upper();
- if (dccCommand == QString::fromLatin1("CHAT"))
+ if (dccCommand == TQString::fromLatin1("CHAT"))
{
// if(ctcpMsg.argsSize()!=4) return false;
@@ -185,7 +185,7 @@ void Engine::CtcpQuery_dcc(Message &msg)
*/
bool okayHost, okayPort;
// should ctctMsg.arg(1) be tested?
- QHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost));
+ TQHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost));
unsigned int port = ctcpMsg.arg(3).toUInt(&okayPort);
if (okayHost && okayPort)
{
@@ -196,7 +196,7 @@ void Engine::CtcpQuery_dcc(Message &msg)
Transfer::Chat );
}
}
- else if (dccCommand == QString::fromLatin1("SEND"))
+ else if (dccCommand == TQString::fromLatin1("SEND"))
{
// if(ctcpMsg.argsSize()!=5) return false;
@@ -208,8 +208,8 @@ void Engine::CtcpQuery_dcc(Message &msg)
* filesize = Size of file being sent
*/
bool okayHost, okayPort, okaySize;
-// QFileInfo realfile(msg.arg(1));
- QHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost));
+// TQFileInfo realfile(msg.arg(1));
+ TQHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost));
unsigned int port = ctcpMsg.arg(3).toUInt(&okayPort);
unsigned int size = ctcpMsg.arg(4).toUInt(&okaySize);
if (okayHost && okayPort && okaySize)
@@ -243,21 +243,21 @@ void Engine::CtcpQuery_finger( Message &)
// To be implemented
}
-void Engine::CtcpRequest_ping(const QString &target)
+void Engine::CtcpRequest_ping(const TQString &target)
{
kdDebug(14120) << k_funcinfo << endl;
timeval time;
if (gettimeofday(&time, 0) == 0)
{
- QString timeReply;
+ TQString timeReply;
if( Entity::isChannel(target) )
- timeReply = QString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
+ timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
else
- timeReply = QString::number( time.tv_sec );
+ timeReply = TQString::number( time.tv_sec );
- writeCtcpQueryMessage( target, QString::null, "PING", timeReply);
+ writeCtcpQueryMessage( target, TQString::null, "PING", timeReply);
}
// else
// ((MessageRedirector *)sender())->error("failed to get current time");
@@ -265,7 +265,7 @@ void Engine::CtcpRequest_ping(const QString &target)
void Engine::CtcpQuery_ping(Message &msg)
{
- writeCtcpReplyMessage( msg.nickFromPrefix(), QString::null,
+ writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null,
msg.ctcpMessage().command(), msg.ctcpMessage().arg(0));
}
@@ -275,30 +275,30 @@ void Engine::CtcpReply_ping(Message &msg)
if (gettimeofday(&time, 0) == 0)
{
// FIXME: the time code is wrong for usec
- QString timeReply = QString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
+ TQString timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
double newTime = timeReply.toDouble();
double oldTime = msg.suffix().section(' ',0, 0).toDouble();
double difference = newTime - oldTime;
- QString diffString;
+ TQString diffString;
if (difference < 1)
{
- diffString = QString::number(difference);
+ diffString = TQString::number(difference);
diffString.remove((diffString.find('.') -1), 2);
diffString.truncate(3);
diffString.append("milliseconds");
}
else
{
- diffString = QString::number(difference);
- QString seconds = diffString.section('.', 0, 0);
- QString millSec = diffString.section('.', 1, 1);
+ diffString = TQString::number(difference);
+ TQString seconds = diffString.section('.', 0, 0);
+ TQString millSec = diffString.section('.', 1, 1);
millSec.remove(millSec.find('.'), 1);
millSec.truncate(3);
- diffString = QString::fromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec);
+ diffString = TQString::fromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec);
}
- emit incomingCtcpReply(QString::fromLatin1("PING"), msg.nickFromPrefix(), diffString);
+ emit incomingCtcpReply(TQString::fromLatin1("PING"), msg.nickFromPrefix(), diffString);
}
// else
// ((MessageRedirector *)sender())->error("failed to get current time");
@@ -306,36 +306,36 @@ void Engine::CtcpReply_ping(Message &msg)
void Engine::CtcpQuery_source(Message &msg)
{
- writeCtcpReplyMessage(msg.nickFromPrefix(), QString::null,
+ writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null,
msg.ctcpMessage().command(), m_SourceString);
}
void Engine::CtcpQuery_time(Message &msg)
{
- writeCtcpReplyMessage(msg.nickFromPrefix(), QString::null,
- msg.ctcpMessage().command(), QDateTime::currentDateTime().toString(),
- QString::null, false);
+ writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null,
+ msg.ctcpMessage().command(), TQDateTime::currentDateTime().toString(),
+ TQString::null, false);
}
void Engine::CtcpQuery_userinfo(Message &msg)
{
- QString userinfo = customCtcpMap[ QString::fromLatin1("userinfo") ];
+ TQString userinfo = customCtcpMap[ TQString::fromLatin1("userinfo") ];
if (userinfo.isNull())
userinfo = m_UserString;
- writeCtcpReplyMessage(msg.nickFromPrefix(), QString::null,
- msg.ctcpMessage().command(), QString::null, userinfo);
+ writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null,
+ msg.ctcpMessage().command(), TQString::null, userinfo);
}
-void Engine::CtcpRequest_version(const QString &target)
+void Engine::CtcpRequest_version(const TQString &target)
{
- writeCtcpQueryMessage(target, QString::null, "VERSION");
+ writeCtcpQueryMessage(target, TQString::null, "VERSION");
}
void Engine::CtcpQuery_version(Message &msg)
{
- QString response = customCtcpMap[ QString::fromLatin1("version") ];
+ TQString response = customCtcpMap[ TQString::fromLatin1("version") ];
kdDebug(14120) << "Version check: " << response << endl;
if (response.isNull())
diff --git a/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp b/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp
index c47b8b05..67d3a842 100644
--- a/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp
@@ -20,7 +20,7 @@
#include "kircengine.h"
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KIRC;
@@ -31,69 +31,69 @@ using namespace KIRC;
void Engine::bindNumericReplies()
{
- bind(1, this, SLOT(numericReply_001(KIRC::Message &)), 1, 1);
- bind(2, this, SLOT(numericReply_002(KIRC::Message &)), 1, 1);
- bind(3, this, SLOT(numericReply_003(KIRC::Message &)), 1, 1);
- bind(4, this, SLOT(numericReply_004(KIRC::Message &)), 5, 5);
- bind(5, this, SLOT(numericReply_004(KIRC::Message &)), 1, 1);
-
- bind(250, this, SLOT(numericReply_250(KIRC::Message &)));
- bind(251, this, SLOT(numericReply_251(KIRC::Message &)));
- bind(252, this, SLOT(numericReply_252(KIRC::Message &)), 2, 2);
- bind(253, this, SLOT(numericReply_253(KIRC::Message &)), 2, 2);
- bind(254, this, SLOT(numericReply_254(KIRC::Message &)), 2, 2);
- bind(255, this, SLOT(numericReply_255(KIRC::Message &)), 1, 1); // incomingConnectString
-
- bind(263, this, SLOT(numericReply_263(KIRC::Message &))); // incomingServerLoadTooHigh
- bind(265, this, SLOT(numericReply_265(KIRC::Message &)));
- bind(266, this, SLOT(numericReply_266(KIRC::Message &)));
-
- bind(301, this, SLOT(numericReply_301(KIRC::Message &)), 2, 2);
- bind(303, this, SLOT(numericReply_303(KIRC::Message &)), 1, 1);
- bind(305, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are no longer marked as away
- bind(306, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are marked as away
- bind(307, this, SLOT(numericReply_307(KIRC::Message &)), 1, 1);
- bind(311, this, SLOT(numericReply_311(KIRC::Message &)), 5, 5);
- bind(312, this, SLOT(numericReply_312(KIRC::Message &)), 3, 3);
- bind(313, this, SLOT(numericReply_313(KIRC::Message &)), 2, 2);
- bind(314, this, SLOT(numericReply_314(KIRC::Message &)), 5, 5);
- bind(315, this, SLOT(numericReply_315(KIRC::Message &)), 2, 2);
- bind(317, this, SLOT(numericReply_317(KIRC::Message &)), 3, 4);
- bind(318, this, SLOT(numericReply_318(KIRC::Message &)), 2, 2);
- bind(319, this, SLOT(numericReply_319(KIRC::Message &)), 2, 2);
- bind(320, this, SLOT(numericReply_320(KIRC::Message &)), 2, 2);
- bind(321, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0 );
- bind(322, this, SLOT(numericReply_322(KIRC::Message &)), 3, 3);
- bind(323, this, SLOT(numericReply_323(KIRC::Message &)), 1, 1);
- bind(324, this, SLOT(numericReply_324(KIRC::Message &)), 2, 4);
- bind(328, this, SLOT(numericReply_328(KIRC::Message &)), 2, 2);
- bind(329, this, SLOT(numericReply_329(KIRC::Message &)), 3, 3);
- bind(330, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0); // ???
- bind(331, this, SLOT(numericReply_331(KIRC::Message &)), 2, 2);
- bind(332, this, SLOT(numericReply_332(KIRC::Message &)), 2, 2);
- bind(333, this, SLOT(numericReply_333(KIRC::Message &)), 4, 4);
- bind(352, this, SLOT(numericReply_352(KIRC::Message &)), 5, 10);
- bind(353, this, SLOT(numericReply_353(KIRC::Message &)), 3, 3);
- bind(366, this, SLOT(numericReply_366(KIRC::Message &)), 2, 2);
- bind(369, this, SLOT(numericReply_369(KIRC::Message &)), 2, 2);
- bind(372, this, SLOT(numericReply_372(KIRC::Message &)), 1, 1);
- bind(375, this, SLOT(ignoreMessage(KIRC::Message&)), 0, 0 );
- bind(376, this, SLOT(ignoreMessage(KIRC::Message&)), 0, 0 );
-
- bind(401, this, SLOT(numericReply_401(KIRC::Message &)), 2, 2); // incomingNoNickChan
-// bind(404, this, SLOT(numericReply_404(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel
- bind(406, this, SLOT(numericReply_406(KIRC::Message &)), 2, 2); // incomingWasNoNick
- bind(422, this, SLOT(numericReply_422(KIRC::Message &)), 1, 1);
- bind(433, this, SLOT(numericReply_433(KIRC::Message &)), 2, 2);
-// bind(442, this, SLOT(numericReply_442(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel
- bind(464, this, SLOT(numericReply_464(KIRC::Message &)), 1, 1);
- bind(471, this, SLOT(numericReply_471(KIRC::Message &)), 2, 2);
- bind(473, this, SLOT(numericReply_473(KIRC::Message &)), 2, 2);
- bind(474, this, SLOT(numericReply_474(KIRC::Message &)), 2, 2);
- bind(475, this, SLOT(numericReply_475(KIRC::Message &)), 2, 2);
+ bind(1, this, TQT_SLOT(numericReply_001(KIRC::Message &)), 1, 1);
+ bind(2, this, TQT_SLOT(numericReply_002(KIRC::Message &)), 1, 1);
+ bind(3, this, TQT_SLOT(numericReply_003(KIRC::Message &)), 1, 1);
+ bind(4, this, TQT_SLOT(numericReply_004(KIRC::Message &)), 5, 5);
+ bind(5, this, TQT_SLOT(numericReply_004(KIRC::Message &)), 1, 1);
+
+ bind(250, this, TQT_SLOT(numericReply_250(KIRC::Message &)));
+ bind(251, this, TQT_SLOT(numericReply_251(KIRC::Message &)));
+ bind(252, this, TQT_SLOT(numericReply_252(KIRC::Message &)), 2, 2);
+ bind(253, this, TQT_SLOT(numericReply_253(KIRC::Message &)), 2, 2);
+ bind(254, this, TQT_SLOT(numericReply_254(KIRC::Message &)), 2, 2);
+ bind(255, this, TQT_SLOT(numericReply_255(KIRC::Message &)), 1, 1); // incomingConnectString
+
+ bind(263, this, TQT_SLOT(numericReply_263(KIRC::Message &))); // incomingServerLoadTooHigh
+ bind(265, this, TQT_SLOT(numericReply_265(KIRC::Message &)));
+ bind(266, this, TQT_SLOT(numericReply_266(KIRC::Message &)));
+
+ bind(301, this, TQT_SLOT(numericReply_301(KIRC::Message &)), 2, 2);
+ bind(303, this, TQT_SLOT(numericReply_303(KIRC::Message &)), 1, 1);
+ bind(305, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are no longer marked as away
+ bind(306, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are marked as away
+ bind(307, this, TQT_SLOT(numericReply_307(KIRC::Message &)), 1, 1);
+ bind(311, this, TQT_SLOT(numericReply_311(KIRC::Message &)), 5, 5);
+ bind(312, this, TQT_SLOT(numericReply_312(KIRC::Message &)), 3, 3);
+ bind(313, this, TQT_SLOT(numericReply_313(KIRC::Message &)), 2, 2);
+ bind(314, this, TQT_SLOT(numericReply_314(KIRC::Message &)), 5, 5);
+ bind(315, this, TQT_SLOT(numericReply_315(KIRC::Message &)), 2, 2);
+ bind(317, this, TQT_SLOT(numericReply_317(KIRC::Message &)), 3, 4);
+ bind(318, this, TQT_SLOT(numericReply_318(KIRC::Message &)), 2, 2);
+ bind(319, this, TQT_SLOT(numericReply_319(KIRC::Message &)), 2, 2);
+ bind(320, this, TQT_SLOT(numericReply_320(KIRC::Message &)), 2, 2);
+ bind(321, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0 );
+ bind(322, this, TQT_SLOT(numericReply_322(KIRC::Message &)), 3, 3);
+ bind(323, this, TQT_SLOT(numericReply_323(KIRC::Message &)), 1, 1);
+ bind(324, this, TQT_SLOT(numericReply_324(KIRC::Message &)), 2, 4);
+ bind(328, this, TQT_SLOT(numericReply_328(KIRC::Message &)), 2, 2);
+ bind(329, this, TQT_SLOT(numericReply_329(KIRC::Message &)), 3, 3);
+ bind(330, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0); // ???
+ bind(331, this, TQT_SLOT(numericReply_331(KIRC::Message &)), 2, 2);
+ bind(332, this, TQT_SLOT(numericReply_332(KIRC::Message &)), 2, 2);
+ bind(333, this, TQT_SLOT(numericReply_333(KIRC::Message &)), 4, 4);
+ bind(352, this, TQT_SLOT(numericReply_352(KIRC::Message &)), 5, 10);
+ bind(353, this, TQT_SLOT(numericReply_353(KIRC::Message &)), 3, 3);
+ bind(366, this, TQT_SLOT(numericReply_366(KIRC::Message &)), 2, 2);
+ bind(369, this, TQT_SLOT(numericReply_369(KIRC::Message &)), 2, 2);
+ bind(372, this, TQT_SLOT(numericReply_372(KIRC::Message &)), 1, 1);
+ bind(375, this, TQT_SLOT(ignoreMessage(KIRC::Message&)), 0, 0 );
+ bind(376, this, TQT_SLOT(ignoreMessage(KIRC::Message&)), 0, 0 );
+
+ bind(401, this, TQT_SLOT(numericReply_401(KIRC::Message &)), 2, 2); // incomingNoNickChan
+// bind(404, this, TQT_SLOT(numericReply_404(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel
+ bind(406, this, TQT_SLOT(numericReply_406(KIRC::Message &)), 2, 2); // incomingWasNoNick
+ bind(422, this, TQT_SLOT(numericReply_422(KIRC::Message &)), 1, 1);
+ bind(433, this, TQT_SLOT(numericReply_433(KIRC::Message &)), 2, 2);
+// bind(442, this, TQT_SLOT(numericReply_442(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel
+ bind(464, this, TQT_SLOT(numericReply_464(KIRC::Message &)), 1, 1);
+ bind(471, this, TQT_SLOT(numericReply_471(KIRC::Message &)), 2, 2);
+ bind(473, this, TQT_SLOT(numericReply_473(KIRC::Message &)), 2, 2);
+ bind(474, this, TQT_SLOT(numericReply_474(KIRC::Message &)), 2, 2);
+ bind(475, this, TQT_SLOT(numericReply_475(KIRC::Message &)), 2, 2);
//Freenode seems to use this for a non-RFC compliant purpose, as does Unreal
- bind(477, this, SLOT(emitSuffix(KIRC::Message&)),0,0);
+ bind(477, this, TQT_SLOT(emitSuffix(KIRC::Message&)),0,0);
}
/* 001: "Welcome to the Internet Relay Network <nick>!<user>@<host>"
@@ -237,8 +237,8 @@ void Engine::numericReply_301(Message &msg)
*/
void Engine::numericReply_303(Message &msg)
{
- QStringList nicks = QStringList::split(QRegExp(QChar(' ')), msg.suffix());
- for(QStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it)
+ TQStringList nicks = TQStringList::split(TQRegExp(TQChar(' ')), msg.suffix());
+ for(TQStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it)
{
if (!(*it).stripWhiteSpace().isEmpty())
emit incomingUserOnline(Kopete::Message::unescape(*it));
@@ -405,7 +405,7 @@ void Engine::numericReply_332(Message &msg)
void Engine::numericReply_333( Message &msg )
{
kdDebug(14120) << k_funcinfo << endl;
- QDateTime d;
+ TQDateTime d;
d.setTime_t( msg.arg(3).toLong() );
emit incomingTopicUser( Kopete::Message::unescape(msg.arg(1)), Kopete::Message::unescape(msg.arg(2)), d );
}
@@ -439,7 +439,7 @@ void Engine::numericReply_352(Message &msg)
*/
void Engine::numericReply_353(Message &msg)
{
- emit incomingNamesList(Kopete::Message::unescape(msg.arg(2)), QStringList::split(' ', msg.suffix()));
+ emit incomingNamesList(Kopete::Message::unescape(msg.arg(2)), TQStringList::split(' ', msg.suffix()));
}
/* 366: "<channel> :End of NAMES list"
diff --git a/kopete/protocols/irc/libkirc/kircentity.cpp b/kopete/protocols/irc/libkirc/kircentity.cpp
index 6aa6fd55..ded35fe5 100644
--- a/kopete/protocols/irc/libkirc/kircentity.cpp
+++ b/kopete/protocols/irc/libkirc/kircentity.cpp
@@ -29,19 +29,19 @@ using namespace KNetwork;
* where user and host are optionnal.
* NOTE: If changes are done to the regexp string, update also the sm_userStrictRegExp regexp string.
*/
-const QRegExp Entity::sm_userRegExp(QString::fromLatin1("^([^\\s,:!@]+)(?:(?:!([^\\s,:!@]+))?(?:@([^\\s,!@]+)))?$"));
+const TQRegExp Entity::sm_userRegExp(TQString::fromLatin1("^([^\\s,:!@]+)(?:(?:!([^\\s,:!@]+))?(?:@([^\\s,!@]+)))?$"));
/**
* Regexp to match strictly the complete user definition:
* nick!user@host
* NOTE: If changes are done to the regexp string, update also the sm_userRegExp regexp string.
*/
-const QRegExp Entity::sm_userStrictRegExp(QString::fromLatin1("^([^\\s,:!@]+)!([^\\s,:!@]+)@([^\\s,:!@]+)$"));
+const TQRegExp Entity::sm_userStrictRegExp(TQString::fromLatin1("^([^\\s,:!@]+)!([^\\s,:!@]+)@([^\\s,:!@]+)$"));
-const QRegExp Entity::sm_channelRegExp( QString::fromLatin1("^[#!+&][^\\s,]+$") );
+const TQRegExp Entity::sm_channelRegExp( TQString::fromLatin1("^[#!+&][^\\s,]+$") );
-Entity::Entity(const QString &, const Type type)
- : QObject(0, "KIRC::Entity"),
+Entity::Entity(const TQString &, const Type type)
+ : TQObject(0, "KIRC::Entity"),
m_type(type)
{
// rename(name, type);
@@ -52,12 +52,12 @@ Entity::~Entity()
emit destroyed(this);
}
-QString Entity::name() const
+TQString Entity::name() const
{
return m_name;
}
-QString Entity::host() const
+TQString Entity::host() const
{
switch(m_type)
{
@@ -70,7 +70,7 @@ QString Entity::host() const
return userHost();
default:
kdDebug(14121) << k_funcinfo << "No host defined for type:" << m_type;
- return QString::null;
+ return TQString::null;
}
}
@@ -86,44 +86,44 @@ KIRC::Entity::Type Entity::guessType()
}
// FIXME: Implement me
-KIRC::Entity::Type Entity::guessType(const QString &)
+KIRC::Entity::Type Entity::guessType(const TQString &)
{
return Unknown;
}
-QString Entity::userNick() const
+TQString Entity::userNick() const
{
return userNick(m_name);
}
-QString Entity::userNick(const QString &s)
+TQString Entity::userNick(const TQString &s)
{
return userInfo(s, 1);
}
-QString Entity::userName() const
+TQString Entity::userName() const
{
return userName(m_name);
}
-QString Entity::userName(const QString &s)
+TQString Entity::userName(const TQString &s)
{
return userInfo(s, 2);
}
-QString Entity::userHost() const
+TQString Entity::userHost() const
{
return userHost(m_name);
}
-QString Entity::userHost(const QString &s)
+TQString Entity::userHost(const TQString &s)
{
return userInfo(s, 3);
}
-QString Entity::userInfo(const QString &s, int num)
+TQString Entity::userInfo(const TQString &s, int num)
{
- QRegExp userRegExp(sm_userRegExp);
+ TQRegExp userRegExp(sm_userRegExp);
userRegExp.search(s);
return userRegExp.cap(num);
}
diff --git a/kopete/protocols/irc/libkirc/kircentity.h b/kopete/protocols/irc/libkirc/kircentity.h
index c9336439..d802d8f4 100644
--- a/kopete/protocols/irc/libkirc/kircentity.h
+++ b/kopete/protocols/irc/libkirc/kircentity.h
@@ -22,10 +22,10 @@
#include <kresolver.h>
#include <ksharedptr.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace KIRC
{
@@ -33,7 +33,7 @@ namespace KIRC
class Engine;
class Entity
- : public QObject,
+ : public TQObject,
public KShared
{
Q_OBJECT
@@ -48,49 +48,49 @@ public:
User
};
- Entity(const QString &name, const Type type = Unknown);
+ Entity(const TQString &name, const Type type = Unknown);
virtual ~Entity();
- QString name() const;
- QString host() const;
+ TQString name() const;
+ TQString host() const;
KIRC::Entity::Type type() const;
KIRC::Entity::Type guessType();
- static KIRC::Entity::Type guessType(const QString &name);
+ static KIRC::Entity::Type guessType(const TQString &name);
- // FIXME: Remove these is* functions ... They are duplicate with the ::guessType(const QString&)
- inline static bool isUser( const QString &s )
+ // FIXME: Remove these is* functions ... They are duplicate with the ::guessType(const TQString&)
+ inline static bool isUser( const TQString &s )
{ return sm_userRegExp.exactMatch(s); };
inline bool isChannel()
{ return isChannel(m_name); };
- inline static bool isChannel( const QString &s )
+ inline static bool isChannel( const TQString &s )
{ return sm_channelRegExp.exactMatch(s); };
- QString userNick() const;
- static QString userNick(const QString &s);
+ TQString userNick() const;
+ static TQString userNick(const TQString &s);
- QString userName() const;
- static QString userName(const QString &s);
+ TQString userName() const;
+ static TQString userName(const TQString &s);
- QString userHost() const;
- static QString userHost(const QString &s);
+ TQString userHost() const;
+ static TQString userHost(const TQString &s);
signals:
void destroyed(KIRC::Entity *self);
private:
- static QString userInfo(const QString &s, int num_cap);
+ static TQString userInfo(const TQString &s, int num_cap);
- static const QRegExp sm_userRegExp;
- static const QRegExp sm_userStrictRegExp;
- static const QRegExp sm_channelRegExp;
+ static const TQRegExp sm_userRegExp;
+ static const TQRegExp sm_userStrictRegExp;
+ static const TQRegExp sm_channelRegExp;
KIRC::Entity::Type m_type;
QString m_name;
// peer ip address if the entity is a User.
- QString m_address;
+ TQString m_address;
};
class EntityPtr
@@ -107,7 +107,7 @@ public:
};
class EntityPtrList
- : public QValueList<EntityPtr>
+ : public TQValueList<EntityPtr>
{
public:
EntityPtrList()
@@ -118,8 +118,8 @@ public:
append(entity);
}
- EntityPtrList(const QValueList<EntityPtr> &list)
- : QValueList<EntityPtr>(list)
+ EntityPtrList(const TQValueList<EntityPtr> &list)
+ : TQValueList<EntityPtr>(list)
{ }
};
diff --git a/kopete/protocols/irc/libkirc/kircmessage.cpp b/kopete/protocols/irc/libkirc/kircmessage.cpp
index f1a5b61f..73a1e53f 100644
--- a/kopete/protocols/irc/libkirc/kircmessage.cpp
+++ b/kopete/protocols/irc/libkirc/kircmessage.cpp
@@ -30,20 +30,20 @@
using namespace KIRC;
#ifndef _IRC_STRICTNESS_
-QRegExp Message::m_IRCNumericCommand("^\\d{1,3}$");
+TQRegExp Message::m_IRCNumericCommand("^\\d{1,3}$");
// TODO: This regexp parsing is no good. It's slower than it needs to be, and
-// is not codec-safe since QString requires a codec. NEed to parse this with
+// is not codec-safe since TQString requires a codec. NEed to parse this with
// our own parsing class that operates on the raw QCStrings
-QRegExp Message::m_IRCCommandType1(
+TQRegExp Message::m_IRCCommandType1(
"^(?::([^ ]+) )?([A-Za-z]+|\\d{1,3})((?: [^ :][^ ]*)*) ?(?: :(.*))?$");
// Extra end arg space check -------------------------^
#else // _IRC_STRICTNESS_
-QRegExp Message::m_IRCNumericCommand("^\\d{3,3}$");
+TQRegExp Message::m_IRCNumericCommand("^\\d{3,3}$");
-QRegExp Message::m_IRCCommandType1(
+TQRegExp Message::m_IRCCommandType1(
"^(?::([^ ]+) )?([A-Za-z]+|\\d{3,3})((?: [^ :][^ ]*){0,13})(?: :(.*))?$");
-QRegExp Message::m_IRCCommandType2(
+TQRegExp Message::m_IRCCommandType2(
"^(?::[[^ ]+) )?([A-Za-z]+|\\d{3,3})((?: [^ :][^ ]*){14,14})(?: (.*))?$");
#endif // _IRC_STRICTNESS_
@@ -90,7 +90,7 @@ Message::~Message()
delete m_ctcpMessage;
}
-void Message::writeRawMessage(Engine *engine, const QTextCodec *codec, const QString &str)
+void Message::writeRawMessage(Engine *engine, const TQTextCodec *codec, const TQString &str)
{
// FIXME: Really handle this
if (!engine->socket())
@@ -99,65 +99,65 @@ void Message::writeRawMessage(Engine *engine, const QTextCodec *codec, const QSt
return;
}
- QString txt = str + QString::fromLatin1("\r\n");
+ TQString txt = str + TQString::fromLatin1("\r\n");
- QCString s(codec->fromUnicode(txt));
+ TQCString s(codec->fromUnicode(txt));
kdDebug(14120) << "Message is " << s.length() << " chars" << endl;
// FIXME: Should check the amount of data really writen.
int wrote = engine->socket()->writeBlock(s.data(), s.length());
- kdDebug(14121) << QString::fromLatin1("(%1 bytes) >> %2").arg(wrote).arg(str) << endl;
+ kdDebug(14121) << TQString::fromLatin1("(%1 bytes) >> %2").arg(wrote).arg(str) << endl;
}
-void Message::writeMessage(Engine *engine, const QTextCodec *codec, const QString &message)
+void Message::writeMessage(Engine *engine, const TQTextCodec *codec, const TQString &message)
{
writeRawMessage(engine, codec, quote(message));
}
-void Message::writeMessage(Engine *engine, const QTextCodec *codec,
- const QString &command, const QStringList &args, const QString &suffix)
+void Message::writeMessage(Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQStringList &args, const TQString &suffix)
{
- QString msg = command;
+ TQString msg = command;
if (!args.isEmpty())
- msg += QChar(' ') + args.join(QChar(' ')).stripWhiteSpace(); // some extra check should be done here
+ msg += TQChar(' ') + args.join(TQChar(' ')).stripWhiteSpace(); // some extra check should be done here
if (!suffix.isNull())
- msg = msg.stripWhiteSpace() + QString::fromLatin1(" :") + suffix;
+ msg = msg.stripWhiteSpace() + TQString::fromLatin1(" :") + suffix;
writeMessage(engine, codec, msg);
}
-void Message::writeCtcpMessage(Engine *engine, const QTextCodec *codec,
- const QString &command, const QString&to,
- const QString &ctcpMessage)
+void Message::writeCtcpMessage(Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQString&to,
+ const TQString &ctcpMessage)
{
- writeMessage(engine, codec, command, to, QChar(0x01) + ctcpQuote(ctcpMessage) + QChar(0x01));
+ writeMessage(engine, codec, command, to, TQChar(0x01) + ctcpQuote(ctcpMessage) + TQChar(0x01));
}
-void Message::writeCtcpMessage(Engine *engine, const QTextCodec *codec,
- const QString &command, const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs, const QString &ctcpSuffix )
+void Message::writeCtcpMessage(Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix )
{
- QString ctcpMsg = ctcpCommand;
+ TQString ctcpMsg = ctcpCommand;
if (!ctcpArgs.isEmpty())
- ctcpMsg += QChar(' ') + ctcpArgs.join(QChar(' ')).stripWhiteSpace(); // some extra check should be done here
+ ctcpMsg += TQChar(' ') + ctcpArgs.join(TQChar(' ')).stripWhiteSpace(); // some extra check should be done here
if (!ctcpSuffix.isNull())
- ctcpMsg += QString::fromLatin1(" :") + ctcpSuffix;
+ ctcpMsg += TQString::fromLatin1(" :") + ctcpSuffix;
- writeMessage(engine, codec, command, to, suffix + QChar(0x01) + ctcpQuote(ctcpMsg) + QChar(0x01));
+ writeMessage(engine, codec, command, to, suffix + TQChar(0x01) + ctcpQuote(ctcpMsg) + TQChar(0x01));
}
-Message Message::parse(Engine *engine, const QTextCodec *codec, bool *parseSuccess)
+Message Message::parse(Engine *engine, const TQTextCodec *codec, bool *parseSuccess)
{
if (parseSuccess)
*parseSuccess=false;
if (engine->socket()->canReadLine())
{
- QCString raw(engine->socket()->bytesAvailable()+1);
+ TQCString raw(engine->socket()->bytesAvailable()+1);
Q_LONG length = engine->socket()->readLine(raw.data(), raw.count());
if( length > -1 )
@@ -197,21 +197,21 @@ Message Message::parse(Engine *engine, const QTextCodec *codec, bool *parseSucce
return Message();
}
-QString Message::quote(const QString &str)
+TQString Message::quote(const TQString &str)
{
- QString tmp = str;
- QChar q('\020');
- tmp.replace(q, q+QString(q));
- tmp.replace(QChar('\r'), q+QString::fromLatin1("r"));
- tmp.replace(QChar('\n'), q+QString::fromLatin1("n"));
- tmp.replace(QChar('\0'), q+QString::fromLatin1("0"));
+ TQString tmp = str;
+ TQChar q('\020');
+ tmp.replace(q, q+TQString(q));
+ tmp.replace(TQChar('\r'), q+TQString::fromLatin1("r"));
+ tmp.replace(TQChar('\n'), q+TQString::fromLatin1("n"));
+ tmp.replace(TQChar('\0'), q+TQString::fromLatin1("0"));
return tmp;
}
// FIXME: The unquote system is buggy.
-QString Message::unquote(const QString &str)
+TQString Message::unquote(const TQString &str)
{
- QString tmp = str;
+ TQString tmp = str;
char b[3] = { 020, 020, '\0' };
const char b2[2] = { 020, '\0' };
@@ -227,23 +227,23 @@ QString Message::unquote(const QString &str)
return tmp;
}
-QString Message::ctcpQuote(const QString &str)
+TQString Message::ctcpQuote(const TQString &str)
{
- QString tmp = str;
- tmp.replace( QChar('\\'), QString::fromLatin1("\\\\"));
- tmp.replace( (char)1, QString::fromLatin1("\\1"));
+ TQString tmp = str;
+ tmp.replace( TQChar('\\'), TQString::fromLatin1("\\\\"));
+ tmp.replace( (char)1, TQString::fromLatin1("\\1"));
return tmp;
}
-QString Message::ctcpUnquote(const QString &str)
+TQString Message::ctcpUnquote(const TQString &str)
{
- QString tmp = str;
+ TQString tmp = str;
tmp.replace("\\\\", "\\");
tmp.replace("\\1", "\1" );
return tmp;
}
-bool Message::matchForIRCRegExp(const QCString &line, const QTextCodec *codec, Message &message)
+bool Message::matchForIRCRegExp(const TQCString &line, const TQTextCodec *codec, Message &message)
{
if(matchForIRCRegExp(m_IRCCommandType1, codec, line, message))
return true;
@@ -256,19 +256,19 @@ bool Message::matchForIRCRegExp(const QCString &line, const QTextCodec *codec, M
// FIXME: remove the decodeStrings calls or update them.
// FIXME: avoid the recursive call, it make the ctcp command unquoted twice (wich is wrong, but valid in most of the cases)
-bool Message::matchForIRCRegExp(QRegExp &regexp, const QTextCodec *codec, const QCString &line, Message &msg )
+bool Message::matchForIRCRegExp(TQRegExp &regexp, const TQTextCodec *codec, const TQCString &line, Message &msg )
{
if( regexp.exactMatch( codec->toUnicode(line) ) )
{
msg.m_raw = line;
msg.m_prefix = unquote(regexp.cap(1));
msg.m_command = unquote(regexp.cap(2));
- msg.m_args = QStringList::split(' ', regexp.cap(3));
+ msg.m_args = TQStringList::split(' ', regexp.cap(3));
- QCString suffix = codec->fromUnicode(unquote(regexp.cap(4)));
+ TQCString suffix = codec->fromUnicode(unquote(regexp.cap(4)));
if (!suffix.isNull() && suffix.length() > 0)
{
- QCString ctcpRaw;
+ TQCString ctcpRaw;
if (extractCtcpCommand(suffix, ctcpRaw))
{
msg.m_ctcpRaw = codec->toUnicode(ctcpRaw);
@@ -279,7 +279,7 @@ bool Message::matchForIRCRegExp(QRegExp &regexp, const QTextCodec *codec, const
int space = ctcpRaw.find(' ');
if (!matchForIRCRegExp(msg.m_ctcpMessage->m_raw, codec, *msg.m_ctcpMessage))
{
- QCString command;
+ TQCString command;
if (space > 0)
command = ctcpRaw.mid(0, space).upper();
else
@@ -296,28 +296,28 @@ bool Message::matchForIRCRegExp(QRegExp &regexp, const QTextCodec *codec, const
msg.m_suffix = Kopete::Message::decodeString( KSParser::parse(suffix), codec );
}
else
- msg.m_suffix = QString::null;
+ msg.m_suffix = TQString::null;
return true;
}
return false;
}
-void Message::decodeAgain( const QTextCodec *codec )
+void Message::decodeAgain( const TQTextCodec *codec )
{
matchForIRCRegExp(m_raw, codec, *this);
}
// FIXME: there are missing parts
-QString Message::toString() const
+TQString Message::toString() const
{
if( !isValid() )
- return QString::null;
+ return TQString::null;
- QString msg = m_command;
- for (QStringList::ConstIterator it = m_args.begin(); it != m_args.end(); ++it)
- msg += QChar(' ') + *it;
+ TQString msg = m_command;
+ for (TQStringList::ConstIterator it = m_args.begin(); it != m_args.end(); ++it)
+ msg += TQChar(' ') + *it;
if (!m_suffix.isNull())
- msg += QString::fromLatin1(" :") + m_suffix;
+ msg += TQString::fromLatin1(" :") + m_suffix;
return msg;
}
@@ -339,7 +339,7 @@ bool Message::isValid() const
* string is splited to get the first part of the message and fill the ctcp command.
* FIXME: The code currently only match for a textual message or a ctcp message not both mixed as it can be (even if very rare).
*/
-bool Message::extractCtcpCommand(QCString &message, QCString &ctcpline)
+bool Message::extractCtcpCommand(TQCString &message, TQCString &ctcpline)
{
uint len = message.length();
diff --git a/kopete/protocols/irc/libkirc/kircmessage.h b/kopete/protocols/irc/libkirc/kircmessage.h
index e37f3fb2..02631bbf 100644
--- a/kopete/protocols/irc/libkirc/kircmessage.h
+++ b/kopete/protocols/irc/libkirc/kircmessage.h
@@ -22,11 +22,11 @@
#include <kbufferedio.h>
-#include <qdict.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <kopetemessage.h>
@@ -44,20 +44,20 @@ class Message
public:
/** \brief Sends the message as-is to the server.
*/
- static void writeRawMessage(KIRC::Engine *engine, const QTextCodec *codec, const QString &str);
+ static void writeRawMessage(KIRC::Engine *engine, const TQTextCodec *codec, const TQString &str);
- static void writeMessage(KIRC::Engine *engine, const QTextCodec *codec, const QString &str);
+ static void writeMessage(KIRC::Engine *engine, const TQTextCodec *codec, const TQString &str);
- static void writeMessage(KIRC::Engine *engine, const QTextCodec *codec,
- const QString &command, const QStringList &args, const QString &suffix);
+ static void writeMessage(KIRC::Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQStringList &args, const TQString &suffix);
- static void writeCtcpMessage(KIRC::Engine *engine, const QTextCodec *codec,
- const QString &command, const QString &to,
- const QString &ctcpMessage);
+ static void writeCtcpMessage(KIRC::Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQString &to,
+ const TQString &ctcpMessage);
- static void writeCtcpMessage(KIRC::Engine *engine, const QTextCodec *codec,
- const QString &command, const QString &to, const QString &suffix,
- const QString &ctcpCommand, const QStringList &ctcpArgs = QStringList(), const QString &ctcpSuffix = QString::null );
+ static void writeCtcpMessage(KIRC::Engine *engine, const TQTextCodec *codec,
+ const TQString &command, const TQString &to, const TQString &suffix,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null );
Message();
Message(const KIRC::Message &obj);
@@ -65,10 +65,10 @@ public:
~Message();
- inline const QString nickFromPrefix() const
+ inline const TQString nickFromPrefix() const
{ return Kopete::Message::unescape(KIRC::Entity::userNick(m_prefix)); }
- QString toString() const;
+ TQString toString() const;
/** \brief Returns true if the message command is numeric.
*/
@@ -84,11 +84,11 @@ public:
/** \brief Re-decodes the message with given codec.
*/
- void decodeAgain( const QTextCodec *codec );
+ void decodeAgain( const TQTextCodec *codec );
/** \brief The whole message as received.
*/
- inline const QCString &raw() const
+ inline const TQCString &raw() const
{ return m_raw; }
/** \brief Prefix of this message.
@@ -100,7 +100,7 @@ public:
* message = [ ":" prefix SPACE ] command [ params ] crlf
* prefix = servername / ( nickname [ [ "!" user ] "@" host ] )
*/
- inline const QString &prefix() const
+ inline const TQString &prefix() const
{ return m_prefix; }
/** \brief The command part of this message.
@@ -109,7 +109,7 @@ public:
*
* Examples: "MODE", "PRIVMSG", 303, 001, ...
*/
- inline const QString &command() const
+ inline const TQString &command() const
{ return m_command; }
/** \brief The number of command arguments this message contains.
@@ -119,19 +119,19 @@ public:
/** \brief i:th command argument.
*/
- inline const QString &arg(size_t i) const
+ inline const TQString &arg(size_t i) const
{ return m_args[i]; }
/** \brief All command arguments.
*/
- inline const QStringList &args() const
+ inline const TQStringList &args() const
{ return m_args; }
/** \brief Message suffix.
*/
- inline const QString &suffix() const
+ inline const TQString &suffix() const
{ return m_suffix; }
- inline const QString &ctcpRaw() const
+ inline const TQString &ctcpRaw() const
{ return m_ctcpRaw; }
inline bool hasCtcpMessage() const
@@ -139,58 +139,58 @@ public:
inline class KIRC::Message &ctcpMessage() const
{ return *m_ctcpMessage; }
- static KIRC::Message parse(KIRC::Engine *engine, const QTextCodec *codec, bool *parseSuccess=0);
+ static KIRC::Message parse(KIRC::Engine *engine, const TQTextCodec *codec, bool *parseSuccess=0);
private:
/**
* Contains the low level dequoted message.
*/
- QCString m_raw;
+ TQCString m_raw;
/**
* Contains the completely dequoted prefix.
*/
- QString m_prefix;
+ TQString m_prefix;
/**
* Contains the completely dequoted command.
*/
- QString m_command;
+ TQString m_command;
/**
* Contains the completely dequoted args.
*/
- QStringList m_args;
+ TQStringList m_args;
/**
* Contains the completely dequoted suffix.
*/
- QString m_suffix;
+ TQString m_suffix;
/**
* If it is a message contains the completely dequoted rawCtcpLine.
* If it is a ctcp message contains the completely dequoted rawCtcpArgsLine.
*/
- QString m_ctcpRaw;
+ TQString m_ctcpRaw;
// low level quoting, message quoting
- static QString quote(const QString &str);
- static QString unquote(const QString &str);
+ static TQString quote(const TQString &str);
+ static TQString unquote(const TQString &str);
// ctcp level quoting
- static QString ctcpQuote(const QString &str);
- static QString ctcpUnquote(const QString &str);
+ static TQString ctcpQuote(const TQString &str);
+ static TQString ctcpUnquote(const TQString &str);
- static bool extractCtcpCommand(QCString &str, QCString &ctcpline);
+ static bool extractCtcpCommand(TQCString &str, TQCString &ctcpline);
- static bool matchForIRCRegExp(const QCString &line, const QTextCodec *codec, KIRC::Message &message);
- static bool matchForIRCRegExp(QRegExp &regexp, const QTextCodec *codec, const QCString &line, KIRC::Message &message);
+ static bool matchForIRCRegExp(const TQCString &line, const TQTextCodec *codec, KIRC::Message &message);
+ static bool matchForIRCRegExp(TQRegExp &regexp, const TQTextCodec *codec, const TQCString &line, KIRC::Message &message);
class KIRC::Message *m_ctcpMessage;
- static QRegExp m_IRCCommandType1;
+ static TQRegExp m_IRCCommandType1;
#ifdef _IRC_STRICTNESS_
- static QRegExp m_IRCCommandType2;
+ static TQRegExp m_IRCCommandType2;
#endif // _IRC_STRICTNESS_
- static QRegExp m_IRCNumericCommand;
+ static TQRegExp m_IRCNumericCommand;
};
}
diff --git a/kopete/protocols/irc/libkirc/kircmessageredirector.cpp b/kopete/protocols/irc/libkirc/kircmessageredirector.cpp
index 49194ce0..2e1d0b4c 100644
--- a/kopete/protocols/irc/libkirc/kircmessageredirector.cpp
+++ b/kopete/protocols/irc/libkirc/kircmessageredirector.cpp
@@ -22,21 +22,21 @@
using namespace KIRC;
MessageRedirector::MessageRedirector(KIRC::Engine *engine,
- int argsSize_min, int argsSize_max, const QString &helpMessage)
- : QObject(engine, "KIRC::MessageRedirector"),
+ int argsSize_min, int argsSize_max, const TQString &helpMessage)
+ : TQObject(engine, "KIRC::MessageRedirector"),
m_argsSize_min(argsSize_min),
m_argsSize_max(argsSize_max),
m_helpMessage(helpMessage)
{
}
-bool MessageRedirector::connect(QObject *object, const char *member)
+bool MessageRedirector::connect(TQObject *object, const char *member)
{
- return QObject::connect(this, SIGNAL(redirect(KIRC::Message &)),
+ return TQObject::connect(this, TQT_SIGNAL(redirect(KIRC::Message &)),
object, member);
}
-QStringList MessageRedirector::operator () (Message &msg)
+TQStringList MessageRedirector::operator () (Message &msg)
{
m_errors.clear();
@@ -49,12 +49,12 @@ QStringList MessageRedirector::operator () (Message &msg)
return m_errors;
}
-QString MessageRedirector::helpMessage()
+TQString MessageRedirector::helpMessage()
{
return m_helpMessage;
}
-void MessageRedirector::error(QString &message)
+void MessageRedirector::error(TQString &message)
{
m_errors.append(message);
}
@@ -82,7 +82,7 @@ bool MessageRedirector::checkValidity(const Message &msg)
( msg.argsSize() > 0 && (
msg.arg(0) == m_Nickname ||
msg.arg(0) == m_PendingNick ||
- msg.arg(0) == QString::fromLatin1("*")
+ msg.arg(0) == TQString::fromLatin1("*")
)
)
)
diff --git a/kopete/protocols/irc/libkirc/kircmessageredirector.h b/kopete/protocols/irc/libkirc/kircmessageredirector.h
index f87a2af6..24a2f9af 100644
--- a/kopete/protocols/irc/libkirc/kircmessageredirector.h
+++ b/kopete/protocols/irc/libkirc/kircmessageredirector.h
@@ -18,8 +18,8 @@
#ifndef KIRC_MESSAGEREDIRECTOR_H
#define KIRC_MESSAGEREDIRECTOR_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
namespace KIRC
{
@@ -42,27 +42,27 @@ public:
MessageRedirector(KIRC::Engine *engine,
int argsSize_min = KIRC::MessageRedirector::Unknown,
int argsSize_max = KIRC::MessageRedirector::Unknown,
- const QString &helpMessage = QString::null);
+ const TQString &helpMessage = TQString::null);
/**
* Connects the given object member signal/slot to this message redirector.
* The member signal slot should be looking like:
- * SIGNAL(mysignal(KIRC::Message &msg))
+ * TQT_SIGNAL(mysignal(KIRC::Message &msg))
* or
- * SIGNAL(myslot(KIRC::Message &msg))
+ * TQT_SIGNAL(myslot(KIRC::Message &msg))
*/
- bool connect(QObject *object, const char *member);
+ bool connect(TQObject *object, const char *member);
/**
* Attempt to send the message.
- * @return a not empty QStringList on errors or no slots connected.
+ * @return a not empty TQStringList on errors or no slots connected.
* The returned string list contains all the errors.
*/
- QStringList operator()(KIRC::Message &msg);
+ TQStringList operator()(KIRC::Message &msg);
- void error(QString &errorMessage);
+ void error(TQString &errorMessage);
- QString helpMessage();
+ TQString helpMessage();
signals:
void redirect(KIRC::Message &);
@@ -74,11 +74,11 @@ private:
*/
bool checkValidity(const KIRC::Message &msg);
- QStringList m_errors;
+ TQStringList m_errors;
int m_argsSize_min;
int m_argsSize_max;
- QString m_helpMessage;
+ TQString m_helpMessage;
};
}
diff --git a/kopete/protocols/irc/libkirc/kirctransfer.cpp b/kopete/protocols/irc/libkirc/kirctransfer.cpp
index 2466d6a9..af7d8948 100644
--- a/kopete/protocols/irc/libkirc/kirctransfer.cpp
+++ b/kopete/protocols/irc/libkirc/kirctransfer.cpp
@@ -19,30 +19,30 @@
#include <kextsock.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include "kirctransfer.h"
using namespace KIRC;
-Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
+Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
Type type,
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(0),
m_initiated(false),
- m_file(0), m_fileName(QString::null), m_fileSize(0), m_fileSizeCur(0), m_fileSizeAck(0),
+ m_file(0), m_fileName(TQString::null), m_fileSize(0), m_fileSizeCur(0), m_fileSizeAck(0),
m_receivedBytes(0), m_receivedBytesLimit(0), m_sentBytes(0), m_sentBytesLimit(0)
{
}
-Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
+Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize, // put this in a QVariant ?
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ?
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(0),
m_initiated(false),
@@ -51,12 +51,12 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
{
}
-Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
- QHostAddress hostAdress, Q_UINT16 port, // put this in a QVariant ?
+Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
+ TQHostAddress hostAdress, Q_UINT16 port, // put this in a TQVariant ?
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize, // put this in a QVariant ?
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ?
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(0),
m_initiated(false),
@@ -66,10 +66,10 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
setSocket(new KExtendedSocket(hostAdress.toString(), port));
}
/*
-Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
- Transfer::Type type, QVariant properties,
- QObject *parent, const char *name )
- : QObject( parent, name ),
+Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
+ Transfer::Type type, TQVariant properties,
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(properties[socket]),
m_initiated(false),
@@ -81,11 +81,11 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress
else if(!properites["hostAddress"].isNull() && !properites["hostPort"].isNull())
setSocket(new KExtendedSocket(properites["hostAddress"], properites["hostPort"]));
- connect(this, SIGNAL(complete()),
- this, SLOT(closeSocket()));
+ connect(this, TQT_SIGNAL(complete()),
+ this, TQT_SLOT(closeSocket()));
- connect(this, SIGNAL(abort(QString)),
- this, SLOT(closeSocket()));
+ connect(this, TQT_SIGNAL(abort(TQString)),
+ this, TQT_SLOT(closeSocket()));
}
*/
Transfer::~Transfer()
@@ -116,7 +116,7 @@ void Transfer::slotError( int error )
bool Transfer::initiate()
{
- QTimer *timer = 0;
+ TQTimer *timer = 0;
if(m_initiated)
{
@@ -134,39 +134,39 @@ bool Transfer::initiate()
m_file.setName(m_fileName);
- connect(this, SIGNAL(complete()),
- this, SLOT(closeSocket()));
- connect(this, SIGNAL(abort(QString)),
- this, SLOT(closeSocket()));
+ connect(this, TQT_SIGNAL(complete()),
+ this, TQT_SLOT(closeSocket()));
+ connect(this, TQT_SIGNAL(abort(TQString)),
+ this, TQT_SLOT(closeSocket()));
-// connect(m_socket, SIGNAL(connectionClosed()),
-// this, SLOT(slotConnectionClosed()));
-// connect(m_socket, SIGNAL(delayedCloseFinished()),
-// this, SLOT(slotConnectionClosed()));
- connect(m_socket, SIGNAL(error(int)), // FIXME: connection failed: No such signal KExtendedSocket::error(int)
- this, SLOT(slotError(int)));
+// connect(m_socket, TQT_SIGNAL(connectionClosed()),
+// this, TQT_SLOT(slotConnectionClosed()));
+// connect(m_socket, TQT_SIGNAL(delayedCloseFinished()),
+// this, TQT_SLOT(slotConnectionClosed()));
+ connect(m_socket, TQT_SIGNAL(error(int)), // FIXME: connection failed: No such signal KExtendedSocket::error(int)
+ this, TQT_SLOT(slotError(int)));
switch( m_type )
{
case Chat:
kdDebug(14121) << k_funcinfo << "Stting up a chat." << endl;
- connect(m_socket, SIGNAL(readyRead()),
- this, SLOT(readyReadFileIncoming()));
+ connect(m_socket, TQT_SIGNAL(readyRead()),
+ this, TQT_SLOT(readyReadFileIncoming()));
break;
case FileIncoming:
kdDebug(14121) << k_funcinfo << "Stting up an incoming file transfer." << endl;
m_file.open(IO_WriteOnly);
- connect(m_socket, SIGNAL(readyRead()),
- this, SLOT(readyReadFileIncoming()));
+ connect(m_socket, TQT_SIGNAL(readyRead()),
+ this, TQT_SLOT(readyReadFileIncoming()));
break;
case FileOutgoing:
kdDebug(14121) << k_funcinfo << "Stting up an outgoing file transfer." << endl;
m_file.open(IO_ReadOnly);
- connect(m_socket, SIGNAL(readyRead()),
- this, SLOT(readyReadFileOutgoing()));
-// timer = new QTimer(this);
-// connect(timer, SIGNAL(timeout()),
-// this, SLOT(writeFileOutgoing()));
+ connect(m_socket, TQT_SIGNAL(readyRead()),
+ this, TQT_SLOT(readyReadFileOutgoing()));
+// timer = new TQTimer(this);
+// connect(timer, TQT_SIGNAL(timeout()),
+// this, TQT_SLOT(writeFileOutgoing()));
// timer->start(1000, false);
writeFileOutgoing(); // send a first packet.
break;
@@ -189,9 +189,9 @@ bool Transfer::initiate()
// I wonder if calling this is really necessary
// As far as I understand, buffer (socket buffer at least) should be flushed while event-looping.
// But I'm not really sure of this, so I force the flush.
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()),
- this, SLOT(flush()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(flush()));
timer->start(1000, FALSE); // flush the streams at every seconds
return true;
@@ -240,12 +240,12 @@ void Transfer::closeSocket()
m_socket->flush();
}
-void Transfer::userAbort(QString msg)
+void Transfer::userAbort(TQString msg)
{
emit abort(msg);
}
-void Transfer::setCodec( QTextCodec *codec )
+void Transfer::setCodec( TQTextCodec *codec )
{
switch( m_type )
{
@@ -258,7 +258,7 @@ void Transfer::setCodec( QTextCodec *codec )
}
}
-void Transfer::writeLine( const QString &line )
+void Transfer::writeLine( const TQString &line )
{
switch( m_type )
{
@@ -275,7 +275,7 @@ void Transfer::readyReadLine()
{
if( m_socket->canReadLine() )
{
- QString msg = m_socket_textStream.readLine();
+ TQString msg = m_socket_textStream.readLine();
emit readLine(msg);
}
}
diff --git a/kopete/protocols/irc/libkirc/kirctransfer.h b/kopete/protocols/irc/libkirc/kirctransfer.h
index 3453f5cb..4053d1fd 100644
--- a/kopete/protocols/irc/libkirc/kirctransfer.h
+++ b/kopete/protocols/irc/libkirc/kirctransfer.h
@@ -18,11 +18,11 @@
#ifndef KIRCTRANSFER_H
#define KIRCTRANSFER_H
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qhostaddress.h>
-#include <qobject.h>
-#include <qtextstream.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqhostaddress.h>
+#include <tqobject.h>
+#include <tqtextstream.h>
class KExtendedSocket;
@@ -56,25 +56,25 @@ public:
Closed
};
public:
- Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress
+ Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress
Type type = Unknown,
- QObject *parent = 0L, const char *name = 0L );
+ TQObject *parent = 0L, const char *name = 0L );
- Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
- QHostAddress peer_address, Q_UINT16 peer_port,
+ Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
+ TQHostAddress peer_address, Q_UINT16 peer_port,
Transfer::Type type,
- QObject *parent = 0L, const char *name = 0L );
+ TQObject *parent = 0L, const char *name = 0L );
- Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
+ Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize,
- QObject *parent = 0L, const char *name = 0L );
+ TQString fileName, Q_UINT32 fileSize,
+ TQObject *parent = 0L, const char *name = 0L );
- Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
- QHostAddress peer_address, Q_UINT16 peer_port,
+ Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
+ TQHostAddress peer_address, Q_UINT16 peer_port,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize,
- QObject *parent = 0L, const char *name = 0L );
+ TQString fileName, Q_UINT32 fileSize,
+ TQObject *parent = 0L, const char *name = 0L );
/*
For a file transfer properties are:
@@ -88,15 +88,15 @@ public:
Q_UINT32 fileSize
for detemining the file propeties.
*//*
- Transfer( KIRC *engine, QString nick,// QString nick_peer_adress,
- Transfer::Type type, QVariant properties,
- QObject *parent = 0L, const char *name = 0L );
+ Transfer( KIRC *engine, TQString nick,// TQString nick_peer_adress,
+ Transfer::Type type, TQVariant properties,
+ TQObject *parent = 0L, const char *name = 0L );
*/
~Transfer();
KIRC::Engine *engine() const
{ return m_engine; }
- QString nick() const
+ TQString nick() const
{ return m_nick; }
Type type() const
{ return m_type; }
@@ -108,11 +108,11 @@ public:
*/
bool initiate();
- QString fileName() const
+ TQString fileName() const
{ return m_fileName; }
/* Change the file name.
*/
- void setFileName(QString fileName)
+ void setFileName(TQString fileName)
{ m_fileName = fileName; }
unsigned long fileSize() const
{ return m_fileSize; }
@@ -120,15 +120,15 @@ public slots:
bool setSocket( KExtendedSocket *socket );
void closeSocket();
- void setCodec( QTextCodec *codec );
- void writeLine( const QString &msg );
+ void setCodec( TQTextCodec *codec );
+ void writeLine( const TQString &msg );
void flush();
- void userAbort(QString);
+ void userAbort(TQString);
signals:
- void readLine( const QString &msg );
+ void readLine( const TQString &msg );
void fileSizeCurrent( unsigned int );
void fileSizeAcknowledge( unsigned int );
@@ -136,7 +136,7 @@ signals:
// void received(Q_UINT32);
// void sent(Q_UINT32);
- void abort(QString);
+ void abort(TQString);
/* Emited when the transfer is complete.
* Usually it means that the file transfer has successfully finished.
@@ -166,7 +166,7 @@ protected:
// Text member data
QTextStream m_socket_textStream;
-// QTextCodec * m_socket_codec;
+// TQTextCodec * m_socket_codec;
// File member data
QFile m_file;
diff --git a/kopete/protocols/irc/libkirc/kirctransferhandler.cpp b/kopete/protocols/irc/libkirc/kirctransferhandler.cpp
index 3fa73dff..c6c2185e 100644
--- a/kopete/protocols/irc/libkirc/kirctransferhandler.cpp
+++ b/kopete/protocols/irc/libkirc/kirctransferhandler.cpp
@@ -19,9 +19,9 @@
#include <klocale.h>
#include <kextsock.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include "kirctransferserver.h"
@@ -54,9 +54,9 @@ TransferServer *TransferHandler::server( Q_UINT16 port, int backlog )
return m_server;
}
-TransferServer *TransferHandler::createServer(Engine *engine, QString m_userName,
+TransferServer *TransferHandler::createServer(Engine *engine, TQString m_userName,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize)
+ TQString fileName, Q_UINT32 fileSize)
{
TransferServer *server = new TransferServer(engine, m_userName, type, fileName, fileSize, this);
transferServerCreated(server);
@@ -64,13 +64,13 @@ TransferServer *TransferHandler::createServer(Engine *engine, QString m_userName
}
Transfer *TransferHandler::createClient(
- Engine *engine, QString nick,// QString nick_peer_adress,
- QHostAddress peer_address, Q_UINT16 peer_port,
+ Engine *engine, TQString nick,// TQString nick_peer_adress,
+ TQHostAddress peer_address, Q_UINT16 peer_port,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize )
+ TQString fileName, Q_UINT32 fileSize )
{
Transfer *client = new Transfer(
- engine, nick,// QString nick_peer_adress,
+ engine, nick,// TQString nick_peer_adress,
peer_address, peer_port,
type,
fileName, fileSize,
@@ -80,9 +80,9 @@ Transfer *TransferHandler::createClient(
}
/*
-File *DCCHandler::openFile( QString file, int mode = IO_ReadWrite )
+File *DCCHandler::openFile( TQString file, int mode = IO_ReadWrite )
{
- QFile *file = new QFile(filename);
+ TQFile *file = new TQFile(filename);
if (!file->open(mode))
{
delete file;
diff --git a/kopete/protocols/irc/libkirc/kirctransferhandler.h b/kopete/protocols/irc/libkirc/kirctransferhandler.h
index 81774c02..de03b810 100644
--- a/kopete/protocols/irc/libkirc/kirctransferhandler.h
+++ b/kopete/protocols/irc/libkirc/kirctransferhandler.h
@@ -18,7 +18,7 @@
#ifndef KIRCTRANSFERHANDLER_H
#define KIRCTRANSFERHANDLER_H
-#include <qhostaddress.h>
+#include <tqhostaddress.h>
#include "kirctransfer.h"
#include "kirctransferserver.h"
@@ -42,24 +42,24 @@ public:
TransferServer *server();
TransferServer *server( Q_UINT16 port, int backlog = 1 );
- TransferServer *createServer(KIRC::Engine *engine, QString m_userName,
+ TransferServer *createServer(KIRC::Engine *engine, TQString m_userName,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize);
+ TQString fileName, Q_UINT32 fileSize);
Transfer *createClient(
- KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
- QHostAddress peer_address, Q_UINT16 peer_port,
+ KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
+ TQHostAddress peer_address, Q_UINT16 peer_port,
Transfer::Type type,
- QString file = QString::null, Q_UINT32 fileSize = 0 );
+ TQString file = TQString::null, Q_UINT32 fileSize = 0 );
// void registerServer( DCCServer * );
-// QPtrList<DCCServer> getRegisteredServers();
-// static QPtrList<DCCServer> getAllRegisteredServers();
+// TQPtrList<DCCServer> getRegisteredServers();
+// static TQPtrList<DCCServer> getAllRegisteredServers();
// void unregisterServer( DCCServer * );
// void registerClient( DCCClient * );
-// QPtrList<DCCClient> getRegisteredClients();
-// static QPtrList<DCCClient> getAllRegisteredClients();
+// TQPtrList<DCCClient> getRegisteredClients();
+// static TQPtrList<DCCClient> getAllRegisteredClients();
// void unregisterClient( DCCClient * );
signals:
@@ -70,8 +70,8 @@ private:
// TransferHandler();
TransferServer *m_server;
-// QPtrList<TransferServer> m_servers;
-// QPtrList<Transfer> m_clients;
+// TQPtrList<TransferServer> m_servers;
+// TQPtrList<Transfer> m_clients;
};
}
diff --git a/kopete/protocols/irc/libkirc/kirctransferserver.cpp b/kopete/protocols/irc/libkirc/kirctransferserver.cpp
index 96cc66fb..1fbe1629 100644
--- a/kopete/protocols/irc/libkirc/kirctransferserver.cpp
+++ b/kopete/protocols/irc/libkirc/kirctransferserver.cpp
@@ -25,27 +25,27 @@
using namespace KIRC;
/*
-TransferServer::TransferServer( QObject *parent, const char *name )
- : QObject( parent, name ),
+TransferServer::TransferServer( TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_socket( 0 ),
m_port( 0 ),
m_backlog( 1 )
{
}
*/
-TransferServer::TransferServer(Q_UINT16 port, int backlog, QObject *parent, const char *name)
- : QObject( parent, name ),
+TransferServer::TransferServer(Q_UINT16 port, int backlog, TQObject *parent, const char *name)
+ : TQObject( parent, name ),
m_socket( 0 ),
m_port( port ),
m_backlog( backlog )
{
}
-TransferServer::TransferServer(Engine *engine, QString nick,// QString nick_peer_adress,
+TransferServer::TransferServer(Engine *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize,
- QObject *parent, const char *name)
- : QObject( parent, name ),
+ TQString fileName, Q_UINT32 fileSize,
+ TQObject *parent, const char *name)
+ : TQObject( parent, name ),
m_socket(0),
m_port(0),
m_backlog(1),
@@ -68,8 +68,8 @@ bool TransferServer::initServer()
{
if (!m_socket)
{
- QObject::connect(this, SIGNAL(incomingNewTransfer(Transfer *)),
- TransferHandler::self(), SIGNAL(transferCreated(Transfer *)));
+ TQObject::connect(this, TQT_SIGNAL(incomingNewTransfer(Transfer *)),
+ TransferHandler::self(), TQT_SIGNAL(transferCreated(Transfer *)));
m_socket = new KExtendedSocket();
@@ -83,10 +83,10 @@ bool TransferServer::initServer()
if (!m_socket->setTimeout(2*60)) // FIXME: allow configuration of this.
kdDebug(14120) << k_funcinfo << "Failed to set timeout." << endl;
- QObject::connect(m_socket, SIGNAL(readyAccept()),
- this, SLOT(readyAccept()));
- QObject::connect(m_socket, SIGNAL(connectionFailed(int)),
- this, SLOT(connectionFailed(int)));
+ TQObject::connect(m_socket, TQT_SIGNAL(readyAccept()),
+ this, TQT_SLOT(readyAccept()));
+ TQObject::connect(m_socket, TQT_SIGNAL(connectionFailed(int)),
+ this, TQT_SLOT(connectionFailed(int)));
m_socket->listen(m_backlog);
m_socket->setBlockingMode(true);
@@ -137,14 +137,14 @@ void Transfer::initClient()
{
if(!m_socket)
{
- connect(m_socket, SIGNAL(connectionClosed()),
- this, SLOT(slotConnectionClosed()));
- connect(m_socket, SIGNAL(delayedCloseFinished()),
- this, SLOT(slotConnectionClosed()));
- connect(m_socket, SIGNAL(error(int)),
- this, SLOT(slotError(int)));
- connect(m_socket, SIGNAL(readyRead()),
- this, SLOT(readyReadFileOut));
+ connect(m_socket, TQT_SIGNAL(connectionClosed()),
+ this, TQT_SLOT(slotConnectionClosed()));
+ connect(m_socket, TQT_SIGNAL(delayedCloseFinished()),
+ this, TQT_SLOT(slotConnectionClosed()));
+ connect(m_socket, TQT_SIGNAL(error(int)),
+ this, TQT_SLOT(slotError(int)));
+ connect(m_socket, TQT_SIGNAL(readyRead()),
+ this, TQT_SLOT(readyReadFileOut));
m_socket->enableRead( true );
m_socket->enableWrite( true );
diff --git a/kopete/protocols/irc/libkirc/kirctransferserver.h b/kopete/protocols/irc/libkirc/kirctransferserver.h
index 8ac016ef..af7c498d 100644
--- a/kopete/protocols/irc/libkirc/kirctransferserver.h
+++ b/kopete/protocols/irc/libkirc/kirctransferserver.h
@@ -20,7 +20,7 @@
#include "kirctransfer.h"
-#include <qobject.h>
+#include <tqobject.h>
class KExtendedSocket;
@@ -36,12 +36,12 @@ class TransferServer
Q_OBJECT
public:
-// TransferServer(QObject *parent = 0, const char *name = 0);
- TransferServer(Q_UINT16 port, int backlog = 1, QObject *parent = 0, const char *name = 0);
- TransferServer(KIRC::Engine *engine, QString nick,// QString nick_peer_adress,
+// TransferServer(TQObject *parent = 0, const char *name = 0);
+ TransferServer(Q_UINT16 port, int backlog = 1, TQObject *parent = 0, const char *name = 0);
+ TransferServer(KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type,
- QString fileName, Q_UINT32 fileSize,
- QObject *parent = 0, const char *name = 0);
+ TQString fileName, Q_UINT32 fileSize,
+ TQObject *parent = 0, const char *name = 0);
~TransferServer();
@@ -71,8 +71,8 @@ private:
QString m_fileName;
Q_UINT32 m_fileSize;
// by
- // QPtrList<Transfer> m_pendingTransfers;
- // QPtrList<Transfer> m_activeTransfers;
+ // TQPtrList<Transfer> m_pendingTransfers;
+ // TQPtrList<Transfer> m_activeTransfers;
};
diff --git a/kopete/protocols/irc/libkirc/ksslsocket.cpp b/kopete/protocols/irc/libkirc/ksslsocket.cpp
index fb2d5161..afe78fed 100644
--- a/kopete/protocols/irc/libkirc/ksslsocket.cpp
+++ b/kopete/protocols/irc/libkirc/ksslsocket.cpp
@@ -16,7 +16,7 @@
*************************************************************************
*/
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include <dcopclient.h>
#include <klocale.h>
@@ -36,8 +36,8 @@ struct KSSLSocketPrivate
mutable KSSL *kssl;
KSSLCertificateCache *cc;
DCOPClient *dcc;
- QMap<QString,QString> metaData;
- QSocketNotifier *socketNotifier;
+ TQMap<TQString,TQString> metaData;
+ TQSocketNotifier *socketNotifier;
};
KSSLSocket::KSSLSocket() : KExtendedSocket()
@@ -52,9 +52,9 @@ KSSLSocket::KSSLSocket() : KExtendedSocket()
setBlockingMode(false);
//Connect internal slots
- QObject::connect( this, SIGNAL(connectionSuccess()), this, SLOT(slotConnected()) );
- QObject::connect( this, SIGNAL(closed(int)), this, SLOT(slotDisconnected()) );
- QObject::connect( this, SIGNAL(connectionFailed(int)), this, SLOT(slotDisconnected()));
+ TQObject::connect( this, TQT_SIGNAL(connectionSuccess()), this, TQT_SLOT(slotConnected()) );
+ TQObject::connect( this, TQT_SIGNAL(closed(int)), this, TQT_SLOT(slotDisconnected()) );
+ TQObject::connect( this, TQT_SIGNAL(connectionFailed(int)), this, TQT_SLOT(slotDisconnected()));
}
KSSLSocket::~KSSLSocket()
@@ -118,7 +118,7 @@ int KSSLSocket::bytesAvailable() const
void KSSLSocket::slotReadData()
{
kdDebug(14120) << k_funcinfo << d->kssl->pending() << endl;
- QByteArray buff(512);
+ TQByteArray buff(512);
int bytesRead = d->kssl->read( buff.data(), 512 );
//Fill the read buffer
@@ -148,11 +148,11 @@ void KSSLSocket::slotConnected()
}
//Disconnect the KExtSocket notifier slot, we use our own
- QObject::disconnect( readNotifier(), SIGNAL(activated( int )),
- this, SLOT(socketActivityRead()) );
+ TQObject::disconnect( readNotifier(), TQT_SIGNAL(activated( int )),
+ this, TQT_SLOT(socketActivityRead()) );
- QObject::connect( readNotifier(), SIGNAL(activated( int )),
- this, SLOT(slotReadData()) );
+ TQObject::connect( readNotifier(), TQT_SIGNAL(activated( int )),
+ this, TQT_SLOT(slotReadData()) );
readNotifier()->setEnabled(true);
@@ -182,34 +182,34 @@ void KSSLSocket::showInfoDialog()
{
if (!d->dcc->isApplicationRegistered("kio_uiserver"))
{
- KApplication::startServiceByDesktopPath("kio_uiserver.desktop",QStringList());
+ KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList());
}
- QByteArray data, ignore;
- QCString ignoretype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, ignore;
+ TQCString ignoretype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << "irc://" + peerAddress()->pretty() + ":" + port() << d->metaData;
d->dcc->call("kio_uiserver", "UIServer",
- "showSSLInfoDialog(QString,KIO::MetaData)", data, ignoretype, ignore);
+ "showSSLInfoDialog(TQString,KIO::MetaData)", data, ignoretype, ignore);
}
}
-void KSSLSocket::setMetaData( const QString &key, const QVariant &data )
+void KSSLSocket::setMetaData( const TQString &key, const TQVariant &data )
{
- QVariant v = data;
+ TQVariant v = data;
d->metaData[key] = v.asString();
}
-bool KSSLSocket::hasMetaData( const QString &key )
+bool KSSLSocket::hasMetaData( const TQString &key )
{
return d->metaData.contains(key);
}
-QString KSSLSocket::metaData( const QString &key )
+TQString KSSLSocket::metaData( const TQString &key )
{
if( d->metaData.contains(key) )
return d->metaData[key];
- return QString::null;
+ return TQString::null;
}
/*
@@ -220,27 +220,27 @@ I basically copied the below from tcpKIO::SlaveBase.hpp, with some modificaions
* Copyright (C) 2001 Dawit Alemayehu <adawit@kde.org>
*/
-int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo )
+int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo )
{
kdDebug(14120) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl;
- QByteArray data, result;
- QCString returnType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, result;
+ TQCString returnType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (int)1 << (int)type << text << caption << buttonYes << buttonNo;
if (!d->dcc->isApplicationRegistered("kio_uiserver"))
{
- KApplication::startServiceByDesktopPath("kio_uiserver.desktop",QStringList());
+ KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList());
}
d->dcc->call("kio_uiserver", "UIServer",
- "messageBox(int,int,QString,QString,QString,QString)", data, returnType, result);
+ "messageBox(int,int,TQString,TQString,TQString,TQString)", data, returnType, result);
if( returnType == "int" )
{
int res;
- QDataStream r(result, IO_ReadOnly);
+ TQDataStream r(result, IO_ReadOnly);
r >> res;
return res;
}
@@ -257,10 +257,10 @@ int KSSLSocket::verifyCertificate()
bool _IPmatchesCN = false;
int result;
bool doAddHost = false;
- QString ourHost = host();
- QString ourIp = peerAddress()->pretty();
+ TQString ourHost = host();
+ TQString ourIp = peerAddress()->pretty();
- QString theurl = "irc://" + ourHost + ":" + port();
+ TQString theurl = "irc://" + ourHost + ":" + port();
if (!d->cc)
d->cc = new KSSLCertificateCache;
@@ -284,15 +284,15 @@ int KSSLSocket::verifyCertificate()
setMetaData("ssl_cipher", d->kssl->connectionInfo().getCipher());
setMetaData("ssl_cipher_desc", d->kssl->connectionInfo().getCipherDescription());
setMetaData("ssl_cipher_version", d->kssl->connectionInfo().getCipherVersion());
- setMetaData("ssl_cipher_used_bits", QString::number(d->kssl->connectionInfo().getCipherUsedBits()));
- setMetaData("ssl_cipher_bits", QString::number(d->kssl->connectionInfo().getCipherBits()));
+ setMetaData("ssl_cipher_used_bits", TQString::number(d->kssl->connectionInfo().getCipherUsedBits()));
+ setMetaData("ssl_cipher_bits", TQString::number(d->kssl->connectionInfo().getCipherBits()));
setMetaData("ssl_peer_ip", ourIp );
- QString errorStr;
+ TQString errorStr;
for(KSSLCertificate::KSSLValidationList::ConstIterator it = ksvl.begin();
it != ksvl.end(); ++it)
{
- errorStr += QString::number(*it)+":";
+ errorStr += TQString::number(*it)+":";
}
setMetaData("ssl_cert_errors", errorStr);
@@ -300,8 +300,8 @@ int KSSLSocket::verifyCertificate()
if (pc.chain().isValid() && pc.chain().depth() > 1)
{
- QString theChain;
- QPtrList<KSSLCertificate> chain = pc.chain().getChain();
+ TQString theChain;
+ TQPtrList<KSSLCertificate> chain = pc.chain().getChain();
for (KSSLCertificate *c = chain.first(); c; c = chain.next())
{
theChain += c->toString();
@@ -314,7 +314,7 @@ int KSSLSocket::verifyCertificate()
setMetaData("ssl_peer_chain", "");
}
- setMetaData("ssl_cert_state", QString::number(ksv));
+ setMetaData("ssl_cert_state", TQString::number(ksv));
if (ksv == KSSLCertificate::Ok)
{
@@ -364,7 +364,7 @@ int KSSLSocket::verifyCertificate()
{
if (ksv == KSSLCertificate::InvalidHost)
{
- QString msg = i18n("The IP address of the host %1 "
+ TQString msg = i18n("The IP address of the host %1 "
"does not match the one the "
"certificate was issued to.");
result = messageBox( KIO::SlaveBase::WarningYesNoCancel,
@@ -375,7 +375,7 @@ int KSSLSocket::verifyCertificate()
}
else
{
- QString msg = i18n("The server certificate failed the "
+ TQString msg = i18n("The server certificate failed the "
"authenticity test (%1).");
result = messageBox( KIO::SlaveBase::WarningYesNoCancel,
msg.arg(ourHost),
diff --git a/kopete/protocols/irc/libkirc/ksslsocket.h b/kopete/protocols/irc/libkirc/ksslsocket.h
index 692d5288..79e3b70b 100644
--- a/kopete/protocols/irc/libkirc/ksslsocket.h
+++ b/kopete/protocols/irc/libkirc/ksslsocket.h
@@ -20,7 +20,7 @@
*************************************************************************
*/
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kextsock.h>
#include <kio/slavebase.h>
@@ -53,14 +53,14 @@ class KSSLSocket : public KExtendedSocket
private:
int verifyCertificate();
- int messageBox( KIO::SlaveBase::MessageBoxType type, const QString &text,
- const QString &caption, const QString &buttonYes, const QString &buttonNo );
+ int messageBox( KIO::SlaveBase::MessageBoxType type, const TQString &text,
+ const TQString &caption, const TQString &buttonYes, const TQString &buttonNo );
//Copied frm tcpslavebase to simply integrating their dialog function
- void setMetaData( const QString &, const QVariant & );
- bool hasMetaData( const QString & );
- QString metaData( const QString & );
+ void setMetaData( const TQString &, const TQVariant & );
+ bool hasMetaData( const TQString & );
+ TQString metaData( const TQString & );
KSSLSocketPrivate *d;
};
diff --git a/kopete/protocols/irc/ui/channellist.cpp b/kopete/protocols/irc/ui/channellist.cpp
index 5c66ede0..ea085db8 100644
--- a/kopete/protocols/irc/ui/channellist.cpp
+++ b/kopete/protocols/irc/ui/channellist.cpp
@@ -22,34 +22,34 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qvariant.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qsimplerichtext.h>
-#include <qstyle.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qheader.h>
+#include <tqvariant.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqsimplerichtext.h>
+#include <tqstyle.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
#include <klistview.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
class ChannelListItem : public KListViewItem
{
public:
- ChannelListItem( KListView *parent, QString arg1, QString arg2, QString arg3 );
- virtual int compare( QListViewItem *i, int col, bool ascending ) const;
- virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
+ ChannelListItem( KListView *parent, TQString arg1, TQString arg2, TQString arg3 );
+ virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align );
private:
KListView *parentList;
};
-ChannelListItem::ChannelListItem( KListView *parent, QString arg1, QString arg2, QString arg3 ) :
+ChannelListItem::ChannelListItem( KListView *parent, TQString arg1, TQString arg2, TQString arg3 ) :
KListViewItem( parent, parent->lastItem() ), parentList( parent )
{
setText(0, arg1);
@@ -57,7 +57,7 @@ ChannelListItem::ChannelListItem( KListView *parent, QString arg1, QString arg2,
setText(2, arg3);
}
-int ChannelListItem::compare( QListViewItem *i, int col, bool ascending ) const
+int ChannelListItem::compare( TQListViewItem *i, int col, bool ascending ) const
{
if( col == 1 )
{
@@ -69,58 +69,58 @@ int ChannelListItem::compare( QListViewItem *i, int col, bool ascending ) const
return 1;
}
else
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
-void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+void ChannelListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align )
{
- QPixmap back( width, height() );
- QPainter paint( &back );
+ TQPixmap back( width, height() );
+ TQPainter paint( &back );
//KListViewItem::paintCell( &paint, cg, column, width, align );
// PASTED FROM KLISTVIEWITEM:
// set the alternate cell background colour if necessary
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
if (isAlternate())
if (listView()->viewport()->backgroundMode()==Qt::FixedColor)
- _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground());
+ _cg.setColor(TQColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground());
else
- _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground());
+ _cg.setColor(TQColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground());
// PASTED FROM QLISTVIEWITEM
{
- QPainter *p = &paint;
+ TQPainter *p = &paint;
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
- QFontMetrics fm( p->fontMetrics() );
+ TQFontMetrics fm( p->fontMetrics() );
// any text we render is done by the Components, not by this class, so make sure we've nothing to write
- QString t;
+ TQString t;
// removed text truncating code from Qt - we do that differently, further on
int marg = lv->itemMargin();
int r = marg;
- // const QPixmap * icon = pixmap( column );
+ // const TQPixmap * icon = pixmap( column );
const BackgroundMode bgmode = lv->viewport()->backgroundMode();
- const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode );
+ const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode );
if ( _cg.brush( crole ) != lv->colorGroup().brush( crole ) )
p->fillRect( 0, 0, width, height(), _cg.brush( crole ) );
else
{
- // all copied from QListView::paintEmptyArea
+ // all copied from TQListView::paintEmptyArea
- //lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) );
- QStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in QListView and QHeader
- QStyle::SFlags how = QStyle::Style_Default;
+ //lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) );
+ TQStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in TQListView and QHeader
+ TQStyle::SFlags how = TQStyle::Style_Default;
if ( lv->isEnabled() )
- how |= QStyle::Style_Enabled;
+ how |= TQStyle::Style_Enabled;
- lv->style().drawComplexControl( QStyle::CC_ListView,
- p, lv, QRect( 0, 0, width, height() ), lv->colorGroup(),
- how, QStyle::SC_ListView, QStyle::SC_None,
+ lv->style().drawComplexControl( TQStyle::CC_ListView,
+ p, lv, TQRect( 0, 0, width, height() ), lv->colorGroup(),
+ how, TQStyle::SC_ListView, TQStyle::SC_None,
opt );
}
@@ -129,7 +129,7 @@ void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column,
if ( isSelected() &&
(column == 0 || lv->allColumnsShowFocus()) ) {
p->fillRect( r - marg, 0, width - r + marg, height(),
- _cg.brush( QColorGroup::Highlight ) );
+ _cg.brush( TQColorGroup::Highlight ) );
// removed text pen setting code from Qt
}
@@ -138,16 +138,16 @@ void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column,
// draw the tree gubbins
if ( multiLinesEnabled() && column == 0 && isOpen() && childCount() ) {
int textheight = fm.size( align, t ).height() + 2 * lv->itemMargin();
- textheight = QMAX( textheight, QApplication::globalStrut().height() );
+ textheight = QMAX( textheight, TQApplication::globalStrut().height() );
if ( textheight % 2 > 0 )
textheight++;
if ( textheight < height() ) {
int w = lv->treeStepSize() / 2;
- lv->style().drawComplexControl( QStyle::CC_ListView, p, lv,
- QRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg,
- lv->isEnabled() ? QStyle::Style_Enabled : QStyle::Style_Default,
- QStyle::SC_ListViewExpand,
- (uint)QStyle::SC_All, QStyleOption( this ) );
+ lv->style().drawComplexControl( TQStyle::CC_ListView, p, lv,
+ TQRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg,
+ lv->isEnabled() ? TQStyle::Style_Enabled : TQStyle::Style_Default,
+ TQStyle::SC_ListViewExpand,
+ (uint)TQStyle::SC_All, TQStyleOption( this ) );
}
}
}
@@ -156,33 +156,33 @@ void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column,
//do you see a better way to tell the TextComponent we are selected ? - Olivier 2004-09-02
if ( isSelected() )
- _cg.setColor(QColorGroup::Text , _cg.highlightedText() );
+ _cg.setColor(TQColorGroup::Text , _cg.highlightedText() );
- QSimpleRichText myrichtext( text(column), paint.font() );
+ TQSimpleRichText myrichtext( text(column), paint.font() );
myrichtext.draw( &paint, 0, 0, paint.window(), _cg );
paint.end();
p->drawPixmap( 0, 0, back );
}
-ChannelList::ChannelList( QWidget* parent, KIRC::Engine *engine )
- : QWidget( parent ), m_engine( engine )
+ChannelList::ChannelList( TQWidget* parent, KIRC::Engine *engine )
+ : TQWidget( parent ), m_engine( engine )
{
- ChannelListLayout = new QVBoxLayout( this, 11, 6, "ChannelListLayout");
+ ChannelListLayout = new TQVBoxLayout( this, 11, 6, "ChannelListLayout");
- layout72_2 = new QHBoxLayout( 0, 0, 6, "layout72_2");
+ layout72_2 = new TQHBoxLayout( 0, 0, 6, "layout72_2");
- textLabel1_2 = new QLabel( this, "textLabel1_2" );
+ textLabel1_2 = new TQLabel( this, "textLabel1_2" );
layout72_2->addWidget( textLabel1_2 );
- channelSearch = new QLineEdit( this, "channelSearch" );
+ channelSearch = new TQLineEdit( this, "channelSearch" );
layout72_2->addWidget( channelSearch );
- numUsers = new QSpinBox( 0, 32767, 1, this, "num_users" );
+ numUsers = new TQSpinBox( 0, 32767, 1, this, "num_users" );
numUsers->setSuffix( i18n(" members") );
layout72_2->addWidget( numUsers );
- mSearchButton = new QPushButton( this, "mSearchButton" );
+ mSearchButton = new TQPushButton( this, "mSearchButton" );
layout72_2->addWidget( mSearchButton );
ChannelListLayout->addLayout( layout72_2 );
@@ -198,46 +198,46 @@ ChannelList::ChannelList( QWidget* parent, KIRC::Engine *engine )
clearWState( WState_Polished );
textLabel1_2->setText( i18n( "Search for:" ) );
- QToolTip::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
- QToolTip::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
- QWhatsThis::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
- QWhatsThis::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) );
- QToolTip::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
- QWhatsThis::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) );
+ TQToolTip::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
+ TQToolTip::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
+ TQWhatsThis::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
+ TQWhatsThis::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) );
+ TQToolTip::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
+ TQWhatsThis::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) );
mSearchButton->setText( i18n( "S&earch" ) );
- QToolTip::add( mSearchButton, i18n( "Perform a channel search." ) );
- QWhatsThis::add( mSearchButton, i18n( "Perform a channel search. Please be patient, as this can be slow depending on the number of channels on the server." ) );
- QToolTip::add( mChannelList, i18n( "Double click on a channel to select it." ) );
+ TQToolTip::add( mSearchButton, i18n( "Perform a channel search." ) );
+ TQWhatsThis::add( mSearchButton, i18n( "Perform a channel search. Please be patient, as this can be slow depending on the number of channels on the server." ) );
+ TQToolTip::add( mChannelList, i18n( "Double click on a channel to select it." ) );
mChannelList->header()->setLabel( 0, i18n( "Channel" ) );
mChannelList->header()->setLabel( 1, i18n( "Users" ) );
mChannelList->header()->setLabel( 2, i18n( "Topic" ) );
// signals and slots connections
- connect( mChannelList, SIGNAL( doubleClicked(QListViewItem*) ),
- this, SLOT( slotItemDoubleClicked(QListViewItem*) ) );
+ connect( mChannelList, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ this, TQT_SLOT( slotItemDoubleClicked(TQListViewItem*) ) );
- connect( mSearchButton, SIGNAL( clicked() ), this, SLOT( search() ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( search() ) );
- connect( mChannelList, SIGNAL( selectionChanged( QListViewItem*) ), this,
- SLOT( slotItemSelected( QListViewItem *) ) );
+ connect( mChannelList, TQT_SIGNAL( selectionChanged( TQListViewItem*) ), this,
+ TQT_SLOT( slotItemSelected( TQListViewItem *) ) );
- connect( m_engine, SIGNAL( incomingListedChan( const QString &, uint, const QString & ) ),
- this, SLOT( slotChannelListed( const QString &, uint, const QString & ) ) );
+ connect( m_engine, TQT_SIGNAL( incomingListedChan( const TQString &, uint, const TQString & ) ),
+ this, TQT_SLOT( slotChannelListed( const TQString &, uint, const TQString & ) ) );
- connect( m_engine, SIGNAL( incomingEndOfList() ), this, SLOT( slotListEnd() ) );
+ connect( m_engine, TQT_SIGNAL( incomingEndOfList() ), this, TQT_SLOT( slotListEnd() ) );
- connect( m_engine, SIGNAL( statusChanged(KIRC::Engine::Status) ),
- this, SLOT( slotStatusChanged(KIRC::Engine::Status) ) );
+ connect( m_engine, TQT_SIGNAL( statusChanged(KIRC::Engine::Status) ),
+ this, TQT_SLOT( slotStatusChanged(KIRC::Engine::Status) ) );
show();
}
-void ChannelList::slotItemDoubleClicked( QListViewItem *i )
+void ChannelList::slotItemDoubleClicked( TQListViewItem *i )
{
emit channelDoubleClicked( i->text(0) );
}
-void ChannelList::slotItemSelected( QListViewItem *i )
+void ChannelList::slotItemSelected( TQListViewItem *i )
{
emit channelSelected( i->text(0) );
}
@@ -306,19 +306,19 @@ void ChannelList::search()
}
}
-void ChannelList::slotChannelListed( const QString &channel, uint users, const QString &topic )
+void ChannelList::slotChannelListed( const TQString &channel, uint users, const TQString &topic )
{
checkSearchResult( channel, users, topic );
- channelCache.insert( channel, QPair< uint, QString >( users, topic ) );
+ channelCache.insert( channel, QPair< uint, TQString >( users, topic ) );
}
-void ChannelList::checkSearchResult( const QString &channel, uint users, const QString &topic )
+void ChannelList::checkSearchResult( const TQString &channel, uint users, const TQString &topic )
{
if( ( mUsers == 0 || mUsers <= users ) &&
( mSearch.isEmpty() || channel.contains( mSearch, false ) || topic.contains( mSearch, false ) )
)
{
- new ChannelListItem( mChannelList, channel, QString::number(users), topic );
+ new ChannelListItem( mChannelList, channel, TQString::number(users), topic );
}
}
@@ -328,7 +328,7 @@ void ChannelList::slotSearchCache()
{
checkSearchResult( cacheIterator.key(), cacheIterator.data().first, cacheIterator.data().second );
++cacheIterator;
- QTimer::singleShot( 0, this, SLOT( slotSearchCache() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotSearchCache() ) );
}
else
{
diff --git a/kopete/protocols/irc/ui/channellist.h b/kopete/protocols/irc/ui/channellist.h
index c6f435a0..59b03a25 100644
--- a/kopete/protocols/irc/ui/channellist.h
+++ b/kopete/protocols/irc/ui/channellist.h
@@ -18,9 +18,9 @@
#ifndef CHANNELLIST_H
#define CHANNELLIST_H
-#include <qwidget.h>
-#include <qmap.h>
-#include <qpair.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqpair.h>
#include "kircengine.h"
@@ -40,7 +40,7 @@ class ChannelList
Q_OBJECT
public:
- ChannelList( QWidget *parent, KIRC::Engine *engine );
+ ChannelList( TQWidget *parent, KIRC::Engine *engine );
public slots:
void search();
@@ -48,33 +48,33 @@ class ChannelList
void clear();
signals:
- void channelDoubleClicked( const QString &channel );
- void channelSelected( const QString &channel );
+ void channelDoubleClicked( const TQString &channel );
+ void channelSelected( const TQString &channel );
private slots:
- void slotItemDoubleClicked( QListViewItem * i );
- void slotItemSelected( QListViewItem * i );
- void slotChannelListed( const QString & channel, uint users, const QString & topic );
+ void slotItemDoubleClicked( TQListViewItem * i );
+ void slotItemSelected( TQListViewItem * i );
+ void slotChannelListed( const TQString & channel, uint users, const TQString & topic );
void slotListEnd();
void slotSearchCache();
void slotStatusChanged( KIRC::Engine::Status );
private:
- void checkSearchResult( const QString & channel, uint users, const QString & topic );
+ void checkSearchResult( const TQString & channel, uint users, const TQString & topic );
- QLabel* textLabel1_2;
- QLineEdit* channelSearch;
- QSpinBox* numUsers;
- QPushButton* mSearchButton;
+ TQLabel* textLabel1_2;
+ TQLineEdit* channelSearch;
+ TQSpinBox* numUsers;
+ TQPushButton* mSearchButton;
KListView* mChannelList;
- QVBoxLayout* ChannelListLayout;
- QHBoxLayout* layout72_2;
+ TQVBoxLayout* ChannelListLayout;
+ TQHBoxLayout* layout72_2;
KIRC::Engine *m_engine;
bool mSearching;
- QString mSearch;
+ TQString mSearch;
uint mUsers;
- QMap< QString, QPair< uint, QString > > channelCache;
- QMap< QString, QPair< uint, QString > >::const_iterator cacheIterator;
+ TQMap< TQString, QPair< uint, TQString > > channelCache;
+ TQMap< TQString, QPair< uint, TQString > >::const_iterator cacheIterator;
};
#endif
diff --git a/kopete/protocols/irc/ui/channellistdialog.cpp b/kopete/protocols/irc/ui/channellistdialog.cpp
index 46128730..e344d227 100644
--- a/kopete/protocols/irc/ui/channellistdialog.cpp
+++ b/kopete/protocols/irc/ui/channellistdialog.cpp
@@ -22,23 +22,23 @@
#include "kopeteuiglobal.h"
-#include "qlayout.h"
+#include "tqlayout.h"
-ChannelListDialog::ChannelListDialog(KIRC::Engine *engine, const QString &caption, QObject *target, const char* slotJoinChan)
+ChannelListDialog::ChannelListDialog(KIRC::Engine *engine, const TQString &caption, TQObject *target, const char* slotJoinChan)
: KDialogBase(Kopete::UI::Global::mainWidget(), "channel_list_widget", false, caption, Close)
{
m_engine = engine;
m_list = new ChannelList( this, engine );
- connect( m_list, SIGNAL( channelDoubleClicked( const QString & ) ),
+ connect( m_list, TQT_SIGNAL( channelDoubleClicked( const TQString & ) ),
target, slotJoinChan );
- connect( m_list, SIGNAL( channelDoubleClicked( const QString & ) ),
- this, SLOT( slotChannelDoubleClicked( const QString & ) ) );
+ connect( m_list, TQT_SIGNAL( channelDoubleClicked( const TQString & ) ),
+ this, TQT_SLOT( slotChannelDoubleClicked( const TQString & ) ) );
- new QHBoxLayout( m_list, 0, spacingHint() );
+ new TQHBoxLayout( m_list, 0, spacingHint() );
- setInitialSize( QSize( 500, 400 ) );
+ setInitialSize( TQSize( 500, 400 ) );
setMainWidget( m_list );
show();
}
@@ -53,7 +53,7 @@ void ChannelListDialog::search()
m_list->search();
}
-void ChannelListDialog::slotChannelDoubleClicked( const QString & )
+void ChannelListDialog::slotChannelDoubleClicked( const TQString & )
{
close();
}
diff --git a/kopete/protocols/irc/ui/channellistdialog.h b/kopete/protocols/irc/ui/channellistdialog.h
index 2bb85f5b..9dcb0cbb 100644
--- a/kopete/protocols/irc/ui/channellistdialog.h
+++ b/kopete/protocols/irc/ui/channellistdialog.h
@@ -28,14 +28,14 @@ class ChannelListDialog
Q_OBJECT
public:
- ChannelListDialog(KIRC::Engine *engine, const QString &caption, QObject *target, const char* slotJoinChan);
+ ChannelListDialog(KIRC::Engine *engine, const TQString &caption, TQObject *target, const char* slotJoinChan);
void clear();
void search();
private slots:
- void slotChannelDoubleClicked( const QString & );
+ void slotChannelDoubleClicked( const TQString & );
private:
KIRC::Engine *m_engine;
diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.cpp b/kopete/protocols/irc/ui/irceditaccountwidget.cpp
index 4a1e6ed3..06e2f166 100644
--- a/kopete/protocols/irc/ui/irceditaccountwidget.cpp
+++ b/kopete/protocols/irc/ui/irceditaccountwidget.cpp
@@ -36,17 +36,17 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qconnection.h>
-#include <qvalidator.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-
-IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, QWidget *parent, const char * )
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqconnection.h>
+#include <tqvalidator.h>
+#include <tqcombobox.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+
+IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, TQWidget *parent, const char * )
: IRCEditAccountBase(parent), KopeteEditAccountWidget(ident)
{
mProtocol = proto;
@@ -56,8 +56,8 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
if( account() )
{
- QString nickName = account()->mySelf()->nickName();
- QString serverInfo = account()->accountId();
+ TQString nickName = account()->mySelf()->nickName();
+ TQString serverInfo = account()->accountId();
mNickName->setText( nickName );
mAltNickname->setText( account()->altNick() );
@@ -82,23 +82,23 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
informationReplies->setCurrentItem( config->readNumEntry( "InformationReplies", IRCAccount::ActiveWindow ) - 1 );
errorMessages->setCurrentItem( config->readNumEntry( "ErrorMessages", IRCAccount::ActiveWindow ) - 1 );
- QStringList cmds = account()->connectCommands();
- for( QStringList::Iterator i = cmds.begin(); i != cmds.end(); ++i )
- new QListViewItem( commandList, *i );
+ TQStringList cmds = account()->connectCommands();
+ for( TQStringList::Iterator i = cmds.begin(); i != cmds.end(); ++i )
+ new TQListViewItem( commandList, *i );
- const QMap< QString, QString > replies = account()->customCtcpReplies();
- for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
- new QListViewItem( ctcpList, it.key(), it.data() );
+ const TQMap< TQString, TQString > replies = account()->customCtcpReplies();
+ for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
+ new TQListViewItem( ctcpList, it.key(), it.data() );
}
- mUserName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^\\s]*$"), mUserName ) );
- mNickName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) );
- mAltNickname->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) );
+ mUserName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^\\s]*$"), mUserName ) );
+ mNickName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) );
+ mAltNickname->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) );
charset->insertStringList( KCodecAction::supportedEncodings() );
for (int i = 0; i < charset->count(); ++i) {
- QString encoding = KGlobal::charsets()->encodingForName(charset->text(i));
+ TQString encoding = KGlobal::charsets()->encodingForName(charset->text(i));
if (KGlobal::charsets()->codecForName(encoding)->mibEnum() == currentCodec) {
charset->setCurrentItem( i );
@@ -106,23 +106,23 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
}
}
- connect( commandList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ),
- this, SLOT( slotCommandContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
+ connect( commandList, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
+ this, TQT_SLOT( slotCommandContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
- connect( ctcpList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ),
- this, SLOT( slotCtcpContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
+ connect( ctcpList, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
+ this, TQT_SLOT( slotCtcpContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
- connect( addButton, SIGNAL( clicked() ), this, SLOT( slotAddCommand() ) );
- connect( editButton, SIGNAL( clicked() ), this, SLOT(slotEditNetworks() ) );
- connect( addReply, SIGNAL( clicked() ), this, SLOT( slotAddCtcp() ) );
+ connect( addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddCommand() ) );
+ connect( editButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT(slotEditNetworks() ) );
+ connect( addReply, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddCtcp() ) );
- connect( network, SIGNAL( activated( const QString & ) ),
- this, SLOT( slotUpdateNetworkDescription( const QString &) ) );
+ connect( network, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( slotUpdateNetworkDescription( const TQString &) ) );
- connect( IRCProtocol::protocol(), SIGNAL( networkConfigUpdated( const QString & ) ),
- this, SLOT( slotUpdateNetworks( const QString & ) ) );
+ connect( IRCProtocol::protocol(), TQT_SIGNAL( networkConfigUpdated( const TQString & ) ),
+ this, TQT_SLOT( slotUpdateNetworks( const TQString & ) ) );
- slotUpdateNetworks( QString::null );
+ slotUpdateNetworks( TQString::null );
}
IRCEditAccountWidget::~IRCEditAccountWidget()
@@ -134,19 +134,19 @@ IRCAccount *IRCEditAccountWidget::account ()
return dynamic_cast<IRCAccount *>(KopeteEditAccountWidget::account () );
}
-void IRCEditAccountWidget::slotUpdateNetworks( const QString & selectedNetwork )
+void IRCEditAccountWidget::slotUpdateNetworks( const TQString & selectedNetwork )
{
network->clear();
uint i = 0;
- QStringList keys;
- for( QDictIterator<IRCNetwork> it( IRCProtocol::protocol()->networks() ); it.current(); ++it )
+ TQStringList keys;
+ for( TQDictIterator<IRCNetwork> it( IRCProtocol::protocol()->networks() ); it.current(); ++it )
keys.append( it.currentKey() );
keys.sort();
- QStringList::Iterator end = keys.end();
- for( QStringList::Iterator it = keys.begin(); it != end; ++it )
+ TQStringList::Iterator end = keys.end();
+ for( TQStringList::Iterator it = keys.begin(); it != end; ++it )
{
IRCNetwork * current = IRCProtocol::protocol()->networks()[*it];
network->insertItem( current->name );
@@ -164,24 +164,24 @@ void IRCEditAccountWidget::slotEditNetworks()
IRCProtocol::protocol()->editNetworks( network->currentText() );
}
-void IRCEditAccountWidget::slotUpdateNetworkDescription( const QString &network )
+void IRCEditAccountWidget::slotUpdateNetworkDescription( const TQString &network )
{
description->setText(
IRCProtocol::protocol()->networks()[ network ]->description
);
}
-void IRCEditAccountWidget::slotCommandContextMenu( KListView *, QListViewItem *item, const QPoint &p )
+void IRCEditAccountWidget::slotCommandContextMenu( KListView *, TQListViewItem *item, const TQPoint &p )
{
- QPopupMenu popup;
+ TQPopupMenu popup;
popup.insertItem( i18n("Remove Command"), 1 );
if( popup.exec( p ) == 1 )
delete item;
}
-void IRCEditAccountWidget::slotCtcpContextMenu( KListView *, QListViewItem *item, const QPoint &p )
+void IRCEditAccountWidget::slotCtcpContextMenu( KListView *, TQListViewItem *item, const TQPoint &p )
{
- QPopupMenu popup;
+ TQPopupMenu popup;
popup.insertItem( i18n("Remove CTCP Reply"), 1 );
if( popup.exec( p ) == 1 )
delete item;
@@ -191,7 +191,7 @@ void IRCEditAccountWidget::slotAddCommand()
{
if ( !commandEdit->text().isEmpty() )
{
- new QListViewItem( commandList, commandEdit->text() );
+ new TQListViewItem( commandList, commandEdit->text() );
commandEdit->clear();
}
}
@@ -200,21 +200,21 @@ void IRCEditAccountWidget::slotAddCtcp()
{
if ( !newCTCP->text().isEmpty() && !newReply->text().isEmpty() )
{
- new QListViewItem( ctcpList, newCTCP->text(), newReply->text() );
+ new TQListViewItem( ctcpList, newCTCP->text(), newReply->text() );
newCTCP->clear();
newReply->clear();
}
}
-QString IRCEditAccountWidget::generateAccountId( const QString &network )
+TQString IRCEditAccountWidget::generateAccountId( const TQString &network )
{
KConfig *config = KGlobal::config();
- QString nextId = network;
+ TQString nextId = network;
uint accountNumber = 1;
- while( config->hasGroup( QString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) )
+ while( config->hasGroup( TQString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) )
{
- nextId = QString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber );
+ nextId = TQString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber );
}
kdDebug( 14120 ) << k_funcinfo << " ID IS: " << nextId << endl;
return nextId;
@@ -222,12 +222,12 @@ QString IRCEditAccountWidget::generateAccountId( const QString &network )
Kopete::Account *IRCEditAccountWidget::apply()
{
- QString nickName = mNickName->text();
- QString networkName = network->currentText();
+ TQString nickName = mNickName->text();
+ TQString networkName = network->currentText();
if( !account() )
{
- setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), QString::null, networkName, nickName ) );
+ setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), TQString::null, networkName, nickName ) );
}
else
@@ -251,12 +251,12 @@ Kopete::Account *IRCEditAccountWidget::apply()
account()->configGroup()->writeEntry("PreferSSL", preferSSL->isChecked());
- QStringList cmds;
- for( QListViewItem *i = commandList->firstChild(); i; i = i->nextSibling() )
+ TQStringList cmds;
+ for( TQListViewItem *i = commandList->firstChild(); i; i = i->nextSibling() )
cmds.append( i->text(0) );
- QMap< QString, QString > replies;
- for( QListViewItem *i = ctcpList->firstChild(); i; i = i->nextSibling() )
+ TQMap< TQString, TQString > replies;
+ for( TQListViewItem *i = ctcpList->firstChild(); i; i = i->nextSibling() )
replies[ i->text(0) ] = i->text(1);
account()->setCustomCtcpReplies( replies );
diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.h b/kopete/protocols/irc/ui/irceditaccountwidget.h
index 365acaf3..348e5cc3 100644
--- a/kopete/protocols/irc/ui/irceditaccountwidget.h
+++ b/kopete/protocols/irc/ui/irceditaccountwidget.h
@@ -31,7 +31,7 @@ class IRCEditAccountWidget : public IRCEditAccountBase, public KopeteEditAccount
Q_OBJECT
public:
- IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *, QWidget *parent=0, const char *name=0);
+ IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *, TQWidget *parent=0, const char *name=0);
~IRCEditAccountWidget();
IRCAccount *account();
@@ -39,17 +39,17 @@ class IRCEditAccountWidget : public IRCEditAccountBase, public KopeteEditAccount
virtual Kopete::Account *apply();
private slots:
- void slotCommandContextMenu( KListView*, QListViewItem*, const QPoint & );
- void slotCtcpContextMenu( KListView*, QListViewItem*, const QPoint & );
+ void slotCommandContextMenu( KListView*, TQListViewItem*, const TQPoint & );
+ void slotCtcpContextMenu( KListView*, TQListViewItem*, const TQPoint & );
void slotAddCommand();
void slotAddCtcp();
void slotEditNetworks();
- void slotUpdateNetworks( const QString & );
- void slotUpdateNetworkDescription( const QString & );
+ void slotUpdateNetworks( const TQString & );
+ void slotUpdateNetworkDescription( const TQString & );
private:
void readNetworks();
- QString generateAccountId( const QString &network );
+ TQString generateAccountId( const TQString &network );
IRCProtocol *mProtocol;
};
diff --git a/kopete/protocols/irc/ui/networkconfig.ui.h b/kopete/protocols/irc/ui/networkconfig.ui.h
index 7716e75f..30f9654e 100644
--- a/kopete/protocols/irc/ui/networkconfig.ui.h
+++ b/kopete/protocols/irc/ui/networkconfig.ui.h
@@ -15,12 +15,12 @@
void NetworkConfig::accept()
{
emit accepted();
- QDialog::accept();
+ TQDialog::accept();
}
void NetworkConfig::reject()
{
emit rejected();
- QDialog::reject();
+ TQDialog::reject();
}