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/ssimanager.cpp | 96 +++++++++++++------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'kopete/protocols/oscar/liboscar/ssimanager.cpp') diff --git a/kopete/protocols/oscar/liboscar/ssimanager.cpp b/kopete/protocols/oscar/liboscar/ssimanager.cpp index 066e93fa..1351c237 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.cpp +++ b/kopete/protocols/oscar/liboscar/ssimanager.cpp @@ -28,9 +28,9 @@ class SSIManagerPrivate { public: - QValueList SSIList; - QValueList groupIdList; - QValueList itemIdList; + TQValueList SSIList; + TQValueList groupIdList; + TQValueList itemIdList; bool complete; DWORD lastModTime; WORD maxContacts; @@ -42,8 +42,8 @@ public: WORD nextGroupId; }; -SSIManager::SSIManager( QObject *parent, const char *name ) - : QObject( parent, name ) +SSIManager::SSIManager( TQObject *parent, const char *name ) + : TQObject( parent, name ) { d = new SSIManagerPrivate; d->complete = false; @@ -70,7 +70,7 @@ void SSIManager::clear() if ( d->SSIList.count() > 0 ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Clearing the SSI list" << endl; - QValueList::iterator it = d->SSIList.begin(); + TQValueList::iterator it = d->SSIList.begin(); while ( it != d->SSIList.end() && d->SSIList.count() > 0 ) it = d->SSIList.remove( it ); @@ -141,7 +141,7 @@ void SSIManager::setParameters( WORD maxContacts, WORD maxGroups, WORD maxVisibl { //I'm not using k_funcinfo for these debug statements because of //the function's long signature - QString funcName = QString::fromLatin1( "[void SSIManager::setParameters] " ); + TQString funcName = TQString::fromLatin1( "[void SSIManager::setParameters] " ); kdDebug(OSCAR_RAW_DEBUG) << funcName << "Max number of contacts allowed in SSI: " << maxContacts << endl; kdDebug(OSCAR_RAW_DEBUG) << funcName << "Max number of groups allowed in SSI: " @@ -160,7 +160,7 @@ void SSIManager::setParameters( WORD maxContacts, WORD maxGroups, WORD maxVisibl d->maxIgnore = maxIgnore; } -void SSIManager::loadFromExisting( const QValueList& newList ) +void SSIManager::loadFromExisting( const TQValueList& newList ) { Q_UNUSED( newList ); //FIXME: NOT Implemented! @@ -168,7 +168,7 @@ void SSIManager::loadFromExisting( const QValueList& newList ) bool SSIManager::hasItem( const Oscar::SSI& item ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { @@ -180,9 +180,9 @@ bool SSIManager::hasItem( const Oscar::SSI& item ) const return false; } -Oscar::SSI SSIManager::findGroup( const QString &group ) const +Oscar::SSI SSIManager::findGroup( const TQString &group ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP && (*it ).name().lower() == group.lower() ) @@ -194,7 +194,7 @@ Oscar::SSI SSIManager::findGroup( const QString &group ) const Oscar::SSI SSIManager::findGroup( int groupId ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP && (*it ).gid() == groupId ) @@ -203,7 +203,7 @@ Oscar::SSI SSIManager::findGroup( int groupId ) const return m_dummyItem; } -Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group ) const +Oscar::SSI SSIManager::findContact( const TQString &contact, const TQString &group ) const { if ( contact.isNull() || group.isNull() ) @@ -222,7 +222,7 @@ Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group ", gr->bid= " << gr.bid() << ", gr->type= " << gr.type() << endl; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { @@ -243,10 +243,10 @@ Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group return m_dummyItem; } -Oscar::SSI SSIManager::findContact( const QString &contact ) const +Oscar::SSI SSIManager::findContact( const TQString &contact ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).name() == contact ) @@ -257,7 +257,7 @@ Oscar::SSI SSIManager::findContact( const QString &contact ) const Oscar::SSI SSIManager::findContact( int contactId ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && ( *it ).bid() == contactId ) @@ -266,9 +266,9 @@ Oscar::SSI SSIManager::findContact( int contactId ) const return m_dummyItem; } -Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const +Oscar::SSI SSIManager::findItemForIcon( TQByteArray iconHash ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) { @@ -278,7 +278,7 @@ Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const Buffer b(t.data); b.skipBytes(1); //don't care about flags BYTE iconSize = b.getByte(); - QByteArray hash( b.getBlock( iconSize ) ); + TQByteArray hash( b.getBlock( iconSize ) ); if ( hash == iconHash ) { Oscar::SSI s = ( *it ); @@ -291,7 +291,7 @@ Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const Oscar::SSI SSIManager::findItemForIconByRef( int ref ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) { @@ -307,9 +307,9 @@ Oscar::SSI SSIManager::findItemForIconByRef( int ref ) const return m_dummyItem; } -Oscar::SSI SSIManager::findItem( const QString &contact, int type ) const +Oscar::SSI SSIManager::findItem( const TQString &contact, int type ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) if ( ( *it ).type() == type && ( *it ).name() == contact ) @@ -318,11 +318,11 @@ Oscar::SSI SSIManager::findItem( const QString &contact, int type ) const return m_dummyItem; } -QValueList SSIManager::groupList() const +TQValueList SSIManager::groupList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP ) list.append( ( *it ) ); @@ -330,11 +330,11 @@ QValueList SSIManager::groupList() const return list; } -QValueList SSIManager::contactList() const +TQValueList SSIManager::contactList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT ) list.append( ( *it ) ); @@ -342,11 +342,11 @@ QValueList SSIManager::contactList() const return list; } -QValueList SSIManager::visibleList() const +TQValueList SSIManager::visibleList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_VISIBLE ) list.append( ( *it ) ); @@ -354,11 +354,11 @@ QValueList SSIManager::visibleList() const return list; } -QValueList SSIManager::invisibleList() const +TQValueList SSIManager::invisibleList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_INVISIBLE ) list.append( ( *it ) ); @@ -366,14 +366,14 @@ QValueList SSIManager::invisibleList() const return list; } -QValueList SSIManager::contactsFromGroup( const QString &group ) const +TQValueList SSIManager::contactsFromGroup( const TQString &group ) const { - QValueList list; + TQValueList list; Oscar::SSI gr = findGroup( group ); if ( gr.isValid() ) { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).gid() == gr.gid() ) list.append( ( *it ) ); @@ -381,11 +381,11 @@ QValueList SSIManager::contactsFromGroup( const QString &group ) con return list; } -QValueList SSIManager::contactsFromGroup( int groupId ) const +TQValueList SSIManager::contactsFromGroup( int groupId ) const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).gid() == groupId ) list.append( ( *it ) ); @@ -396,7 +396,7 @@ QValueList SSIManager::contactsFromGroup( int groupId ) const Oscar::SSI SSIManager::visibilityItem() const { Oscar::SSI item = m_dummyItem; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { if ( ( *it ).type() == 0x0004 ) @@ -423,7 +423,7 @@ bool SSIManager::listComplete() const bool SSIManager::newGroup( const Oscar::SSI& group ) { //trying to find the group by its ID - QValueList::iterator it, listEnd = d->SSIList.end(); + TQValueList::iterator it, listEnd = d->SSIList.end(); if ( findGroup( group.name() ).isValid() ) return false; @@ -465,7 +465,7 @@ bool SSIManager::updateGroup( const Oscar::SSI& group ) bool SSIManager::removeGroup( const Oscar::SSI& group ) { - QString groupName = group.name(); + TQString groupName = group.name(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing group " << group.name() << endl; int remcount = d->SSIList.remove( group ); removeID( group ); @@ -480,7 +480,7 @@ bool SSIManager::removeGroup( const Oscar::SSI& group ) return true; } -bool SSIManager::removeGroup( const QString &group ) +bool SSIManager::removeGroup( const TQString &group ) { Oscar::SSI gr = findGroup( group ); @@ -534,7 +534,7 @@ bool SSIManager::updateContact( const Oscar::SSI& contact ) bool SSIManager::removeContact( const Oscar::SSI& contact ) { - QString contactName = contact.name(); + TQString contactName = contact.name(); int remcount = d->SSIList.remove( contact ); removeID( contact ); @@ -548,7 +548,7 @@ bool SSIManager::removeContact( const Oscar::SSI& contact ) return true; } -bool SSIManager::removeContact( const QString &contact ) +bool SSIManager::removeContact( const TQString &contact ) { Oscar::SSI ct = findContact( contact ); @@ -642,7 +642,7 @@ void SSIManager::removeID( const Oscar::SSI& item ) } } -WORD SSIManager::findFreeId( const QValueList& idList, WORD fromId ) const +WORD SSIManager::findFreeId( const TQValueList& idList, WORD fromId ) const { for ( WORD id = fromId; id < 0x8000; id++ ) { -- cgit v1.2.1