From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/oscar/liboscar/ssimodifytask.cpp | 54 +++++++++++------------ 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'kopete/protocols/oscar/liboscar/ssimodifytask.cpp') diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp index 2091fca8..b4194b5e 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include "connection.h" #include "oscarutils.h" #include "transfer.h" @@ -73,12 +73,12 @@ bool SSIModifyTask::take( Transfer* transfer ) return false; } -bool SSIModifyTask::addContact( const QString& contact, const QString& group, bool requiresAuth ) +bool SSIModifyTask::addContact( const TQString& contact, const TQString& group, bool requiresAuth ) { m_opType = Add; m_opSubject = Contact; - QString newContact = Oscar::normalize( contact ); + TQString newContact = Oscar::normalize( contact ); Oscar::SSI oldItem = m_ssiManager->findContact( newContact ); Oscar::SSI groupItem = m_ssiManager->findGroup( group ); @@ -90,7 +90,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo } //create new SSI item and populate the TLV list - QValueList tlvList; + TQValueList tlvList; if ( requiresAuth ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "This contact requires auth. adding appropriate tlv" << endl; @@ -104,7 +104,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo return true; } -bool SSIModifyTask::removeContact( const QString& contact ) +bool SSIModifyTask::removeContact( const TQString& contact ) { m_opType = Remove; m_opSubject = Contact; @@ -113,7 +113,7 @@ bool SSIModifyTask::removeContact( const QString& contact ) return true; } -bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup ) +bool SSIModifyTask::changeGroup( const TQString& contact, const TQString& newGroup ) { m_opType = Change; m_opSubject = Group; @@ -144,19 +144,19 @@ bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup return true; } -bool SSIModifyTask::addGroup( const QString& groupName ) +bool SSIModifyTask::addGroup( const TQString& groupName ) { m_opType = Add; m_opSubject = Group; m_newItem = m_ssiManager->findGroup( groupName ); - QValueList dummy; + TQValueList dummy; Oscar::SSI newItem( groupName, m_ssiManager->nextGroupId(), 0, ROSTER_GROUP, dummy ); m_newItem = newItem; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding group '" << m_newItem.name() << "' to SSI" << endl; return true; } -bool SSIModifyTask::removeGroup( const QString& groupName ) +bool SSIModifyTask::removeGroup( const TQString& groupName ) { m_opType = Remove; m_opSubject = Group; @@ -165,7 +165,7 @@ bool SSIModifyTask::removeGroup( const QString& groupName ) return true; } -bool SSIModifyTask::renameGroup( const QString& oldName, const QString & newName ) +bool SSIModifyTask::renameGroup( const TQString& oldName, const TQString & newName ) { m_opType = Rename; m_opSubject = Group; @@ -254,36 +254,36 @@ void SSIModifyTask::handleSSIAck() break; case 0x0002: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item to modify not found in list" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x0003: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item already exists in SSI" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000A: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Error adding item ( invalid id, already in list, invalid data )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000C: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item. Limit exceeded." << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000D: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add ICQ item to AIM list ( and vice versa )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000E: { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item because contact requires authorization" << endl; Oscar::SSI groupItem = m_ssiManager->findGroup( m_newItem.gid() ); - QString groupName = groupItem.name(); + TQString groupName = groupItem.name(); addContact( m_newItem.name(), groupName, true ); go(); break; } default: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Unknown acknowledgement code" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; } }; @@ -391,7 +391,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the old group item to remove the bid we're //moving to a different group - QValueList list = oldGroupItem.tlvList(); + TQValueList list = oldGroupItem.tlvList(); TLV oldIds = Oscar::findTLV( list, 0x00C8 ); if ( oldIds.type == 0x00C8 ) { @@ -414,7 +414,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the new group item to add the bid we're //adding to this group - QValueList list2 = m_groupItem.tlvList(); + TQValueList list2 = m_groupItem.tlvList(); TLV oldIds2 = Oscar::findTLV( list2, 0x00C8 ); TLV newGroupTLV; if ( oldIds2.type == 0x00C8 ) @@ -466,7 +466,7 @@ void SSIModifyTask::updateSSIManager() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "and adding " << m_newItem.name() << " to SSI manager" << endl; m_ssiManager->newItem( m_newItem ); } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -479,7 +479,7 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->removeContact( m_oldItem.name() ); else if ( m_opSubject == NoSubject ) m_ssiManager->removeItem( m_oldItem ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -492,11 +492,11 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->newContact( m_newItem ); else if ( m_opSubject == NoSubject ) m_ssiManager->newItem( m_newItem ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void SSIModifyTask::freeIdOnError() @@ -550,18 +550,18 @@ void SSIModifyTask::addItemToBuffer( Oscar::SSI item, Buffer* buffer ) buffer->addWord( item.type() ); buffer->addWord( item.tlvListLength() ); - QValueList::const_iterator it = item.tlvList().begin(); - QValueList::const_iterator listEnd = item.tlvList().end(); + TQValueList::const_iterator it = item.tlvList().begin(); + TQValueList::const_iterator listEnd = item.tlvList().end(); for( ; it != listEnd; ++it ) buffer->addTLV( ( *it ) ); } Oscar::SSI SSIModifyTask::getItemFromBuffer( Buffer* buffer ) const { - QValueList tlvList; + TQValueList tlvList; WORD strlength = buffer->getWord(); - QString itemName = QString::fromUtf8( buffer->getBlock( strlength ), strlength ); + TQString itemName = TQString::fromUtf8( buffer->getBlock( strlength ), strlength ); WORD groupId = buffer->getWord(); WORD itemId = buffer->getWord(); WORD itemType = buffer->getWord(); -- cgit v1.2.1