diff options
author | Timothy Pearson <[email protected]> | 2011-12-15 15:49:40 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-15 15:49:40 -0600 |
commit | 808e453c56036211f57482ed847d54aca01bba68 (patch) | |
tree | 75515d5768dea10d4fbe4cd772e0a89c1c4b3aa9 /kopete/protocols/irc/ircaccount.cpp | |
parent | cd9b9ed7fd0ac8a75106148254aa58e2e5c04863 (diff) | |
download | tdenetwork-808e453c56036211f57482ed847d54aca01bba68.tar.gz tdenetwork-808e453c56036211f57482ed847d54aca01bba68.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kopete/protocols/irc/ircaccount.cpp')
-rw-r--r-- | kopete/protocols/irc/ircaccount.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/kopete/protocols/irc/ircaccount.cpp b/kopete/protocols/irc/ircaccount.cpp index 9dbdfc4a..e9d88985 100644 --- a/kopete/protocols/irc/ircaccount.cpp +++ b/kopete/protocols/irc/ircaccount.cpp @@ -54,14 +54,14 @@ #include <knotifyclient.h> #include <kpopupmenu.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> -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"); +const TQString IRCAccount::CONFIG_CODECMIB = TQString::fromLatin1("Codec"); +const TQString IRCAccount::CONFIG_NETWORKNAME = TQString::fromLatin1("NetworkName"); +const TQString IRCAccount::CONFIG_NICKNAME = TQString::fromLatin1("NickName"); +const TQString IRCAccount::CONFIG_USERNAME = TQString::fromLatin1("UserName"); +const TQString IRCAccount::CONFIG_REALNAME = TQString::fromLatin1("RealName"); IRCAccount::IRCAccount(IRCProtocol *protocol, const 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]").tqarg(kapp->aboutData()->version()); + TQString version=i18n("Kopete IRC Plugin %1 [http://kopete.kde.org]").arg(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::tqStatus)), - this, TQT_SLOT(engineStatusChanged(KIRC::Engine::tqStatus))); + TQObject::connect(m_engine, TQT_SIGNAL(statusChanged(KIRC::Engine::Status)), + this, TQT_SLOT(engineStatusChanged(KIRC::Engine::Status))); 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").tqarg( hostName ); + m_network->name = i18n("Temporary Network - %1").arg( hostName ); m_network->description = i18n("Network imported from previous version of Kopete, or an IRC URI"); IRCHost *host = new IRCHost; @@ -204,7 +204,7 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const TQString &accountId, const T m_contactManager = new IRCContactManager(mNickName, this); setMyself( m_contactManager->mySelf() ); - setAccountLabel( TQString::tqfromLatin1("%1@%2").tqarg(mNickName,networkName) ); + setAccountLabel( TQString::fromLatin1("%1@%2").arg(mNickName,networkName) ); m_myServer = m_contactManager->myServer(); m_joinChannelAction = new KAction ( i18n("Join Channel..."), TQString(), 0, 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:").tqarg(nick), + i18n("The nickname %1 is already in use. Please enter an alternate nickname:").arg(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").tqarg(nick), i18n("IRC Plugin")); + KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("The nickname %1 is already in use").arg(nick), i18n("IRC Plugin")); } void IRCAccount::setAltNick( const TQString &altNick ) { - configGroup()->writeEntry(TQString::tqfromLatin1( "altNick" ), altNick); + configGroup()->writeEntry(TQString::fromLatin1( "altNick" ), altNick); } const TQString IRCAccount::altNick() const { - return configGroup()->readEntry(TQString::tqfromLatin1("altNick")); + return configGroup()->readEntry(TQString::fromLatin1("altNick")); } void IRCAccount::setAutoShowServerWindow( bool show ) { autoShowServerWindow = show; - configGroup()->writeEntry(TQString::tqfromLatin1( "AutoShowServerWindow" ), autoShowServerWindow); + configGroup()->writeEntry(TQString::fromLatin1( "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>").tqarg(network), - i18n("Problem Loading %1").tqarg( accountId() ), 0 ); + " 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 ); } } @@ -338,29 +338,29 @@ TQTextCodec *IRCAccount::codec() const // FIXME: Move this to a dictionnary void IRCAccount::setDefaultPart( const TQString &defaultPart ) { - configGroup()->writeEntry( TQString::tqfromLatin1( "defaultPart" ), defaultPart ); + configGroup()->writeEntry( TQString::fromLatin1( "defaultPart" ), defaultPart ); } // FIXME: Move this to a dictionnary void IRCAccount::setDefaultQuit( const TQString &defaultQuit ) { - configGroup()->writeEntry( TQString::tqfromLatin1( "defaultQuit" ), defaultQuit ); + configGroup()->writeEntry( TQString::fromLatin1( "defaultQuit" ), defaultQuit ); } // FIXME: Move this to a dictionnary const TQString IRCAccount::defaultPart() const { - TQString partMsg = configGroup()->readEntry(TQString::tqfromLatin1("defaultPart")); + TQString partMsg = configGroup()->readEntry(TQString::fromLatin1("defaultPart")); if( partMsg.isEmpty() ) - return TQString::tqfromLatin1("Kopete %1 : http://kopete.kde.org").tqarg( kapp->aboutData()->version() ); + return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg( kapp->aboutData()->version() ); return partMsg; } const TQString IRCAccount::defaultQuit() const { - TQString quitMsg = configGroup()->readEntry(TQString::tqfromLatin1("defaultQuit")); + TQString quitMsg = configGroup()->readEntry(TQString::fromLatin1("defaultQuit")); if( quitMsg.isEmpty() ) - return TQString::tqfromLatin1("Kopete %1 : http://kopete.kde.org").tqarg(kapp->aboutData()->version()); + return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg(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::tqfromLatin1("%1=%2").tqarg( it.key() ).tqarg( it.data() ) ); + val.append( TQString::fromLatin1("%1=%2").arg( it.key() ).arg( it.data() ) ); } configGroup()->writeEntry( "CustomCtcp", val ); @@ -416,7 +416,7 @@ void IRCAccount::setMessageDestinations( int serverNotices, int serverMessages, KActionMenu *IRCAccount::actionMenu() { - TQString menuTitle = TQString::tqfromLatin1( " %1 <%2> " ).tqarg( accountId() ).tqarg( myself()->onlinetqStatus().description() ); + TQString menuTitle = TQString::fromLatin1( " %1 <%2> " ).arg( accountId() ).arg( myself()->onlineStatus().description() ); KActionMenu *mActionMenu = Kopete::Account::actionMenu(); @@ -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>").tqarg(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>").arg(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>").tqarg(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>").arg(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...").tqarg( host->host ) ); + myServer()->appendMessage( i18n("Connecting to %1...").arg( 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::tqStatus newtqStatus) +void IRCAccount::engineStatusChanged(KIRC::Engine::Status newStatus) { kdDebug(14120) << k_funcinfo << endl; - mySelf()->updatetqStatus(); + mySelf()->updateStatus(); - switch (newtqStatus) + switch (newStatus) { case KIRC::Engine::Idle: // Do nothing. @@ -563,7 +563,7 @@ void IRCAccount::slotPerformOnConnectCommands() return; if (!autoConnect.isEmpty()) - Kopete::CommandHandler::commandHandler()->processMessage( TQString::tqfromLatin1("/join %1").tqarg(autoConnect), manager); + Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/join %1").arg(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").tqarg( m_engine->currentHost() ), this, + i18n("Channel List for %1").arg( m_engine->currentHost() ), this, TQT_SLOT( slotJoinNamedChannel( const TQString & ) ) ); } else @@ -653,17 +653,17 @@ void IRCAccount::slotShowServerWindow() bool IRCAccount::isConnected() { -// return ( myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Offline ); +// return ( myself()->onlineStatus().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()->onlinetqStatus().status() == Kopete::OnlineStatus::Offline ) + myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline ) connect(); else if (status.status() == Kopete::OnlineStatus::Online && - myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Away ) + myself()->onlineStatus().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::tqfromLatin1("#"))) + else if (contactId.startsWith(TQString::fromLatin1("#"))) { 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 tqchildren = old->contacts(); - if (tqchildren.isEmpty()) + Kopete::ContactPtrList children = old->contacts(); + if (children.isEmpty()) Kopete::ContactList::self()->removeMetaContact( old ); } else if( c->metaContact()->isTemporary() ) @@ -781,7 +781,7 @@ void IRCAccount::slotJoinChannel() } KMessageBox::error( Kopete::UI::Global::mainWidget(), - i18n("\"%1\" is an invalid channel. Channels must start with '#', '!', '+', or '&'.").tqarg(chan), + i18n("\"%1\" is an invalid channel. Channels must start with '#', '!', '+', or '&'.").arg(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").tqarg(type).tqarg(messageReceived), InfoReply ); + appendMessage( i18n("CTCP %1 REPLY: %2").arg(type).arg(messageReceived), InfoReply ); } void IRCAccount::slotNoSuchNickname( const TQString &nick ) { if( KIRC::Entity::isChannel(nick) ) - appendMessage( i18n("The channel \"%1\" does not exist").tqarg(nick), UnknownReply ); + appendMessage( i18n("The channel \"%1\" does not exist").arg(nick), UnknownReply ); else - appendMessage( i18n("The nickname \"%1\" does not exist").tqarg(nick), UnknownReply ); + appendMessage( i18n("The nickname \"%1\" does not exist").arg(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::tqfromLatin1("irc_event"), message + Kopete::UI::Global::mainWidget()->winId(), TQString::fromLatin1("irc_event"), message ); } } |