summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/irc')
-rw-r--r--kopete/protocols/irc/ircaccount.cpp96
-rw-r--r--kopete/protocols/irc/ircaccount.h15
-rw-r--r--kopete/protocols/irc/ircaddcontactpage.cpp2
-rw-r--r--kopete/protocols/irc/ircaddcontactpage.h3
-rw-r--r--kopete/protocols/irc/ircchannelcontact.cpp72
-rw-r--r--kopete/protocols/irc/ircchannelcontact.h9
-rw-r--r--kopete/protocols/irc/irccontact.cpp38
-rw-r--r--kopete/protocols/irc/irccontact.h7
-rw-r--r--kopete/protocols/irc/irccontactmanager.cpp4
-rw-r--r--kopete/protocols/irc/irccontactmanager.h3
-rw-r--r--kopete/protocols/irc/ircguiclient.cpp8
-rw-r--r--kopete/protocols/irc/ircguiclient.h3
-rw-r--r--kopete/protocols/irc/ircprotocol.cpp202
-rw-r--r--kopete/protocols/irc/ircprotocol.h15
-rw-r--r--kopete/protocols/irc/ircservercontact.cpp18
-rw-r--r--kopete/protocols/irc/ircservercontact.h3
-rw-r--r--kopete/protocols/irc/ircsignalhandler.h35
-rw-r--r--kopete/protocols/irc/irctransferhandler.cpp2
-rw-r--r--kopete/protocols/irc/irctransferhandler.h3
-rw-r--r--kopete/protocols/irc/ircusercontact.cpp134
-rw-r--r--kopete/protocols/irc/ircusercontact.h3
-rw-r--r--kopete/protocols/irc/kcodecaction.cpp4
-rw-r--r--kopete/protocols/irc/kcodecaction.h3
-rw-r--r--kopete/protocols/irc/ksparser.cpp64
-rw-r--r--kopete/protocols/irc/ksparser.h2
-rw-r--r--kopete/protocols/irc/libkirc/kircengine.cpp52
-rw-r--r--kopete/protocols/irc/libkirc/kircengine.h71
-rw-r--r--kopete/protocols/irc/libkirc/kircengine_commands.cpp26
-rw-r--r--kopete/protocols/irc/libkirc/kircengine_ctcp.cpp66
-rw-r--r--kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp2
-rw-r--r--kopete/protocols/irc/libkirc/kircentity.cpp8
-rw-r--r--kopete/protocols/irc/libkirc/kircentity.h3
-rw-r--r--kopete/protocols/irc/libkirc/kircmessage.cpp48
-rw-r--r--kopete/protocols/irc/libkirc/kircmessage.h4
-rw-r--r--kopete/protocols/irc/libkirc/kircmessageredirector.cpp6
-rw-r--r--kopete/protocols/irc/libkirc/kircmessageredirector.h5
-rw-r--r--kopete/protocols/irc/libkirc/kirctransfer.cpp34
-rw-r--r--kopete/protocols/irc/libkirc/kirctransfer.h63
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferhandler.cpp8
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferhandler.h11
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferserver.cpp16
-rw-r--r--kopete/protocols/irc/libkirc/kirctransferserver.h21
-rw-r--r--kopete/protocols/irc/libkirc/ksslsocket.cpp22
-rw-r--r--kopete/protocols/irc/libkirc/ksslsocket.h9
-rw-r--r--kopete/protocols/irc/ui/channellist.cpp58
-rw-r--r--kopete/protocols/irc/ui/channellist.h13
-rw-r--r--kopete/protocols/irc/ui/channellistdialog.h1
-rw-r--r--kopete/protocols/irc/ui/ircadd.ui30
-rw-r--r--kopete/protocols/irc/ui/irceditaccount.ui150
-rw-r--r--kopete/protocols/irc/ui/irceditaccountwidget.cpp18
-rw-r--r--kopete/protocols/irc/ui/irceditaccountwidget.h3
-rw-r--r--kopete/protocols/irc/ui/networkconfig.ui60
-rw-r--r--kopete/protocols/irc/ui/networkconfig.ui.h2
53 files changed, 796 insertions, 762 deletions
diff --git a/kopete/protocols/irc/ircaccount.cpp b/kopete/protocols/irc/ircaccount.cpp
index 09d0db3c..9dbdfc4a 100644
--- a/kopete/protocols/irc/ircaccount.cpp
+++ b/kopete/protocols/irc/ircaccount.cpp
@@ -57,11 +57,11 @@
#include <tqlayout.h>
#include <tqtimer.h>
-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");
+const TQString IRCAccount::CONFIG_CODECMIB = TQString::tqfromLatin1("Codec");
+const TQString IRCAccount::CONFIG_NETWORKNAME = TQString::tqfromLatin1("NetworkName");
+const TQString IRCAccount::CONFIG_NICKNAME = TQString::tqfromLatin1("NickName");
+const TQString IRCAccount::CONFIG_USERNAME = TQString::tqfromLatin1("UserName");
+const TQString IRCAccount::CONFIG_REALNAME = TQString::tqfromLatin1("RealName");
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)
@@ -79,7 +79,7 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const TQString &accountId, const T
for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
m_engine->addCustomCtcp( it.key(), it.data() );
- TQString 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]").tqarg(kapp->aboutData()->version());
m_engine->setVersionString( version );
TQObject::connect(m_engine, TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)),
@@ -100,8 +100,8 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const TQString &accountId, const T
TQObject::connect(m_engine, TQT_SIGNAL(incomingCtcpReply(const TQString &, const TQString &, const TQString &)),
this, TQT_SLOT( slotNewCtcpReply(const TQString&, const TQString &, const TQString &)));
- TQObject::connect(m_engine, TQT_SIGNAL(statusChanged(KIRC::Engine::Status)),
- this, TQT_SLOT(engineStatusChanged(KIRC::Engine::Status)));
+ TQObject::connect(m_engine, TQT_SIGNAL(statusChanged(KIRC::Engine::tqStatus)),
+ this, TQT_SLOT(engineStatusChanged(KIRC::Engine::tqStatus)));
TQObject::connect(m_engine, TQT_SIGNAL(incomingServerLoadTooHigh()),
this, TQT_SLOT(slotServerBusy()));
@@ -173,7 +173,7 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const TQString &accountId, const T
/* Could not find this host. Add it to the networks structure */
m_network = new IRCNetwork;
- m_network->name = i18n("Temporary Network - %1").arg( hostName );
+ m_network->name = i18n("Temporary Network - %1").tqarg( hostName );
m_network->description = i18n("Network imported from previous version of Kopete, or an IRC URI");
IRCHost *host = new IRCHost;
@@ -204,12 +204,12 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const TQString &accountId, const T
m_contactManager = new IRCContactManager(mNickName, this);
setMyself( m_contactManager->mySelf() );
- setAccountLabel( TQString::fromLatin1("%1@%2").arg(mNickName,networkName) );
+ setAccountLabel( TQString::tqfromLatin1("%1@%2").tqarg(mNickName,networkName) );
m_myServer = m_contactManager->myServer();
- m_joinChannelAction = new KAction ( i18n("Join Channel..."), TQString::null, 0, this,
+ m_joinChannelAction = new KAction ( i18n("Join Channel..."), TQString(), 0, this,
TQT_SLOT(slotJoinChannel()), this);
- m_searchChannelAction = new KAction ( i18n("Search Channels..."), TQString::null, 0, this,
+ m_searchChannelAction = new KAction ( i18n("Search Channels..."), TQString(), 0, this,
TQT_SLOT(slotSearchChannels()), this);
}
@@ -226,7 +226,7 @@ void IRCAccount::slotNickInUse( const TQString &nick )
{
TQString newNick = KInputDialog::getText(
i18n("IRC Plugin"),
- i18n("The nickname %1 is already in use. Please enter an alternate nickname:").arg(nick),
+ i18n("The nickname %1 is already in use. Please enter an alternate nickname:").tqarg(nick),
nick);
if (newNick.isNull())
@@ -243,23 +243,23 @@ void IRCAccount::slotNickInUse( const TQString &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"));
+ KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("The nickname %1 is already in use").tqarg(nick), i18n("IRC Plugin"));
}
void IRCAccount::setAltNick( const TQString &altNick )
{
- configGroup()->writeEntry(TQString::fromLatin1( "altNick" ), altNick);
+ configGroup()->writeEntry(TQString::tqfromLatin1( "altNick" ), altNick);
}
const TQString IRCAccount::altNick() const
{
- return configGroup()->readEntry(TQString::fromLatin1("altNick"));
+ return configGroup()->readEntry(TQString::tqfromLatin1("altNick"));
}
void IRCAccount::setAutoShowServerWindow( bool show )
{
autoShowServerWindow = show;
- configGroup()->writeEntry(TQString::fromLatin1( "AutoShowServerWindow" ), autoShowServerWindow);
+ configGroup()->writeEntry(TQString::tqfromLatin1( "AutoShowServerWindow" ), autoShowServerWindow);
}
const TQString IRCAccount::networkName() const
@@ -306,8 +306,8 @@ void IRCAccount::setNetwork( const TQString &network )
KMessageBox::queuedMessageBox(
Kopete::UI::Global::mainWidget(), KMessageBox::Error,
i18n("<qt>The network associated with this account, <b>%1</b>, no longer exists. Please"
- " ensure that the account has a valid network. The account will not be enabled until you do so.</qt>").arg(network),
- i18n("Problem Loading %1").arg( accountId() ), 0 );
+ " ensure that the account has a valid network. The account will not be enabled until you do so.</qt>").tqarg(network),
+ i18n("Problem Loading %1").tqarg( accountId() ), 0 );
}
}
@@ -338,29 +338,29 @@ TQTextCodec *IRCAccount::codec() const
// FIXME: Move this to a dictionnary
void IRCAccount::setDefaultPart( const TQString &defaultPart )
{
- configGroup()->writeEntry( TQString::fromLatin1( "defaultPart" ), defaultPart );
+ configGroup()->writeEntry( TQString::tqfromLatin1( "defaultPart" ), defaultPart );
}
// FIXME: Move this to a dictionnary
void IRCAccount::setDefaultQuit( const TQString &defaultQuit )
{
- configGroup()->writeEntry( TQString::fromLatin1( "defaultQuit" ), defaultQuit );
+ configGroup()->writeEntry( TQString::tqfromLatin1( "defaultQuit" ), defaultQuit );
}
// FIXME: Move this to a dictionnary
const TQString IRCAccount::defaultPart() const
{
- TQString partMsg = configGroup()->readEntry(TQString::fromLatin1("defaultPart"));
+ TQString partMsg = configGroup()->readEntry(TQString::tqfromLatin1("defaultPart"));
if( partMsg.isEmpty() )
- return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg( kapp->aboutData()->version() );
+ return TQString::tqfromLatin1("Kopete %1 : http://kopete.kde.org").tqarg( kapp->aboutData()->version() );
return partMsg;
}
const TQString IRCAccount::defaultQuit() const
{
- TQString quitMsg = configGroup()->readEntry(TQString::fromLatin1("defaultQuit"));
+ TQString quitMsg = configGroup()->readEntry(TQString::tqfromLatin1("defaultQuit"));
if( quitMsg.isEmpty() )
- return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg(kapp->aboutData()->version());
+ return TQString::tqfromLatin1("Kopete %1 : http://kopete.kde.org").tqarg(kapp->aboutData()->version());
return quitMsg;
}
@@ -370,7 +370,7 @@ void IRCAccount::setCustomCtcpReplies( const TQMap< TQString, TQString > &replie
for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
{
m_engine->addCustomCtcp( it.key(), it.data() );
- val.append( TQString::fromLatin1("%1=%2").arg( it.key() ).arg( it.data() ) );
+ val.append( TQString::tqfromLatin1("%1=%2").tqarg( it.key() ).tqarg( it.data() ) );
}
configGroup()->writeEntry( "CustomCtcp", val );
@@ -416,7 +416,7 @@ void IRCAccount::setMessageDestinations( int serverNotices, int serverMessages,
KActionMenu *IRCAccount::actionMenu()
{
- TQString menuTitle = TQString::fromLatin1( " %1 <%2> " ).arg( accountId() ).arg( myself()->onlineStatus().description() );
+ TQString menuTitle = TQString::tqfromLatin1( " %1 <%2> " ).tqarg( accountId() ).tqarg( myself()->onlinetqStatus().description() );
KActionMenu *mActionMenu = Kopete::Account::actionMenu();
@@ -426,7 +426,7 @@ KActionMenu *IRCAccount::actionMenu()
mActionMenu->popupMenu()->insertSeparator();
mActionMenu->insert(m_joinChannelAction);
mActionMenu->insert(m_searchChannelAction);
- mActionMenu->insert( new KAction ( i18n("Show Server Window"), TQString::null, 0, this, TQT_SLOT(slotShowServerWindow()), mActionMenu ) );
+ mActionMenu->insert( new KAction ( i18n("Show Server Window"), TQString(), 0, this, TQT_SLOT(slotShowServerWindow()), mActionMenu ) );
if( m_engine->isConnected() && m_engine->useSSL() )
{
@@ -455,14 +455,14 @@ void IRCAccount::connectWithPassword(const TQString &password)
{
KMessageBox::queuedMessageBox(
Kopete::UI::Global::mainWidget(), KMessageBox::Error,
- i18n("<qt>The network associated with this account, <b>%1</b>, has no valid hosts. Please ensure that the account has a valid network.</qt>").arg(m_network->name),
+ i18n("<qt>The network associated with this account, <b>%1</b>, has no valid hosts. Please ensure that the account has a valid network.</qt>").tqarg(m_network->name),
i18n("Network is Empty"), 0 );
}
else if( currentHost == hosts.count() )
{
KMessageBox::queuedMessageBox(
Kopete::UI::Global::mainWidget(), KMessageBox::Error,
- i18n("<qt>Kopete could not connect to any of the servers in the network associated with this account (<b>%1</b>). Please try again later.</qt>").arg(m_network->name),
+ i18n("<qt>Kopete could not connect to any of the servers in the network associated with this account (<b>%1</b>). Please try again later.</qt>").tqarg(m_network->name),
i18n("Network is Unavailable"), 0 );
currentHost = 0;
@@ -490,7 +490,7 @@ void IRCAccount::connectWithPassword(const TQString &password)
}
IRCHost *host = hosts[ currentHost++ ];
- myServer()->appendMessage( i18n("Connecting to %1...").arg( host->host ) );
+ myServer()->appendMessage( i18n("Connecting to %1...").tqarg( host->host ) );
if( host->ssl )
myServer()->appendMessage( i18n("Using SSL") );
@@ -505,13 +505,13 @@ void IRCAccount::connectWithPassword(const TQString &password)
}
}
-void IRCAccount::engineStatusChanged(KIRC::Engine::Status newStatus)
+void IRCAccount::engineStatusChanged(KIRC::Engine::tqStatus newtqStatus)
{
kdDebug(14120) << k_funcinfo << endl;
- mySelf()->updateStatus();
+ mySelf()->updatetqStatus();
- switch (newStatus)
+ switch (newtqStatus)
{
case KIRC::Engine::Idle:
// Do nothing.
@@ -563,7 +563,7 @@ void IRCAccount::slotPerformOnConnectCommands()
return;
if (!autoConnect.isEmpty())
- Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/join %1").arg(autoConnect), manager);
+ Kopete::CommandHandler::commandHandler()->processMessage( TQString::tqfromLatin1("/join %1").tqarg(autoConnect), manager);
TQStringList commands(connectCommands());
for (TQStringList::Iterator it=commands.begin(); it != commands.end(); ++it)
@@ -597,7 +597,7 @@ void IRCAccount::slotSearchChannels()
if( !m_channelList )
{
m_channelList = new ChannelListDialog( m_engine,
- i18n("Channel List for %1").arg( m_engine->currentHost() ), this,
+ i18n("Channel List for %1").tqarg( m_engine->currentHost() ), this,
TQT_SLOT( slotJoinNamedChannel( const TQString & ) ) );
}
else
@@ -653,17 +653,17 @@ void IRCAccount::slotShowServerWindow()
bool IRCAccount::isConnected()
{
-// return ( myself()->onlineStatus().status() != Kopete::OnlineStatus::Offline );
+// return ( myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Offline );
return m_engine->isConnected();
}
void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason )
{
if ( status.status() == Kopete::OnlineStatus::Online &&
- myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline )
+ myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Offline )
connect();
else if (status.status() == Kopete::OnlineStatus::Online &&
- myself()->onlineStatus().status() == Kopete::OnlineStatus::Away )
+ myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Away )
setAway( false );
else if ( status.status() == Kopete::OnlineStatus::Offline )
disconnect();
@@ -700,7 +700,7 @@ bool IRCAccount::createContact( const TQString &contactId, Kopete::MetaContact *
return false;
}
- else if (contactId.startsWith(TQString::fromLatin1("#")))
+ else if (contactId.startsWith(TQString::tqfromLatin1("#")))
{
c = static_cast<IRCContact*>(contactManager()->findChannel(contactId, m));
}
@@ -714,8 +714,8 @@ bool IRCAccount::createContact( const TQString &contactId, Kopete::MetaContact *
{//This should NEVER happen
Kopete::MetaContact *old = c->metaContact();
c->setMetaContact( m );
- Kopete::ContactPtrList children = old->contacts();
- if (children.isEmpty())
+ Kopete::ContactPtrList tqchildren = old->contacts();
+ if (tqchildren.isEmpty())
Kopete::ContactList::self()->removeMetaContact( old );
}
else if( c->metaContact()->isTemporary() )
@@ -749,7 +749,7 @@ void IRCAccount::slotJoinChannel()
KLineEditDlg dlg(
i18n("Please enter name of the channel you want to join:"),
- TQString::null,
+ TQString(),
Kopete::UI::Global::mainWidget()
);
@@ -781,7 +781,7 @@ void IRCAccount::slotJoinChannel()
}
KMessageBox::error( Kopete::UI::Global::mainWidget(),
- i18n("\"%1\" is an invalid channel. Channels must start with '#', '!', '+', or '&'.").arg(chan),
+ i18n("\"%1\" is an invalid channel. Channels must start with '#', '!', '+', or '&'.").tqarg(chan),
i18n("IRC Plugin")
);
}
@@ -789,15 +789,15 @@ void IRCAccount::slotJoinChannel()
void IRCAccount::slotNewCtcpReply(const TQString &type, const TQString &/*target*/, const TQString &messageReceived)
{
- appendMessage( i18n("CTCP %1 REPLY: %2").arg(type).arg(messageReceived), InfoReply );
+ appendMessage( i18n("CTCP %1 REPLY: %2").tqarg(type).tqarg(messageReceived), InfoReply );
}
void IRCAccount::slotNoSuchNickname( const TQString &nick )
{
if( KIRC::Entity::isChannel(nick) )
- appendMessage( i18n("The channel \"%1\" does not exist").arg(nick), UnknownReply );
+ appendMessage( i18n("The channel \"%1\" does not exist").tqarg(nick), UnknownReply );
else
- appendMessage( i18n("The nickname \"%1\" does not exist").arg(nick), UnknownReply );
+ appendMessage( i18n("The nickname \"%1\" does not exist").tqarg(nick), UnknownReply );
}
void IRCAccount::appendMessage( const TQString &message, MessageType type )
@@ -852,7 +852,7 @@ void IRCAccount::appendMessage( const TQString &message, MessageType type )
if( destination == KNotify )
{
KNotifyClient::event(
- Kopete::UI::Global::mainWidget()->winId(), TQString::fromLatin1("irc_event"), message
+ Kopete::UI::Global::mainWidget()->winId(), TQString::tqfromLatin1("irc_event"), message
);
}
}
diff --git a/kopete/protocols/irc/ircaccount.h b/kopete/protocols/irc/ircaccount.h
index 1aa4072e..a20ccc93 100644
--- a/kopete/protocols/irc/ircaccount.h
+++ b/kopete/protocols/irc/ircaccount.h
@@ -73,6 +73,7 @@ class IRCAccount
friend class IRCProtocolHandler;
Q_OBJECT
+ TQ_OBJECT
public:
static const TQString CONFIG_CODECMIB;
@@ -100,8 +101,8 @@ public:
Ignore = 5
};
- IRCAccount(IRCProtocol *p, const TQString &accountid, const TQString &autoConnect = TQString::null,
- const TQString& networkName = TQString::null, const TQString &nickName = TQString::null);
+ IRCAccount(IRCProtocol *p, const TQString &accountid, const TQString &autoConnect = TQString(),
+ const TQString& networkName = TQString(), const TQString &nickName = TQString());
virtual ~IRCAccount();
void setNickName( const TQString & );
@@ -157,12 +158,12 @@ public slots:
virtual KActionMenu *actionMenu();
- virtual void setAway( bool isAway, const TQString &awayMessage = TQString::null );
+ virtual void setAway( bool isAway, const TQString &awayMessage = TQString() );
virtual bool isConnected();
/** Reimplemented from Kopete::Account */
- void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null);
+ void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString());
// Returns the KIRC engine instance
KIRC::Engine *engine() const { return m_engine; }
@@ -183,17 +184,17 @@ public slots:
virtual void connectWithPassword( const TQString & );
virtual void disconnect();
- void quit( const TQString &quitMessage = TQString::null );
+ void quit( const TQString &quitMessage = TQString() );
void listChannels();
void appendMessage( const TQString &message, MessageType type = Default );
protected:
- virtual bool createContact( const TQString &contactId, Kopete::MetaContact *parentContact ) ;
+ virtual bool createContact( const TQString &contactId, Kopete::MetaContact *tqparentContact ) ;
private slots:
- void engineStatusChanged(KIRC::Engine::Status newStatus);
+ void engineStatusChanged(KIRC::Engine::tqStatus newtqStatus);
void destroyed(IRCContact *contact);
diff --git a/kopete/protocols/irc/ircaddcontactpage.cpp b/kopete/protocols/irc/ircaddcontactpage.cpp
index 6b19721c..85f2edfb 100644
--- a/kopete/protocols/irc/ircaddcontactpage.cpp
+++ b/kopete/protocols/irc/ircaddcontactpage.cpp
@@ -31,7 +31,7 @@
#include <klocale.h>
#include <kmessagebox.h>
-IRCAddContactPage::IRCAddContactPage( TQWidget *parent, IRCAccount *a ) : AddContactPage(parent, 0)
+IRCAddContactPage::IRCAddContactPage( TQWidget *tqparent, IRCAccount *a ) : AddContactPage(tqparent, 0)
{
(new TQVBoxLayout(this))->setAutoAdd(true);
ircdata = new ircAddUI(this);
diff --git a/kopete/protocols/irc/ircaddcontactpage.h b/kopete/protocols/irc/ircaddcontactpage.h
index 390cd829..100886b4 100644
--- a/kopete/protocols/irc/ircaddcontactpage.h
+++ b/kopete/protocols/irc/ircaddcontactpage.h
@@ -32,8 +32,9 @@ class ChannelList;
class IRCAddContactPage : public AddContactPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- IRCAddContactPage(TQWidget *parent=0, IRCAccount* account = 0);
+ IRCAddContactPage(TQWidget *tqparent=0, IRCAccount* account = 0);
~IRCAddContactPage();
ircAddUI *ircdata;
diff --git a/kopete/protocols/irc/ircchannelcontact.cpp b/kopete/protocols/irc/ircchannelcontact.cpp
index cab2748b..1835bb4b 100644
--- a/kopete/protocols/irc/ircchannelcontact.cpp
+++ b/kopete/protocols/irc/ircchannelcontact.cpp
@@ -66,7 +66,7 @@ IRCChannelContact::IRCChannelContact(IRCContactManager *contactManager, const TQ
actionModeI = new KToggleAction(i18n("&Invite Only"), 0, this, TQT_SLOT(slotModeChanged()), this );
actionHomePage = 0L;
- updateStatus();
+ updatetqStatus();
}
IRCChannelContact::~IRCChannelContact()
@@ -77,10 +77,10 @@ void IRCChannelContact::slotUpdateInfo()
{
/** This woudl be nice, but it generates server errors too often
- if( !manager(Kopete::Contact::CannotCreate) && onlineStatus() == m_protocol->m_ChannelStatusOnline )
- kircEngine()->writeMessage( TQString::fromLatin1("LIST %1").arg(m_nickName) );
+ if( !manager(Kopete::Contact::CannotCreate) && onlinetqStatus() == m_protocol->m_ChannelStatusOnline )
+ kircEngine()->writeMessage( TQString::tqfromLatin1("LIST %1").tqarg(m_nickName) );
else
- setProperty( TQString::fromLatin1("channelMembers"), i18n("Members"), manager()->members().count() );
+ setProperty( TQString::tqfromLatin1("channelMembers"), i18n("Members"), manager()->members().count() );
*/
KIRC::Engine *engine = kircEngine();
@@ -88,7 +88,7 @@ void IRCChannelContact::slotUpdateInfo()
if (manager(Kopete::Contact::CannotCreate))
{
setProperty(m_protocol->propChannelMembers, manager()->members().count());
- engine->writeMessage(TQString::fromLatin1("WHO %1").arg(m_nickName));
+ engine->writeMessage(TQString::tqfromLatin1("WHO %1").tqarg(m_nickName));
}
else
{
@@ -102,7 +102,7 @@ void IRCChannelContact::slotUpdateInfo()
void IRCChannelContact::slotChannelListed( const TQString &channel, uint members, const TQString &topic )
{
if (!manager(Kopete::Contact::CannotCreate) &&
- onlineStatus() == m_protocol->m_ChannelStatusOnline &&
+ onlinetqStatus() == m_protocol->m_ChannelStatusOnline &&
channel.lower() == m_nickName.lower())
{
mTopic = topic;
@@ -126,9 +126,9 @@ void IRCChannelContact::toggleOperatorActions(bool enabled)
actionModeI->setEnabled(enabled);
}
-void IRCChannelContact::slotOnlineStatusChanged(Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus)
+void IRCChannelContact::slotOnlineStatusChanged(Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldtqStatus)
{
- Q_UNUSED(oldStatus);
+ Q_UNUSED(oldtqStatus);
if (c == account()->myself()) {
if (status.internalStatus() & IRCProtocol::Operator) {
@@ -141,9 +141,9 @@ void IRCChannelContact::slotOnlineStatusChanged(Kopete::Contact *c, const Kopete
}
}
-void IRCChannelContact::updateStatus()
+void IRCChannelContact::updatetqStatus()
{
- KIRC::Engine::Status status = kircEngine()->status();
+ KIRC::Engine::tqStatus status = kircEngine()->status();
switch (status)
{
case KIRC::Engine::Idle:
@@ -200,7 +200,7 @@ void IRCChannelContact::namesList(const TQStringList &nicknames)
void IRCChannelContact::endOfNames()
{
- setMode(TQString::null);
+ setMode(TQString());
slotUpdateInfo();
}
@@ -251,7 +251,7 @@ void IRCChannelContact::slotAddNicknames()
else if( firstChar == '+')
status = m_protocol->m_UserStatusVoice;
else
- status = user->onlineStatus();
+ status = user->onlinetqStatus();
if( user != account->mySelf() )
manager()->addContact(user , status, true);
@@ -272,12 +272,12 @@ void IRCChannelContact::channelTopic(const TQString &topic)
if (mTopic.isEmpty()) {
Kopete::Message msg((Kopete::Contact*)this, mMyself,
- i18n("Topic for %1 is set empty.").arg(m_nickName),
+ i18n("Topic for %1 is set empty.").tqarg(m_nickName),
Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW);
appendMessage(msg);
} else {
Kopete::Message msg((Kopete::Contact*)this, mMyself,
- i18n("Topic for %1 is %2").arg(m_nickName).arg(mTopic),
+ i18n("Topic for %1 is %2").tqarg(m_nickName).tqarg(mTopic),
Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW);
appendMessage(msg);
}
@@ -292,7 +292,7 @@ void IRCChannelContact::channelHomePage(const TQString &url)
void IRCChannelContact::join()
{
if (!manager(Kopete::Contact::CannotCreate) &&
- onlineStatus().status() == Kopete::OnlineStatus::Online)
+ onlinetqStatus().status() == Kopete::OnlineStatus::Online)
{
kdDebug() << k_funcinfo << "My nickname:" << m_nickName << endl;
kdDebug() << k_funcinfo << "My manager:" << manager(Kopete::Contact::CannotCreate) << endl;
@@ -329,7 +329,7 @@ void IRCChannelContact::slotIncomingUserIsAway( const TQString &nick, const TQSt
if( nick.lower() == account->mySelf()->nickName().lower() )
{
IRCUserContact *c = account->mySelf();
- if (manager() && manager()->members().contains(c))
+ if (manager() && manager()->members().tqcontains(c))
{
Kopete::OnlineStatus status = manager()->contactOnlineStatus(c);
if (status == m_protocol->m_UserStatusOp)
@@ -362,7 +362,7 @@ void IRCChannelContact::userJoinedChannel(const TQString &nickname)
kdDebug() << k_funcinfo << "My view:" << manager(Kopete::Contact::CannotCreate)->view(false) << endl;
Kopete::Message msg((Kopete::Contact *)this, mMyself,
- i18n("You have joined channel %1").arg(m_nickName),
+ i18n("You have joined channel %1").tqarg(m_nickName),
Kopete::Message::Internal, Kopete::Message::PlainText,
CHAT_VIEW);
msg.setImportance( Kopete::Message::Low); //set the importance manualy to low
@@ -378,7 +378,7 @@ void IRCChannelContact::userJoinedChannel(const TQString &nickname)
contact->setOnlineStatus( m_protocol->m_UserStatusOnline );
manager()->addContact((Kopete::Contact *)contact, true);
Kopete::Message msg((Kopete::Contact *)this, mMyself,
- i18n("User <b>%1</b> joined channel %2").arg(nickname).arg(m_nickName),
+ i18n("User <b>%1</b> joined channel %2").tqarg(nickname).tqarg(m_nickName),
Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW);
msg.setImportance( Kopete::Message::Low); //set the importance manualy to low
manager()->appendMessage(msg);
@@ -413,9 +413,9 @@ void IRCChannelContact::userKicked(const TQString &nick, const TQString &nickKic
TQString r;
if ((reason != nick) && (reason != nickKicked)) {
- r = i18n( "%1 was kicked by %2. Reason: %3" ).arg(nickKicked, nick, reason);
+ r = i18n( "%1 was kicked by %2. Reason: %3" ).tqarg(nickKicked, nick, reason);
} else {
- r = i18n( "%1 was kicked by %2." ).arg(nickKicked, nick);
+ r = i18n( "%1 was kicked by %2." ).tqarg(nickKicked, nick);
}
manager()->removeContact( c, r );
@@ -434,9 +434,9 @@ void IRCChannelContact::userKicked(const TQString &nick, const TQString &nickKic
TQString r;
if ((reason != nick) && (reason != nickKicked)) {
- r = i18n( "You were kicked from %1 by %2. Reason: %3" ).arg(m_nickName, nickKicked, reason);
+ r = i18n( "You were kicked from %1 by %2. Reason: %3" ).tqarg(m_nickName, nickKicked, reason);
} else {
- r = i18n( "You were kicked from %1 by %2." ).arg(m_nickName, nickKicked);
+ r = i18n( "You were kicked from %1 by %2." ).tqarg(m_nickName, nickKicked);
}
KMessageBox::error(Kopete::UI::Global::mainWidget(), r, i18n("IRC Plugin"));
@@ -468,7 +468,7 @@ void IRCChannelContact::setTopic(const TQString &topic)
else
{
Kopete::Message msg(account->myServer(), manager()->members(),
- i18n("You must be a channel operator on %1 to do that.").arg(m_nickName),
+ i18n("You must be a channel operator on %1 to do that.").tqarg(m_nickName),
Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW);
manager()->appendMessage(msg);
}
@@ -483,7 +483,7 @@ void IRCChannelContact::topicChanged(const TQString &nick, const TQString &newto
setProperty( m_protocol->propChannelTopic, mTopic );
manager()->setDisplayName( caption() );
Kopete::Message msg(account->myServer(), mMyself,
- i18n("%1 has changed the topic to: %2").arg(nick).arg(newtopic),
+ i18n("%1 has changed the topic to: %2").tqarg(nick).tqarg(newtopic),
Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW);
msg.setImportance(Kopete::Message::Low); //set the importance manualy to low
appendMessage(msg);
@@ -494,7 +494,7 @@ void IRCChannelContact::topicUser(const TQString &nick, const TQDateTime &time)
IRCAccount *account = ircAccount();
Kopete::Message msg(account->myServer(), mMyself,
- i18n("Topic set by %1 at %2").arg(nick).arg(
+ i18n("Topic set by %1 at %2").tqarg(nick).tqarg(
KGlobal::locale()->formatDateTime(time, true)
), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW);
msg.setImportance(Kopete::Message::Low); //set the importance manualy to low
@@ -503,13 +503,13 @@ void IRCChannelContact::topicUser(const TQString &nick, const TQDateTime &time)
void IRCChannelContact::incomingModeChange( const TQString &nick, const TQString &mode )
{
- Kopete::Message msg(this, mMyself, i18n("%1 sets mode %2 on %3").arg(nick).arg(mode).arg(m_nickName), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW);
+ Kopete::Message msg(this, mMyself, i18n("%1 sets mode %2 on %3").tqarg(nick).tqarg(mode).tqarg(m_nickName), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW);
msg.setImportance( Kopete::Message::Low); //set the importance manualy to low
appendMessage(msg);
bool inParams = false;
bool modeEnabled = false;
- TQString params = TQString::null;
+ TQString params = TQString();
for( uint i=0; i < mode.length(); i++ )
{
switch( mode[i] )
@@ -564,7 +564,7 @@ void IRCChannelContact::failedChanBanned()
{
manager()->deleteLater();
KMessageBox::error( Kopete::UI::Global::mainWidget(),
- i18n("<qt>You can not join %1 because you have been banned.</qt>").arg(m_nickName),
+ i18n("<qt>You can not join %1 because you have been banned.</qt>").tqarg(m_nickName),
i18n("IRC Plugin") );
}
@@ -572,14 +572,14 @@ void IRCChannelContact::failedChanInvite()
{
manager()->deleteLater();
KMessageBox::error( Kopete::UI::Global::mainWidget(),
- i18n("<qt>You can not join %1 because it is set to invite only, and no one has invited you.</qt>").arg(m_nickName), i18n("IRC Plugin") );
+ i18n("<qt>You can not join %1 because it is set to invite only, and no one has invited you.</qt>").tqarg(m_nickName), i18n("IRC Plugin") );
}
void IRCChannelContact::failedChanFull()
{
manager()->deleteLater();
KMessageBox::error( Kopete::UI::Global::mainWidget(),
- i18n("<qt>You can not join %1 because it has reached its user limit.</qt>").arg(m_nickName),
+ i18n("<qt>You can not join %1 because it has reached its user limit.</qt>").tqarg(m_nickName),
i18n("IRC Plugin") );
}
@@ -587,8 +587,8 @@ void IRCChannelContact::failedChankey()
{
bool ok;
TQString diaPassword = KInputDialog::getText( i18n( "IRC Plugin" ),
- i18n( "Please enter key for channel %1: ").arg(m_nickName),
- TQString::null,
+ i18n( "Please enter key for channel %1: ").tqarg(m_nickName),
+ TQString(),
&ok );
if ( !ok )
@@ -636,9 +636,9 @@ void IRCChannelContact::toggleMode( TQChar mode, bool enabled, bool update )
if( modeMap[mode] != enabled )
{
if( enabled )
- setMode( TQString::fromLatin1("+") + mode );
+ setMode( TQString::tqfromLatin1("+") + mode );
else
- setMode( TQString::fromLatin1("-") + mode );
+ setMode( TQString::tqfromLatin1("-") + mode );
}
}
@@ -717,9 +717,9 @@ void IRCChannelContact::slotHomepage()
const TQString IRCChannelContact::caption() const
{
- TQString cap = TQString::fromLatin1("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost());
+ TQString cap = TQString::tqfromLatin1("%1 @ %2").tqarg(m_nickName).tqarg(kircEngine()->currentHost());
if(!mTopic.isEmpty())
- cap.append( TQString::fromLatin1(" - %1").arg(Kopete::Message::unescape(mTopic)) );
+ cap.append( TQString::tqfromLatin1(" - %1").tqarg(Kopete::Message::unescape(mTopic)) );
return cap;
}
diff --git a/kopete/protocols/irc/ircchannelcontact.h b/kopete/protocols/irc/ircchannelcontact.h
index 0febd30b..67fa46c9 100644
--- a/kopete/protocols/irc/ircchannelcontact.h
+++ b/kopete/protocols/irc/ircchannelcontact.h
@@ -47,6 +47,7 @@ class IRCChannelContact
friend class IRCSignalMapper;
Q_OBJECT
+ TQ_OBJECT
public:
IRCChannelContact(IRCContactManager *, const TQString &channel, Kopete::MetaContact *metac);
@@ -95,19 +96,19 @@ public:
void newAction(const TQString &from, const TQString &action);
public slots:
- void updateStatus();
+ void updatetqStatus();
/**
* Sets the topic of this channel
* @param topic The topic you want set
*/
- void setTopic( const TQString &topic = TQString::null );
+ void setTopic( const TQString &topic = TQString() );
/**
* Sets or unsets a mode on this channel
* @param mode The full text of the mode change you want performed
*/
- void setMode( const TQString &mode = TQString::null );
+ void setMode( const TQString &mode = TQString() );
void part();
void partAction();
@@ -127,7 +128,7 @@ private slots:
void slotUpdateInfo();
void slotHomepage();
void slotChannelListed(const TQString &channel, uint members, const TQString &topic);
- void slotOnlineStatusChanged(Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus);
+ void slotOnlineStatusChanged(Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldtqStatus);
private:
KAction *actionJoin;
diff --git a/kopete/protocols/irc/irccontact.cpp b/kopete/protocols/irc/irccontact.cpp
index 349fba60..93888b55 100644
--- a/kopete/protocols/irc/irccontact.cpp
+++ b/kopete/protocols/irc/irccontact.cpp
@@ -67,8 +67,8 @@ IRCContact::IRCContact(IRCContactManager *contactManager, const TQString &nick,
TQObject::connect(engine, TQT_SIGNAL(incomingQuitIRC(const TQString &, const TQString &)),
this, TQT_SLOT( slotUserDisconnected(const TQString&, const TQString&)));
- TQObject::connect(engine, TQT_SIGNAL(statusChanged(KIRC::Engine::Status)),
- this, TQT_SLOT(updateStatus()));
+ TQObject::connect(engine, TQT_SIGNAL(statusChanged(KIRC::Engine::tqStatus)),
+ this, TQT_SLOT(updatetqStatus()));
engine->setCodec( m_nickName, codec() );
}
@@ -94,8 +94,8 @@ KIRC::Engine *IRCContact::kircEngine() const
bool IRCContact::isReachable()
{
- if (onlineStatus().status() != Kopete::OnlineStatus::Offline &&
- onlineStatus().status() != Kopete::OnlineStatus::Unknown)
+ if (onlinetqStatus().status() != Kopete::OnlineStatus::Offline &&
+ onlinetqStatus().status() != Kopete::OnlineStatus::Unknown)
return true;
return false;
@@ -103,15 +103,15 @@ bool IRCContact::isReachable()
const TQString IRCContact::caption() const
{
- return TQString::null;
+ return TQString();
}
/*
const TQString IRCContact::formatedName() const
{
- return TQString::null;
+ return TQString();
}
*/
-void IRCContact::updateStatus()
+void IRCContact::updatetqStatus()
{
}
@@ -122,12 +122,12 @@ void IRCContact::privateMessage(IRCContact *, IRCContact *, const TQString &)
void IRCContact::setCodec(const TQTextCodec *codec)
{
kircEngine()->setCodec(m_nickName, codec);
- metaContact()->setPluginData(m_protocol, TQString::fromLatin1("Codec"), TQString::number(codec->mibEnum()));
+ metaContact()->setPluginData(m_protocol, TQString::tqfromLatin1("Codec"), TQString::number(codec->mibEnum()));
}
const TQTextCodec *IRCContact::codec()
{
- TQString codecId = metaContact()->pluginData(m_protocol, TQString::fromLatin1("Codec"));
+ TQString codecId = metaContact()->pluginData(m_protocol, TQString::tqfromLatin1("Codec"));
TQTextCodec *codec = ircAccount()->codec();
if( !codecId.isEmpty() )
@@ -186,7 +186,7 @@ void IRCContact::slotUserDisconnected(const TQString &user, const TQString &reas
Kopete::Contact *c = locateUser( nickname );
if ( c )
{
- m_chatSession->removeContact(c, i18n("Quit: \"%1\" ").arg(reason), Kopete::Message::RichText);
+ m_chatSession->removeContact(c, i18n("Quit: \"%1\" ").tqarg(reason), Kopete::Message::RichText);
c->setOnlineStatus(m_protocol->m_UserStatusOffline);
}
}
@@ -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(TQString::fromLatin1("</span")) > -1)
+ if (htmlString.tqfind(TQString::tqfromLatin1("</span")) > -1)
{
- TQRegExp findTags( TQString::fromLatin1("<span style=\"(.*)\">(.*)</span>") );
+ TQRegExp findTags( TQString::tqfromLatin1("<span style=\"(.*)\">(.*)</span>") );
findTags.setMinimal( true );
int pos = 0;
@@ -249,19 +249,19 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *)
TQString attribute = (*attrPair).section(':',0,0);
TQString value = (*attrPair).section(':',1);
- if( attribute == TQString::fromLatin1("color") )
+ if( attribute == TQString::tqfromLatin1("color") )
{
int ircColor = KSParser::colorForHTML( value );
if( ircColor > -1 )
replacement.prepend( TQString( TQChar(0x03) ).append( TQString::number(ircColor) ) ).append( TQChar( 0x03 ) );
}
- else if( attribute == TQString::fromLatin1("font-weight") &&
- value == TQString::fromLatin1("600") ) {
+ else if( attribute == TQString::tqfromLatin1("font-weight") &&
+ value == TQString::tqfromLatin1("600") ) {
// Bolding
replacement.prepend( TQChar(0x02) ).append( TQChar(0x02) );
}
- else if( attribute == TQString::fromLatin1("text-decoration") &&
- value == TQString::fromLatin1("underline") ) {
+ else if( attribute == TQString::tqfromLatin1("text-decoration") &&
+ value == TQString::tqfromLatin1("underline") ) {
replacement.prepend( TQChar(31) ).append( TQChar(31) );
}
}
@@ -363,7 +363,7 @@ bool IRCContact::isChatting(const Kopete::ChatSession *avoid) const
for (TQValueList<Kopete::ChatSession*>::Iterator it= sessions.begin(); it!=sessions.end() ; ++it)
{
if( (*it) != avoid && (*it)->account() == account &&
- (*it)->members().contains(this) )
+ (*it)->members().tqcontains(this) )
{
return true;
}
@@ -413,7 +413,7 @@ void IRCContact::receivedMessage( KIRC::Engine::ServerMessageType type,
const KIRC::EntityPtrList &to,
const TQString &msg)
{
- if (to.contains(m_entity))
+ if (to.tqcontains(m_entity))
{
IRCContact *fromContact = ircAccount()->getContact(from);
Kopete::Message message(fromContact, manager()->members(), msg, Kopete::Message::Inbound,
diff --git a/kopete/protocols/irc/irccontact.h b/kopete/protocols/irc/irccontact.h
index 7a9fd169..823f23ae 100644
--- a/kopete/protocols/irc/irccontact.h
+++ b/kopete/protocols/irc/irccontact.h
@@ -61,10 +61,11 @@ class IRCContact
: public Kopete::Contact
{
Q_OBJECT
+ TQ_OBJECT
public:
- 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);
+ IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const TQString& icon = TQString());
+ IRCContact(IRCContactManager *contactManager, const TQString &nick, Kopete::MetaContact *metac, const TQString& icon = TQString());
virtual ~IRCContact();
IRCAccount *ircAccount() const;
@@ -120,7 +121,7 @@ signals:
public slots:
void setCodec( const TQTextCodec *codec );
- virtual void updateStatus();
+ virtual void updatetqStatus();
protected slots:
virtual void slotSendMsg(Kopete::Message &message, Kopete::ChatSession *);
diff --git a/kopete/protocols/irc/irccontactmanager.cpp b/kopete/protocols/irc/irccontactmanager.cpp
index fb49e08e..f304a2ed 100644
--- a/kopete/protocols/irc/irccontactmanager.cpp
+++ b/kopete/protocols/irc/irccontactmanager.cpp
@@ -260,7 +260,7 @@ void IRCContactManager::slotContactAdded( Kopete::MetaContact *contact )
void IRCContactManager::addToNotifyList(const TQString &nick)
{
- if (!m_NotifyList.contains(nick.lower()))
+ if (!m_NotifyList.tqcontains(nick.lower()))
{
m_NotifyList.append(nick);
checkOnlineNotifyList();
@@ -269,7 +269,7 @@ void IRCContactManager::addToNotifyList(const TQString &nick)
void IRCContactManager::removeFromNotifyList(const TQString &nick)
{
- if (m_NotifyList.contains(nick.lower()))
+ if (m_NotifyList.tqcontains(nick.lower()))
m_NotifyList.remove(nick.lower());
}
diff --git a/kopete/protocols/irc/irccontactmanager.h b/kopete/protocols/irc/irccontactmanager.h
index 7ce8483c..0a0f558b 100644
--- a/kopete/protocols/irc/irccontactmanager.h
+++ b/kopete/protocols/irc/irccontactmanager.h
@@ -52,9 +52,10 @@ class TQTimer;
* It manage the life cycle of all the @ref IRCServerContact, @ref IRCChannelContact and @ref IRCUserContact objects for the given account.
*/
class IRCContactManager
- : public QObject
+ : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
IRCContactManager(const TQString &nickName, IRCAccount *account, const char *name=0);
diff --git a/kopete/protocols/irc/ircguiclient.cpp b/kopete/protocols/irc/ircguiclient.cpp
index d9d5f8e2..182670d7 100644
--- a/kopete/protocols/irc/ircguiclient.cpp
+++ b/kopete/protocols/irc/ircguiclient.cpp
@@ -40,9 +40,9 @@
#include "ircaccount.h"
#include "irccontact.h"
-IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : TQObject(parent) , KXMLGUIClient(parent)
+IRCGUIClient::IRCGUIClient( Kopete::ChatSession *tqparent ) : TQObject(tqparent) , KXMLGUIClient(tqparent)
{
- Kopete::ContactPtrList members = parent->members();
+ Kopete::ContactPtrList members = tqparent->members();
if( members.count() > 0 )
{
m_user = static_cast<IRCContact*>( members.first() );
@@ -53,7 +53,7 @@ IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : TQObject(parent) , K
setXMLFile("ircchatui.rc");
unplugActionList( "irccontactactionlist" );
- TQPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
+ TQPtrList<KAction> *actions = m_user->customContextMenuActions( tqparent );
plugActionList( "irccontactactionlist", *actions );
delete actions;
*/
@@ -62,7 +62,7 @@ IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : TQObject(parent) , K
TQDomDocument doc = domDocument();
TQDomNode menu = doc.documentElement().firstChild().firstChild();
- TQPtrList<KAction> *actions = m_user->customContextMenuActions( parent );
+ TQPtrList<KAction> *actions = m_user->customContextMenuActions( tqparent );
if( actions )
{
for( KAction *a = actions->first(); a; a = actions->next() )
diff --git a/kopete/protocols/irc/ircguiclient.h b/kopete/protocols/irc/ircguiclient.h
index fed65dd4..10d691ad 100644
--- a/kopete/protocols/irc/ircguiclient.h
+++ b/kopete/protocols/irc/ircguiclient.h
@@ -28,8 +28,9 @@ class IRCContact;
class IRCGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- IRCGUIClient( Kopete::ChatSession *parent = 0 );
+ IRCGUIClient( Kopete::ChatSession *tqparent = 0 );
~IRCGUIClient();
private slots:
diff --git a/kopete/protocols/irc/ircprotocol.cpp b/kopete/protocols/irc/ircprotocol.cpp
index 6112429b..a3182a14 100644
--- a/kopete/protocols/irc/ircprotocol.cpp
+++ b/kopete/protocols/irc/ircprotocol.cpp
@@ -72,7 +72,7 @@ IRCProtocol *IRCProtocol::s_protocol = 0L;
IRCProtocolHandler::IRCProtocolHandler() : Kopete::MimeTypeHandler( false )
{
- registerAsProtocolHandler( TQString::fromLatin1("irc") );
+ registerAsProtocolHandler( TQString::tqfromLatin1("irc") );
}
void IRCProtocolHandler::handleURL( const KURL &url ) const
@@ -90,7 +90,7 @@ void IRCProtocolHandler::handleURL( const KURL &url ) const
return;
KUser user( getuid() );
- TQString accountId = TQString::fromLatin1("%1@%2:%3").arg(
+ TQString accountId = TQString::tqfromLatin1("%1@%2:%3").tqarg(
user.loginName(),
url.host(),
TQString::number(port)
@@ -104,18 +104,18 @@ void IRCProtocolHandler::handleURL( const KURL &url ) const
newAccount->connect();
}
-IRCProtocol::IRCProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ )
-: Kopete::Protocol( IRCProtocolFactory::instance(), parent, name ),
+IRCProtocol::IRCProtocol( TQObject *tqparent, const char *name, const TQStringList & /* args */ )
+: Kopete::Protocol( IRCProtocolFactory::instance(), tqparent, name ),
m_ServerStatusOnline(Kopete::OnlineStatus::Online,
- 100, this, OnlineServer, TQString::null, i18n("Online")),
+ 100, this, OnlineServer, TQString(), i18n("Online")),
m_ServerStatusOffline(Kopete::OnlineStatus::Offline,
- 90, this, OfflineServer, TQString::null, i18n("Offline")),
+ 90, this, OfflineServer, TQString(), i18n("Offline")),
m_ChannelStatusOnline(Kopete::OnlineStatus::Online,
- 80, this, OnlineChannel, TQString::null, i18n("Online")),
+ 80, this, OnlineChannel, TQString(), i18n("Online")),
m_ChannelStatusOffline(Kopete::OnlineStatus::Offline,
- 70, this, OfflineChannel, TQString::null, i18n("Offline")),
+ 70, this, OfflineChannel, TQString(), i18n("Offline")),
m_UserStatusOpVoice(Kopete::OnlineStatus::Online,
60, this, Online | Operator | Voiced, TQStringList::split(' ',"irc_voice irc_op"), i18n("Op")),
@@ -136,7 +136,7 @@ IRCProtocol::IRCProtocol( TQObject *parent, const char *name, const TQStringList
TQStringList::split(' ',"irc_voice contact_away_overlay"), i18n("Away")),
m_UserStatusOnline(Kopete::OnlineStatus::Online,
- 25, this, Online, TQString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online),
+ 25, this, Online, TQString(), i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online),
m_UserStatusAway(Kopete::OnlineStatus::Away,
2, this, Online | Away, "contact_away_overlay",
@@ -144,147 +144,147 @@ IRCProtocol::IRCProtocol( TQObject *parent, const char *name, const TQStringList
m_UserStatusConnecting(Kopete::OnlineStatus::Connecting,
1, this, Connecting, "irc_connecting", i18n("Connecting")),
m_UserStatusOffline(Kopete::OnlineStatus::Offline,
- 0, this, Offline, TQString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline),
+ 0, this, Offline, TQString(), i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline),
m_StatusUnknown(Kopete::OnlineStatus::Unknown,
- 999, this, 999, "status_unknown", i18n("Status not available")),
+ 999, this, 999, "status_unknown", i18n("tqStatus not available")),
- propChannelTopic(TQString::fromLatin1("channelTopic"), i18n("Topic"), TQString::null, false, true ),
- propChannelMembers(TQString::fromLatin1("channelMembers"), i18n("Members")),
- propHomepage(TQString::fromLatin1("homePage"), i18n("Home Page")),
+ propChannelTopic(TQString::tqfromLatin1("channelTopic"), i18n("Topic"), TQString(), false, true ),
+ propChannelMembers(TQString::tqfromLatin1("channelMembers"), i18n("Members")),
+ propHomepage(TQString::tqfromLatin1("homePage"), i18n("Home Page")),
propLastSeen(Kopete::Global::Properties::self()->lastSeen()),
- propUserInfo(TQString::fromLatin1("userInfo"), i18n("IRC User")),
- propServer(TQString::fromLatin1("ircServer"), i18n("IRC Server")),
- propChannels( TQString::fromLatin1("ircChannels"), i18n("IRC Channels")),
- propHops(TQString::fromLatin1("ircHops"), i18n("IRC Hops")),
- propFullName(TQString::fromLatin1("FormattedName"), i18n("Full Name")),
- propIsIdentified(TQString::fromLatin1("identifiedUser"), i18n("User Is Authenticated"))
+ propUserInfo(TQString::tqfromLatin1("userInfo"), i18n("IRC User")),
+ propServer(TQString::tqfromLatin1("ircServer"), i18n("IRC Server")),
+ propChannels( TQString::tqfromLatin1("ircChannels"), i18n("IRC Channels")),
+ propHops(TQString::tqfromLatin1("ircHops"), i18n("IRC Hops")),
+ propFullName(TQString::tqfromLatin1("FormattedName"), i18n("Full Name")),
+ propIsIdentified(TQString::tqfromLatin1("identifiedUser"), i18n("User Is Authenticated"))
{
// kdDebug(14120) << k_funcinfo << endl;
s_protocol = this;
- //m_status = m_unknownStatus = m_Unknown;
+ //m_status = m_unknowntqStatus = m_Unknown;
addAddressBookField("messaging/irc", Kopete::Plugin::MakeIndexField);
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("raw"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("raw"),
TQT_SLOT( slotRawCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /raw <text> - Sends the text in raw form to the server."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("quote"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("quote"),
TQT_SLOT( slotQuoteCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /quote <text> - Sends the text in quoted form to the server."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ctcp"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("ctcp"),
TQT_SLOT( slotCtcpCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ctcp <nick> <message> - Send the CTCP message to nick<action>."), 2 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ping"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("ping"),
TQT_SLOT( slotPingCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ping <nickname> - Alias for /CTCP <nickname> PING."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("motd"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("motd"),
TQT_SLOT( slotMotdCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /motd [<server>] - Shows the message of the day for the current or the given server.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("list"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("list"),
TQT_SLOT( slotListCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /list - List the public channels on the server.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("join"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("join"),
TQT_SLOT( slotJoinCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /join <#channel 1> [<password>] - Joins the specified channel."), 1, 2 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("topic"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("topic"),
TQT_SLOT( slotTopicCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /topic [<topic>] - Sets and/or displays the topic for the active channel.") );
//FIXME: Update help text
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("whois"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("whois"),
TQT_SLOT( slotWhoisCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /whois <nickname> - Display whois info on this user."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("whowas"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("whowas"),
TQT_SLOT( slotWhoWasCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /whowas <nickname> - Display whowas info on this user."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("who"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("who"),
TQT_SLOT( slotWhoCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /who <nickname|channel> - Display who info on this user/channel."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("query"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("query"),
TQT_SLOT( slotQueryCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /query <nickname> [<message>] - Open a private chat with this user."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("mode"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("mode"),
TQT_SLOT( slotModeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /mode <channel> <modes> - Set modes on the given channel."), 2 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("nick"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("nick"),
TQT_SLOT( slotNickCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /nick <nickname> - Change your nickname to the given one."), 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("me"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("me"),
TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /me <action> - Do something."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ame"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("ame"),
TQT_SLOT( slotAllMeCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /ame <action> - Do something in every open chat."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("kick"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("kick"),
TQT_SLOT( slotKickCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /kick <nickname> [<reason>] - Kick someone from the channel (requires operator status).")
, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ban"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("ban"),
TQT_SLOT( slotBanCommand( const TQString &, Kopete::ChatSession*) ),
- i18n("USAGE: /ban <mask> - Add someone to this channel's ban list. (requires operator status)."),
+ i18n("USAGE: /ban <tqmask> - Add someone to this channel's ban list. (requires operator status)."),
1, 1 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("bannick"),
- TQString::fromLatin1("ban %1!*@*"),
- 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()->registerAlias( this, TQString::tqfromLatin1("bannick"),
+ TQString::tqfromLatin1("ban %1!*@*"),
+ i18n("USAGE: /bannick <nickname> - Add someone to this channel's ban list. Uses the hosttqmask nickname!*@* (requires operator status)."), Kopete::CommandHandler::SystemAlias, 1, 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("op"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("op"),
TQT_SLOT( slotOpCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /op <nickname 1> [<nickname 2> <...>] - Give channel operator status to someone (requires operator status)."),
1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("deop"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("deop"),
TQT_SLOT( slotDeopCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /deop <nickname> [<nickname 2> <...>]- Remove channel operator status from someone (requires operator status)."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("voice"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("voice"),
TQT_SLOT( slotVoiceCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /voice <nickname> [<nickname 2> <...>]- Give channel voice status to someone (requires operator status)."),
1);
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("devoice"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("devoice"),
TQT_SLOT( slotDevoiceCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /devoice <nickname> [<nickname 2> <...>]- Remove channel voice status from someone (requires operator status)."), 1 );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("quit"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("quit"),
TQT_SLOT( slotQuitCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /quit [<reason>] - Disconnect from IRC, optionally leaving a message.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("part"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("part"),
TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /part [<reason>] - Part from a channel, optionally leaving a message.") );
- Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("invite"),
+ Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::tqfromLatin1("invite"),
TQT_SLOT( slotInviteCommand( const TQString &, Kopete::ChatSession*) ),
i18n("USAGE: /invite <nickname> [<channel>] - Invite a user to join a channel."), 1 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("j"),
- TQString::fromLatin1("join %1"),
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::tqfromLatin1("j"),
+ TQString::tqfromLatin1("join %1"),
i18n("USAGE: /j <#channel 1> [<password>] - Alias for JOIN."), Kopete::CommandHandler::SystemAlias,
1, 2 );
- Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("msg"),
- TQString::fromLatin1("query %s"),
- i18n("USAGE: /msg <nickname> [<message>] - Alias for QUERY <nickname> <message>."), Kopete::CommandHandler::SystemAlias, 1 );
+ Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::tqfromLatin1("msg"),
+ TQString::tqfromLatin1("query %s"),
+ i18n("USAGE: /msg <nickname> [<message>] - Alias for TQUERY <nickname> <message>."), Kopete::CommandHandler::SystemAlias, 1 );
TQObject::connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL(aboutToDisplay(Kopete::Message &)),
this, TQT_SLOT(slotMessageFilter(Kopete::Message &)) );
@@ -313,7 +313,7 @@ IRCProtocol::~IRCProtocol()
delete m_protocolHandler;
}
-const Kopete::OnlineStatus IRCProtocol::statusLookup( IRCStatus status ) const
+const Kopete::OnlineStatus IRCProtocol::statusLookup( IRCtqStatus status ) const
{
kdDebug(14120) << k_funcinfo << "Looking up status for " << status << endl;
@@ -376,7 +376,7 @@ void IRCProtocol::slotMessageFilter( Kopete::Message &msg )
TQString messageText = msg.escapedBody();
//Add right click for channels, only replace text not in HTML tags
- messageText.replace( TQRegExp( TQString::fromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), TQString::fromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") );
+ messageText.tqreplace( TQRegExp( TQString::tqfromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), TQString::tqfromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") );
msg.setBody( messageText, Kopete::Message::RichText );
}
@@ -391,7 +391,7 @@ TQPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Mes
{
activeNode = n;
activeAccount = static_cast<IRCAccount*>( m.from()->account() );
- if( e.getAttribute( TQString::fromLatin1("type") ) == TQString::fromLatin1("IRCChannel") )
+ if( e.getAttribute( TQString::tqfromLatin1("type") ) == TQString::tqfromLatin1("IRCChannel") )
return activeAccount->contactManager()->findChannel(
e.innerText().string() )->customContextMenuActions();
}
@@ -399,14 +399,14 @@ TQPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Mes
return 0L;
}
-AddContactPage *IRCProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account)
+AddContactPage *IRCProtocol::createAddContactWidget(TQWidget *tqparent, Kopete::Account *account)
{
- return new IRCAddContactPage(parent,static_cast<IRCAccount*>(account));
+ return new IRCAddContactPage(tqparent,static_cast<IRCAccount*>(account));
}
-KopeteEditAccountWidget *IRCProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent)
+KopeteEditAccountWidget *IRCProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *tqparent)
{
- return new IRCEditAccountWidget(this, static_cast<IRCAccount*>(account),parent);
+ return new IRCEditAccountWidget(this, static_cast<IRCAccount*>(account),tqparent);
}
Kopete::Account *IRCProtocol::createNewAccount(const TQString &accountId)
@@ -480,7 +480,7 @@ void IRCProtocol::slotCtcpCommand( const TQString &args, Kopete::ChatSession *ma
{
TQString user = args.section( ' ', 0, 0 );
TQString message = args.section( ' ', 1 );
- static_cast<IRCAccount*>( manager->account() )->engine()->writeCtcpQueryMessage( user, TQString::null, message );
+ static_cast<IRCAccount*>( manager->account() )->engine()->writeCtcpQueryMessage( user, TQString(), message );
}
}
@@ -512,7 +512,7 @@ void IRCProtocol::slotTopicCommand( const TQString &args, Kopete::ChatSession *m
else
{
static_cast<IRCAccount*>(manager->account())->engine()->
- writeRawMessage(TQString::fromLatin1("TOPIC %1").arg(chan->nickName()));
+ writeRawMessage(TQString::tqfromLatin1("TOPIC %1").tqarg(chan->nickName()));
}
}
else
@@ -536,7 +536,7 @@ void IRCProtocol::slotJoinCommand( const TQString &arg, Kopete::ChatSession *man
{
static_cast<IRCAccount*>( manager->account() )->appendMessage(
i18n("\"%1\" is an invalid channel. Channels must start with '#', '!', '+', or '&'.")
- .arg(args[0]), IRCAccount::ErrorReply );
+ .tqarg(args[0]), IRCAccount::ErrorReply );
}
}
@@ -556,7 +556,7 @@ void IRCProtocol::slotInviteCommand( const TQString &args, Kopete::ChatSession *
{
static_cast<IRCAccount*>( manager->account() )->appendMessage(
i18n("\"%1\" is an invalid channel. Channels must start with '#', '!', '+', or '&'.")
- .arg(argsList[1]), IRCAccount::ErrorReply );
+ .tqarg(argsList[1]), IRCAccount::ErrorReply );
}
}
else
@@ -568,7 +568,7 @@ void IRCProtocol::slotInviteCommand( const TQString &args, Kopete::ChatSession *
if( c && c->manager()->contactOnlineStatus( manager->myself() ) == m_UserStatusOp )
{
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- TQString::fromLatin1("INVITE %1 %2").arg( argsList[0] ).
+ TQString::tqfromLatin1("INVITE %1 %2").tqarg( argsList[0] ).
arg( c->nickName() )
);
}
@@ -599,7 +599,7 @@ void IRCProtocol::slotQueryCommand( const TQString &args, Kopete::ChatSession *m
else
{
static_cast<IRCAccount*>( manager->account() )->appendMessage(
- i18n("\"%1\" is an invalid nickname. Nicknames must not start with '#','!','+', or '&'.").arg(user),
+ i18n("\"%1\" is an invalid nickname. Nicknames must not start with '#','!','+', or '&'.").tqarg(user),
IRCAccount::ErrorReply );
}
}
@@ -614,7 +614,7 @@ void IRCProtocol::slotWhoCommand( const TQString &args, Kopete::ChatSession *man
{
TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- TQString::fromLatin1("WHO %1").arg( argsList.first() ) );
+ TQString::tqfromLatin1("WHO %1").tqarg( argsList.first() ) );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
@@ -622,7 +622,7 @@ void IRCProtocol::slotWhoWasCommand( const TQString &args, Kopete::ChatSession *
{
TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage(
- TQString::fromLatin1("WHOWAS %1").arg( argsList.first() ) );
+ TQString::tqfromLatin1("WHOWAS %1").tqarg( argsList.first() ) );
static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager );
}
@@ -641,7 +641,7 @@ void IRCProtocol::slotModeCommand(const TQString &args, Kopete::ChatSession *man
{
TQStringList argsList = Kopete::CommandHandler::parseArguments( args );
static_cast<IRCAccount*>( manager->account() )->engine()->mode( argsList.front(),
- args.section( TQRegExp(TQString::fromLatin1("\\s+")), 1 ) );
+ args.section( TQRegExp(TQString::tqfromLatin1("\\s+")), 1 ) );
}
void IRCProtocol::slotMeCommand(const TQString &args, Kopete::ChatSession *manager)
@@ -668,7 +668,7 @@ void IRCProtocol::slotKickCommand(const TQString &args, Kopete::ChatSession *man
{
if (manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp)
{
- TQRegExp spaces(TQString::fromLatin1("\\s+"));
+ TQRegExp spaces(TQString::tqfromLatin1("\\s+"));
TQString nick = args.section( spaces, 0, 0);
TQString reason = args.section( spaces, 1);
Kopete::ContactPtrList members = manager->members();
@@ -691,7 +691,7 @@ void IRCProtocol::slotBanCommand( const TQString &args, Kopete::ChatSession *man
Kopete::ContactPtrList members = manager->members();
IRCChannelContact *chan = static_cast<IRCChannelContact*>( members.first() );
if( chan && chan->locateUser( argsList.front() ) )
- chan->setMode( TQString::fromLatin1("+b %1").arg( argsList.front() ) );
+ chan->setMode( TQString::tqfromLatin1("+b %1").tqarg( argsList.front() ) );
}
else
{
@@ -724,22 +724,22 @@ void IRCProtocol::slotPartCommand( const TQString &args, Kopete::ChatSession *ma
void IRCProtocol::slotOpCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, TQString::fromLatin1("+o") );
+ simpleModeChange( args, manager, TQString::tqfromLatin1("+o") );
}
void IRCProtocol::slotDeopCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, TQString::fromLatin1("-o") );
+ simpleModeChange( args, manager, TQString::tqfromLatin1("-o") );
}
void IRCProtocol::slotVoiceCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, TQString::fromLatin1("+v") );
+ simpleModeChange( args, manager, TQString::tqfromLatin1("+v") );
}
void IRCProtocol::slotDevoiceCommand( const TQString &args, Kopete::ChatSession *manager )
{
- simpleModeChange( args, manager, TQString::fromLatin1("-v") );
+ simpleModeChange( args, manager, TQString::tqfromLatin1("-v") );
}
void IRCProtocol::simpleModeChange( const TQString &args, Kopete::ChatSession *manager, const TQString &mode )
@@ -754,7 +754,7 @@ void IRCProtocol::simpleModeChange( const TQString &args, Kopete::ChatSession *m
for( TQStringList::iterator it = argsList.begin(); it != argsList.end(); ++it )
{
if( chan->locateUser( *it ) )
- chan->setMode( TQString::fromLatin1("%1 %2").arg( mode ).arg( *it ) );
+ chan->setMode( TQString::tqfromLatin1("%1 %2").tqarg( mode ).tqarg( *it ) );
}
}
}
@@ -770,7 +770,7 @@ void IRCProtocol::editNetworks( const TQString &networkName )
if( !netConf )
{
netConf = new NetworkConfig( Kopete::UI::Global::mainWidget(), "network_config", true );
- netConf->host->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[\\w-\\.]*$"), netConf ) );
+ netConf->host->setValidator( new TQRegExpValidator( TQString::tqfromLatin1("^[\\w-\\.]*$"), TQT_TQOBJECT(netConf) ) );
netConf->upButton->setIconSet( SmallIconSet( "up" ) );
netConf->downButton->setIconSet( SmallIconSet( "down" ) );
@@ -807,7 +807,7 @@ void IRCProtocol::editNetworks( const TQString &networkName )
connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
if( !networkName.isEmpty() )
- netConf->networkList->setSelected( netConf->networkList->findItem( networkName ), true );
+ netConf->networkList->setSelected( netConf->networkList->tqfindItem( networkName ), true );
//slotUpdateNetworkConfig(); // unnecessary, setSelected emits selectionChanged
@@ -827,7 +827,7 @@ void IRCProtocol::slotUpdateNetworkConfig()
netConf->hostList->clear();
for( TQValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it )
- netConf->hostList->insertItem( (*it)->host + TQString::fromLatin1(":") + TQString::number((*it)->port) );
+ netConf->hostList->insertItem( (*it)->host + TQString::tqfromLatin1(":") + TQString::number((*it)->port) );
// prevent nested event loop crash
disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
@@ -871,7 +871,7 @@ void IRCProtocol::storeCurrentHost()
void IRCProtocol::slotHostPortChanged( int value )
{
- TQString entryText = m_uiCurrentHostSelection + TQString::fromLatin1(":") + TQString::number( value );
+ TQString entryText = m_uiCurrentHostSelection + TQString::tqfromLatin1(":") + TQString::number( value );
// changeItem causes a take() and insert, and we don't want a selectionChanged() signal that sets all this off again.
disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
netConf->hostList->changeItem( entryText, netConf->hostList->currentItem() );
@@ -918,8 +918,8 @@ void IRCProtocol::slotDeleteNetwork()
if( KMessageBox::warningContinueCancel(
Kopete::UI::Global::mainWidget(), i18n("<qt>Are you sure you want to delete the network <b>%1</b>?<br>"
"Any accounts which use this network will have to be modified.</qt>")
- .arg(network), i18n("Deleting Network"),
- KGuiItem(i18n("&Delete Network"),"editdelete"), TQString::fromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue )
+ .tqarg(network), i18n("Deleting Network"),
+ KGuiItem(i18n("&Delete Network"),"editdelete"), TQString::tqfromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue )
{
disconnect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) );
disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
@@ -944,15 +944,15 @@ void IRCProtocol::slotDeleteHost()
TQString hostName = netConf->host->text();
if ( KMessageBox::warningContinueCancel(
Kopete::UI::Global::mainWidget(), i18n("<qt>Are you sure you want to delete the host <b>%1</b>?</qt>")
- .arg(hostName), i18n("Deleting Host"),
- KGuiItem(i18n("&Delete Host"),"editdelete"), TQString::fromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue )
+ .tqarg(hostName), i18n("Deleting Host"),
+ KGuiItem(i18n("&Delete Host"),"editdelete"), TQString::tqfromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue )
{
IRCHost *host = m_hosts[ hostName ];
if ( host )
{
disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
- TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port);
- TQListBoxItem * justAdded = netConf->hostList->findItem( entryText );
+ TQString entryText = host->host + TQString::tqfromLatin1(":") + TQString::number(host->port);
+ TQListBoxItem * justAdded = netConf->hostList->tqfindItem( entryText );
netConf->hostList->removeItem( netConf->hostList->index( justAdded ) );
connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) );
@@ -971,14 +971,14 @@ void IRCProtocol::slotNewNetwork()
// create a new network struct
IRCNetwork *net = new IRCNetwork;
// give it the name of 'New Network' (incrementing number if needed)
- TQString netName = TQString::fromLatin1( "New Network" );
- if ( m_networks.find( netName ) )
+ TQString netName = TQString::tqfromLatin1( "New Network" );
+ if ( m_networks.tqfind( netName ) )
{
int newIdx = 1;
do {
- netName = TQString::fromLatin1( "New Network #%1" ).arg( newIdx++ );
+ netName = TQString::tqfromLatin1( "New Network #%1" ).tqarg( newIdx++ );
}
- while ( m_networks.find( netName ) && newIdx < 100 );
+ while ( m_networks.tqfind( netName ) && newIdx < 100 );
if ( newIdx == 100 ) // pathological case
return;
}
@@ -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 );
- TQListBoxItem * justAdded = netConf->networkList->findItem( net->name );
+ TQListBoxItem * justAdded = netConf->networkList->tqfindItem( net->name );
netConf->networkList->setSelected( justAdded, true );
netConf->networkList->setBottomItem( netConf->networkList->index( justAdded ) );
}
@@ -1000,7 +1000,7 @@ void IRCProtocol::slotNewHost()
TQString name = KInputDialog::getText(
i18n("New Host"),
i18n("Enter the hostname of the new server:"),
- TQString::null, &ok, Kopete::UI::Global::mainWidget() );
+ TQString(), &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
- TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port);
+ TQString entryText = host->host + TQString::tqfromLatin1(":") + TQString::number(host->port);
netConf->hostList->insertItem( entryText );
// select it in the gui
- TQListBoxItem * justAdded = netConf->hostList->findItem( entryText );
+ TQListBoxItem * justAdded = netConf->hostList->tqfindItem( entryText );
netConf->hostList->setSelected( justAdded, true );
//netConf->hostList->setBottomItem( netConf->hostList->index( justAdded ) );
}
@@ -1056,7 +1056,7 @@ void IRCProtocol::slotRenameNetwork()
m_networks.remove( m_uiCurrentNetworkSelection );
m_networks.insert( net->name, net );
// ui
- int idx = netConf->networkList->index( netConf->networkList->findItem( m_uiCurrentNetworkSelection ) );
+ int idx = netConf->networkList->index( netConf->networkList->tqfindItem( m_uiCurrentNetworkSelection ) );
m_uiCurrentNetworkSelection = net->name;
netConf->networkList->changeItem( net->name, idx ); // changes the selection!!!
netConf->networkList->sort();
@@ -1190,7 +1190,7 @@ void IRCProtocol::slotMoveServerUp()
if( !selectedNetwork || !selectedHost )
return;
- TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
+ TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.tqfind( selectedHost );
if( pos != selectedNetwork->hosts.begin() )
{
TQValueList<IRCHost*>::iterator lastPos = pos;
@@ -1203,7 +1203,7 @@ void IRCProtocol::slotMoveServerUp()
if( currentPos > 0 )
{
netConf->hostList->removeItem( currentPos );
- TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port );
+ TQString entryText = selectedHost->host + TQString::tqfromLatin1(":") + TQString::number( selectedHost->port );
netConf->hostList->insertItem( entryText, --currentPos );
netConf->hostList->setSelected( currentPos, true );
}
@@ -1217,7 +1217,7 @@ void IRCProtocol::slotMoveServerDown()
if( !selectedNetwork || !selectedHost )
return;
- TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost );
+ TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.tqfind( selectedHost );
if( *pos != selectedNetwork->hosts.back() )
{
TQValueList<IRCHost*>::iterator nextPos = selectedNetwork->hosts.remove( pos );
@@ -1228,7 +1228,7 @@ void IRCProtocol::slotMoveServerDown()
if( currentPos < ( netConf->hostList->count() - 1 ) )
{
netConf->hostList->removeItem( currentPos );
- TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port );
+ TQString entryText = selectedHost->host + TQString::tqfromLatin1(":") + TQString::number( selectedHost->port );
netConf->hostList->insertItem( entryText, ++currentPos );
netConf->hostList->setSelected( currentPos, true );
}
diff --git a/kopete/protocols/irc/ircprotocol.h b/kopete/protocols/irc/ircprotocol.h
index 0151f900..61a810fd 100644
--- a/kopete/protocols/irc/ircprotocol.h
+++ b/kopete/protocols/irc/ircprotocol.h
@@ -56,7 +56,7 @@ class IRCProtocolHandler : public Kopete::MimeTypeHandler
void handleURL( const KURL &url ) const;
};
-static const TQString CHAT_VIEW( TQString::fromLatin1("kopete_chatwindow") );
+static const TQString CHAT_VIEW( TQString::tqfromLatin1("kopete_chatwindow") );
/**
* @author Nick Betcher <nbetcher@kde.org>
@@ -64,9 +64,10 @@ static const TQString CHAT_VIEW( TQString::fromLatin1("kopete_chatwindow") );
class IRCProtocol : public Kopete::Protocol
{
Q_OBJECT
+ TQ_OBJECT
public:
- enum IRCStatus
+ enum IRCtqStatus
{
Offline = 1, //! An offline user.
Connecting = 2, //! User that is connecting.
@@ -81,11 +82,11 @@ public:
OnlineServer = 32768 //! This server is online.
};
- IRCProtocol( TQObject *parent, const char *name, const TQStringList &args );
+ IRCProtocol( TQObject *tqparent, const char *name, const TQStringList &args );
~IRCProtocol();
/** Kopete::Protocol reimplementation */
- virtual AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *account);
+ virtual AddContactPage *createAddContactWidget(TQWidget *tqparent, Kopete::Account *account);
/**
* Deserialize contact data
@@ -93,7 +94,7 @@ public:
virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact,
const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> &addressBookData );
- virtual KopeteEditAccountWidget* createEditAccountWidget(Kopete::Account *account, TQWidget *parent);
+ virtual KopeteEditAccountWidget* createEditAccountWidget(Kopete::Account *account, TQWidget *tqparent);
virtual Kopete::Account* createNewAccount(const TQString &accountId);
@@ -104,7 +105,7 @@ public:
/**
* Maps the given IRC status to Kopete::OnlineStatus.
*/
- const Kopete::OnlineStatus statusLookup( IRCStatus status ) const;
+ const Kopete::OnlineStatus statusLookup( IRCtqStatus status ) const;
const Kopete::OnlineStatus m_ServerStatusOnline;
const Kopete::OnlineStatus m_ServerStatusOffline;
@@ -145,7 +146,7 @@ public:
TQDict<IRCNetwork> &networks(){ return m_networks; }
void addNetwork( IRCNetwork *network );
- void editNetworks( const TQString &networkName = TQString::null );
+ void editNetworks( const TQString &networkName = TQString() );
signals:
void networkConfigUpdated( const TQString &selectedNetwork );
diff --git a/kopete/protocols/irc/ircservercontact.cpp b/kopete/protocols/irc/ircservercontact.cpp
index 5be40dff..3200d72d 100644
--- a/kopete/protocols/irc/ircservercontact.cpp
+++ b/kopete/protocols/irc/ircservercontact.cpp
@@ -63,12 +63,12 @@ IRCServerContact::IRCServerContact(IRCContactManager *contactManager, const TQSt
TQObject::connect(Kopete::ChatSessionManager::self(), TQT_SIGNAL(viewCreated(KopeteView*)),
this, TQT_SLOT(slotViewCreated(KopeteView*)) );
- updateStatus();
+ updatetqStatus();
}
-void IRCServerContact::updateStatus()
+void IRCServerContact::updatetqStatus()
{
- KIRC::Engine::Status status = kircEngine()->status();
+ KIRC::Engine::tqStatus status = kircEngine()->status();
switch( status )
{
case KIRC::Engine::Idle:
@@ -92,7 +92,7 @@ void IRCServerContact::updateStatus()
const TQString IRCServerContact::caption() const
{
- return i18n("%1 @ %2").arg(ircAccount()->mySelf()->nickName() ).arg(
+ return i18n("%1 @ %2").tqarg(ircAccount()->mySelf()->nickName() ).tqarg(
kircEngine()->currentHost().isEmpty() ? ircAccount()->networkName() : kircEngine()->currentHost()
);
}
@@ -147,21 +147,21 @@ void IRCServerContact::slotIncomingNotice( const TQString &orig, const TQString
// Prefix missing.
// NOTICE AUTH :*** Checking Ident
- ircAccount()->appendMessage(i18n("NOTICE from %1: %2").arg(kircEngine()->currentHost(), notice),
+ ircAccount()->appendMessage(i18n("NOTICE from %1: %2").tqarg(kircEngine()->currentHost(), notice),
IRCAccount::NoticeReply);
} else {
// :Global!service@rizon.net NOTICE foobar :[Logon News - Oct 12 2005] Due to growing problems ...
// :somenick!~fooobar@somehostname.fi NOTICE foobar :hello
- if (orig.contains('!')) {
- ircAccount()->appendMessage(i18n("NOTICE from %1 (%2): %3").arg(
+ if (orig.tqcontains('!')) {
+ ircAccount()->appendMessage(i18n("NOTICE from %1 (%2): %3").tqarg(
orig.section('!', 0, 0),
orig.section('!', 1, 1),
notice),
IRCAccount::NoticeReply);
} else {
- ircAccount()->appendMessage(i18n("NOTICE from %1: %2").arg(
+ ircAccount()->appendMessage(i18n("NOTICE from %1: %2").tqarg(
orig, notice), IRCAccount::NoticeReply);
}
}
@@ -184,7 +184,7 @@ void IRCServerContact::slotIncomingMotd(const TQString &message)
void IRCServerContact::slotCannotSendToChannel(const TQString &channel, const TQString &message)
{
- ircAccount()->appendMessage(TQString::fromLatin1("%1: %2").arg(channel).arg(message), IRCAccount::ErrorReply);
+ ircAccount()->appendMessage(TQString::tqfromLatin1("%1: %2").tqarg(channel).tqarg(message), IRCAccount::ErrorReply);
}
void IRCServerContact::appendMessage(Kopete::Message &msg)
diff --git a/kopete/protocols/irc/ircservercontact.h b/kopete/protocols/irc/ircservercontact.h
index 4d9e378d..b715a65b 100644
--- a/kopete/protocols/irc/ircservercontact.h
+++ b/kopete/protocols/irc/ircservercontact.h
@@ -45,6 +45,7 @@ class IRCServerContact
: public IRCContact
{
Q_OBJECT
+ TQ_OBJECT
public:
// This class provides a Kopete::Contact for each server of a given IRC connection.
@@ -60,7 +61,7 @@ class IRCServerContact
virtual void slotSendMsg(Kopete::Message &message, Kopete::ChatSession *);
private slots:
- virtual void updateStatus();
+ virtual void updatetqStatus();
void slotViewCreated( KopeteView* );
void slotDumpMessages();
diff --git a/kopete/protocols/irc/ircsignalhandler.h b/kopete/protocols/irc/ircsignalhandler.h
index 57732e07..2571a897 100644
--- a/kopete/protocols/irc/ircsignalhandler.h
+++ b/kopete/protocols/irc/ircsignalhandler.h
@@ -45,11 +45,11 @@
* up the contact it is for, and call the function passed into the class by the
* mapping function.
*
-* Since QObjects cannot be inside templates, the QMember classes that connect
+* Since TQObjects cannot be inside templates, the TQMember classes that connect
* to the slots are seperate.
*/
-/*** Pre-declare mapping types for the QObjects **/
+/*** Pre-declare mapping types for the TQObjects **/
struct IRCSignalMappingBase{};
struct IRCSignalMappingT : IRCSignalMappingBase
@@ -81,12 +81,13 @@ TQObject members, these connect to the KIRC signals and call
the Mapping functions when they emit.
**/
-class QMember : public QObject
+class TQMember : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- QMember( IRCSignalMappingT *m, TQObject *p ) : TQObject( p ), mapping( m ){};
+ TQMember( IRCSignalMappingT *m, TQObject *p ) : TQObject( p ), mapping( m ){};
public slots:
void slotEmit( const TQString &id )
@@ -99,12 +100,13 @@ class QMember : public QObject
IRCSignalMappingT *mapping;
};
-class QMemberSingle : public QObject
+class TQMemberSingle : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- QMemberSingle( IRCSignalMappingSingleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
+ TQMemberSingle( IRCSignalMappingSingleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
public slots:
void slotEmit( const TQString &id, const TQString &arg )
@@ -117,12 +119,13 @@ class QMemberSingle : public QObject
IRCSignalMappingSingleT *mapping;
};
-class QMemberDouble : public QObject
+class TQMemberDouble : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- QMemberDouble( IRCSignalMappingDoubleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
+ TQMemberDouble( IRCSignalMappingDoubleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
public slots:
void slotEmit( const TQString &id, const TQString &arg, const TQString &arg2 )
@@ -135,12 +138,13 @@ class QMemberDouble : public QObject
IRCSignalMappingDoubleT *mapping;
};
-class QMemberTriple : public QObject
+class TQMemberTriple : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- QMemberTriple( IRCSignalMappingTripleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
+ TQMemberTriple( IRCSignalMappingTripleT *m, TQObject *p ) : TQObject( p ), mapping( m ){}
public slots:
void slotEmit( const TQString &id, const TQString &arg, const TQString &arg2, const TQString &arg3 )
@@ -250,9 +254,10 @@ class IRCSignalMappingTriple : public IRCSignalMappingTripleT
void (TClass::*method)(const TQString &,const TQString &,const TQString &);
};
-class IRCSignalHandler : public QObject
+class IRCSignalHandler : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
IRCSignalHandler( IRCContactManager *manager );
@@ -288,7 +293,7 @@ class IRCSignalHandler : public QObject
IRCSignalMappingT *mapping = new IRCSignalMapping<TClass>( m, signal, method );
mappings.append(mapping);
TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
- new QMember( mapping, this),
+ new TQMember( mapping, this),
TQT_SLOT( slotEmit( const TQString &) )
);
}
@@ -300,7 +305,7 @@ class IRCSignalHandler : public QObject
IRCSignalMappingSingleT *mapping = new IRCSignalMappingSingle<TClass>( m, signal, method );
mappings.append(mapping);
TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
- new QMemberSingle( mapping, this),
+ new TQMemberSingle( mapping, this),
TQT_SLOT( slotEmit( const TQString &, const TQString &) )
);
}
@@ -312,7 +317,7 @@ class IRCSignalHandler : public QObject
IRCSignalMappingDoubleT *mapping = new IRCSignalMappingDouble<TClass>( m, signal, method );
mappings.append(mapping);
TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
- new QMemberDouble( mapping, this),
+ new TQMemberDouble( mapping, this),
TQT_SLOT( slotEmit( const TQString &, const TQString &,const TQString &) )
);
}
@@ -325,7 +330,7 @@ class IRCSignalHandler : public QObject
IRCSignalMappingTripleT *mapping = new IRCSignalMappingTriple<TClass>( m, signal, method );
mappings.append(mapping);
TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal,
- new QMemberTriple( mapping, this),
+ new TQMemberTriple( mapping, this),
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 e579e94a..f4b5af10 100644
--- a/kopete/protocols/irc/irctransferhandler.cpp
+++ b/kopete/protocols/irc/irctransferhandler.cpp
@@ -164,7 +164,7 @@ void IRCTransferHandler::kioresult(KIO::Job *job)
// if (t->)
// kt->userAbort(i18n("User canceled transfer."));
// else
-// kt->userAbort(i18n("User canceled transfer for file:%1").arg(t->fileName()));
+// kt->userAbort(i18n("User canceled transfer for file:%1").tqarg(t->fileName()));
break;
default:
kdDebug(14120) << k_funcinfo << "Transfer halted:" << kt->error() << endl;
diff --git a/kopete/protocols/irc/irctransferhandler.h b/kopete/protocols/irc/irctransferhandler.h
index 7847464c..d5a76bd4 100644
--- a/kopete/protocols/irc/irctransferhandler.h
+++ b/kopete/protocols/irc/irctransferhandler.h
@@ -34,9 +34,10 @@ class TransferHandler;
}
class IRCTransferHandler
- : public QObject
+ : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
static IRCTransferHandler *self();
diff --git a/kopete/protocols/irc/ircusercontact.cpp b/kopete/protocols/irc/ircusercontact.cpp
index 24e46c57..2c039e94 100644
--- a/kopete/protocols/irc/ircusercontact.cpp
+++ b/kopete/protocols/irc/ircusercontact.cpp
@@ -53,39 +53,39 @@ IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const TQString
mInfo.away = false;
mInfo.online = metaContact()->isTemporary();
- updateStatus();
+ updatetqStatus();
}
-void IRCUserContact::updateStatus()
+void IRCUserContact::updatetqStatus()
{
//kdDebug(14120) << k_funcinfo << endl;
- Kopete::OnlineStatus newStatus;
+ Kopete::OnlineStatus newtqStatus;
switch (kircEngine()->status())
{
case KIRC::Engine::Idle:
- newStatus = m_protocol->m_UserStatusOffline;
+ newtqStatus = m_protocol->m_UserStatusOffline;
break;
case KIRC::Engine::Connecting:
case KIRC::Engine::Authentifying:
if (this == ircAccount()->mySelf())
- newStatus = m_protocol->m_UserStatusConnecting;
+ newtqStatus = m_protocol->m_UserStatusConnecting;
else
- newStatus = m_protocol->m_UserStatusOffline;
+ newtqStatus = m_protocol->m_UserStatusOffline;
break;
case KIRC::Engine::Connected:
case KIRC::Engine::Closing:
if (mInfo.away)
- newStatus = m_protocol->m_UserStatusAway;
+ newtqStatus = m_protocol->m_UserStatusAway;
else if (mInfo.online)
- newStatus = m_protocol->m_UserStatusOnline;
+ newtqStatus = m_protocol->m_UserStatusOnline;
break;
default:
- newStatus = m_protocol->m_StatusUnknown;
+ newtqStatus = m_protocol->m_StatusUnknown;
}
// Try hard not to emit several onlineStatusChanged() signals.
@@ -105,31 +105,31 @@ void IRCUserContact::updateStatus()
for( TQValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it )
{
IRCChannelContact *channel = *it;
- Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this);
+ Kopete::OnlineStatus currenttqStatus = channel->manager()->contactOnlineStatus(this);
- //kdDebug(14120) << k_funcinfo << "iterating channel " << channel->nickName() << " internal status: " << currentStatus.internalStatus() << endl;
+ //kdDebug(14120) << k_funcinfo << "iterating channel " << channel->nickName() << " internal status: " << currenttqStatus.internalStatus() << endl;
- if( currentStatus.internalStatus() >= IRCProtocol::Online )
+ if( currenttqStatus.internalStatus() >= IRCProtocol::Online )
{
onlineStatusChanged = true;
- if( !(currentStatus.internalStatus() & IRCProtocol::Away) && newStatus == m_protocol->m_UserStatusAway )
+ if( !(currenttqStatus.internalStatus() & IRCProtocol::Away) && newtqStatus == m_protocol->m_UserStatusAway )
{
- setOnlineStatus( newStatus );
+ setOnlineStatus( newtqStatus );
//kdDebug(14120) << k_funcinfo << "was NOT away, but is now, channel " << channel->nickName() << endl;
adjustInternalOnlineStatusBits(channel, IRCProtocol::Away, AddBits);
}
- else if( (currentStatus.internalStatus() & IRCProtocol::Away) && newStatus == m_protocol->m_UserStatusOnline )
+ else if( (currenttqStatus.internalStatus() & IRCProtocol::Away) && newtqStatus == m_protocol->m_UserStatusOnline )
{
- setOnlineStatus( newStatus );
+ setOnlineStatus( newtqStatus );
//kdDebug(14120) << k_funcinfo << "was away, but not anymore, channel " << channel->nickName() << endl;
adjustInternalOnlineStatusBits(channel, IRCProtocol::Away, RemoveBits);
}
- else if( newStatus.internalStatus() < IRCProtocol::Away )
+ else if( newtqStatus.internalStatus() < IRCProtocol::Away )
{
//kdDebug(14120) << k_funcinfo << "offline or connecting?" << endl;
- channel->manager()->setContactOnlineStatus( this, newStatus );
+ channel->manager()->setContactOnlineStatus( this, newtqStatus );
}
}
}
@@ -137,7 +137,7 @@ void IRCUserContact::updateStatus()
if (!onlineStatusChanged) {
//kdDebug(14120) << k_funcinfo << "setting status at last" << endl;
- setOnlineStatus( newStatus );
+ setOnlineStatus( newtqStatus );
}
}
@@ -147,7 +147,7 @@ void IRCUserContact::sendFile(const KURL &sourceURL, const TQString&, unsigned i
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
- filePath = KFileDialog::getOpenFileName(TQString::null, "*", 0l , i18n("Kopete File Transfer"));
+ filePath = KFileDialog::getOpenFileName(TQString(), "*", 0l , i18n("Kopete File Transfer"));
else
filePath = sourceURL.path(-1);
@@ -162,10 +162,10 @@ void IRCUserContact::slotUserOffline()
mInfo.online = false;
mInfo.away = false;
- updateStatus();
+ updatetqStatus();
if( !metaContact()->isTemporary() )
- kircEngine()->writeMessage( TQString::fromLatin1("WHOWAS %1").arg(m_nickName) );
+ kircEngine()->writeMessage( TQString::tqfromLatin1("WHOWAS %1").tqarg(m_nickName) );
removeProperty( m_protocol->propUserInfo );
removeProperty( m_protocol->propServer );
@@ -177,7 +177,7 @@ void IRCUserContact::setAway(bool isAway)
//kdDebug(14120) << k_funcinfo << isAway << endl;
mInfo.away = isAway;
- updateStatus();
+ updatetqStatus();
}
void IRCUserContact::incomingUserIsAway(const TQString &reason)
@@ -185,7 +185,7 @@ void IRCUserContact::incomingUserIsAway(const TQString &reason)
if( manager( Kopete::Contact::CannotCreate ) )
{
Kopete::Message msg( (Kopete::Contact*)ircAccount()->myServer(), mMyself,
- i18n("%1 is away (%2)").arg( m_nickName ).arg( reason ),
+ i18n("%1 is away (%2)").tqarg( m_nickName ).tqarg( reason ),
Kopete::Message::Internal, Kopete::Message::RichText, CHAT_VIEW );
manager(Kopete::Contact::CanCreate)->appendMessage(msg);
}
@@ -194,7 +194,7 @@ void IRCUserContact::incomingUserIsAway(const TQString &reason)
void IRCUserContact::userOnline()
{
mInfo.online = true;
- updateStatus();
+ updatetqStatus();
if (this != ircAccount()->mySelf() && !metaContact()->isTemporary() && ircAccount()->isConnected())
{
mOnlineTimer->start( 45000, true );
@@ -216,27 +216,27 @@ void IRCUserContact::slotUserInfo()
const TQString IRCUserContact::caption() const
{
- return i18n("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost());
+ return i18n("%1 @ %2").tqarg(m_nickName).tqarg(kircEngine()->currentHost());
}
void IRCUserContact::slotOp()
{
- contactMode( TQString::fromLatin1("+o") );
+ contactMode( TQString::tqfromLatin1("+o") );
}
void IRCUserContact::slotDeop()
{
- contactMode( TQString::fromLatin1("-o") );
+ contactMode( TQString::tqfromLatin1("-o") );
}
void IRCUserContact::slotVoice()
{
- contactMode( TQString::fromLatin1("+v") );
+ contactMode( TQString::tqfromLatin1("+v") );
}
void IRCUserContact::slotDevoice()
{
- contactMode( TQString::fromLatin1("-v") );
+ contactMode( TQString::tqfromLatin1("-v") );
}
void IRCUserContact::slotBanHost()
@@ -260,7 +260,7 @@ void IRCUserContact::slotBanHostOnce()
Kopete::ContactPtrList members = mActiveManager->members();
TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@%1").arg(mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*@%1").tqarg(mInfo.hostName));
}
void IRCUserContact::slotBanUserHost()
@@ -284,7 +284,7 @@ void IRCUserContact::slotBanUserHostOnce()
Kopete::ContactPtrList members = mActiveManager->members();
TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*%1@%2").tqarg(mInfo.userName, mInfo.hostName));
}
void IRCUserContact::slotBanDomain()
@@ -310,7 +310,7 @@ void IRCUserContact::slotBanDomainOnce()
TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@*.%1").arg(domain));
+ kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*@*.%1").tqarg(domain));
}
void IRCUserContact::slotBanUserDomain()
@@ -336,21 +336,21 @@ void IRCUserContact::slotBanUserDomainOnce()
TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain));
+ kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*%1@*.%2").tqarg(mInfo.userName, domain));
}
void IRCUserContact::slotKick()
{
Kopete::ContactPtrList members = mActiveManager->members();
TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->kick(m_nickName, channelName, TQString::null);
+ kircEngine()->kick(m_nickName, channelName, TQString());
}
void IRCUserContact::contactMode(const TQString &mode)
{
Kopete::ContactPtrList members = mActiveManager->members();
TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, TQString::fromLatin1("%1 %2").arg(mode).arg(m_nickName));
+ kircEngine()->mode(channelName, TQString::tqfromLatin1("%1 %2").tqarg(mode).tqarg(m_nickName));
}
void IRCUserContact::slotCtcpPing()
@@ -370,10 +370,10 @@ void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &host
mInfo.hostName = hostname;
mInfo.realName = realname;
- if( onlineStatus().status() == Kopete::OnlineStatus::Offline )
+ if( onlinetqStatus().status() == Kopete::OnlineStatus::Offline )
{
- setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
- .arg(mInfo.userName).arg(mInfo.hostName) );
+ setProperty( m_protocol->propUserInfo, TQString::tqfromLatin1("%1@%2")
+ .tqarg(mInfo.userName).tqarg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propFullName, mInfo.realName );
}
@@ -382,8 +382,8 @@ void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &host
void IRCUserContact::newWhoIsServer(const TQString &servername, const TQString &serverinfo)
{
mInfo.serverName = servername;
- if( metaContact()->isTemporary() || onlineStatus().status() == Kopete::OnlineStatus::Online
- || onlineStatus().status() == Kopete::OnlineStatus::Away )
+ if( metaContact()->isTemporary() || onlinetqStatus().status() == Kopete::OnlineStatus::Online
+ || onlinetqStatus().status() == Kopete::OnlineStatus::Away )
mInfo.serverInfo = serverinfo;
else
{
@@ -433,26 +433,26 @@ void IRCUserContact::whoIsComplete()
{
//User info
TQString msg = i18n("%1 is (%2@%3): %4<br/>")
- .arg(m_nickName)
- .arg(mInfo.userName)
- .arg(mInfo.hostName)
- .arg(mInfo.realName);
+ .tqarg(m_nickName)
+ .tqarg(mInfo.userName)
+ .tqarg(mInfo.hostName)
+ .tqarg(mInfo.realName);
if( mInfo.isIdentified )
- msg += i18n("%1 is authenticated with NICKSERV<br/>").arg(m_nickName);
+ msg += i18n("%1 is authenticated with NICKSERV<br/>").tqarg(m_nickName);
if( mInfo.isOperator )
- msg += i18n("%1 is an IRC operator<br/>").arg(m_nickName);
+ msg += i18n("%1 is an IRC operator<br/>").tqarg(m_nickName);
//Channels
- msg += i18n("on channels %1<br/>").arg(mInfo.channels.join(" ; "));
+ msg += i18n("on channels %1<br/>").tqarg(mInfo.channels.join(" ; "));
//Server
- msg += i18n("on IRC via server %1 ( %2 )<br/>").arg(mInfo.serverName).arg(mInfo.serverInfo);
+ msg += i18n("on IRC via server %1 ( %2 )<br/>").tqarg(mInfo.serverName).tqarg(mInfo.serverInfo);
//Idle
TQString idleTime = formattedIdleTime();
- msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? TQString::number(0) : idleTime );
+ msg += i18n("idle: %2<br/>").tqarg( idleTime.isEmpty() ? TQString::number(0) : idleTime );
//End
ircAccount()->appendMessage(msg, IRCAccount::InfoReply );
@@ -466,12 +466,12 @@ void IRCUserContact::whoWasComplete()
{
//User info
TQString msg = i18n("%1 was (%2@%3): %4\n")
- .arg(m_nickName)
- .arg(mInfo.userName)
- .arg(mInfo.hostName)
- .arg(mInfo.realName);
+ .tqarg(m_nickName)
+ .tqarg(mInfo.userName)
+ .tqarg(mInfo.hostName)
+ .tqarg(mInfo.realName);
- msg += i18n("Last Online: %1\n").arg(
+ msg += i18n("Last Online: %1\n").tqarg(
KGlobal::locale()->formatDateTime(
property( m_protocol->propLastSeen ).value().toDateTime()
)
@@ -489,8 +489,8 @@ TQString IRCUserContact::formattedName() const
void IRCUserContact::updateInfo()
{
- setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
- .arg(mInfo.userName).arg(mInfo.hostName) );
+ setProperty( m_protocol->propUserInfo, TQString::tqfromLatin1("%1@%2")
+ .tqarg(mInfo.userName).tqarg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propChannels, mInfo.channels.join(" ") );
setProperty( m_protocol->propHops, TQString::number(mInfo.hops) );
@@ -504,7 +504,7 @@ void IRCUserContact::updateInfo()
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 ) )
+ if( !mInfo.channels.tqcontains( channel ) )
mInfo.channels.append( channel );
mInfo.userName = user;
@@ -667,32 +667,32 @@ void IRCUserContact::slotIncomingModeChange( const TQString &channel, const TQSt
void IRCUserContact::adjustInternalOnlineStatusBits(IRCChannelContact *channel, unsigned statusAdjustment, bitAdjustment adj)
{
- Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this);
- Kopete::OnlineStatus newStatus;
+ Kopete::OnlineStatus currenttqStatus = channel->manager()->contactOnlineStatus(this);
+ Kopete::OnlineStatus newtqStatus;
if (adj == RemoveBits) {
// If the bit is not set in the current internal status, stop here.
- if ((currentStatus.internalStatus() & ~statusAdjustment) == currentStatus.internalStatus())
+ if ((currenttqStatus.internalStatus() & ~statusAdjustment) == currenttqStatus.internalStatus())
return;
- newStatus = m_protocol->statusLookup(
- (IRCProtocol::IRCStatus)(currentStatus.internalStatus() & ~statusAdjustment)
+ newtqStatus = m_protocol->statusLookup(
+ (IRCProtocol::IRCtqStatus)(currenttqStatus.internalStatus() & ~statusAdjustment)
);
} else if (adj == AddBits) {
// If the bit is already set in the current internal status, stop here.
- if ((currentStatus.internalStatus() | statusAdjustment) == currentStatus.internalStatus())
+ if ((currenttqStatus.internalStatus() | statusAdjustment) == currenttqStatus.internalStatus())
return;
- newStatus = m_protocol->statusLookup(
- (IRCProtocol::IRCStatus)(currentStatus.internalStatus() | statusAdjustment)
+ newtqStatus = m_protocol->statusLookup(
+ (IRCProtocol::IRCtqStatus)(currenttqStatus.internalStatus() | statusAdjustment)
);
}
- channel->manager()->setContactOnlineStatus(this, newStatus);
+ channel->manager()->setContactOnlineStatus(this, newtqStatus);
}
void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message)
diff --git a/kopete/protocols/irc/ircusercontact.h b/kopete/protocols/irc/ircusercontact.h
index 860f3972..269cd40c 100644
--- a/kopete/protocols/irc/ircusercontact.h
+++ b/kopete/protocols/irc/ircusercontact.h
@@ -61,6 +61,7 @@ struct IRCUserInfo
class IRCUserContact : public IRCContact
{
Q_OBJECT
+ TQ_OBJECT
public:
// This class provides a Kopete::Contact for each user on the channel.
@@ -93,7 +94,7 @@ public:
public slots:
/** \brief Updates online status for channels based on current internal status.
*/
- virtual void updateStatus();
+ virtual void updatetqStatus();
virtual void sendFile(const KURL &sourceURL, const TQString&, unsigned int);
diff --git a/kopete/protocols/irc/kcodecaction.cpp b/kopete/protocols/irc/kcodecaction.cpp
index f7e4ee24..7bd9bfe8 100644
--- a/kopete/protocols/irc/kcodecaction.cpp
+++ b/kopete/protocols/irc/kcodecaction.cpp
@@ -21,7 +21,7 @@
#include "kcodecaction.h"
KCodecAction::KCodecAction( const TQString &text, const KShortcut &cut,
- TQObject *parent, const char *name ) : KSelectAction( text, "", cut, parent, name )
+ TQObject *tqparent, const char *name ) : KSelectAction( text, "", cut, tqparent, name )
{
TQObject::connect( this, TQT_SIGNAL( activated( const TQString & ) ),
this, TQT_SLOT( slotActivated( const TQString & ) ) );
@@ -70,7 +70,7 @@ TQStringList KCodecAction::supportedEncodings(bool usAscii)
{
TQTextCodec *codec = KGlobal::charsets()->codecForName(*it);
TQString mimeName = (codec) ? TQString(codec->mimeName()).lower() : (*it);
- if (mimeNames.find(mimeName) == mimeNames.end())
+ if (mimeNames.tqfind(mimeName) == mimeNames.end())
{
encodings.append(KGlobal::charsets()->languageForEncoding(*it)
+ " ( " + mimeName + " )");
diff --git a/kopete/protocols/irc/kcodecaction.h b/kopete/protocols/irc/kcodecaction.h
index 3ebd5f4d..1cd408ab 100644
--- a/kopete/protocols/irc/kcodecaction.h
+++ b/kopete/protocols/irc/kcodecaction.h
@@ -29,9 +29,10 @@
class KCodecAction : public KSelectAction
{
Q_OBJECT
+ TQ_OBJECT
public:
KCodecAction( const TQString &text, const KShortcut &cut = KShortcut(),
- TQObject *parent = 0, const char *name = 0 );
+ TQObject *tqparent = 0, const char *name = 0 );
void setCodec( const TQTextCodec *codec );
diff --git a/kopete/protocols/irc/ksparser.cpp b/kopete/protocols/irc/ksparser.cpp
index f9029e84..ea7e72cd 100644
--- a/kopete/protocols/irc/ksparser.cpp
+++ b/kopete/protocols/irc/ksparser.cpp
@@ -33,22 +33,22 @@ KSParser KSParser::m_parser;
const TQColor KSParser::IRC_Colors[17]=
{
- Qt::white,
- Qt::black,
- Qt::darkBlue,
- Qt::darkGreen,
- Qt::red,
- Qt::darkRed,
- Qt::darkMagenta,
- Qt::darkYellow,
- Qt::yellow,
- Qt::green,
- Qt::darkCyan,
- Qt::cyan,
- Qt::blue,
- Qt::magenta,
- Qt::darkGray,
- Qt::gray,
+ TQt::white,
+ TQt::black,
+ TQt::darkBlue,
+ TQt::darkGreen,
+ TQt::red,
+ TQt::darkRed,
+ TQt::darkMagenta,
+ TQt::darkYellow,
+ TQt::yellow,
+ TQt::green,
+ TQt::darkCyan,
+ TQt::cyan,
+ TQt::blue,
+ TQt::magenta,
+ TQt::darkGray,
+ TQt::gray,
TQColor() // default invalid color, must be the last
};
@@ -117,17 +117,17 @@ TQCString KSParser::_parse(const TQCString &message)
}
else
{
- toAppend = popTag(TQString::fromLatin1("span"));
+ toAppend = popTag(TQString::tqfromLatin1("span"));
}
break;
case 0x07: //System bell: ^G
- KNotifyClient::beep( TQString::fromLatin1("IRC beep event received in a message") );
+ KNotifyClient::beep( TQString::tqfromLatin1("IRC beep event received in a message") );
break;
case '\t': // 0x09
- toAppend = TQString::fromLatin1("&nbsp;&nbsp;&nbsp;&nbsp;");
+ toAppend = TQString::tqfromLatin1("&nbsp;&nbsp;&nbsp;&nbsp;");
break;
case '\n': // 0x0D
- toAppend= TQString::fromLatin1("<br/>");
+ toAppend= TQString::tqfromLatin1("<br/>");
break;
case 0x0D: // Italics: ^N
toAppend = toggleTag("i");
@@ -145,14 +145,14 @@ TQCString KSParser::_parse(const TQCString &message)
toAppend = toggleTag("u");
break;
case '<':
- toAppend = TQString::fromLatin1("&lt;");
+ toAppend = TQString::tqfromLatin1("&lt;");
break;
case '>':
- toAppend = TQString::fromLatin1("&gt;");
+ toAppend = TQString::tqfromLatin1("&gt;");
break;
default:
if (cur < TQChar(' ')) // search for control characters
- toAppend = TQString::fromLatin1("&lt;%1&gt;").arg(cur, 2, 16).upper();
+ toAppend = TQString::tqfromLatin1("&lt;%1&gt;").tqarg(cur, 2, 16).upper();
else
toAppend = TQStyleSheet::escape(cur);
}
@@ -178,10 +178,10 @@ TQString KSParser::pushTag(const TQString &tag, const TQString &attributes)
{
TQString res;
m_tags.push(tag);
- if(!m_attributes.contains(tag))
+ if(!m_attributes.tqcontains(tag))
m_attributes.insert(tag, attributes);
else if(!attributes.isEmpty())
- m_attributes.replace(tag, attributes);
+ m_attributes.tqreplace(tag, attributes);
res.append("<" + tag);
if(!m_attributes[tag].isEmpty())
res.append(" " + m_attributes[tag]);
@@ -193,20 +193,20 @@ TQString KSParser::pushColorTag(const TQColor &fgColor, const TQColor &bgColor)
TQString tagStyle;
if (fgColor.isValid())
- tagStyle += TQString::fromLatin1("color:%1;").arg(fgColor.name());
+ tagStyle += TQString::tqfromLatin1("color:%1;").tqarg(fgColor.name());
if (bgColor.isValid())
- tagStyle += TQString::fromLatin1("background-color:%1;").arg(bgColor.name());
+ tagStyle += TQString::tqfromLatin1("background-color:%1;").tqarg(bgColor.name());
if(!tagStyle.isEmpty())
- tagStyle = TQString::fromLatin1("style=\"%1\"").arg(tagStyle);
+ tagStyle = TQString::tqfromLatin1("style=\"%1\"").tqarg(tagStyle);
- return pushTag(TQString::fromLatin1("span"), tagStyle);;
+ return pushTag(TQString::tqfromLatin1("span"), tagStyle);;
}
TQString KSParser::popTag(const TQString &tag)
{
- if (!m_tags.contains(tag))
- return TQString::null;
+ if (!m_tags.tqcontains(tag))
+ return TQString();
TQString res;
TQValueStack<TQString> savedTags;
@@ -224,7 +224,7 @@ TQString KSParser::popTag(const TQString &tag)
TQString KSParser::toggleTag(const TQString &tag)
{
- return m_attributes.contains(tag)?popTag(tag):pushTag(tag);
+ return m_attributes.tqcontains(tag)?popTag(tag):pushTag(tag);
}
TQString KSParser::popAll()
diff --git a/kopete/protocols/irc/ksparser.h b/kopete/protocols/irc/ksparser.h
index cc9d9dc4..a71ff175 100644
--- a/kopete/protocols/irc/ksparser.h
+++ b/kopete/protocols/irc/ksparser.h
@@ -36,7 +36,7 @@ private:
KSParser();
TQCString _parse(const TQCString &);
- TQString pushTag(const TQString &, const TQString & = TQString::null);
+ TQString pushTag(const TQString &, const TQString & = TQString());
TQString pushColorTag(const TQColor &fgColor, const TQColor &bgColor);
TQString popTag(const TQString &);
TQString toggleTag(const TQString &);
diff --git a/kopete/protocols/irc/libkirc/kircengine.cpp b/kopete/protocols/irc/libkirc/kircengine.cpp
index 03936d5f..167d7a22 100644
--- a/kopete/protocols/irc/libkirc/kircengine.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine.cpp
@@ -51,10 +51,10 @@ using namespace KIRC;
/* 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 TQRegExp Engine::m_RemoveLinefeeds( TQString::fromLatin1("[\\r\\n]*$") );
+const TQRegExp Engine::m_RemoveLinefeeds( TQString::tqfromLatin1("[\\r\\n]*$") );
-Engine::Engine(TQObject *parent, const char *name)
- : TQObject(parent, TQString::fromLatin1("[KIRC::Engine]%1").arg(name).latin1()),
+Engine::Engine(TQObject *tqparent, const char *name)
+ : TQObject(tqparent, TQString::tqfromLatin1("[KIRC::Engine]%1").tqarg(name).latin1()),
m_status(Idle),
m_FailedNickOnLogin(false),
m_useSSL(false),
@@ -64,7 +64,7 @@ Engine::Engine(TQObject *parent, const char *name)
m_ctcpReplies(17, false),
codecs(577,false)
{
- setUserName(TQString::null);
+ setUserName(TQString());
m_commands.setAutoDelete(true);
m_ctcpQueries.setAutoDelete(true);
@@ -74,9 +74,9 @@ Engine::Engine(TQObject *parent, const char *name)
bindNumericReplies();
bindCtcp();
- 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.");
+ m_VersionString = TQString::tqfromLatin1("Anonymous client using the KIRC engine.");
+ m_UserString = TQString::tqfromLatin1("Response not supplied by user.");
+ m_SourceString = TQString::tqfromLatin1("Unknown client, known source.");
defaultCodec = TQTextCodec::codecForMib(106); // UTF8 mib is 106
kdDebug(14120) << "Setting default engine codec, " << defaultCodec->name() << endl;
@@ -133,14 +133,14 @@ void Engine::setUseSSL( bool useSSL )
}
}
-void Engine::setStatus(Engine::Status status)
+void Engine::settqStatus(Engine::tqStatus status)
{
kdDebug(14120) << k_funcinfo << status << endl;
if (m_status == status)
return;
-// Engine::Status oldStatus = m_status;
+// Engine::tqStatus oldtqStatus = m_status;
m_status = status;
emit statusChanged(status);
@@ -169,21 +169,21 @@ void Engine::setStatus(Engine::Status status)
case Closing:
m_sock->close();
m_sock->reset();
- setStatus(Idle);
+ settqStatus(Idle);
break;
case AuthentifyingFailed:
- setStatus(Closing);
+ settqStatus(Closing);
break;
case Timeout:
- setStatus(Closing);
+ settqStatus(Closing);
break;
case Disconnected:
- setStatus(Closing);
+ settqStatus(Closing);
break;
}
}
-void Engine::connectToServer(const TQString &host, Q_UINT16 port, const TQString &nickname, bool useSSL )
+void Engine::connectToServer(const TQString &host, TQ_UINT16 port, const TQString &nickname, bool useSSL )
{
setUseSSL(useSSL);
@@ -195,28 +195,28 @@ void Engine::connectToServer(const TQString &host, Q_UINT16 port, const TQString
kdDebug(14120) << "Sock status: " << m_sock->socketStatus() << endl;
if( !m_sock->setAddress(m_Host, m_Port) )
- kdDebug(14120) << k_funcinfo << "setAddress failed. Status: " << m_sock->socketStatus() << endl;
+ kdDebug(14120) << k_funcinfo << "setAddress failed. tqStatus: " << m_sock->socketStatus() << endl;
if( m_sock->startAsyncConnect() == 0 )
{
- kdDebug(14120) << k_funcinfo << "Success!. Status: " << m_sock->socketStatus() << endl;
- setStatus(Connecting);
+ kdDebug(14120) << k_funcinfo << "Success!. tqStatus: " << m_sock->socketStatus() << endl;
+ settqStatus(Connecting);
}
else
{
- kdDebug(14120) << k_funcinfo << "Failed. Status: " << m_sock->socketStatus() << endl;
- setStatus(Disconnected);
+ kdDebug(14120) << k_funcinfo << "Failed. tqStatus: " << m_sock->socketStatus() << endl;
+ settqStatus(Disconnected);
}
}
void Engine::slotConnected()
{
- setStatus(Authentifying);
+ settqStatus(Authentifying);
}
void Engine::slotConnectionClosed()
{
- setStatus(Disconnected);
+ settqStatus(Disconnected);
}
void Engine::error(int errCode)
@@ -225,7 +225,7 @@ void Engine::error(int errCode)
if (m_sock->socketStatus () != KExtendedSocket::connecting)
{
// Connection in progress.. This is a signal fired wrong
- setStatus(Disconnected);
+ settqStatus(Disconnected);
}
}
@@ -250,7 +250,7 @@ void Engine::setSourceString(const TQString &newString)
void Engine::setUserName(const TQString &newName)
{
if(newName.isEmpty())
- m_Username = TQString::fromLatin1(getpwuid(getuid())->pw_name);
+ m_Username = TQString::tqfromLatin1(getpwuid(getuid())->pw_name);
else
m_Username = newName;
m_Username.remove(m_RemoveLinefeeds);
@@ -259,7 +259,7 @@ void Engine::setUserName(const TQString &newName)
void Engine::setRealName(const TQString &newName)
{
if(newName.isEmpty())
- m_realName = TQString::fromLatin1(getpwuid(getuid())->pw_gecos);
+ m_realName = TQString::tqfromLatin1(getpwuid(getuid())->pw_gecos);
else
m_realName = newName;
m_realName.remove(m_RemoveLinefeeds);
@@ -277,7 +277,7 @@ bool Engine::_bind(TQDict<KIRC::MessageRedirector> &dict,
if (!mr)
{
mr = new MessageRedirector(this, minArgs, maxArgs, helpMessage);
- dict.replace(command, mr);
+ dict.tqreplace(command, mr);
}
return mr->connect(object, member);
@@ -443,7 +443,7 @@ bool Engine::invokeCtcpCommandOfMessage(const TQDict<MessageRedirector> &map, Me
kdDebug(14120) << "Method error for line:" << ctcpMsg.raw() << endl;
writeCtcpErrorMessage(msg.prefix(), msg.ctcpRaw(),
- TQString::fromLatin1("%1 internal error(s)").arg(errors.size()));
+ TQString::tqfromLatin1("%1 internal error(s)").tqarg(errors.size()));
}
else
{
diff --git a/kopete/protocols/irc/libkirc/kircengine.h b/kopete/protocols/irc/libkirc/kircengine.h
index c39bbe6e..e086afc1 100644
--- a/kopete/protocols/irc/libkirc/kircengine.h
+++ b/kopete/protocols/irc/libkirc/kircengine.h
@@ -51,27 +51,28 @@ namespace KIRC
* @author Jason Keirstead <jason@keirstead.org>
*/
class Engine
- : public QObject
+ : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
-// Q_PROPERTY(TQUrl serverURL READ serverURL WRITE setServerURL)
+// TQ_PROPERTY(TQUrl serverURL READ serverURL WRITE setServerURL)
// Extracted from the base of the serverURL.
-// Q_PROPERTY(bool useSSL);
-// Q_PROPERTY(TQString user READ user);
-// Q_PROPERTY(TQString password);
-// Q_PROPERTY(TQString host READ host);
-// Q_PROPERTY(int port READ host);
+// TQ_PROPERTY(bool useSSL);
+// TQ_PROPERTY(TQString user READ user);
+// TQ_PROPERTY(TQString password);
+// TQ_PROPERTY(TQString host READ host);
+// TQ_PROPERTY(int port READ host);
// Extracted from the query of the serverURL.
-// Q_PROPERTY(bool reqsPasswd);
-// Q_PROPERTY(TQString name); // real name
-// Q_PROPERTY(TQStringList nickList READ nickList WRITE setNickList)
-// Q_PROPERTY(TQString nick READ nick)
-// Q_PROPERTY(TQStringList portList)
+// TQ_PROPERTY(bool reqsPasswd);
+// TQ_PROPERTY(TQString name); // real name
+// TQ_PROPERTY(TQStringList nickList READ nickList WRITE setNickList)
+// TQ_PROPERTY(TQString nick READ nick)
+// TQ_PROPERTY(TQStringList portList)
- Q_ENUMS(Status)
+ Q_ENUMS(tqStatus)
public:
enum Error
@@ -83,7 +84,7 @@ public:
MethodFailed
};
- enum Status
+ enum tqStatus
{
Idle,
Connecting,
@@ -105,7 +106,7 @@ public:
MessageOfTheDayCondensedMessage
};
- Engine( TQObject *parent = 0, const char* name = 0 );
+ Engine( TQObject *tqparent = 0, const char* name = 0 );
~Engine();
// TQString nick() const;
@@ -118,7 +119,7 @@ public:
inline const TQString &currentHost() const
{ return m_Host; };
- inline Q_UINT16 currentPort()
+ inline TQ_UINT16 currentPort()
{ return m_Port; }
inline const TQString &nickName() const
@@ -159,12 +160,12 @@ public:
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);
+ void connectToServer(const TQString &host, TQ_UINT16 port, const TQString &nickname, bool useSSL = false);
KExtendedSocket *socket()
{ return m_sock; };
- inline KIRC::Engine::Status status() const
+ inline KIRC::Engine::tqStatus status() const
{ return m_status; }
inline bool isDisconnected() const
@@ -174,7 +175,7 @@ public:
{ return m_status == Connected; }
inline void setCodec( const TQString &nick, const TQTextCodec *codec )
- { codecs.replace( nick, codec ); }
+ { codecs.tqreplace( nick, codec ); }
/* Custom CTCP replies handling */
inline TQString &customCtcp( const TQString &s )
@@ -191,16 +192,16 @@ public slots:
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);
+ const TQString &suffix = TQString(), const TQTextCodec *codec = 0);
void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &ctcpMessage);
void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &suffix,
- const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix = TQString::null,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix = TQString(),
bool emitRepliedCtcp = true);
inline void writeCtcpQueryMessage(const TQString &to, const TQString &suffix,
- const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString(),
bool emitRepliedCtcp = true)
{ return writeCtcpMessage("PRIVMSG", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); }
@@ -208,42 +209,42 @@ public slots:
{ writeCtcpMessage("NOTICE", to, ctcpMessage); }
inline void writeCtcpReplyMessage(const TQString &to, const TQString &suffix,
- const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null,
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString(),
bool emitRepliedCtcp = true)
{ return writeCtcpMessage("NOTICE", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); }
inline void writeCtcpErrorMessage(const TQString &to, const TQString &ctcpLine, const TQString &errorMsg,
bool emitRepliedCtcp=true)
- { return writeCtcpReplyMessage(to, TQString::null, "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); }
+ { return writeCtcpReplyMessage(to, TQString(), "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); }
bool bind(const TQString &command, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const TQString &helpMessage = TQString::null);
+ const TQString &helpMessage = TQString());
bool bind(int id, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const TQString &helpMessage = TQString::null);
+ const TQString &helpMessage = TQString());
bool bindCtcpQuery(const TQString &command, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const TQString &helpMessage = TQString::null);
+ const TQString &helpMessage = TQString());
bool bindCtcpReply(const TQString &command, TQObject *object, const char *member,
int minArgs = KIRC::MessageRedirector::Unknown,
int maxArgs = KIRC::MessageRedirector::Unknown,
- const TQString &helpMessage = TQString::null);
+ const TQString &helpMessage = TQString());
- void away(bool isAway, const TQString &awayMessage = TQString::null);
+ void away(bool isAway, const TQString &awayMessage = TQString());
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 TQString &target, const TQString &mode);
- void motd(const TQString &server = TQString::null);
+ void motd(const TQString &server = TQString());
void nick(const TQString &newNickname);
void notice(const TQString &target, const TQString &message);
void part(const TQString &name, const TQString &reason);
@@ -259,7 +260,7 @@ public slots:
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 user(const TQString &newUsername, TQ_UINT8 mode, const TQString &newRealname);
void whois(const TQString &user);
@@ -274,7 +275,7 @@ public slots:
void showInfoDialog();
signals:
- void statusChanged(KIRC::Engine::Status newStatus);
+ void statusChanged(KIRC::Engine::tqStatus newtqStatus);
void internalError(KIRC::Engine::Error, KIRC::Message &);
void receivedMessage(KIRC::Message &);
@@ -478,7 +479,7 @@ private:
void bindNumericReplies();
void bindCtcp();
- void setStatus(KIRC::Engine::Status status);
+ void settqStatus(KIRC::Engine::tqStatus status);
bool invokeCtcpCommandOfMessage(const TQDict<KIRC::MessageRedirector> &map, KIRC::Message &message);
/*
@@ -492,9 +493,9 @@ private:
//Static regexes
static const TQRegExp m_RemoveLinefeeds;
- KIRC::Engine::Status m_status;
+ KIRC::Engine::tqStatus m_status;
TQString m_Host;
- Q_UINT16 m_Port;
+ TQ_UINT16 m_Port;
// TQUrl serverURL;
// TQUrl currentServerURL;
diff --git a/kopete/protocols/irc/libkirc/kircengine_commands.cpp b/kopete/protocols/irc/libkirc/kircengine_commands.cpp
index 21a90676..f8c3dcca 100644
--- a/kopete/protocols/irc/libkirc/kircengine_commands.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine_commands.cpp
@@ -37,8 +37,8 @@ void Engine::bindCommands()
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("TQUIT", this, TQT_SLOT(quit(KIRC::Message &)), 0, 0);
+// bind("STQUIT", this, TQT_SLOT(squit(KIRC::Message &)), 1, 1);
bind("TOPIC", this, TQT_SLOT(topic(KIRC::Message &)), 1, 1);
}
@@ -46,30 +46,30 @@ void Engine::away(bool isAway, const TQString &awayMessage)
{
if(isAway)
if( !awayMessage.isEmpty() )
- writeMessage("AWAY", TQString::null, awayMessage);
+ writeMessage("AWAY", TQString(), awayMessage);
else
- writeMessage("AWAY", TQString::null, TQString::fromLatin1("I'm away."));
+ writeMessage("AWAY", TQString(), TQString::tqfromLatin1("I'm away."));
else
- writeMessage("AWAY", TQString::null);
+ writeMessage("AWAY", TQString());
}
// FIXME: Really handle this message
void Engine::error(Message &)
{
- setStatus(Closing);
+ settqStatus(Closing);
}
void Engine::ison(const TQStringList &nickList)
{
if (!nickList.isEmpty())
{
- TQString statement = TQString::fromLatin1("ISON");
+ TQString statement = TQString::tqfromLatin1("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 = TQString::fromLatin1("ISON ") + (*it);
+ statement = TQString::tqfromLatin1("ISON ") + (*it);
}
else
statement.append(TQChar(' ') + (*it));
@@ -199,9 +199,9 @@ void Engine::quit(const TQString &reason, bool /*now*/)
return;
if (isConnected())
- writeMessage("QUIT", TQString::null, reason);
+ writeMessage("TQUIT", TQString(), reason);
- setStatus(Closing);
+ settqStatus(Closing);
}
void Engine::quit(Message &msg)
@@ -224,10 +224,10 @@ void Engine::user(const TQString &newUserName, const TQString &hostname, const T
writeMessage("USER", TQStringList(m_Username) << hostname << m_Host, m_realName);
}
-void Engine::user(const TQString &newUserName, Q_UINT8 mode, const TQString &newRealName)
+void Engine::user(const TQString &newUserName, TQ_UINT8 mode, const TQString &newRealName)
{
/* RFC2812: "<user> <mode> <unused> <realname>"
- * mode is a numeric value (from a bit mask).
+ * mode is a numeric value (from a bit tqmask).
* 0x00 normal
* 0x04 request +w
* 0x08 request +i */
@@ -252,7 +252,7 @@ void Engine::topic(Message &msg)
void Engine::list()
{
- writeMessage("LIST", TQString::null);
+ writeMessage("LIST", TQString());
}
void Engine::motd(const TQString &server)
diff --git a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp
index 7216dea7..83a4257c 100644
--- a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp
@@ -72,7 +72,7 @@ void Engine::CtcpRequestCommand(const TQString &contact, const TQString &command
{
if(m_status == Connected)
{
- writeCtcpQueryMessage(contact, TQString::null, command);
+ writeCtcpQueryMessage(contact, TQString(), command);
// emit ctcpCommandMessage( contact, command );
}
}
@@ -81,7 +81,7 @@ void Engine::CtcpRequest_action(const TQString &contact, const TQString &message
{
if(m_status == Connected)
{
- writeCtcpQueryMessage(contact, TQString::null, "ACTION", message);
+ writeCtcpQueryMessage(contact, TQString(), "ACTION", message);
if( Entity::isChannel(contact) )
emit incomingAction(Kopete::Message::unescape(contact), Kopete::Message::unescape(m_Nickname), message);
@@ -109,15 +109,15 @@ bool Engine::CtcpReply_action(Message &msg)
// FIXME: the API can now answer to help commands.
void Engine::CtcpQuery_clientinfo(Message &msg)
{
- TQString clientinfo = customCtcpMap[ TQString::fromLatin1("clientinfo") ];
+ TQString clientinfo = customCtcpMap[ TQString::tqfromLatin1("clientinfo") ];
if (clientinfo.isNull())
- clientinfo = TQString::fromLatin1("The following commands are supported, but "
+ clientinfo = TQString::tqfromLatin1("The following commands are supported, but "
"without sub-command help: VERSION, CLIENTINFO, USERINFO, TIME, SOURCE, PING,"
"ACTION.");
- writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null,
- msg.ctcpMessage().command(), TQString::null, clientinfo);
+ writeCtcpReplyMessage( msg.nickFromPrefix(), TQString(),
+ msg.ctcpMessage().command(), TQString(), clientinfo);
}
void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName, uint port, Transfer::Type type)
@@ -131,9 +131,9 @@ void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName,
{
case Transfer::Chat:
{
- writeCtcpQueryMessage(nickname, TQString::null,
- TQString::fromLatin1("DCC"),
- TQStringList(TQString::fromLatin1("CHAT")) << TQString::fromLatin1("chat") <<
+ writeCtcpQueryMessage(nickname, TQString(),
+ TQString::tqfromLatin1("DCC"),
+ TQStringList(TQString::tqfromLatin1("CHAT")) << TQString::tqfromLatin1("chat") <<
m_sock->localAddress()->nodeName() << TQString::number(port)
);
break;
@@ -143,8 +143,8 @@ void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName,
{
TQFileInfo file(fileName);
TQString noWhiteSpace = file.fileName();
- if (noWhiteSpace.contains(' ') > 0)
- noWhiteSpace.replace(TQRegExp("\\s+"), "_");
+ if (noWhiteSpace.tqcontains(' ') > 0)
+ noWhiteSpace.tqreplace(TQRegExp("\\s+"), "_");
TransferServer *server = TransferHandler::self()->createServer(this, nickname, type, fileName, file.size());
@@ -153,9 +153,9 @@ void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName,
kdDebug(14120) << "Starting DCC file outgoing transfer." << endl;
- writeCtcpQueryMessage(nickname, TQString::null,
- TQString::fromLatin1("DCC"),
- TQStringList(TQString::fromLatin1("SEND")) << noWhiteSpace << ipNumber <<
+ writeCtcpQueryMessage(nickname, TQString(),
+ TQString::tqfromLatin1("DCC"),
+ TQStringList(TQString::tqfromLatin1("SEND")) << noWhiteSpace << ipNumber <<
TQString::number(server->port()) << TQString::number(file.size())
);
break;
@@ -173,7 +173,7 @@ void Engine::CtcpQuery_dcc(Message &msg)
Message &ctcpMsg = msg.ctcpMessage();
TQString dccCommand = ctcpMsg.arg(0).upper();
- if (dccCommand == TQString::fromLatin1("CHAT"))
+ if (dccCommand == TQString::tqfromLatin1("CHAT"))
{
// if(ctcpMsg.argsSize()!=4) return false;
@@ -196,7 +196,7 @@ void Engine::CtcpQuery_dcc(Message &msg)
Transfer::Chat );
}
}
- else if (dccCommand == TQString::fromLatin1("SEND"))
+ else if (dccCommand == TQString::tqfromLatin1("SEND"))
{
// if(ctcpMsg.argsSize()!=5) return false;
@@ -253,11 +253,11 @@ void Engine::CtcpRequest_ping(const TQString &target)
TQString timeReply;
if( Entity::isChannel(target) )
- timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
+ timeReply = TQString::tqfromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
else
timeReply = TQString::number( time.tv_sec );
- writeCtcpQueryMessage( target, TQString::null, "PING", timeReply);
+ writeCtcpQueryMessage( target, TQString(), "PING", timeReply);
}
// else
// ((MessageRedirector *)sender())->error("failed to get current time");
@@ -265,7 +265,7 @@ void Engine::CtcpRequest_ping(const TQString &target)
void Engine::CtcpQuery_ping(Message &msg)
{
- writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null,
+ writeCtcpReplyMessage( msg.nickFromPrefix(), TQString(),
msg.ctcpMessage().command(), msg.ctcpMessage().arg(0));
}
@@ -275,7 +275,7 @@ void Engine::CtcpReply_ping(Message &msg)
if (gettimeofday(&time, 0) == 0)
{
// FIXME: the time code is wrong for usec
- TQString timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec);
+ TQString timeReply = TQString::tqfromLatin1("%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;
@@ -284,7 +284,7 @@ void Engine::CtcpReply_ping(Message &msg)
if (difference < 1)
{
diffString = TQString::number(difference);
- diffString.remove((diffString.find('.') -1), 2);
+ diffString.remove((diffString.tqfind('.') -1), 2);
diffString.truncate(3);
diffString.append("milliseconds");
}
@@ -293,12 +293,12 @@ void Engine::CtcpReply_ping(Message &msg)
diffString = TQString::number(difference);
TQString seconds = diffString.section('.', 0, 0);
TQString millSec = diffString.section('.', 1, 1);
- millSec.remove(millSec.find('.'), 1);
+ millSec.remove(millSec.tqfind('.'), 1);
millSec.truncate(3);
- diffString = TQString::fromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec);
+ diffString = TQString::tqfromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec);
}
- emit incomingCtcpReply(TQString::fromLatin1("PING"), msg.nickFromPrefix(), diffString);
+ emit incomingCtcpReply(TQString::tqfromLatin1("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(), TQString::null,
+ writeCtcpReplyMessage(msg.nickFromPrefix(), TQString(),
msg.ctcpMessage().command(), m_SourceString);
}
void Engine::CtcpQuery_time(Message &msg)
{
- writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null,
- msg.ctcpMessage().command(), TQDateTime::currentDateTime().toString(),
- TQString::null, false);
+ writeCtcpReplyMessage(msg.nickFromPrefix(), TQString(),
+ msg.ctcpMessage().command(), TQDateTime::tqcurrentDateTime().toString(),
+ TQString(), false);
}
void Engine::CtcpQuery_userinfo(Message &msg)
{
- TQString userinfo = customCtcpMap[ TQString::fromLatin1("userinfo") ];
+ TQString userinfo = customCtcpMap[ TQString::tqfromLatin1("userinfo") ];
if (userinfo.isNull())
userinfo = m_UserString;
- writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null,
- msg.ctcpMessage().command(), TQString::null, userinfo);
+ writeCtcpReplyMessage(msg.nickFromPrefix(), TQString(),
+ msg.ctcpMessage().command(), TQString(), userinfo);
}
void Engine::CtcpRequest_version(const TQString &target)
{
- writeCtcpQueryMessage(target, TQString::null, "VERSION");
+ writeCtcpQueryMessage(target, TQString(), "VERSION");
}
void Engine::CtcpQuery_version(Message &msg)
{
- TQString response = customCtcpMap[ TQString::fromLatin1("version") ];
+ TQString response = customCtcpMap[ TQString::tqfromLatin1("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 67d3a842..3d7b896b 100644
--- a/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp
+++ b/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp
@@ -117,7 +117,7 @@ void Engine::numericReply_001(Message &msg)
*/
emitSuffix(msg);
- setStatus(Connected);
+ settqStatus(Connected);
}
/* 002: ":Your host is <servername>, running version <ver>"
diff --git a/kopete/protocols/irc/libkirc/kircentity.cpp b/kopete/protocols/irc/libkirc/kircentity.cpp
index ded35fe5..2086ab9d 100644
--- a/kopete/protocols/irc/libkirc/kircentity.cpp
+++ b/kopete/protocols/irc/libkirc/kircentity.cpp
@@ -29,16 +29,16 @@ 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 TQRegExp Entity::sm_userRegExp(TQString::fromLatin1("^([^\\s,:!@]+)(?:(?:!([^\\s,:!@]+))?(?:@([^\\s,!@]+)))?$"));
+const TQRegExp Entity::sm_userRegExp(TQString::tqfromLatin1("^([^\\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 TQRegExp Entity::sm_userStrictRegExp(TQString::fromLatin1("^([^\\s,:!@]+)!([^\\s,:!@]+)@([^\\s,:!@]+)$"));
+const TQRegExp Entity::sm_userStrictRegExp(TQString::tqfromLatin1("^([^\\s,:!@]+)!([^\\s,:!@]+)@([^\\s,:!@]+)$"));
-const TQRegExp Entity::sm_channelRegExp( TQString::fromLatin1("^[#!+&][^\\s,]+$") );
+const TQRegExp Entity::sm_channelRegExp( TQString::tqfromLatin1("^[#!+&][^\\s,]+$") );
Entity::Entity(const TQString &, const Type type)
: TQObject(0, "KIRC::Entity"),
@@ -70,7 +70,7 @@ TQString Entity::host() const
return userHost();
default:
kdDebug(14121) << k_funcinfo << "No host defined for type:" << m_type;
- return TQString::null;
+ return TQString();
}
}
diff --git a/kopete/protocols/irc/libkirc/kircentity.h b/kopete/protocols/irc/libkirc/kircentity.h
index 1878a406..a8dc8fff 100644
--- a/kopete/protocols/irc/libkirc/kircentity.h
+++ b/kopete/protocols/irc/libkirc/kircentity.h
@@ -37,6 +37,7 @@ class Entity
public KShared
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type
@@ -87,7 +88,7 @@ private:
static const TQRegExp sm_channelRegExp;
KIRC::Entity::Type m_type;
- QString m_name;
+ TQString m_name;
// peer ip address if the entity is a User.
TQString m_address;
diff --git a/kopete/protocols/irc/libkirc/kircmessage.cpp b/kopete/protocols/irc/libkirc/kircmessage.cpp
index 73a1e53f..0c1d3ef0 100644
--- a/kopete/protocols/irc/libkirc/kircmessage.cpp
+++ b/kopete/protocols/irc/libkirc/kircmessage.cpp
@@ -34,7 +34,7 @@ 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 TQString requires a codec. NEed to parse this with
-// our own parsing class that operates on the raw QCStrings
+// our own parsing class that operates on the raw TQCStrings
TQRegExp Message::m_IRCCommandType1(
"^(?::([^ ]+) )?([A-Za-z]+|\\d{1,3})((?: [^ :][^ ]*)*) ?(?: :(.*))?$");
// Extra end arg space check -------------------------^
@@ -99,14 +99,14 @@ void Message::writeRawMessage(Engine *engine, const TQTextCodec *codec, const TQ
return;
}
- TQString txt = str + TQString::fromLatin1("\r\n");
+ TQString txt = str + TQString::tqfromLatin1("\r\n");
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) << TQString::fromLatin1("(%1 bytes) >> %2").arg(wrote).arg(str) << endl;
+ kdDebug(14121) << TQString::tqfromLatin1("(%1 bytes) >> %2").tqarg(wrote).tqarg(str) << endl;
}
void Message::writeMessage(Engine *engine, const TQTextCodec *codec, const TQString &message)
@@ -123,7 +123,7 @@ void Message::writeMessage(Engine *engine, const TQTextCodec *codec,
msg += TQChar(' ') + args.join(TQChar(' ')).stripWhiteSpace(); // some extra check should be done here
if (!suffix.isNull())
- msg = msg.stripWhiteSpace() + TQString::fromLatin1(" :") + suffix;
+ msg = msg.stripWhiteSpace() + TQString::tqfromLatin1(" :") + suffix;
writeMessage(engine, codec, msg);
}
@@ -145,7 +145,7 @@ void Message::writeCtcpMessage(Engine *engine, const TQTextCodec *codec,
ctcpMsg += TQChar(' ') + ctcpArgs.join(TQChar(' ')).stripWhiteSpace(); // some extra check should be done here
if (!ctcpSuffix.isNull())
- ctcpMsg += TQString::fromLatin1(" :") + ctcpSuffix;
+ ctcpMsg += TQString::tqfromLatin1(" :") + ctcpSuffix;
writeMessage(engine, codec, command, to, suffix + TQChar(0x01) + ctcpQuote(ctcpMsg) + TQChar(0x01));
}
@@ -158,7 +158,7 @@ Message Message::parse(Engine *engine, const TQTextCodec *codec, bool *parseSucc
if (engine->socket()->canReadLine())
{
TQCString raw(engine->socket()->bytesAvailable()+1);
- Q_LONG length = engine->socket()->readLine(raw.data(), raw.count());
+ TQ_LONG length = engine->socket()->readLine(raw.data(), raw.count());
if( length > -1 )
{
@@ -169,10 +169,10 @@ Message Message::parse(Engine *engine, const TQTextCodec *codec, bool *parseSucc
// Some servers send '\n' instead of '\r\n' that the RFCs say they should be sending.
if (length > 1 && raw.at(length-2) == '\n') {
- raw.at(length-2) = '\0';
+ raw.tqat(length-2) = '\0';
}
if (length > 2 && raw.at(length-3) == '\r') {
- raw.at(length-3) = '\0';
+ raw.tqat(length-3) = '\0';
}
kdDebug(14121) << "<< " << raw << endl;
@@ -201,10 +201,10 @@ TQString Message::quote(const TQString &str)
{
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"));
+ tmp.tqreplace(q, q+TQString(q));
+ tmp.tqreplace(TQChar('\r'), q+TQString::tqfromLatin1("r"));
+ tmp.tqreplace(TQChar('\n'), q+TQString::tqfromLatin1("n"));
+ tmp.tqreplace(TQChar('\0'), q+TQString::tqfromLatin1("0"));
return tmp;
}
@@ -216,13 +216,13 @@ TQString Message::unquote(const TQString &str)
char b[3] = { 020, 020, '\0' };
const char b2[2] = { 020, '\0' };
- tmp.replace( b, b2 );
+ tmp.tqreplace( b, b2 );
b[1] = 'r';
- tmp.replace( b, "\r");
+ tmp.tqreplace( b, "\r");
b[1] = 'n';
- tmp.replace( b, "\n");
+ tmp.tqreplace( b, "\n");
b[1] = '0';
- tmp.replace( b, "\0");
+ tmp.tqreplace( b, "\0");
return tmp;
}
@@ -230,16 +230,16 @@ TQString Message::unquote(const TQString &str)
TQString Message::ctcpQuote(const TQString &str)
{
TQString tmp = str;
- tmp.replace( TQChar('\\'), TQString::fromLatin1("\\\\"));
- tmp.replace( (char)1, TQString::fromLatin1("\\1"));
+ tmp.tqreplace( TQChar('\\'), TQString::tqfromLatin1("\\\\"));
+ tmp.tqreplace( (char)1, TQString::tqfromLatin1("\\1"));
return tmp;
}
TQString Message::ctcpUnquote(const TQString &str)
{
TQString tmp = str;
- tmp.replace("\\\\", "\\");
- tmp.replace("\\1", "\1" );
+ tmp.tqreplace("\\\\", "\\");
+ tmp.tqreplace("\\1", "\1" );
return tmp;
}
@@ -276,7 +276,7 @@ bool Message::matchForIRCRegExp(TQRegExp &regexp, const TQTextCodec *codec, cons
msg.m_ctcpMessage = new Message();
msg.m_ctcpMessage->m_raw = codec->fromUnicode(ctcpUnquote(msg.m_ctcpRaw));
- int space = ctcpRaw.find(' ');
+ int space = ctcpRaw.tqfind(' ');
if (!matchForIRCRegExp(msg.m_ctcpMessage->m_raw, codec, *msg.m_ctcpMessage))
{
TQCString command;
@@ -296,7 +296,7 @@ bool Message::matchForIRCRegExp(TQRegExp &regexp, const TQTextCodec *codec, cons
msg.m_suffix = Kopete::Message::decodeString( KSParser::parse(suffix), codec );
}
else
- msg.m_suffix = TQString::null;
+ msg.m_suffix = TQString();
return true;
}
return false;
@@ -311,13 +311,13 @@ void Message::decodeAgain( const TQTextCodec *codec )
TQString Message::toString() const
{
if( !isValid() )
- return TQString::null;
+ return TQString();
TQString msg = m_command;
for (TQStringList::ConstIterator it = m_args.begin(); it != m_args.end(); ++it)
msg += TQChar(' ') + *it;
if (!m_suffix.isNull())
- msg += TQString::fromLatin1(" :") + m_suffix;
+ msg += TQString::tqfromLatin1(" :") + m_suffix;
return msg;
}
diff --git a/kopete/protocols/irc/libkirc/kircmessage.h b/kopete/protocols/irc/libkirc/kircmessage.h
index 02631bbf..80dcfa79 100644
--- a/kopete/protocols/irc/libkirc/kircmessage.h
+++ b/kopete/protocols/irc/libkirc/kircmessage.h
@@ -57,7 +57,7 @@ public:
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 );
+ const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString() );
Message();
Message(const KIRC::Message &obj);
@@ -112,7 +112,7 @@ public:
inline const TQString &command() const
{ return m_command; }
- /** \brief The number of command arguments this message contains.
+ /** \brief The number of command arguments this message tqcontains.
*/
inline size_t argsSize() const
{ return m_args.size(); }
diff --git a/kopete/protocols/irc/libkirc/kircmessageredirector.cpp b/kopete/protocols/irc/libkirc/kircmessageredirector.cpp
index 2e1d0b4c..ae9854f1 100644
--- a/kopete/protocols/irc/libkirc/kircmessageredirector.cpp
+++ b/kopete/protocols/irc/libkirc/kircmessageredirector.cpp
@@ -80,9 +80,9 @@ bool MessageRedirector::checkValidity(const Message &msg)
/*
if ( msg.isNumeric() &&
( msg.argsSize() > 0 && (
- msg.arg(0) == m_Nickname ||
- msg.arg(0) == m_PendingNick ||
- msg.arg(0) == TQString::fromLatin1("*")
+ msg.tqarg(0) == m_Nickname ||
+ msg.tqarg(0) == m_PendingNick ||
+ msg.tqarg(0) == TQString::tqfromLatin1("*")
)
)
)
diff --git a/kopete/protocols/irc/libkirc/kircmessageredirector.h b/kopete/protocols/irc/libkirc/kircmessageredirector.h
index 24a2f9af..e6fbda80 100644
--- a/kopete/protocols/irc/libkirc/kircmessageredirector.h
+++ b/kopete/protocols/irc/libkirc/kircmessageredirector.h
@@ -29,9 +29,10 @@ class Engine;
class Message;
class MessageRedirector
- : public QObject
+ : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum {
@@ -42,7 +43,7 @@ public:
MessageRedirector(KIRC::Engine *engine,
int argsSize_min = KIRC::MessageRedirector::Unknown,
int argsSize_max = KIRC::MessageRedirector::Unknown,
- const TQString &helpMessage = TQString::null);
+ const TQString &helpMessage = TQString());
/**
* Connects the given object member signal/slot to this message redirector.
diff --git a/kopete/protocols/irc/libkirc/kirctransfer.cpp b/kopete/protocols/irc/libkirc/kirctransfer.cpp
index af7d8948..198009a3 100644
--- a/kopete/protocols/irc/libkirc/kirctransfer.cpp
+++ b/kopete/protocols/irc/libkirc/kirctransfer.cpp
@@ -28,21 +28,21 @@ using namespace KIRC;
Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
Type type,
- TQObject *parent, const char *name )
- : TQObject( parent, name ),
+ TQObject *tqparent, const char *name )
+ : TQObject( tqparent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(0),
m_initiated(false),
- m_file(0), m_fileName(TQString::null), m_fileSize(0), m_fileSizeCur(0), m_fileSizeAck(0),
+ m_file(0), m_fileName(TQString()), 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, TQString nick,// TQString nick_peer_adress
Transfer::Type type,
- TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ?
- TQObject *parent, const char *name )
- : TQObject( parent, name ),
+ TQString fileName, TQ_UINT32 fileSize, // put this in a TQVariant ?
+ TQObject *tqparent, const char *name )
+ : TQObject( tqparent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(0),
m_initiated(false),
@@ -52,11 +52,11 @@ Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
}
Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
- TQHostAddress hostAdress, Q_UINT16 port, // put this in a TQVariant ?
+ TQHostAddress hostAdress, TQ_UINT16 port, // put this in a TQVariant ?
Transfer::Type type,
- TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ?
- TQObject *parent, const char *name )
- : TQObject( parent, name ),
+ TQString fileName, TQ_UINT32 fileSize, // put this in a TQVariant ?
+ TQObject *tqparent, const char *name )
+ : TQObject( tqparent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(0),
m_initiated(false),
@@ -68,8 +68,8 @@ Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
/*
Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress
Transfer::Type type, TQVariant properties,
- TQObject *parent, const char *name )
- : TQObject( parent, name ),
+ TQObject *tqparent, const char *name )
+ : TQObject( tqparent, name ),
m_engine(engine), m_nick(nick),
m_type(type), m_socket(properties[socket]),
m_initiated(false),
@@ -94,11 +94,11 @@ Transfer::~Transfer()
// m_file is automatically closed on destroy.
}
-Transfer::Status Transfer::status() const
+Transfer::tqStatus Transfer::status() const
{
if(m_socket)
{
-// return (Transfer::Status)m_socket->socketStatus();
+// return (Transfer::tqStatus)m_socket->socketStatus();
return Connected;
}
return Error_NoSocket;
@@ -310,7 +310,7 @@ void Transfer::readyReadFileOutgoing()
kdDebug(14121) << k_funcinfo << "Available bytes:" << m_socket->bytesAvailable() << endl;
bool hadData = false;
- Q_UINT32 fileSizeAck = 0;
+ TQ_UINT32 fileSizeAck = 0;
// if (m_socket->bytesAvailable() >= sizeof(fileSizeAck)) // BUGGY: bytesAvailable() that allways return 0 on unbuffered sockets.
{
@@ -334,7 +334,7 @@ void Transfer::writeFileOutgoing()
m_bufferLength = m_file.readBlock(m_buffer, sizeof(m_buffer));
if (m_bufferLength > 0)
{
- Q_UINT32 read = m_socket->writeBlock(m_buffer, m_bufferLength); // should check written == read
+ TQ_UINT32 read = m_socket->writeBlock(m_buffer, m_bufferLength); // should check written == read
// if(read != m_buffer_length)
// buffer is not cleared still
@@ -348,7 +348,7 @@ void Transfer::writeFileOutgoing()
}
}
-void Transfer::checkFileTransferEnd(Q_UINT32 fileSizeAck)
+void Transfer::checkFileTransferEnd(TQ_UINT32 fileSizeAck)
{
kdDebug(14121) << k_funcinfo << "Acknowledged:" << fileSizeAck << endl;
diff --git a/kopete/protocols/irc/libkirc/kirctransfer.h b/kopete/protocols/irc/libkirc/kirctransfer.h
index 36d8de32..3794e744 100644
--- a/kopete/protocols/irc/libkirc/kirctransfer.h
+++ b/kopete/protocols/irc/libkirc/kirctransfer.h
@@ -34,9 +34,10 @@ namespace KIRC
class Engine;
class Transfer
- : public QObject
+ : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type {
@@ -46,7 +47,7 @@ public:
FileIncoming
};
- enum Status {
+ enum tqStatus {
Error_NoSocket = -2,
Error = -1,
Idle = 0,
@@ -58,39 +59,39 @@ public:
public:
Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress
Type type = Unknown,
- TQObject *parent = 0L, const char *name = 0L );
+ TQObject *tqparent = 0L, const char *name = 0L );
Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
- TQHostAddress peer_address, Q_UINT16 peer_port,
+ TQHostAddress peer_address, TQ_UINT16 peer_port,
Transfer::Type type,
- TQObject *parent = 0L, const char *name = 0L );
+ TQObject *tqparent = 0L, const char *name = 0L );
Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type,
- TQString fileName, Q_UINT32 fileSize,
- TQObject *parent = 0L, const char *name = 0L );
+ TQString fileName, TQ_UINT32 fileSize,
+ TQObject *tqparent = 0L, const char *name = 0L );
Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
- TQHostAddress peer_address, Q_UINT16 peer_port,
+ TQHostAddress peer_address, TQ_UINT16 peer_port,
Transfer::Type type,
- TQString fileName, Q_UINT32 fileSize,
- TQObject *parent = 0L, const char *name = 0L );
+ TQString fileName, TQ_UINT32 fileSize,
+ TQObject *tqparent = 0L, const char *name = 0L );
/*
For a file transfer properties are:
KExntendedSocket *socket
or
- QHostAddress peerAddress
- Q_UINT16 peerPort
+ TQHostAddress peerAddress
+ TQ_UINT16 peerPort
for determining the socket.
- QString fileName
- Q_UINT32 fileSize
+ TQString fileName
+ TQ_UINT32 fileSize
for detemining the file propeties.
*//*
Transfer( KIRC *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type, TQVariant properties,
- TQObject *parent = 0L, const char *name = 0L );
+ TQObject *tqparent = 0L, const char *name = 0L );
*/
~Transfer();
@@ -100,7 +101,7 @@ public:
{ return m_nick; }
Type type() const
{ return m_type; }
- Status status() const;
+ tqStatus status() const;
/* Start the transfer.
* If not connected connect to client.
@@ -133,8 +134,8 @@ signals:
void fileSizeCurrent( unsigned int );
void fileSizeAcknowledge( unsigned int );
-// void received(Q_UINT32);
-// void sent(Q_UINT32);
+// void received(TQ_UINT32);
+// void sent(TQ_UINT32);
void abort(TQString);
@@ -155,35 +156,35 @@ protected slots:
protected:
// void emitSignals();
- void checkFileTransferEnd( Q_UINT32 fileSizeAck );
+ void checkFileTransferEnd( TQ_UINT32 fileSizeAck );
KIRC::Engine * m_engine;
- QString m_nick;
+ TQString m_nick;
Type m_type;
KExtendedSocket *m_socket;
bool m_initiated;
// Text member data
- QTextStream m_socket_textStream;
+ TQTextStream m_socket_textStream;
// TQTextCodec * m_socket_codec;
// File member data
- QFile m_file;
- QString m_fileName;
- Q_UINT32 m_fileSize;
- Q_UINT32 /*usize_t*/ m_fileSizeCur;
- Q_UINT32 /*usize_t*/ m_fileSizeAck;
- QDataStream m_socketDataStream;
+ TQFile m_file;
+ TQString m_fileName;
+ TQ_UINT32 m_fileSize;
+ TQ_UINT32 /*usize_t*/ m_fileSizeCur;
+ TQ_UINT32 /*usize_t*/ m_fileSizeAck;
+ TQDataStream m_socketDataStream;
char m_buffer[1024];
int m_bufferLength;
// Data transfer measures
- Q_UINT32 m_receivedBytes;
- Q_UINT32 m_receivedBytesLimit;
+ TQ_UINT32 m_receivedBytes;
+ TQ_UINT32 m_receivedBytesLimit;
- Q_UINT32 m_sentBytes;
- Q_UINT32 m_sentBytesLimit;
+ TQ_UINT32 m_sentBytes;
+ TQ_UINT32 m_sentBytesLimit;
};
}
diff --git a/kopete/protocols/irc/libkirc/kirctransferhandler.cpp b/kopete/protocols/irc/libkirc/kirctransferhandler.cpp
index c6c2185e..3a5ef27c 100644
--- a/kopete/protocols/irc/libkirc/kirctransferhandler.cpp
+++ b/kopete/protocols/irc/libkirc/kirctransferhandler.cpp
@@ -43,7 +43,7 @@ TransferServer *TransferHandler::server()
return m_server;
}
-TransferServer *TransferHandler::server( Q_UINT16 port, int backlog )
+TransferServer *TransferHandler::server( TQ_UINT16 port, int backlog )
{
// if( m_server )
// m_server->terminate();
@@ -56,7 +56,7 @@ TransferServer *TransferHandler::server( Q_UINT16 port, int backlog )
TransferServer *TransferHandler::createServer(Engine *engine, TQString m_userName,
Transfer::Type type,
- TQString fileName, Q_UINT32 fileSize)
+ TQString fileName, TQ_UINT32 fileSize)
{
TransferServer *server = new TransferServer(engine, m_userName, type, fileName, fileSize, this);
transferServerCreated(server);
@@ -65,9 +65,9 @@ TransferServer *TransferHandler::createServer(Engine *engine, TQString m_userNam
Transfer *TransferHandler::createClient(
Engine *engine, TQString nick,// TQString nick_peer_adress,
- TQHostAddress peer_address, Q_UINT16 peer_port,
+ TQHostAddress peer_address, TQ_UINT16 peer_port,
Transfer::Type type,
- TQString fileName, Q_UINT32 fileSize )
+ TQString fileName, TQ_UINT32 fileSize )
{
Transfer *client = new Transfer(
engine, nick,// TQString nick_peer_adress,
diff --git a/kopete/protocols/irc/libkirc/kirctransferhandler.h b/kopete/protocols/irc/libkirc/kirctransferhandler.h
index dc02754c..34516f15 100644
--- a/kopete/protocols/irc/libkirc/kirctransferhandler.h
+++ b/kopete/protocols/irc/libkirc/kirctransferhandler.h
@@ -32,25 +32,26 @@ namespace KIRC
{
class TransferHandler
- : public QObject
+ : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
static TransferHandler *self();
TransferServer *server();
- TransferServer *server( Q_UINT16 port, int backlog = 1 );
+ TransferServer *server( TQ_UINT16 port, int backlog = 1 );
TransferServer *createServer(KIRC::Engine *engine, TQString m_userName,
Transfer::Type type,
- TQString fileName, Q_UINT32 fileSize);
+ TQString fileName, TQ_UINT32 fileSize);
Transfer *createClient(
KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
- TQHostAddress peer_address, Q_UINT16 peer_port,
+ TQHostAddress peer_address, TQ_UINT16 peer_port,
Transfer::Type type,
- TQString file = TQString::null, Q_UINT32 fileSize = 0 );
+ TQString file = TQString(), TQ_UINT32 fileSize = 0 );
// void registerServer( DCCServer * );
// TQPtrList<DCCServer> getRegisteredServers();
diff --git a/kopete/protocols/irc/libkirc/kirctransferserver.cpp b/kopete/protocols/irc/libkirc/kirctransferserver.cpp
index 1fbe1629..ee9e38c1 100644
--- a/kopete/protocols/irc/libkirc/kirctransferserver.cpp
+++ b/kopete/protocols/irc/libkirc/kirctransferserver.cpp
@@ -25,16 +25,16 @@
using namespace KIRC;
/*
-TransferServer::TransferServer( TQObject *parent, const char *name )
- : TQObject( parent, name ),
+TransferServer::TransferServer( TQObject *tqparent, const char *name )
+ : TQObject( tqparent, name ),
m_socket( 0 ),
m_port( 0 ),
m_backlog( 1 )
{
}
*/
-TransferServer::TransferServer(Q_UINT16 port, int backlog, TQObject *parent, const char *name)
- : TQObject( parent, name ),
+TransferServer::TransferServer(TQ_UINT16 port, int backlog, TQObject *tqparent, const char *name)
+ : TQObject( tqparent, name ),
m_socket( 0 ),
m_port( port ),
m_backlog( backlog )
@@ -43,9 +43,9 @@ TransferServer::TransferServer(Q_UINT16 port, int backlog, TQObject *parent, con
TransferServer::TransferServer(Engine *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type,
- TQString fileName, Q_UINT32 fileSize,
- TQObject *parent, const char *name)
- : TQObject( parent, name ),
+ TQString fileName, TQ_UINT32 fileSize,
+ TQObject *tqparent, const char *name)
+ : TQObject( tqparent, name ),
m_socket(0),
m_port(0),
m_backlog(1),
@@ -104,7 +104,7 @@ bool TransferServer::initServer()
return (m_socket->socketStatus() != KExtendedSocket::error);
}
-bool TransferServer::initServer( Q_UINT16 port, int backlog )
+bool TransferServer::initServer( TQ_UINT16 port, int backlog )
{
if (m_socket)
{
diff --git a/kopete/protocols/irc/libkirc/kirctransferserver.h b/kopete/protocols/irc/libkirc/kirctransferserver.h
index 80031859..a84000e2 100644
--- a/kopete/protocols/irc/libkirc/kirctransferserver.h
+++ b/kopete/protocols/irc/libkirc/kirctransferserver.h
@@ -31,17 +31,18 @@ namespace KIRC
{
class TransferServer
- : public QObject
+ : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
-// TransferServer(TQObject *parent = 0, const char *name = 0);
- TransferServer(Q_UINT16 port, int backlog = 1, TQObject *parent = 0, const char *name = 0);
+// TransferServer(TQObject *tqparent = 0, const char *name = 0);
+ TransferServer(TQ_UINT16 port, int backlog = 1, TQObject *tqparent = 0, const char *name = 0);
TransferServer(KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress,
Transfer::Type type,
- TQString fileName, Q_UINT32 fileSize,
- TQObject *parent = 0, const char *name = 0);
+ TQString fileName, TQ_UINT32 fileSize,
+ TQObject *tqparent = 0, const char *name = 0);
~TransferServer();
@@ -50,7 +51,7 @@ public:
protected:
bool initServer();
- bool initServer( Q_UINT16 port, int backlog = 1 );
+ bool initServer( TQ_UINT16 port, int backlog = 1 );
signals:
void incomingNewTransfer(Transfer *transfer);
@@ -61,15 +62,15 @@ protected slots:
private:
KExtendedSocket * m_socket;
- Q_UINT16 m_port;
+ TQ_UINT16 m_port;
int m_backlog;
// The following will be deprecated ...
KIRC::Engine * m_engine;
- QString m_nick;
+ TQString m_nick;
Transfer::Type m_type;
- QString m_fileName;
- Q_UINT32 m_fileSize;
+ TQString m_fileName;
+ TQ_UINT32 m_fileSize;
// by
// 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 afe78fed..f14f1a3e 100644
--- a/kopete/protocols/irc/libkirc/ksslsocket.cpp
+++ b/kopete/protocols/irc/libkirc/ksslsocket.cpp
@@ -73,10 +73,10 @@ KSSLSocket::~KSSLSocket()
delete d;
}
-Q_LONG KSSLSocket::readBlock( char* data, Q_ULONG maxLen )
+TQ_LONG KSSLSocket::readBlock( char* data, TQ_ULONG maxLen )
{
//Re-implemented because KExtSocket doesn't use this when not in buffered mode
- Q_LONG retval = consumeReadBuffer(maxLen, data);
+ TQ_LONG retval = consumeReadBuffer(maxLen, data);
if( retval == 0 )
{
@@ -101,12 +101,16 @@ int KSSLSocket::peekBlock( char* data, uint maxLen )
return consumeReadBuffer(maxLen, data, false);
}
-Q_LONG KSSLSocket::writeBlock( const char* data, Q_ULONG len )
+TQ_LONG KSSLSocket::writeBlock( const char* data, TQ_ULONG len )
{
return d->kssl->write( data, len );
}
+#ifdef USE_QT4
+qint64 KSSLSocket::bytesAvailable() const
+#else // USE_QT4
int KSSLSocket::bytesAvailable() const
+#endif // USE_QT4
{
if( socketStatus() < connected )
return -2;
@@ -202,14 +206,14 @@ void KSSLSocket::setMetaData( const TQString &key, const TQVariant &data )
bool KSSLSocket::hasMetaData( const TQString &key )
{
- return d->metaData.contains(key);
+ return d->metaData.tqcontains(key);
}
TQString KSSLSocket::metaData( const TQString &key )
{
- if( d->metaData.contains(key) )
+ if( d->metaData.tqcontains(key) )
return d->metaData[key];
- return TQString::null;
+ return TQString();
}
/*
@@ -322,7 +326,7 @@ int KSSLSocket::verifyCertificate()
setMetaData("ssl_action", "accept");
}
- // Since we're the parent, we need to teach the child.
+ // Since we're the tqparent, we need to teach the child.
setMetaData("ssl_parent_ip", ourIp );
setMetaData("ssl_parent_cert", pc.toString());
@@ -368,7 +372,7 @@ int KSSLSocket::verifyCertificate()
"does not match the one the "
"certificate was issued to.");
result = messageBox( KIO::SlaveBase::WarningYesNoCancel,
- msg.arg(ourHost),
+ msg.tqarg(ourHost),
i18n("Server Authentication"),
i18n("&Details"),
i18n("Co&ntinue") );
@@ -378,7 +382,7 @@ int KSSLSocket::verifyCertificate()
TQString msg = i18n("The server certificate failed the "
"authenticity test (%1).");
result = messageBox( KIO::SlaveBase::WarningYesNoCancel,
- msg.arg(ourHost),
+ msg.tqarg(ourHost),
i18n("Server Authentication"),
i18n("&Details"),
i18n("Co&ntinue") );
diff --git a/kopete/protocols/irc/libkirc/ksslsocket.h b/kopete/protocols/irc/libkirc/ksslsocket.h
index 79e3b70b..795941cc 100644
--- a/kopete/protocols/irc/libkirc/ksslsocket.h
+++ b/kopete/protocols/irc/libkirc/ksslsocket.h
@@ -29,15 +29,20 @@ class KSSLSocketPrivate;
class KSSLSocket : public KExtendedSocket
{
Q_OBJECT
+ TQ_OBJECT
public:
KSSLSocket();
~KSSLSocket();
- Q_LONG readBlock( char* data, Q_ULONG maxLen );
- Q_LONG writeBlock( const char* data, Q_ULONG len );
+ TQ_LONG readBlock( char* data, TQ_ULONG maxLen );
+ TQ_LONG writeBlock( const char* data, TQ_ULONG len );
int peekBlock( char *data, uint maxLen );
+#ifdef USE_QT4
+ qint64 bytesAvailable() const;
+#else // USE_QT4
int bytesAvailable() const;
+#endif // USE_QT4
void showInfoDialog();
diff --git a/kopete/protocols/irc/ui/channellist.cpp b/kopete/protocols/irc/ui/channellist.cpp
index ea085db8..67916d4d 100644
--- a/kopete/protocols/irc/ui/channellist.cpp
+++ b/kopete/protocols/irc/ui/channellist.cpp
@@ -41,16 +41,16 @@
class ChannelListItem : public KListViewItem
{
public:
- ChannelListItem( KListView *parent, TQString arg1, TQString arg2, TQString arg3 );
+ ChannelListItem( KListView *tqparent, 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;
+ KListView *tqparentList;
};
-ChannelListItem::ChannelListItem( KListView *parent, TQString arg1, TQString arg2, TQString arg3 ) :
- KListViewItem( parent, parent->lastItem() ), parentList( parent )
+ChannelListItem::ChannelListItem( KListView *tqparent, TQString arg1, TQString arg2, TQString arg3 ) :
+ KListViewItem( tqparent, tqparent->lastItem() ), tqparentList( tqparent )
{
setText(0, arg1);
setText(1, arg2);
@@ -81,11 +81,11 @@ void ChannelListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int colum
// set the alternate cell background colour if necessary
TQColorGroup _cg = cg;
if (isAlternate())
- if (listView()->viewport()->backgroundMode()==Qt::FixedColor)
+ if (listView()->viewport()->backgroundMode()==TQt::FixedColor)
_cg.setColor(TQColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground());
else
_cg.setColor(TQColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground());
- // PASTED FROM QLISTVIEWITEM
+ // PASTED FROM TQLISTVIEWITEM
{
TQPainter *p = &paint;
@@ -97,7 +97,7 @@ void ChannelListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int colum
// any text we render is done by the Components, not by this class, so make sure we've nothing to write
TQString t;
- // removed text truncating code from Qt - we do that differently, further on
+ // removed text truncating code from TQt - we do that differently, further on
int marg = lv->itemMargin();
int r = marg;
@@ -106,20 +106,20 @@ void ChannelListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int colum
const BackgroundMode bgmode = lv->viewport()->backgroundMode();
const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode );
- if ( _cg.brush( crole ) != lv->colorGroup().brush( crole ) )
+ if ( _cg.brush( crole ) != lv->tqcolorGroup().brush( crole ) )
p->fillRect( 0, 0, width, height(), _cg.brush( crole ) );
else
{
// all copied from TQListView::paintEmptyArea
//lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) );
- TQStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in TQListView and QHeader
+ TQStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in TQListView and TQHeader
TQStyle::SFlags how = TQStyle::Style_Default;
if ( lv->isEnabled() )
how |= TQStyle::Style_Enabled;
- lv->style().drawComplexControl( TQStyle::CC_ListView,
- p, lv, TQRect( 0, 0, width, height() ), lv->colorGroup(),
+ lv->tqstyle().tqdrawComplexControl( TQStyle::CC_ListView,
+ p, lv, TQRect( 0, 0, width, height() ), lv->tqcolorGroup(),
how, TQStyle::SC_ListView, TQStyle::SC_None,
opt );
}
@@ -130,20 +130,20 @@ void ChannelListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int colum
(column == 0 || lv->allColumnsShowFocus()) ) {
p->fillRect( r - marg, 0, width - r + marg, height(),
_cg.brush( TQColorGroup::Highlight ) );
- // removed text pen setting code from Qt
+ // removed text pen setting code from TQt
}
- // removed icon drawing code from Qt
+ // removed icon drawing code from TQt
// draw the tree gubbins
if ( multiLinesEnabled() && column == 0 && isOpen() && childCount() ) {
int textheight = fm.size( align, t ).height() + 2 * lv->itemMargin();
- textheight = QMAX( textheight, TQApplication::globalStrut().height() );
+ textheight = TQMAX( textheight, TQApplication::globalStrut().height() );
if ( textheight % 2 > 0 )
textheight++;
if ( textheight < height() ) {
int w = lv->treeStepSize() / 2;
- lv->style().drawComplexControl( TQStyle::CC_ListView, p, lv,
+ lv->tqstyle().tqdrawComplexControl( 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,
@@ -165,26 +165,26 @@ void ChannelListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int colum
p->drawPixmap( 0, 0, back );
}
-ChannelList::ChannelList( TQWidget* parent, KIRC::Engine *engine )
- : TQWidget( parent ), m_engine( engine )
+ChannelList::ChannelList( TQWidget* tqparent, KIRC::Engine *engine )
+ : TQWidget( tqparent ), m_engine( engine )
{
ChannelListLayout = new TQVBoxLayout( this, 11, 6, "ChannelListLayout");
- layout72_2 = new TQHBoxLayout( 0, 0, 6, "layout72_2");
+ tqlayout72_2 = new TQHBoxLayout( 0, 0, 6, "tqlayout72_2");
textLabel1_2 = new TQLabel( this, "textLabel1_2" );
- layout72_2->addWidget( textLabel1_2 );
+ tqlayout72_2->addWidget( textLabel1_2 );
channelSearch = new TQLineEdit( this, "channelSearch" );
- layout72_2->addWidget( channelSearch );
+ tqlayout72_2->addWidget( channelSearch );
numUsers = new TQSpinBox( 0, 32767, 1, this, "num_users" );
numUsers->setSuffix( i18n(" members") );
- layout72_2->addWidget( numUsers );
+ tqlayout72_2->addWidget( numUsers );
mSearchButton = new TQPushButton( this, "mSearchButton" );
- layout72_2->addWidget( mSearchButton );
- ChannelListLayout->addLayout( layout72_2 );
+ tqlayout72_2->addWidget( mSearchButton );
+ ChannelListLayout->addLayout( tqlayout72_2 );
mChannelList = new KListView( this, "mChannelList" );
mChannelList->addColumn( i18n( "Channel" ) );
@@ -226,8 +226,8 @@ ChannelList::ChannelList( TQWidget* parent, KIRC::Engine *engine )
connect( m_engine, TQT_SIGNAL( incomingEndOfList() ), this, TQT_SLOT( slotListEnd() ) );
- connect( m_engine, TQT_SIGNAL( statusChanged(KIRC::Engine::Status) ),
- this, TQT_SLOT( slotStatusChanged(KIRC::Engine::Status) ) );
+ connect( m_engine, TQT_SIGNAL( statusChanged(KIRC::Engine::tqStatus) ),
+ this, TQT_SLOT( slotStatusChanged(KIRC::Engine::tqStatus) ) );
show();
}
@@ -242,9 +242,9 @@ void ChannelList::slotItemSelected( TQListViewItem *i )
emit channelSelected( i->text(0) );
}
-void ChannelList::slotStatusChanged(KIRC::Engine::Status newStatus)
+void ChannelList::slotStatusChanged(KIRC::Engine::tqStatus newtqStatus)
{
- switch(newStatus) {
+ switch(newtqStatus) {
case KIRC::Engine::Connected:
this->reset();
break;
@@ -309,13 +309,13 @@ void ChannelList::search()
void ChannelList::slotChannelListed( const TQString &channel, uint users, const TQString &topic )
{
checkSearchResult( channel, users, topic );
- channelCache.insert( channel, QPair< uint, TQString >( users, topic ) );
+ channelCache.insert( channel, TQPair< uint, TQString >( users, 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 ) )
+ ( mSearch.isEmpty() || channel.tqcontains( mSearch, false ) || topic.tqcontains( mSearch, false ) )
)
{
new ChannelListItem( mChannelList, channel, TQString::number(users), topic );
diff --git a/kopete/protocols/irc/ui/channellist.h b/kopete/protocols/irc/ui/channellist.h
index 229bf4c6..d907efcb 100644
--- a/kopete/protocols/irc/ui/channellist.h
+++ b/kopete/protocols/irc/ui/channellist.h
@@ -35,12 +35,13 @@ class TQSpinBox;
class TQListViewItem;
class ChannelList
- : public QWidget
+ : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ChannelList( TQWidget *parent, KIRC::Engine *engine );
+ ChannelList( TQWidget *tqparent, KIRC::Engine *engine );
public slots:
void search();
@@ -57,7 +58,7 @@ class ChannelList
void slotChannelListed( const TQString & channel, uint users, const TQString & topic );
void slotListEnd();
void slotSearchCache();
- void slotStatusChanged( KIRC::Engine::Status );
+ void slotStatusChanged( KIRC::Engine::tqStatus );
private:
void checkSearchResult( const TQString & channel, uint users, const TQString & topic );
@@ -68,13 +69,13 @@ class ChannelList
TQPushButton* mSearchButton;
KListView* mChannelList;
TQVBoxLayout* ChannelListLayout;
- TQHBoxLayout* layout72_2;
+ TQHBoxLayout* tqlayout72_2;
KIRC::Engine *m_engine;
bool mSearching;
TQString mSearch;
uint mUsers;
- TQMap< TQString, QPair< uint, TQString > > channelCache;
- TQMap< TQString, QPair< uint, TQString > >::const_iterator cacheIterator;
+ TQMap< TQString, TQPair< uint, TQString > > channelCache;
+ TQMap< TQString, TQPair< uint, TQString > >::const_iterator cacheIterator;
};
#endif
diff --git a/kopete/protocols/irc/ui/channellistdialog.h b/kopete/protocols/irc/ui/channellistdialog.h
index 9dcb0cbb..e97316b9 100644
--- a/kopete/protocols/irc/ui/channellistdialog.h
+++ b/kopete/protocols/irc/ui/channellistdialog.h
@@ -26,6 +26,7 @@ class ChannelListDialog
: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ChannelListDialog(KIRC::Engine *engine, const TQString &caption, TQObject *target, const char* slotJoinChan);
diff --git a/kopete/protocols/irc/ui/ircadd.ui b/kopete/protocols/irc/ui/ircadd.ui
index f1025112..ae2c0740 100644
--- a/kopete/protocols/irc/ui/ircadd.ui
+++ b/kopete/protocols/irc/ui/ircadd.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>ircAddUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ircAddUI</cstring>
</property>
@@ -22,11 +22,11 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget3</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -43,15 +43,15 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout70</cstring>
+ <cstring>tqlayout70</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -68,7 +68,7 @@
<string>The name of the IRC contact or channel you would like to add. You may type simply the text of a person's nickname, or you may type a channel name, preceded by a pound sign ('#').</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>addID</cstring>
</property>
@@ -81,14 +81,14 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
<property name="text">
<string>&lt;i&gt;(for example: joe_bob or #somechannel)&lt;/i&gt;</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -102,7 +102,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>110</height>
@@ -111,7 +111,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -122,7 +122,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QHBox">
+ <widget class="TQHBox">
<property name="name">
<cstring>hbox</cstring>
</property>
@@ -134,8 +134,8 @@
</widget>
<customwidgets>
<customwidget>
- <class>QHBox</class>
- <header>qhbox.h</header>
+ <class>TQHBox</class>
+ <header>tqhbox.h</header>
<sizehint>
<width>-1</width>
<height>-1</height>
@@ -159,5 +159,5 @@
<tabstop>addID</tabstop>
<tabstop>tabWidget3</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kopete/protocols/irc/ui/irceditaccount.ui b/kopete/protocols/irc/ui/irceditaccount.ui
index 682e9be9..c5827342 100644
--- a/kopete/protocols/irc/ui/irceditaccount.ui
+++ b/kopete/protocols/irc/ui/irceditaccount.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>IRCEditAccountBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>IRCEditAccountBase</cstring>
</property>
@@ -30,7 +30,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget2</cstring>
</property>
@@ -42,7 +42,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -63,14 +63,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>150</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -82,7 +82,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -91,11 +91,11 @@
<property name="text">
<string>&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; Most IRC servers do not require a password, and only a nickname is required to connect&lt;/p&gt;</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox59</cstring>
</property>
@@ -112,7 +112,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -126,7 +126,7 @@
<string>This is the name that everyone will see everytime you say something</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -140,7 +140,7 @@
<string>When the nickname is already in use when connecting, this name will be used instead</string>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>mNickName</cstring>
</property>
@@ -159,7 +159,7 @@
<string>The alias you would like to use on IRC. You may change this once online with the /nick command.</string>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>mAltNickname</cstring>
</property>
@@ -175,7 +175,7 @@
<cstring>mPasswordWidget</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>m_realNameLabel</cstring>
</property>
@@ -186,7 +186,7 @@
<cstring>m_realNameLineEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -200,7 +200,7 @@
<string>The username you would prefer to use on IRC, if your system does not have identd support. Leave blank to use your system account name.</string>
</property>
</widget>
- <widget class="QLineEdit" row="2" column="1">
+ <widget class="TQLineEdit" row="2" column="1">
<property name="name">
<cstring>mUserName</cstring>
</property>
@@ -222,7 +222,7 @@
<string>The username you would prefer to use on IRC, if your system does not have identd support. Leave blank to use your system account name.</string>
</property>
</widget>
- <widget class="QLineEdit" row="3" column="1">
+ <widget class="TQLineEdit" row="3" column="1">
<property name="name">
<cstring>m_realNameLineEdit</cstring>
</property>
@@ -248,7 +248,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -259,23 +259,23 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout21</cstring>
+ <cstring>tqlayout21</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
- <cstring>layout19</cstring>
+ <cstring>tqlayout19</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>description</cstring>
</property>
@@ -293,7 +293,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>161</width>
<height>20</height>
@@ -302,20 +302,20 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout20</cstring>
+ <cstring>tqlayout20</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>network</cstring>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>editButton</cstring>
</property>
@@ -333,7 +333,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>392</width>
<height>20</height>
@@ -342,7 +342,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -355,7 +355,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -374,7 +374,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>preferSSL</cstring>
</property>
@@ -382,7 +382,7 @@
<string>&amp;Prefer SSL-based connections</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>autoConnect</cstring>
</property>
@@ -393,15 +393,15 @@
<string>If you check that case, the account will not be connected when you press the "Connect All" button, or at startup even if you selected to automatically connect at startup</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout25</cstring>
+ <cstring>tqlayout25</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2_2</cstring>
</property>
@@ -412,7 +412,7 @@
<cstring>charset</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>charset</cstring>
</property>
@@ -427,7 +427,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>141</width>
<height>20</height>
@@ -438,7 +438,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox5</cstring>
</property>
@@ -449,7 +449,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -460,7 +460,7 @@
<cstring>partMessage</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -471,7 +471,7 @@
<cstring>quitMessage</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>partMessage</cstring>
</property>
@@ -482,7 +482,7 @@
<string>The message you want people to see when you part a channel without giving a reason. Leave this field blank to use the Kopete default message.</string>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>quitMessage</cstring>
</property>
@@ -505,7 +505,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>150</height>
@@ -514,7 +514,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -525,7 +525,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox7</cstring>
</property>
@@ -536,7 +536,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="1" column="1">
+ <widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>autoShowAnonWindows</cstring>
</property>
@@ -544,7 +544,7 @@
<string>Auto-show anonymous windows</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>autoShowServerWindow</cstring>
</property>
@@ -552,15 +552,15 @@
<string>Auto-show the server window</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout19</cstring>
+ <cstring>tqlayout19</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -568,7 +568,7 @@
<string>Server messages:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel4_3</cstring>
</property>
@@ -576,7 +576,7 @@
<string>Server notices:</string>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<item>
<property name="text">
<string>Active Window</string>
@@ -609,7 +609,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QComboBox" row="0" column="1">
+ <widget class="TQComboBox" row="0" column="1">
<item>
<property name="text">
<string>Active Window</string>
@@ -644,15 +644,15 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout23</cstring>
+ <cstring>tqlayout23</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3_3</cstring>
</property>
@@ -660,7 +660,7 @@
<string>Error messages:</string>
</property>
</widget>
- <widget class="QComboBox" row="0" column="1">
+ <widget class="TQComboBox" row="0" column="1">
<item>
<property name="text">
<string>Active Window</string>
@@ -690,7 +690,7 @@
<cstring>informationReplies</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -698,7 +698,7 @@
<string>Information replies:</string>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<item>
<property name="text">
<string>Active Window</string>
@@ -732,7 +732,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox6</cstring>
</property>
@@ -744,7 +744,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>130</height>
@@ -807,15 +807,15 @@
<string>You can use this dialog to add custom replies for when people send CTCP requests to you. You can also use this dialog to override the built-in replies for VERSION, USERINFO, and CLIENTINFO.</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout153</cstring>
+ <cstring>tqlayout153</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
@@ -826,12 +826,12 @@
<cstring>newCTCP</cstring>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>newCTCP</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel4_2</cstring>
</property>
@@ -842,12 +842,12 @@
<cstring>newReply</cstring>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>newReply</cstring>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>addReply</cstring>
</property>
@@ -859,7 +859,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox60</cstring>
</property>
@@ -871,7 +871,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>130</height>
@@ -884,15 +884,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout29</cstring>
+ <cstring>tqlayout29</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>commandEdit</cstring>
</property>
@@ -905,7 +905,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>addButton</cstring>
</property>
@@ -1015,7 +1015,7 @@
<tabstop>commandEdit</tabstop>
<tabstop>addButton</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.cpp b/kopete/protocols/irc/ui/irceditaccountwidget.cpp
index 06e2f166..6717bb21 100644
--- a/kopete/protocols/irc/ui/irceditaccountwidget.cpp
+++ b/kopete/protocols/irc/ui/irceditaccountwidget.cpp
@@ -46,8 +46,8 @@
#include <tqlistbox.h>
#include <tqlineedit.h>
-IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, TQWidget *parent, const char * )
- : IRCEditAccountBase(parent), KopeteEditAccountWidget(ident)
+IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, TQWidget *tqparent, const char * )
+ : IRCEditAccountBase(tqparent), KopeteEditAccountWidget(ident)
{
mProtocol = proto;
@@ -91,9 +91,9 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
new TQListViewItem( ctcpList, it.key(), it.data() );
}
- mUserName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^\\s]*$"), mUserName ) );
- mNickName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) );
- mAltNickname->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) );
+ mUserName->setValidator( new TQRegExpValidator( TQString::tqfromLatin1("^[^\\s]*$"), TQT_TQOBJECT(mUserName) ) );
+ mNickName->setValidator( new TQRegExpValidator( TQString::tqfromLatin1("^[^#+&][^\\s]*$"), TQT_TQOBJECT(mNickName) ) );
+ mAltNickname->setValidator( new TQRegExpValidator( TQString::tqfromLatin1("^[^#+&][^\\s]*$"), TQT_TQOBJECT(mAltNickname) ) );
charset->insertStringList( KCodecAction::supportedEncodings() );
@@ -122,7 +122,7 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
connect( IRCProtocol::protocol(), TQT_SIGNAL( networkConfigUpdated( const TQString & ) ),
this, TQT_SLOT( slotUpdateNetworks( const TQString & ) ) );
- slotUpdateNetworks( TQString::null );
+ slotUpdateNetworks( TQString() );
}
IRCEditAccountWidget::~IRCEditAccountWidget()
@@ -212,9 +212,9 @@ TQString IRCEditAccountWidget::generateAccountId( const TQString &network )
TQString nextId = network;
uint accountNumber = 1;
- while( config->hasGroup( TQString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) )
+ while( config->hasGroup( TQString("Account_%1_%2").tqarg( m_protocol->pluginId() ).tqarg( nextId ) ) )
{
- nextId = TQString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber );
+ nextId = TQString::tqfromLatin1("%1_%2").tqarg( network ).tqarg( ++accountNumber );
}
kdDebug( 14120 ) << k_funcinfo << " ID IS: " << nextId << endl;
return nextId;
@@ -227,7 +227,7 @@ Kopete::Account *IRCEditAccountWidget::apply()
if( !account() )
{
- setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), TQString::null, networkName, nickName ) );
+ setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), TQString(), networkName, nickName ) );
}
else
diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.h b/kopete/protocols/irc/ui/irceditaccountwidget.h
index bd9718f3..025dc5fb 100644
--- a/kopete/protocols/irc/ui/irceditaccountwidget.h
+++ b/kopete/protocols/irc/ui/irceditaccountwidget.h
@@ -29,9 +29,10 @@ class TQListViewItem;
class IRCEditAccountWidget : public IRCEditAccountBase, public KopeteEditAccountWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *, TQWidget *parent=0, const char *name=0);
+ IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *, TQWidget *tqparent=0, const char *name=0);
~IRCEditAccountWidget();
IRCAccount *account();
diff --git a/kopete/protocols/irc/ui/networkconfig.ui b/kopete/protocols/irc/ui/networkconfig.ui
index d1000e37..2a00f1bb 100644
--- a/kopete/protocols/irc/ui/networkconfig.ui
+++ b/kopete/protocols/irc/ui/networkconfig.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>NetworkConfig</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>NetworkConfig</cstring>
</property>
@@ -19,12 +19,12 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLineEdit" row="1" column="4" rowspan="1" colspan="3">
+ <widget class="TQLineEdit" row="1" column="4" rowspan="1" colspan="3">
<property name="name">
<cstring>description</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="3">
+ <widget class="TQLabel" row="1" column="3">
<property name="name">
<cstring>textLabel10</cstring>
</property>
@@ -43,7 +43,7 @@
<cstring>description</cstring>
</property>
</widget>
- <widget class="QGroupBox" row="2" column="3" rowspan="1" colspan="4">
+ <widget class="TQGroupBox" row="2" column="3" rowspan="1" colspan="4">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@@ -65,7 +65,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QListBox" row="0" column="0" rowspan="3" colspan="4">
+ <widget class="TQListBox" row="0" column="0" rowspan="3" colspan="4">
<property name="name">
<cstring>hostList</cstring>
</property>
@@ -84,7 +84,7 @@
<string>The IRC servers associated with this network. Use the up and down buttons to alter the order in which connections are attempted.</string>
</property>
</widget>
- <widget class="QLineEdit" row="4" column="1" rowspan="1" colspan="4">
+ <widget class="TQLineEdit" row="4" column="1" rowspan="1" colspan="4">
<property name="name">
<cstring>password</cstring>
</property>
@@ -95,7 +95,7 @@
<string>Most IRC servers do not require a password</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="2">
+ <widget class="TQLabel" row="3" column="2">
<property name="name">
<cstring>textLabel6</cstring>
</property>
@@ -106,7 +106,7 @@
<cstring>port</cstring>
</property>
</widget>
- <widget class="QSpinBox" row="3" column="3" rowspan="1" colspan="2">
+ <widget class="TQSpinBox" row="3" column="3" rowspan="1" colspan="2">
<property name="name">
<cstring>port</cstring>
</property>
@@ -120,7 +120,7 @@
<number>6667</number>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -131,7 +131,7 @@
<cstring>password</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -142,7 +142,7 @@
<cstring>host</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="3" column="1">
+ <widget class="TQLineEdit" row="3" column="1">
<property name="name">
<cstring>host</cstring>
</property>
@@ -153,7 +153,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>useSSL</cstring>
</property>
@@ -164,7 +164,7 @@
<string>Check this to enable SSL for this connection</string>
</property>
</widget>
- <widget class="QPushButton" row="6" column="3" rowspan="1" colspan="2">
+ <widget class="TQPushButton" row="6" column="3" rowspan="1" colspan="2">
<property name="name">
<cstring>removeHost</cstring>
</property>
@@ -180,7 +180,7 @@
<string>&amp;Remove</string>
</property>
</widget>
- <widget class="QPushButton" row="6" column="2">
+ <widget class="TQPushButton" row="6" column="2">
<property name="name">
<cstring>newHost</cstring>
</property>
@@ -206,14 +206,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>210</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="2" column="4">
+ <widget class="TQPushButton" row="2" column="4">
<property name="name">
<cstring>downButton</cstring>
</property>
@@ -240,14 +240,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>151</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="1" column="4">
+ <widget class="TQPushButton" row="1" column="4">
<property name="name">
<cstring>upButton</cstring>
</property>
@@ -266,7 +266,7 @@
</widget>
</grid>
</widget>
- <widget class="QPushButton" row="3" column="6">
+ <widget class="TQPushButton" row="3" column="6">
<property name="name">
<cstring>cancelButton</cstring>
</property>
@@ -274,7 +274,7 @@
<string>&amp;Cancel</string>
</property>
</widget>
- <widget class="QPushButton" row="3" column="5">
+ <widget class="TQPushButton" row="3" column="5">
<property name="name">
<cstring>saveButton</cstring>
</property>
@@ -282,7 +282,7 @@
<string>&amp;Save</string>
</property>
</widget>
- <widget class="QPushButton" row="3" column="0">
+ <widget class="TQPushButton" row="3" column="0">
<property name="name">
<cstring>newNetwork</cstring>
</property>
@@ -290,7 +290,7 @@
<string>Ne&amp;w</string>
</property>
</widget>
- <widget class="QListBox" row="0" column="0" rowspan="3" colspan="3">
+ <widget class="TQListBox" row="0" column="0" rowspan="3" colspan="3">
<property name="name">
<cstring>networkList</cstring>
</property>
@@ -313,14 +313,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>260</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="3" column="1">
+ <widget class="TQPushButton" row="3" column="1">
<property name="name">
<cstring>renameNetwork</cstring>
</property>
@@ -328,7 +328,7 @@
<string>Rena&amp;me...</string>
</property>
</widget>
- <widget class="QPushButton" row="3" column="2">
+ <widget class="TQPushButton" row="3" column="2">
<property name="name">
<cstring>removeNetwork</cstring>
</property>
@@ -370,13 +370,13 @@
<tabstop>saveButton</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
-<signals>
+<Q_SIGNALS>
<signal>accepted()</signal>
<signal>rejected()</signal>
-</signals>
-<slots>
+</Q_SIGNALS>
+<Q_SLOTS>
<slot access="protected">accept()</slot>
<slot access="protected">reject()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kopete/protocols/irc/ui/networkconfig.ui.h b/kopete/protocols/irc/ui/networkconfig.ui.h
index 30f9654e..183ba57f 100644
--- a/kopete/protocols/irc/ui/networkconfig.ui.h
+++ b/kopete/protocols/irc/ui/networkconfig.ui.h
@@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
+** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/