summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/groupwise/gwcontactlist.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/groupwise/gwcontactlist.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/groupwise/gwcontactlist.cpp')
-rw-r--r--kopete/protocols/groupwise/gwcontactlist.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kopete/protocols/groupwise/gwcontactlist.cpp b/kopete/protocols/groupwise/gwcontactlist.cpp
index 3f8b5c4d..03e66f45 100644
--- a/kopete/protocols/groupwise/gwcontactlist.cpp
+++ b/kopete/protocols/groupwise/gwcontactlist.cpp
@@ -22,8 +22,8 @@
#include "gwcontactlist.h"
#include "gwerror.h" //debug area
-GWContactList::GWContactList( TQObject * parent )
- : TQObject( parent ), rootFolder( new GWFolder( this, 0, 0, TQString::null ) )
+GWContactList::GWContactList( TQObject * tqparent )
+ : TQObject( tqparent ), rootFolder( new GWFolder( this, 0, 0, TQString() ) )
{ }
GWFolder * GWContactList::addFolder( unsigned int id, unsigned int sequence, const TQString & displayName )
@@ -34,7 +34,7 @@ GWFolder * GWContactList::addFolder( unsigned int id, unsigned int sequence, con
return 0;
}
-GWContactInstance * GWContactList::addContactInstance( unsigned int id, unsigned int parent, unsigned int sequence, const TQString & displayName, const TQString & dn )
+GWContactInstance * GWContactList::addContactInstance( unsigned int id, unsigned int tqparent, unsigned int sequence, const TQString & displayName, const TQString & dn )
{
TQObjectList * l = queryList( "GWFolder", 0, false, true );
TQObjectListIt it( *l ); // iterate over the buttons
@@ -42,8 +42,8 @@ GWContactInstance * GWContactList::addContactInstance( unsigned int id, unsigned
GWContactInstance * contact = 0;
while ( (obj = it.current()) != 0 )
{
- GWFolder * folder = ::qt_cast< GWFolder * >( obj );
- if ( folder && folder->id == parent )
+ GWFolder * folder = ::tqqt_cast< GWFolder * >( obj );
+ if ( folder && folder->id == tqparent )
{
contact = new GWContactInstance( folder, id, sequence, displayName, dn );
break;
@@ -62,7 +62,7 @@ GWFolder * GWContactList::findFolderById( unsigned int id )
GWFolder * candidate, * folder = 0;
while ( (obj = it.current()) != 0 )
{
- candidate = ::qt_cast< GWFolder * >( obj );
+ candidate = ::tqqt_cast< GWFolder * >( obj );
if ( candidate->id == id )
{
folder = candidate;
@@ -82,7 +82,7 @@ GWFolder * GWContactList::findFolderByName( const TQString & displayName )
GWFolder * folder = 0;
while ( (obj = it.current()) != 0 )
{
- GWFolder * candidate = ::qt_cast< GWFolder * >( obj );
+ GWFolder * candidate = ::tqqt_cast< GWFolder * >( obj );
if ( candidate->displayName == displayName )
{
folder = candidate;
@@ -102,8 +102,8 @@ int GWContactList::maxSequenceNumber()
unsigned int sequence = 0;
while ( (obj = it.current()) != 0 )
{
- GWFolder * current = ::qt_cast< GWFolder * >( obj );
- sequence = QMAX( sequence, current->sequence );
+ GWFolder * current = ::tqqt_cast< GWFolder * >( obj );
+ sequence = TQMAX( sequence, current->sequence );
++it;
}
delete l;
@@ -119,7 +119,7 @@ GWContactInstanceList GWContactList::instancesWithDn( const TQString & dn )
while ( (obj = it.current()) != 0 )
{
++it;
- GWContactInstance * current = ::qt_cast<GWContactInstance *>( obj );
+ GWContactInstance * current = ::tqqt_cast<GWContactInstance *>( obj );
if ( current->dn == dn )
matches.append( current );
}
@@ -141,7 +141,7 @@ void GWContactList::removeInstanceById( unsigned int id )
while ( (obj = it.current()) != 0 )
{
++it;
- GWContactInstance * current = ::qt_cast<GWContactInstance *>( obj );
+ GWContactInstance * current = ::tqqt_cast<GWContactInstance *>( obj );
if ( current->id == id )
{
delete current;
@@ -154,14 +154,14 @@ void GWContactList::removeInstanceById( unsigned int id )
void GWContactList::dump()
{
kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl;
- const TQObjectList * l = children();
- if ( l && !l->isEmpty() )
+ const TQObjectList l = childrenListObject();
+ if ( !l.isEmpty() )
{
- TQObjectListIt it( *l ); // iterate over the buttons
+ TQObjectListIt it( l ); // iterate over the buttons
TQObject *obj;
while ( (obj = it.current()) != 0 )
{
- GWFolder * folder = ::qt_cast< GWFolder * >( obj );
+ GWFolder * folder = ::tqqt_cast< GWFolder * >( obj );
if ( folder )
folder->dump( 1 );
++it;
@@ -174,10 +174,10 @@ void GWContactList::dump()
void GWContactList::clear()
{
kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl;
- const TQObjectList * l = children();
- if ( l && !l->isEmpty() )
+ const TQObjectList l = childrenListObject();
+ if ( !l.isEmpty() )
{
- TQObjectListIt it( *l );
+ TQObjectListIt it( l );
TQObject *obj;
while ( (obj = it.current()) != 0 )
{
@@ -187,33 +187,33 @@ void GWContactList::clear()
}
}
-GWContactListItem::GWContactListItem( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ) :
- TQObject( parent), id( theId ), sequence( theSequence ), displayName( theDisplayName )
+GWContactListItem::GWContactListItem( TQObject * tqparent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ) :
+ TQObject( tqparent), id( theId ), sequence( theSequence ), displayName( theDisplayName )
{ }
-GWFolder::GWFolder( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ) :
- GWContactListItem( parent, theId, theSequence, theDisplayName )
+GWFolder::GWFolder( TQObject * tqparent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ) :
+ GWContactListItem( tqparent, theId, theSequence, theDisplayName )
{ }
void GWFolder::dump( unsigned int depth )
{
TQString s;
s.fill( ' ', ++depth * 2 );
- kdDebug( GROUPWISE_DEBUG_GLOBAL ) << s <<"Folder " << displayName << " id: " << id << " contains: " << endl;
- const TQObjectList * l = children();
- if ( l )
+ kdDebug( GROUPWISE_DEBUG_GLOBAL ) << s <<"Folder " << displayName << " id: " << id << " tqcontains: " << endl;
+ const TQObjectList l = childrenListObject();
+ if ( !l.isEmpty() )
{
- TQObjectListIt it( *l ); // iterate over the buttons
+ TQObjectListIt it( l ); // iterate over the buttons
TQObject *obj;
while ( (obj = it.current()) != 0 )
{
++it;
- GWContactInstance * instance = ::qt_cast< GWContactInstance * >( obj );
+ GWContactInstance * instance = ::tqqt_cast< GWContactInstance * >( obj );
if (instance)
instance->dump( depth );
else
{
- GWFolder * folder = ::qt_cast< GWFolder * >( obj );
+ GWFolder * folder = ::tqqt_cast< GWFolder * >( obj );
if ( folder )
folder->dump( depth );
}
@@ -223,8 +223,8 @@ void GWFolder::dump( unsigned int depth )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << s << " no contacts." << endl;
}
-GWContactInstance::GWContactInstance( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName, const TQString & theDn ) :
- GWContactListItem( parent, theId, theSequence, theDisplayName ), dn( theDn )
+GWContactInstance::GWContactInstance( TQObject * tqparent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName, const TQString & theDn ) :
+ GWContactListItem( tqparent, theId, theSequence, theDisplayName ), dn( theDn )
{ }
void GWContactInstance::dump( unsigned int depth )