diff options
Diffstat (limited to 'kopete/protocols/irc/irccontactmanager.cpp')
-rw-r--r-- | kopete/protocols/irc/irccontactmanager.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/kopete/protocols/irc/irccontactmanager.cpp b/kopete/protocols/irc/irccontactmanager.cpp index 7808668b..fb49e08e 100644 --- a/kopete/protocols/irc/irccontactmanager.cpp +++ b/kopete/protocols/irc/irccontactmanager.cpp @@ -34,12 +34,12 @@ #include <kconfig.h> #include <kstandarddirs.h> -#include <qtimer.h> +#include <tqtimer.h> -IRCContactManager::IRCContactManager(const QString &nickName, IRCAccount *account, const char *name) - : QObject(account, name), - m_channels( QDict<IRCChannelContact>( 17, false ) ), - m_users( QDict<IRCUserContact>( 577, false ) ), +IRCContactManager::IRCContactManager(const TQString &nickName, IRCAccount *account, const char *name) + : TQObject(account, name), + m_channels( TQDict<IRCChannelContact>( 17, false ) ), + m_users( TQDict<IRCUserContact>( 577, false ) ), m_account( account ) { m_mySelf = findUser(nickName); @@ -48,41 +48,41 @@ IRCContactManager::IRCContactManager(const QString &nickName, IRCAccount *accoun // m->setTemporary( true ); m_myServer = new IRCServerContact(this, account->networkName(), m); - QObject::connect(account->engine(), SIGNAL(incomingMessage(const QString &, const QString &, const QString &)), - this, SLOT(slotNewMessage(const QString &, const QString &, const QString &))); + TQObject::connect(account->engine(), TQT_SIGNAL(incomingMessage(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotNewMessage(const TQString &, const TQString &, const TQString &))); - QObject::connect(account->engine(), SIGNAL(incomingPrivMessage(const QString &, const QString &, const QString &)), - this, SLOT(slotNewPrivMessage(const QString &, const QString &, const QString &))); + TQObject::connect(account->engine(), TQT_SIGNAL(incomingPrivMessage(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotNewPrivMessage(const TQString &, const TQString &, const TQString &))); - QObject::connect(account->engine(), SIGNAL(incomingNickChange(const QString &, const QString &)), - this, SLOT( slotNewNickChange(const QString&, const QString&))); + TQObject::connect(account->engine(), TQT_SIGNAL(incomingNickChange(const TQString &, const TQString &)), + this, TQT_SLOT( slotNewNickChange(const TQString&, const TQString&))); - QObject::connect(account->engine(), SIGNAL(successfullyChangedNick(const QString &, const QString &)), - this, SLOT( slotNewNickChange(const QString &, const QString &))); + TQObject::connect(account->engine(), TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)), + this, TQT_SLOT( slotNewNickChange(const TQString &, const TQString &))); - QObject::connect(account->engine(), SIGNAL(incomingUserOnline(const QString &)), - this, SLOT( slotIsonRecieved())); + TQObject::connect(account->engine(), TQT_SIGNAL(incomingUserOnline(const TQString &)), + this, TQT_SLOT( slotIsonRecieved())); - QObject::connect(Kopete::ContactList::self(), SIGNAL(metaContactAdded( Kopete::MetaContact * )), - this, SLOT( slotContactAdded( Kopete::MetaContact* ))); + TQObject::connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactAdded( Kopete::MetaContact * )), + this, TQT_SLOT( slotContactAdded( Kopete::MetaContact* ))); socketTimeout = 15000; - QString timeoutPath = locate( "config", "kioslaverc" ); + TQString timeoutPath = locate( "config", "kioslaverc" ); if( !timeoutPath.isEmpty() ) { KConfig config( timeoutPath ); socketTimeout = config.readNumEntry( "ReadTimeout", 15 ) * 1000; } - m_NotifyTimer = new QTimer(this); - QObject::connect(m_NotifyTimer, SIGNAL(timeout()), - this, SLOT(checkOnlineNotifyList())); + m_NotifyTimer = new TQTimer(this); + TQObject::connect(m_NotifyTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(checkOnlineNotifyList())); m_NotifyTimer->start(30000); // check online every 30sec new IRCSignalHandler(this); } -void IRCContactManager::slotNewNickChange(const QString &oldnick, const QString &newnick) +void IRCContactManager::slotNewNickChange(const TQString &oldnick, const TQString &newnick) { IRCUserContact *c = m_users[ oldnick ]; if( c ) @@ -92,14 +92,14 @@ void IRCContactManager::slotNewNickChange(const QString &oldnick, const QString } } -void IRCContactManager::slotNewMessage(const QString &originating, const QString &channel, const QString &message) +void IRCContactManager::slotNewMessage(const TQString &originating, const TQString &channel, const TQString &message) { IRCContact *from = findUser(originating); IRCChannelContact *to = findChannel(channel); emit privateMessage(from, to, message); } -void IRCContactManager::slotNewPrivMessage(const QString &originating, const QString &user, const QString &message) +void IRCContactManager::slotNewPrivMessage(const TQString &originating, const TQString &user, const TQString &message) { IRCContact *from = findUser(originating); IRCUserContact *to = findUser(user); @@ -112,10 +112,10 @@ void IRCContactManager::unregister(Kopete::Contact *contact) unregisterUser(contact, true); } -QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserContact *contact ) +TQValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserContact *contact ) { - QValueList<IRCChannelContact*> retVal; - for( QDictIterator<IRCChannelContact> it(m_channels); it.current(); ++it ) + TQValueList<IRCChannelContact*> retVal; + for( TQDictIterator<IRCChannelContact> it(m_channels); it.current(); ++it ) { if( it.current()->manager(Kopete::Contact::CannotCreate) ) { @@ -126,7 +126,7 @@ QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserC bool c = true; Kopete::ContactPtrList members = it.current()->manager()->members(); - for( QPtrListIterator<Kopete::Contact> it2( members ); c && it2.current(); ++it2 ) + for( TQPtrListIterator<Kopete::Contact> it2( members ); c && it2.current(); ++it2 ) { if( it2.current() == contact ) { @@ -141,7 +141,7 @@ QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserC return retVal; } -IRCChannelContact *IRCContactManager::findChannel(const QString &name, Kopete::MetaContact *m) +IRCChannelContact *IRCContactManager::findChannel(const TQString &name, Kopete::MetaContact *m) { IRCChannelContact *channel = m_channels[ name ]; @@ -155,14 +155,14 @@ IRCChannelContact *IRCContactManager::findChannel(const QString &name, Kopete::M channel = new IRCChannelContact(this, name, m); m_channels.insert( name, channel ); - QObject::connect(channel, SIGNAL(contactDestroyed(Kopete::Contact *)), - this, SLOT(unregister(Kopete::Contact *))); + TQObject::connect(channel, TQT_SIGNAL(contactDestroyed(Kopete::Contact *)), + this, TQT_SLOT(unregister(Kopete::Contact *))); } return channel; } -IRCChannelContact *IRCContactManager::existChannel( const QString &channel ) const +IRCChannelContact *IRCContactManager::existChannel( const TQString &channel ) const { return m_channels[ channel ]; } @@ -179,7 +179,7 @@ void IRCContactManager::unregisterChannel(Kopete::Contact *contact, bool force ) } } -IRCUserContact *IRCContactManager::findUser(const QString &name, Kopete::MetaContact *m) +IRCUserContact *IRCContactManager::findUser(const TQString &name, Kopete::MetaContact *m) { IRCUserContact *user = m_users[name.section('!', 0, 0)]; @@ -193,19 +193,19 @@ IRCUserContact *IRCContactManager::findUser(const QString &name, Kopete::MetaCon user = new IRCUserContact(this, name, m); m_users.insert( name, user ); - QObject::connect(user, SIGNAL(contactDestroyed(Kopete::Contact *)), - this, SLOT(unregister(Kopete::Contact *))); + TQObject::connect(user, TQT_SIGNAL(contactDestroyed(Kopete::Contact *)), + this, TQT_SLOT(unregister(Kopete::Contact *))); } return user; } -IRCUserContact *IRCContactManager::existUser( const QString &user ) const +IRCUserContact *IRCContactManager::existUser( const TQString &user ) const { return m_users[user]; } -IRCContact *IRCContactManager::findContact( const QString &id, Kopete::MetaContact *m ) +IRCContact *IRCContactManager::findContact( const TQString &id, Kopete::MetaContact *m ) { if( KIRC::Entity::isChannel(id) ) return findChannel( id, m ); @@ -213,10 +213,10 @@ IRCContact *IRCContactManager::findContact( const QString &id, Kopete::MetaConta return findUser( id, m ); } -IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const QString &id ) +IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const TQString &id ) { - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( IRCProtocol::protocol() ); - QDictIterator<Kopete::Account> it(accounts); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( IRCProtocol::protocol() ); + TQDictIterator<Kopete::Account> it(accounts); for( ; it.current(); ++it ) { IRCAccount *account = (IRCAccount *)it.current(); @@ -226,7 +226,7 @@ IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const Q return 0L; } -IRCContact *IRCContactManager::existContact( const QString &id ) const +IRCContact *IRCContactManager::existContact( const TQString &id ) const { if( KIRC::Entity::isChannel(id) ) return existChannel( id ); @@ -249,7 +249,7 @@ void IRCContactManager::unregisterUser(Kopete::Contact *contact, bool force ) void IRCContactManager::slotContactAdded( Kopete::MetaContact *contact ) { - for( QPtrListIterator<Kopete::Contact> it( contact->contacts() ); it.current(); ++it ) + for( TQPtrListIterator<Kopete::Contact> it( contact->contacts() ); it.current(); ++it ) { if( it.current()->account() == m_account ) { @@ -258,7 +258,7 @@ void IRCContactManager::slotContactAdded( Kopete::MetaContact *contact ) } } -void IRCContactManager::addToNotifyList(const QString &nick) +void IRCContactManager::addToNotifyList(const TQString &nick) { if (!m_NotifyList.contains(nick.lower())) { @@ -267,7 +267,7 @@ void IRCContactManager::addToNotifyList(const QString &nick) } } -void IRCContactManager::removeFromNotifyList(const QString &nick) +void IRCContactManager::removeFromNotifyList(const TQString &nick) { if (m_NotifyList.contains(nick.lower())) m_NotifyList.remove(nick.lower()); @@ -279,7 +279,7 @@ void IRCContactManager::checkOnlineNotifyList() { isonRecieved = false; m_account->engine()->ison( m_NotifyList ); - //QTimer::singleShot( socketTimeout, this, SLOT( slotIsonTimeout() ) ); + //TQTimer::singleShot( socketTimeout, this, TQT_SLOT( slotIsonTimeout() ) ); } } |