diff options
Diffstat (limited to 'kopete/protocols/oscar/icq/icqaccount.cpp')
-rw-r--r-- | kopete/protocols/oscar/icq/icqaccount.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/kopete/protocols/oscar/icq/icqaccount.cpp b/kopete/protocols/oscar/icq/icqaccount.cpp index 9a071442..7e358346 100644 --- a/kopete/protocols/oscar/icq/icqaccount.cpp +++ b/kopete/protocols/oscar/icq/icqaccount.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include <qfile.h> +#include <tqfile.h> #include <kconfig.h> #include <kdebug.h> @@ -43,21 +43,21 @@ ICQMyselfContact::ICQMyselfContact( ICQAccount *acct ) : OscarMyselfContact( acct ) { - QObject::connect( acct->engine(), SIGNAL( loggedIn() ), this, SLOT( fetchShortInfo() ) ); - QObject::connect( acct->engine(), SIGNAL( receivedIcqShortInfo( const QString& ) ), - this, SLOT( receivedShortInfo( const QString& ) ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( fetchShortInfo() ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( receivedIcqShortInfo( const TQString& ) ), + this, TQT_SLOT( receivedShortInfo( const TQString& ) ) ); } void ICQMyselfContact::userInfoUpdated() { DWORD extendedStatus = details().extendedStatus(); - kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << QString::number( extendedStatus, 16 ) << endl; + kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << TQString::number( extendedStatus, 16 ) << endl; ICQ::Presence presence = ICQ::Presence::fromOscarStatus( extendedStatus & 0xffff ); setOnlineStatus( presence.toOnlineStatus() ); setProperty( Kopete::Global::Properties::self()->awayMessage(), static_cast<ICQAccount*>( account() )->engine()->statusMessage() ); } -void ICQMyselfContact::receivedShortInfo( const QString& contact ) +void ICQMyselfContact::receivedShortInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -74,7 +74,7 @@ void ICQMyselfContact::fetchShortInfo() static_cast<ICQAccount*>( account() )->engine()->requestShortInfo( contactId() ); } -ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char *name) +ICQAccount::ICQAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, true) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; @@ -83,15 +83,15 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * m_visibilityDialog = 0; - QString nickName = configGroup()->readEntry("NickName", QString::null); + TQString nickName = configGroup()->readEntry("NickName", TQString::null); mWebAware = configGroup()->readBoolEntry( "WebAware", false ); mHideIP = configGroup()->readBoolEntry( "HideIP", true ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; - QObject::connect( Kopete::ContactList::self(), SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), - this, SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), + this, TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); //setIgnoreUnknownContacts(pluginData(protocol(), "IgnoreUnknownContacts").toUInt() == 1); @@ -100,7 +100,7 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * { kdDebug(14153) << k_funcinfo << "sending status to reflect HideIP and WebAware settings" << endl; - //setStatus(mStatus, QString::null); + //setStatus(mStatus, TQString::null); }*/ } @@ -129,21 +129,21 @@ KActionMenu* ICQAccount::actionMenu() KToggleAction* actionInvisible = new KToggleAction( i18n( "In&visible" ), ICQ::Presence( presence().type(), ICQ::Presence::Invisible ).toOnlineStatus().iconFor( this ), - 0, this, SLOT( slotToggleInvisible() ), this ); + 0, this, TQT_SLOT( slotToggleInvisible() ), this ); actionInvisible->setChecked( presence().visibility() == ICQ::Presence::Invisible ); actionMenu->insert( actionInvisible ); actionMenu->popupMenu()->insertSeparator(); actionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "ICQAccount::mActionSetVisibility") ); - //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); + //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, TQT_SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); return actionMenu; } -void ICQAccount::connectWithPassword( const QString &password ) +void ICQAccount::connectWithPassword( const TQString &password ) { if ( password.isNull() ) return; @@ -162,9 +162,9 @@ void ICQAccount::connectWithPassword( const QString &password ) if ( accountIsOffline ) { myself()->setOnlineStatus( protocol()->statusManager()->connectingStatus() ); - QString icqNumber = accountId(); + TQString icqNumber = accountId(); kdDebug(14153) << k_funcinfo << "Logging in as " << icqNumber << endl ; - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); @@ -185,7 +185,7 @@ void ICQAccount::connectWithPassword( const QString &password ) engine()->start( server, port, accountId(), password ); engine()->connectToServer( c, server, true /* doAuth */ ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; } } @@ -195,7 +195,7 @@ void ICQAccount::disconnected( DisconnectReason reason ) ICQ::Presence presOffline = ICQ::Presence( ICQ::Presence::Offline, presence().visibility() ); myself()->setOnlineStatus( presOffline.toOnlineStatus() ); - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast<OscarContact*>( it.current() ); @@ -231,25 +231,25 @@ void ICQAccount::slotSetVisiblility() if ( !m_visibilityDialog ) { m_visibilityDialog = new OscarVisibilityDialog( engine(), Kopete::UI::Global::mainWidget() ); - QObject::connect( m_visibilityDialog, SIGNAL( closing() ), - this, SLOT( slotVisibilityDialogClosed() ) ); + TQObject::connect( m_visibilityDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( slotVisibilityDialogClosed() ) ); //add all contacts; OscarVisibilityDialog::ContactMap contactMap; //temporary map for faster lookup of contactId - QMap<QString, QString> revContactMap; + TQMap<TQString, TQString> revContactMap; - QValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); - QValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); + TQValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); + TQValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); for ( it = contactList.constBegin(); it != cEnd; ++it ) { - QString contactId = ( *it ).name(); + TQString contactId = ( *it ).name(); OscarContact* oc = dynamic_cast<OscarContact*>( contacts()[( *it ).name()] ); if ( oc ) { //for better orientation in lists use nickName and icq number - QString screenName( "%1 (%2)" ); + TQString screenName( "%1 (%2)" ); screenName = screenName.arg( oc->nickName(), contactId); contactMap.insert( screenName, contactId ); revContactMap.insert( contactId, screenName ); @@ -263,7 +263,7 @@ void ICQAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -299,7 +299,7 @@ void ICQAccount::slotVisibilityDialogClosed() m_visibilityDialog = 0L; } -void ICQAccount::setAway( bool away, const QString &awayReason ) +void ICQAccount::setAway( bool away, const TQString &awayReason ) { kdDebug(14153) << k_funcinfo << "account='" << accountId() << "'" << endl; if ( away ) @@ -319,7 +319,7 @@ void ICQAccount::setInvisible( ICQ::Presence::Visibility vis ) setPresenceTarget( ICQ::Presence( pres.type(), vis ) ); } -void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &message ) +void ICQAccount::setPresenceType( ICQ::Presence::Type type, const TQString &message ) { ICQ::Presence pres = presence(); kdDebug(14153) << k_funcinfo << "new type=" << (int)type << ", old type=" << (int)pres.type() << ", new message=" << message << endl; @@ -327,7 +327,7 @@ void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &messa setPresenceTarget( ICQ::Presence( type, pres.visibility() ), message ); } -void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString &message ) +void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const TQString &message ) { bool targetIsOffline = (newPres.type() == ICQ::Presence::Offline); bool accountIsOffline = ( presence().type() == ICQ::Presence::Offline || @@ -351,7 +351,7 @@ void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString } -void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { if ( status.status() == Kopete::OnlineStatus::Invisible ) { @@ -375,9 +375,9 @@ void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *ICQAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - ICQContact* contact = new ICQContact( this, contactId, parentContact, QString::null, ssiItem ); + ICQContact* contact = new ICQContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); @@ -387,13 +387,13 @@ OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::Me return contact; } -QString ICQAccount::sanitizedMessage( const QString& message ) +TQString ICQAccount::sanitizedMessage( const TQString& message ) { return Kopete::Message::escape( message ); } -void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void ICQAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(14153) << k_funcinfo << "Global identity changed" << endl; @@ -417,14 +417,14 @@ void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void ICQAccount::slotBuddyIconChanged() { // need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); if ( !engine()->isActive() ) { - QObject::connect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); return; } - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); SSIManager* ssi = engine()->ssiManager(); Oscar::SSI item = ssi->findItemForIconByRef( 1 ); @@ -437,7 +437,7 @@ void ICQAccount::slotBuddyIconChanged() Oscar::SSI s(item); //remove hash and alias - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) tList.remove( t ); @@ -453,7 +453,7 @@ void ICQAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -478,7 +478,7 @@ void ICQAccount::slotBuddyIconChanged() t2.type = 0x0131; t2.length = 0; - QValueList<Oscar::TLV> list; + TQValueList<Oscar::TLV> list; list.append( t ); list.append( t2 ); @@ -492,7 +492,7 @@ void ICQAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(14153) << k_funcinfo << "modifying old item in ssi." << endl; - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) |