diff options
Diffstat (limited to 'kopete/protocols/oscar/aim/aimaccount.cpp')
-rw-r--r-- | kopete/protocols/oscar/aim/aimaccount.cpp | 222 |
1 files changed, 111 insertions, 111 deletions
diff --git a/kopete/protocols/oscar/aim/aimaccount.cpp b/kopete/protocols/oscar/aim/aimaccount.cpp index c6228040..9a6ec9de 100644 --- a/kopete/protocols/oscar/aim/aimaccount.cpp +++ b/kopete/protocols/oscar/aim/aimaccount.cpp @@ -13,8 +13,8 @@ ************************************************************************* */ -#include <qdom.h> -#include <qfile.h> +#include <tqdom.h> +#include <tqfile.h> #include <kdebug.h> #include <kconfig.h> @@ -68,20 +68,20 @@ void AIMMyselfContact::userInfoUpdated() setOnlineStatus( static_cast<AIMProtocol*>( protocol() )->statusAway ); //we're away } -void AIMMyselfContact::setOwnProfile( const QString& newProfile ) +void AIMMyselfContact::setOwnProfile( const TQString& newProfile ) { m_profileString = newProfile; if ( m_acct->isConnected() ) m_acct->engine()->updateProfile( newProfile ); } -QString AIMMyselfContact::userProfile() +TQString AIMMyselfContact::userProfile() { return m_profileString; } Kopete::ChatSession* AIMMyselfContact::manager( Kopete::Contact::CanCreateFlags canCreate, - Oscar::WORD exchange, const QString& room ) + Oscar::WORD exchange, const TQString& room ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << endl; Kopete::ContactPtrList chatMembers; @@ -95,8 +95,8 @@ Kopete::ChatSession* AIMMyselfContact::manager( Kopete::Contact::CanCreateFlags session = new AIMChatSession( this, chatMembers, account()->protocol(), exchange, room ); session->setEngine( m_acct->engine() ); - connect( session, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), - this, SLOT( sendMessage( Kopete::Message&, Kopete::ChatSession* ) ) ); + connect( session, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), + this, TQT_SLOT( sendMessage( Kopete::Message&, Kopete::ChatSession* ) ) ); m_chatRoomSessions.append( session ); } return session; @@ -112,7 +112,7 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "sending a message" << endl; //TODO: remove duplication - factor into a message utils class or something Oscar::Message msg; - QString s; + TQString s; if (message.plainBody().isEmpty()) // no text, do nothing return; @@ -127,53 +127,53 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio //font-size:xxpt -> <font ptsize=xx> s=message.escapedBody(); - s.replace ( QRegExp( QString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), - QString::fromLatin1("<style>\\1;\"\\2</style>")); + s.replace ( TQRegExp( TQString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), + TQString::fromLatin1("<style>\\1;\"\\2</style>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("\\2")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("\\2")); //okay now change the <font ptsize="xx"> to <font size="xx"> //0-9 are size 1 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"\\d\">")), - QString::fromLatin1("<font size=\"1\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"\\d\">")), + TQString::fromLatin1("<font size=\"1\">")); //10-11 are size 2 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[01]\">")), - QString::fromLatin1("<font size=\"2\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[01]\">")), + TQString::fromLatin1("<font size=\"2\">")); //12-13 are size 3 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[23]\">")), - QString::fromLatin1("<font size=\"3\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[23]\">")), + TQString::fromLatin1("<font size=\"3\">")); //14-16 are size 4 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[456]\">")), - QString::fromLatin1("<font size=\"4\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[456]\">")), + TQString::fromLatin1("<font size=\"4\">")); //17-22 are size 5 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), - QString::fromLatin1("<font size=\"5\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), + TQString::fromLatin1("<font size=\"5\">")); //23-29 are size 6 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"2[3456789]\">")),QString::fromLatin1("<font size=\"6\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"2[3456789]\">")),TQString::fromLatin1("<font size=\"6\">")); //30- (and any I missed) are size 7 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"[^\"]*\">")),QString::fromLatin1("<font size=\"7\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"[^\"]*\">")),TQString::fromLatin1("<font size=\"7\">")); - s.replace ( QRegExp ( QString::fromLatin1("<br[ /]*>")), QString::fromLatin1("<br>") ); + s.replace ( TQRegExp ( TQString::fromLatin1("<br[ /]*>")), TQString::fromLatin1("<br>") ); kdDebug(14190) << k_funcinfo << "sending " << s << endl; @@ -200,34 +200,34 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio } -AIMAccount::AIMAccount(Kopete::Protocol *parent, QString accountID, const char *name) +AIMAccount::AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, false) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; AIMMyselfContact* mc = new AIMMyselfContact( this ); setMyself( mc ); myself()->setOnlineStatus( static_cast<AIMProtocol*>( parent )->statusOffline ); - QString profile = configGroup()->readEntry( "Profile", + TQString profile = configGroup()->readEntry( "Profile", i18n( "Visit the Kopete website at <a href=\"http://kopete.kde.org\">http://kopete.kde.org</a>") ); mc->setOwnProfile( profile ); m_joinChatDialog = 0; m_visibilityDialog = 0; - QObject::connect( Kopete::ContactList::self(), - SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), + TQObject::connect( Kopete::ContactList::self(), + TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), this, - SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( engine(), SIGNAL( chatRoomConnected( WORD, const QString& ) ), - this, SLOT( connectedToChatRoom( WORD, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( chatRoomConnected( WORD, const TQString& ) ), + this, TQT_SLOT( connectedToChatRoom( WORD, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); } @@ -235,19 +235,19 @@ AIMAccount::~AIMAccount() { } -OscarContact *AIMAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *AIMAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - AIMContact* contact = new AIMContact( this, contactId, parentContact, QString::null, ssiItem ); + AIMContact* contact = new AIMContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); return contact; } -QString AIMAccount::sanitizedMessage( const QString& message ) +TQString AIMAccount::sanitizedMessage( const TQString& message ) { - QDomDocument doc; - QString domError; + TQDomDocument doc; + TQString domError; int errLine = 0, errCol = 0; doc.setContent( message, false, &domError, &errLine, &errCol ); if ( !domError.isEmpty() ) //error parsing, do nothing @@ -260,7 +260,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "conversion to dom document successful." << "looking for font tags" << endl; - QDomNodeList fontTagList = doc.elementsByTagName( "font" ); + TQDomNodeList fontTagList = doc.elementsByTagName( "font" ); if ( fontTagList.count() == 0 ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "No font tags found. Returning normal message" << endl; @@ -272,8 +272,8 @@ QString AIMAccount::sanitizedMessage( const QString& message ) uint numFontTags = fontTagList.count(); for ( uint i = 0; i < numFontTags; i++ ) { - QDomNode fontNode = fontTagList.item(i); - QDomElement fontEl; + TQDomNode fontNode = fontTagList.item(i); + TQDomElement fontEl; if ( !fontNode.isNull() && fontNode.isElement() ) fontEl = fontTagList.item(i).toElement(); else @@ -281,7 +281,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) if ( fontEl.hasAttribute( "back" ) ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Found attribute to replace. Doing replacement" << endl; - QString backgroundColor = fontEl.attribute( "back" ); + TQString backgroundColor = fontEl.attribute( "back" ); backgroundColor.insert( 0, "background-color: " ); backgroundColor.append( ';' ); fontEl.setAttribute( "style", backgroundColor ); @@ -304,42 +304,42 @@ KActionMenu* AIMAccount::actionMenu() AIMProtocol *p = AIMProtocol::protocol(); - QString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); mActionMenu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), i18n( "%2 <%1>" ).arg( accountId(), accountNick )); mActionMenu->insert( new KAction( i18n("Online"), p->statusOnline.iconFor( this ), 0, this, - SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); + TQT_SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); KAction* mActionAway = new Kopete::AwayAction(i18n("Away"), p->statusAway.iconFor( this ), 0, this, - SLOT(slotGoAway( const QString & )), this, "AIMAccount::mActionNA" ); + TQT_SLOT(slotGoAway( const TQString & )), this, "AIMAccount::mActionNA" ); mActionAway->setEnabled( isConnected() ); mActionMenu->insert( mActionAway ); KAction* mActionOffline = new KAction( i18n("Offline"), p->statusOffline.iconFor(this), 0, this, - SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); + TQT_SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); mActionMenu->insert( mActionOffline ); mActionMenu->popupMenu()->insertSeparator(); - KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), QString::null, 0, this, - SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); + KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), TQString::null, 0, this, + TQT_SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); mActionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "AIMAccount::mActionSetVisibility") ); mActionMenu->insert( m_joinChatAction ); KAction* m_editInfoAction = new KAction( i18n( "Edit User Info..." ), "identity", 0, - this, SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); + this, TQT_SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); mActionMenu->insert( m_editInfoAction ); return mActionMenu; } -void AIMAccount::setAway(bool away, const QString &awayReason) +void AIMAccount::setAway(bool away, const TQString &awayReason) { // kdDebug(14152) << k_funcinfo << accountId() << "reason is " << awayReason << endl; if ( away ) @@ -353,12 +353,12 @@ void AIMAccount::setAway(bool away, const QString &awayReason) { engine()->setStatus( Client::Online ); AIMMyselfContact* me = static_cast<AIMMyselfContact *> ( myself() ); - me->setLastAwayMessage(QString::null); + me->setLastAwayMessage(TQString::null); me->removeProperty( Kopete::Global::Properties::self()->awayMessage() ); } } -void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { kdDebug(14152) << k_funcinfo << "called with reason = " << reason <<" status = "<< status.status() << endl;; if ( status.status() == Kopete::OnlineStatus::Online ) @@ -368,13 +368,13 @@ void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -void AIMAccount::setUserProfile(const QString &profile) +void AIMAccount::setUserProfile(const TQString &profile) { kdDebug(14152) << k_funcinfo << "called." << endl; AIMMyselfContact* aimmc = dynamic_cast<AIMMyselfContact*>( myself() ); if ( aimmc ) aimmc->setOwnProfile( profile ); - configGroup()->writeEntry( QString::fromLatin1( "Profile" ), profile ); + configGroup()->writeEntry( TQString::fromLatin1( "Profile" ), profile ); } void AIMAccount::slotEditInfo() @@ -391,7 +391,7 @@ void AIMAccount::slotEditInfo() myInfo->exec(); // This is a modal dialog } -void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void AIMAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Global identity changed" << endl; @@ -415,14 +415,14 @@ void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void AIMAccount::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 ); @@ -435,7 +435,7 @@ void AIMAccount::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 ); @@ -447,7 +447,7 @@ void AIMAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -467,7 +467,7 @@ void AIMAccount::slotBuddyIconChanged() memcpy(t.data.data() + 2, iconHash.rawDigest(), 16); t.length = t.data.size(); - QValueList<Oscar::TLV> list; + TQValueList<Oscar::TLV> list; list.append( t ); Oscar::SSI s( "1", 0, ssi->nextContactId(), ROSTER_BUDDYICONS, list ); @@ -480,7 +480,7 @@ void AIMAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(OSCAR_AIM_DEBUG) << 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 ) @@ -520,9 +520,9 @@ void AIMAccount::slotJoinChat() if ( !m_joinChatDialog ) { m_joinChatDialog = new AIMJoinChatUI( this, false, Kopete::UI::Global::mainWidget() ); - QObject::connect( m_joinChatDialog, SIGNAL( closing( int ) ), - this, SLOT( joinChatDialogClosed( int ) ) ); - QValueList<int> list = engine()->chatExchangeList(); + TQObject::connect( m_joinChatDialog, TQT_SIGNAL( closing( int ) ), + this, TQT_SLOT( joinChatDialogClosed( int ) ) ); + TQValueList<int> list = engine()->chatExchangeList(); m_joinChatDialog->setExchangeList( list ); m_joinChatDialog->show(); } @@ -549,7 +549,7 @@ void AIMAccount::slotGoOnline() } } -void AIMAccount::slotGoAway(const QString &message) +void AIMAccount::slotGoAway(const TQString &message) { kdDebug(14152) << k_funcinfo << message << endl; setAway(true, message); @@ -557,7 +557,7 @@ void AIMAccount::slotGoAway(const QString &message) void AIMAccount::joinChatDialogClosed( int code ) { - if ( code == QDialog::Accepted ) + if ( code == TQDialog::Accepted ) { //join the chat kdDebug(14152) << k_funcinfo << "chat accepted." << endl; @@ -583,7 +583,7 @@ void AIMAccount::disconnected( DisconnectReason reason ) kdDebug( OSCAR_AIM_DEBUG ) << k_funcinfo << "Attempting to set status offline" << endl; myself()->setOnlineStatus( static_cast<AIMProtocol*>( protocol() )->statusOffline ); - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast<OscarContact*>( it.current() ); @@ -608,7 +608,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(14152) << k_funcinfo << "Checking to see if I'm online.." << endl; if( myself()->onlineStatus().status() == Kopete::OnlineStatus::Away ) { - QString sender = Oscar::normalize( message.sender() ); + TQString sender = Oscar::normalize( message.sender() ); AIMContact* aimSender = static_cast<AIMContact *> ( contacts()[sender] ); //should exist now if ( !aimSender ) { @@ -621,7 +621,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) // get the away message we have set AIMMyselfContact* myContact = static_cast<AIMMyselfContact *> ( myself() ); - QString msg = myContact->lastAwayMessage(); + TQString msg = myContact->lastAwayMessage(); kdDebug(14152) << k_funcinfo << "Got away message: " << msg << endl; // Create the message Kopete::Message chatMessage( myself(), aimSender, msg, Kopete::Message::Outbound, @@ -636,8 +636,8 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "have chat message" << endl; //handle chat room messages seperately - QValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); + TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -652,7 +652,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "found chat session for chat room" << endl; Kopete::Contact* ocSender = contacts()[Oscar::normalize( message.sender() )]; //sanitize; - QString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); + TQString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); Kopete::ContactPtrList me; me.append( myself() ); @@ -665,7 +665,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) } } -void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) +void AIMAccount::connectedToChatRoom( WORD exchange, const TQString& room ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Creating chat room session" << endl; Kopete::ContactPtrList emptyList; @@ -677,14 +677,14 @@ void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) session->raiseView(); } -void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userJoinedChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "user " << contact << " has joined the chat" << endl; - QValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); + TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -717,13 +717,13 @@ void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QStri } } -void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userLeftChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; - QValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); + TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -753,18 +753,18 @@ void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString } -void AIMAccount::connectWithPassword( const QString & ) +void AIMAccount::connectWithPassword( const TQString & ) { kdDebug(14152) << k_funcinfo << "accountId='" << accountId() << "'" << endl; // Get the screen name for this account - QString screenName = accountId(); - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString screenName = accountId(); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); - QString _password = password().cachedValue(); + TQString _password = password().cachedValue(); if ( _password.isEmpty() ) { kdDebug(14150) << "Kopete is unable to attempt to sign-on to the " @@ -794,19 +794,19 @@ void AIMAccount::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; - 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 ) @@ -823,7 +823,7 @@ void AIMAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -895,9 +895,9 @@ void AIMAccount::setPrivacySettings( int privacy ) void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) { SSIManager* ssi = engine()->ssiManager(); - Oscar::SSI item = ssi->findItem( QString::null, ROSTER_VISIBILITY ); + Oscar::SSI item = ssi->findItem( TQString::null, ROSTER_VISIBILITY ); - QValueList<Oscar::TLV> tList; + TQValueList<Oscar::TLV> tList; tList.append( TLV( 0x00CA, 1, (char *)&privacy ) ); tList.append( TLV( 0x00CB, sizeof(userClasses), (char *)&userClasses ) ); @@ -905,7 +905,7 @@ void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) if ( !item ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Adding new privacy TLV item" << endl; - Oscar::SSI s( QString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); + Oscar::SSI s( TQString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); engine()->modifySSIItem( item, s ); } else |