summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/liboscar/ssimanager.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/oscar/liboscar/ssimanager.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/oscar/liboscar/ssimanager.cpp')
-rw-r--r--kopete/protocols/oscar/liboscar/ssimanager.cpp96
1 files changed, 48 insertions, 48 deletions
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<Oscar::SSI> SSIList;
- QValueList<WORD> groupIdList;
- QValueList<WORD> itemIdList;
+ TQValueList<Oscar::SSI> SSIList;
+ TQValueList<WORD> groupIdList;
+ TQValueList<WORD> 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<Oscar::SSI>::iterator it = d->SSIList.begin();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI*>& newList )
+void SSIManager::loadFromExisting( const TQValueList<Oscar::SSI*>& newList )
{
Q_UNUSED( newList );
//FIXME: NOT Implemented!
@@ -168,7 +168,7 @@ void SSIManager::loadFromExisting( const QValueList<Oscar::SSI*>& newList )
bool SSIManager::hasItem( const Oscar::SSI& item ) const
{
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::groupList() const
+TQValueList<Oscar::SSI> SSIManager::groupList() const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::groupList() const
return list;
}
-QValueList<Oscar::SSI> SSIManager::contactList() const
+TQValueList<Oscar::SSI> SSIManager::contactList() const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::contactList() const
return list;
}
-QValueList<Oscar::SSI> SSIManager::visibleList() const
+TQValueList<Oscar::SSI> SSIManager::visibleList() const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::visibleList() const
return list;
}
-QValueList<Oscar::SSI> SSIManager::invisibleList() const
+TQValueList<Oscar::SSI> SSIManager::invisibleList() const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::invisibleList() const
return list;
}
-QValueList<Oscar::SSI> SSIManager::contactsFromGroup( const QString &group ) const
+TQValueList<Oscar::SSI> SSIManager::contactsFromGroup( const TQString &group ) const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
Oscar::SSI gr = findGroup( group );
if ( gr.isValid() )
{
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::contactsFromGroup( const QString &group ) con
return list;
}
-QValueList<Oscar::SSI> SSIManager::contactsFromGroup( int groupId ) const
+TQValueList<Oscar::SSI> SSIManager::contactsFromGroup( int groupId ) const
{
- QValueList<Oscar::SSI> list;
+ TQValueList<Oscar::SSI> list;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI> SSIManager::contactsFromGroup( int groupId ) const
Oscar::SSI SSIManager::visibilityItem() const
{
Oscar::SSI item = m_dummyItem;
- QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<Oscar::SSI>::iterator it, listEnd = d->SSIList.end();
+ TQValueList<Oscar::SSI>::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<WORD>& idList, WORD fromId ) const
+WORD SSIManager::findFreeId( const TQValueList<WORD>& idList, WORD fromId ) const
{
for ( WORD id = fromId; id < 0x8000; id++ )
{