summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetecontactlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/kopetecontactlist.cpp')
-rw-r--r--kopete/libkopete/kopetecontactlist.cpp496
1 files changed, 248 insertions, 248 deletions
diff --git a/kopete/libkopete/kopetecontactlist.cpp b/kopete/libkopete/kopetecontactlist.cpp
index 9aab9f2f..6e33f257 100644
--- a/kopete/libkopete/kopetecontactlist.cpp
+++ b/kopete/libkopete/kopetecontactlist.cpp
@@ -20,9 +20,9 @@
#include "kopetecontactlist.h"
-#include <qdir.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kabc/stdaddressbook.h>
@@ -51,12 +51,12 @@ class ContactList::Private
/** Flag: do not save the contactlist until she is completely loaded */
bool loaded ;
- QPtrList<MetaContact> contacts;
- QPtrList<Group> groups;
- QPtrList<MetaContact> selectedMetaContacts;
- QPtrList<Group> selectedGroups;
+ TQPtrList<MetaContact> contacts;
+ TQPtrList<Group> groups;
+ TQPtrList<MetaContact> selectedMetaContacts;
+ TQPtrList<Group> selectedGroups;
- QTimer *saveTimer;
+ TQTimer *saveTimer;
MetaContact *myself;
@@ -80,7 +80,7 @@ ContactList *ContactList::self()
}
ContactList::ContactList()
- : QObject( kapp, "KopeteContactList" )
+ : TQObject( kapp, "KopeteContactList" )
{
d=new Private;
@@ -92,14 +92,14 @@ ContactList::ContactList()
d->loaded=false;
// automatically save on changes to the list
- d->saveTimer = new QTimer( this, "saveTimer" );
- connect( d->saveTimer, SIGNAL( timeout() ), SLOT ( save() ) );
-
- connect( this, SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), SLOT( slotSaveLater() ) );
- connect( this, SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), SLOT( slotSaveLater() ) );
- connect( this, SIGNAL( groupAdded( Kopete::Group * ) ), SLOT( slotSaveLater() ) );
- connect( this, SIGNAL( groupRemoved( Kopete::Group * ) ), SLOT( slotSaveLater() ) );
- connect( this, SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ), SLOT( slotSaveLater() ) );
+ d->saveTimer = new TQTimer( this, "saveTimer" );
+ connect( d->saveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT ( save() ) );
+
+ connect( this, TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), TQT_SLOT( slotSaveLater() ) );
+ connect( this, TQT_SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), TQT_SLOT( slotSaveLater() ) );
+ connect( this, TQT_SIGNAL( groupAdded( Kopete::Group * ) ), TQT_SLOT( slotSaveLater() ) );
+ connect( this, TQT_SIGNAL( groupRemoved( Kopete::Group * ) ), TQT_SLOT( slotSaveLater() ) );
+ connect( this, TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ), TQT_SLOT( slotSaveLater() ) );
}
ContactList::~ContactList()
@@ -108,21 +108,21 @@ ContactList::~ContactList()
delete d;
}
-QPtrList<MetaContact> ContactList::metaContacts() const
+TQPtrList<MetaContact> ContactList::metaContacts() const
{
return d->contacts;
}
-QPtrList<Group> ContactList::groups() const
+TQPtrList<Group> ContactList::groups() const
{
return d->groups;
}
-MetaContact *ContactList::metaContact( const QString &metaContactId ) const
+MetaContact *ContactList::metaContact( const TQString &metaContactId ) const
{
- QPtrListIterator<MetaContact> it( d->contacts );
+ TQPtrListIterator<MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
@@ -146,8 +146,8 @@ Group * ContactList::group(unsigned int groupId) const
}
-Contact *ContactList::findContact( const QString &protocolId,
- const QString &accountId, const QString &contactId ) const
+Contact *ContactList::findContact( const TQString &protocolId,
+ const TQString &accountId, const TQString &contactId ) const
{
//Browsing metacontacts is too slow, better to uses the Dict of the account.
Account *i=AccountManager::self()->findAccount(protocolId,accountId);
@@ -160,9 +160,9 @@ Contact *ContactList::findContact( const QString &protocolId,
}
-MetaContact *ContactList::findMetaContactByDisplayName( const QString &displayName ) const
+MetaContact *ContactList::findMetaContactByDisplayName( const TQString &displayName ) const
{
- QPtrListIterator<MetaContact> it( d->contacts );
+ TQPtrListIterator<MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
// kdDebug(14010) << "Display Name: " << it.current()->displayName() << "\n";
@@ -174,10 +174,10 @@ MetaContact *ContactList::findMetaContactByDisplayName( const QString &displayNa
return 0L;
}
-MetaContact* ContactList::findMetaContactByContactId( const QString &contactId ) const
+MetaContact* ContactList::findMetaContactByContactId( const TQString &contactId ) const
{
- QPtrList<Account> acts=AccountManager::self()->accounts();
- QPtrListIterator<Account> it( acts );
+ TQPtrList<Account> acts=AccountManager::self()->accounts();
+ TQPtrListIterator<Account> it( acts );
for ( ; it.current(); ++it )
{
Contact *c=(*it)->contacts()[contactId];
@@ -187,7 +187,7 @@ MetaContact* ContactList::findMetaContactByContactId( const QString &contactId )
return 0L;
}
-Group * ContactList::findGroup(const QString& displayName, int type)
+Group * ContactList::findGroup(const TQString& displayName, int type)
{
if( type == Group::Temporary )
return Group::temporary();
@@ -205,12 +205,12 @@ Group * ContactList::findGroup(const QString& displayName, int type)
}
-QPtrList<MetaContact> ContactList::selectedMetaContacts() const
+TQPtrList<MetaContact> ContactList::selectedMetaContacts() const
{
return d->selectedMetaContacts;
}
-QPtrList<Group> ContactList::selectedGroups() const
+TQPtrList<Group> ContactList::selectedGroups() const
{
return d->selectedGroups;
}
@@ -224,9 +224,9 @@ void ContactList::addMetaContact( MetaContact *mc )
d->contacts.append( mc );
emit metaContactAdded( mc );
- connect( mc, SIGNAL( persistentDataChanged( ) ), SLOT( slotSaveLater() ) );
- connect( mc, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( metaContactAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) );
- connect( mc, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( metaContactRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) );
+ connect( mc, TQT_SIGNAL( persistentDataChanged( ) ), TQT_SLOT( slotSaveLater() ) );
+ connect( mc, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( metaContactAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) );
+ connect( mc, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( metaContactRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) );
}
@@ -245,7 +245,7 @@ void ContactList::removeMetaContact(MetaContact *m)
}
//removes subcontact from server here and now.
- QPtrList<Contact> cts=m->contacts();
+ TQPtrList<Contact> cts=m->contacts();
for( Contact *c = cts.first(); c; c = cts.next() )
{
c->deleteContact();
@@ -263,7 +263,7 @@ void ContactList::addGroup( Group * g )
{
d->groups.append( g );
emit groupAdded( g );
- connect( g , SIGNAL ( displayNameChanged(Kopete::Group* , const QString & )) , this , SIGNAL ( groupRenamed(Kopete::Group* , const QString & )) ) ;
+ connect( g , TQT_SIGNAL ( displayNameChanged(Kopete::Group* , const TQString & )) , this , TQT_SIGNAL ( groupRenamed(Kopete::Group* , const TQString & )) ) ;
}
}
@@ -281,7 +281,7 @@ void ContactList::removeGroup( Group *g )
}
-void ContactList::setSelectedItems(QPtrList<MetaContact> metaContacts , QPtrList<Group> groups)
+void ContactList::setSelectedItems(TQPtrList<MetaContact> metaContacts , TQPtrList<Group> groups)
{
kdDebug( 14010 ) << k_funcinfo << metaContacts.count() << " metacontacts, " << groups.count() << " groups selected" << endl;
d->selectedMetaContacts=metaContacts;
@@ -304,11 +304,11 @@ void ContactList::loadGlobalIdentity()
if(Kopete::Config::enableGlobalIdentity())
{
// Disconnect to make sure it will not cause duplicate calls.
- disconnect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged()));
- disconnect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged()));
+ disconnect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged()));
+ disconnect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged()));
- connect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged()));
- connect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged()));
+ connect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged()));
+ connect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged()));
// Ensure that the myself metaContactId is always the KABC whoAmI
KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
@@ -324,8 +324,8 @@ void ContactList::loadGlobalIdentity()
}
else
{
- disconnect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged()));
- disconnect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged()));
+ disconnect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged()));
+ disconnect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged()));
}
}
@@ -370,7 +370,7 @@ void ContactList::load()
{
loadXML();
// Apply the global identity when all the protocols plugins are loaded.
- connect(PluginManager::self(), SIGNAL(allPluginsLoaded()), this, SLOT(loadGlobalIdentity()));
+ connect(PluginManager::self(), TQT_SIGNAL(allPluginsLoaded()), this, TQT_SLOT(loadGlobalIdentity()));
}
void ContactList::loadXML()
@@ -378,25 +378,25 @@ void ContactList::loadXML()
// don't save when we're in the middle of this...
d->loaded = false;
- QString filename = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) );
+ TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) );
if( filename.isEmpty() )
{
d->loaded=true;
return ;
}
- QDomDocument contactList( QString::fromLatin1( "kopete-contact-list" ) );
+ TQDomDocument contactList( TQString::fromLatin1( "kopete-contact-list" ) );
- QFile contactListFile( filename );
+ TQFile contactListFile( filename );
contactListFile.open( IO_ReadOnly );
contactList.setContent( &contactListFile );
- QDomElement list = contactList.documentElement();
+ TQDomElement list = contactList.documentElement();
- QString versionString = list.attribute( QString::fromLatin1( "version" ), QString::null );
+ TQString versionString = list.attribute( TQString::fromLatin1( "version" ), TQString::null );
uint version = 0;
- if( QRegExp( QString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) )
- version = versionString.replace( QString::fromLatin1( "." ), QString::null ).toUInt();
+ if( TQRegExp( TQString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) )
+ version = versionString.replace( TQString::fromLatin1( "." ), TQString::null ).toUInt();
if( version < Private::ContactListVersion )
{
@@ -410,7 +410,7 @@ void ContactList::loadXML()
convertContactList( filename, version, Private::ContactListVersion );
- contactList = QDomDocument ( QString::fromLatin1( "kopete-contact-list" ) );
+ contactList = TQDomDocument ( TQString::fromLatin1( "kopete-contact-list" ) );
contactListFile.open( IO_ReadOnly );
contactList.setContent( &contactListFile );
@@ -420,13 +420,13 @@ void ContactList::loadXML()
addGroup( Kopete::Group::topLevel() );
- QDomElement element = list.firstChild().toElement();
+ TQDomElement element = list.firstChild().toElement();
while( !element.isNull() )
{
- if( element.tagName() == QString::fromLatin1("meta-contact") )
+ if( element.tagName() == TQString::fromLatin1("meta-contact") )
{
//TODO: id isn't used
- //QString id = element.attribute( "id", QString::null );
+ //TQString id = element.attribute( "id", TQString::null );
Kopete::MetaContact *metaContact = new Kopete::MetaContact();
if ( !metaContact->fromXML( element ) )
{
@@ -439,7 +439,7 @@ void ContactList::loadXML()
metaContact );
}
}
- else if( element.tagName() == QString::fromLatin1("kopete-group") )
+ else if( element.tagName() == TQString::fromLatin1("kopete-group") )
{
Kopete::Group *group = new Kopete::Group();
if( !group->fromXML( element ) )
@@ -453,7 +453,7 @@ void ContactList::loadXML()
}
}
// Only load myself metacontact information when Global Identity is enabled.
- else if( element.tagName() == QString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() )
+ else if( element.tagName() == TQString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() )
{
if( !myself()->fromXML( element ) )
{
@@ -473,94 +473,94 @@ void ContactList::loadXML()
d->loaded=true;
}
-void ContactList::convertContactList( const QString &fileName, uint /* fromVersion */, uint /* toVersion */ )
+void ContactList::convertContactList( const TQString &fileName, uint /* fromVersion */, uint /* toVersion */ )
{
// For now, ignore fromVersion and toVersion. These are meant for future
// changes to allow incremental (multi-pass) conversion so we don't have
// to rewrite the whole conversion code for each change.
- QDomDocument contactList( QString::fromLatin1( "messaging-contact-list" ) );
- QFile contactListFile( fileName );
+ TQDomDocument contactList( TQString::fromLatin1( "messaging-contact-list" ) );
+ TQFile contactListFile( fileName );
contactListFile.open( IO_ReadOnly );
contactList.setContent( &contactListFile );
- QDomElement oldList = contactList.documentElement();
+ TQDomElement oldList = contactList.documentElement();
- QDomDocument newList( QString::fromLatin1( "kopete-contact-list" ) );
- newList.appendChild( newList.createProcessingInstruction( QString::fromLatin1( "xml" ), QString::fromLatin1( "version=\"1.0\"" ) ) );
+ TQDomDocument newList( TQString::fromLatin1( "kopete-contact-list" ) );
+ newList.appendChild( newList.createProcessingInstruction( TQString::fromLatin1( "xml" ), TQString::fromLatin1( "version=\"1.0\"" ) ) );
- QDomElement newRoot = newList.createElement( QString::fromLatin1( "kopete-contact-list" ) );
+ TQDomElement newRoot = newList.createElement( TQString::fromLatin1( "kopete-contact-list" ) );
newList.appendChild( newRoot );
- newRoot.setAttribute( QString::fromLatin1( "version" ), QString::fromLatin1( "1.0" ) );
+ newRoot.setAttribute( TQString::fromLatin1( "version" ), TQString::fromLatin1( "1.0" ) );
- QDomNode oldNode = oldList.firstChild();
+ TQDomNode oldNode = oldList.firstChild();
while( !oldNode.isNull() )
{
- QDomElement oldElement = oldNode.toElement();
+ TQDomElement oldElement = oldNode.toElement();
if( !oldElement.isNull() )
{
- if( oldElement.tagName() == QString::fromLatin1("meta-contact") )
+ if( oldElement.tagName() == TQString::fromLatin1("meta-contact") )
{
// Ignore ID, it is not used in the current list anyway
- QDomElement newMetaContact = newList.createElement( QString::fromLatin1( "meta-contact" ) );
+ TQDomElement newMetaContact = newList.createElement( TQString::fromLatin1( "meta-contact" ) );
newRoot.appendChild( newMetaContact );
// Plugin data is stored completely different, and requires
// some bookkeeping to convert properly
- QMap<QString, QDomElement> pluginData;
- QStringList icqData;
- QStringList gaduData;
+ TQMap<TQString, TQDomElement> pluginData;
+ TQStringList icqData;
+ TQStringList gaduData;
// ICQ and Gadu can only be converted properly if the address book fields
// are already parsed. Therefore, scan for those first and add the rest
// afterwards
- QDomNode oldContactNode = oldNode.firstChild();
+ TQDomNode oldContactNode = oldNode.firstChild();
while( !oldContactNode.isNull() )
{
- QDomElement oldContactElement = oldContactNode.toElement();
- if( !oldContactElement.isNull() && oldContactElement.tagName() == QString::fromLatin1("address-book-field") )
+ TQDomElement oldContactElement = oldContactNode.toElement();
+ if( !oldContactElement.isNull() && oldContactElement.tagName() == TQString::fromLatin1("address-book-field") )
{
// Convert address book fields.
// Jabber will be called "xmpp", Aim/Toc and Aim/Oscar both will
// be called "aim". MSN, AIM, IRC, Oscar and SMS don't use address
// book fields yet; Gadu and ICQ can be converted as-is.
// As Yahoo is unfinished we won't try to convert at all.
- QString id = oldContactElement.attribute( QString::fromLatin1( "id" ), QString::null );
- QString data = oldContactElement.text();
-
- QString app, key, val;
- QString separator = QString::fromLatin1( "," );
- if( id == QString::fromLatin1( "messaging/gadu" ) )
- separator = QString::fromLatin1( "\n" );
- else if( id == QString::fromLatin1( "messaging/icq" ) )
- separator = QString::fromLatin1( ";" );
- else if( id == QString::fromLatin1( "messaging/jabber" ) )
- id = QString::fromLatin1( "messaging/xmpp" );
-
- if( id == QString::fromLatin1( "messaging/gadu" ) || id == QString::fromLatin1( "messaging/icq" ) ||
- id == QString::fromLatin1( "messaging/winpopup" ) || id == QString::fromLatin1( "messaging/xmpp" ) )
+ TQString id = oldContactElement.attribute( TQString::fromLatin1( "id" ), TQString::null );
+ TQString data = oldContactElement.text();
+
+ TQString app, key, val;
+ TQString separator = TQString::fromLatin1( "," );
+ if( id == TQString::fromLatin1( "messaging/gadu" ) )
+ separator = TQString::fromLatin1( "\n" );
+ else if( id == TQString::fromLatin1( "messaging/icq" ) )
+ separator = TQString::fromLatin1( ";" );
+ else if( id == TQString::fromLatin1( "messaging/jabber" ) )
+ id = TQString::fromLatin1( "messaging/xmpp" );
+
+ if( id == TQString::fromLatin1( "messaging/gadu" ) || id == TQString::fromLatin1( "messaging/icq" ) ||
+ id == TQString::fromLatin1( "messaging/winpopup" ) || id == TQString::fromLatin1( "messaging/xmpp" ) )
{
app = id;
- key = QString::fromLatin1( "All" );
- val = data.replace( separator, QChar( 0xE000 ) );
+ key = TQString::fromLatin1( "All" );
+ val = data.replace( separator, TQChar( 0xE000 ) );
}
if( !app.isEmpty() )
{
- QDomElement addressBookField = newList.createElement( QString::fromLatin1( "address-book-field" ) );
+ TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) );
newMetaContact.appendChild( addressBookField );
- addressBookField.setAttribute( QString::fromLatin1( "app" ), app );
- addressBookField.setAttribute( QString::fromLatin1( "key" ), key );
+ addressBookField.setAttribute( TQString::fromLatin1( "app" ), app );
+ addressBookField.setAttribute( TQString::fromLatin1( "key" ), key );
addressBookField.appendChild( newList.createTextNode( val ) );
// ICQ didn't store the contactId locally, only in the address
// book fields, so we need to be able to access it later
- if( id == QString::fromLatin1( "messaging/icq" ) )
- icqData = QStringList::split( QChar( 0xE000 ), val );
- else if( id == QString::fromLatin1("messaging/gadu") )
- gaduData = QStringList::split( QChar( 0xE000 ), val );
+ if( id == TQString::fromLatin1( "messaging/icq" ) )
+ icqData = TQStringList::split( TQChar( 0xE000 ), val );
+ else if( id == TQString::fromLatin1("messaging/gadu") )
+ gaduData = TQStringList::split( TQChar( 0xE000 ), val );
}
}
oldContactNode = oldContactNode.nextSibling();
@@ -570,172 +570,172 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi
oldContactNode = oldNode.firstChild();
while( !oldContactNode.isNull() )
{
- QDomElement oldContactElement = oldContactNode.toElement();
+ TQDomElement oldContactElement = oldContactNode.toElement();
if( !oldContactElement.isNull() )
{
- if( oldContactElement.tagName() == QString::fromLatin1("display-name") )
+ if( oldContactElement.tagName() == TQString::fromLatin1("display-name") )
{
- QDomElement displayName = newList.createElement( QString::fromLatin1( "display-name" ) );
+ TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) );
displayName.appendChild( newList.createTextNode( oldContactElement.text() ) );
newMetaContact.appendChild( displayName );
}
- else if( oldContactElement.tagName() == QString::fromLatin1("groups") )
+ else if( oldContactElement.tagName() == TQString::fromLatin1("groups") )
{
- QDomElement groups = newList.createElement( QString::fromLatin1( "groups" ) );
+ TQDomElement groups = newList.createElement( TQString::fromLatin1( "groups" ) );
newMetaContact.appendChild( groups );
- QDomNode oldGroup = oldContactElement.firstChild();
+ TQDomNode oldGroup = oldContactElement.firstChild();
while( !oldGroup.isNull() )
{
- QDomElement oldGroupElement = oldGroup.toElement();
- if ( oldGroupElement.tagName() == QString::fromLatin1("group") )
+ TQDomElement oldGroupElement = oldGroup.toElement();
+ if ( oldGroupElement.tagName() == TQString::fromLatin1("group") )
{
- QDomElement group = newList.createElement( QString::fromLatin1( "group" ) );
+ TQDomElement group = newList.createElement( TQString::fromLatin1( "group" ) );
group.appendChild( newList.createTextNode( oldGroupElement.text() ) );
groups.appendChild( group );
}
- else if ( oldGroupElement.tagName() == QString::fromLatin1("top-level") )
+ else if ( oldGroupElement.tagName() == TQString::fromLatin1("top-level") )
{
- QDomElement group = newList.createElement( QString::fromLatin1( "top-level" ) );
+ TQDomElement group = newList.createElement( TQString::fromLatin1( "top-level" ) );
groups.appendChild( group );
}
oldGroup = oldGroup.nextSibling();
}
}
- else if( oldContactElement.tagName() == QString::fromLatin1( "plugin-data" ) )
+ else if( oldContactElement.tagName() == TQString::fromLatin1( "plugin-data" ) )
{
// Convert the plugin data
- QString id = oldContactElement.attribute( QString::fromLatin1( "plugin-id" ), QString::null );
- QString data = oldContactElement.text();
+ TQString id = oldContactElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null );
+ TQString data = oldContactElement.text();
bool convertOldAim = false;
uint fieldCount = 1;
- QString addressBookLabel;
- if( id == QString::fromLatin1("MSNProtocol") )
+ TQString addressBookLabel;
+ if( id == TQString::fromLatin1("MSNProtocol") )
{
fieldCount = 3;
- addressBookLabel = QString::fromLatin1("msn");
+ addressBookLabel = TQString::fromLatin1("msn");
}
- else if( id == QString::fromLatin1("IRCProtocol") )
+ else if( id == TQString::fromLatin1("IRCProtocol") )
{
fieldCount = 3;
- addressBookLabel = QString::fromLatin1("irc");
+ addressBookLabel = TQString::fromLatin1("irc");
}
- else if( id == QString::fromLatin1("OscarProtocol") )
+ else if( id == TQString::fromLatin1("OscarProtocol") )
{
fieldCount = 2;
- addressBookLabel = QString::fromLatin1("aim");
+ addressBookLabel = TQString::fromLatin1("aim");
}
- else if( id == QString::fromLatin1("AIMProtocol") )
+ else if( id == TQString::fromLatin1("AIMProtocol") )
{
- id = QString::fromLatin1("OscarProtocol");
+ id = TQString::fromLatin1("OscarProtocol");
convertOldAim = true;
- addressBookLabel = QString::fromLatin1("aim");
+ addressBookLabel = TQString::fromLatin1("aim");
}
- else if( id == QString::fromLatin1("ICQProtocol") || id == QString::fromLatin1("WPProtocol") || id == QString::fromLatin1("GaduProtocol") )
+ else if( id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") )
{
fieldCount = 1;
}
- else if( id == QString::fromLatin1("JabberProtocol") )
+ else if( id == TQString::fromLatin1("JabberProtocol") )
{
fieldCount = 4;
}
- else if( id == QString::fromLatin1("SMSProtocol") )
+ else if( id == TQString::fromLatin1("SMSProtocol") )
{
// SMS used a variable serializing using a dot as delimiter.
// The minimal count is three though (id, name, delimiter).
fieldCount = 2;
- addressBookLabel = QString::fromLatin1("sms");
+ addressBookLabel = TQString::fromLatin1("sms");
}
if( pluginData[ id ].isNull() )
{
- pluginData[ id ] = newList.createElement( QString::fromLatin1( "plugin-data" ) );
- pluginData[ id ].setAttribute( QString::fromLatin1( "plugin-id" ), id );
+ pluginData[ id ] = newList.createElement( TQString::fromLatin1( "plugin-data" ) );
+ pluginData[ id ].setAttribute( TQString::fromLatin1( "plugin-id" ), id );
newMetaContact.appendChild( pluginData[ id ] );
}
// Do the actual conversion
- if( id == QString::fromLatin1( "MSNProtocol" ) || id == QString::fromLatin1( "OscarProtocol" ) ||
- id == QString::fromLatin1( "AIMProtocol" ) || id == QString::fromLatin1( "IRCProtocol" ) ||
- id == QString::fromLatin1( "ICQProtocol" ) || id == QString::fromLatin1( "JabberProtocol" ) ||
- id == QString::fromLatin1( "SMSProtocol" ) || id == QString::fromLatin1( "WPProtocol" ) ||
- id == QString::fromLatin1( "GaduProtocol" ) )
+ if( id == TQString::fromLatin1( "MSNProtocol" ) || id == TQString::fromLatin1( "OscarProtocol" ) ||
+ id == TQString::fromLatin1( "AIMProtocol" ) || id == TQString::fromLatin1( "IRCProtocol" ) ||
+ id == TQString::fromLatin1( "ICQProtocol" ) || id == TQString::fromLatin1( "JabberProtocol" ) ||
+ id == TQString::fromLatin1( "SMSProtocol" ) || id == TQString::fromLatin1( "WPProtocol" ) ||
+ id == TQString::fromLatin1( "GaduProtocol" ) )
{
- QStringList strList = QStringList::split( QString::fromLatin1( "||" ), data );
+ TQStringList strList = TQStringList::split( TQString::fromLatin1( "||" ), data );
// Unescape '||'
- for( QStringList::iterator it = strList.begin(); it != strList.end(); ++it )
+ for( TQStringList::iterator it = strList.begin(); it != strList.end(); ++it )
{
- ( *it ).replace( QString::fromLatin1( "\\|;" ), QString::fromLatin1( "|" ) ).
- replace( QString::fromLatin1( "\\\\" ), QString::fromLatin1( "\\" ) );
+ ( *it ).replace( TQString::fromLatin1( "\\|;" ), TQString::fromLatin1( "|" ) ).
+ replace( TQString::fromLatin1( "\\\\" ), TQString::fromLatin1( "\\" ) );
}
uint idx = 0;
while( idx < strList.size() )
{
- QDomElement dataField;
+ TQDomElement dataField;
- dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "contactId" ) );
- if( id == QString::fromLatin1("ICQProtocol") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "contactId" ) );
+ if( id == TQString::fromLatin1("ICQProtocol") )
dataField.appendChild( newList.createTextNode( icqData[ idx ] ) );
- else if( id == QString::fromLatin1("GaduProtocol") )
+ else if( id == TQString::fromLatin1("GaduProtocol") )
dataField.appendChild( newList.createTextNode( gaduData[ idx ] ) );
- else if( id == QString::fromLatin1("JabberProtocol") )
+ else if( id == TQString::fromLatin1("JabberProtocol") )
dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) );
else
dataField.appendChild( newList.createTextNode( strList[ idx ] ) );
- dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "displayName" ) );
- if( convertOldAim || id == QString::fromLatin1("ICQProtocol") || id == QString::fromLatin1("WPProtocol") || id == QString::fromLatin1("GaduProtocol") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "displayName" ) );
+ if( convertOldAim || id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") )
dataField.appendChild( newList.createTextNode( strList[ idx ] ) );
- else if( id == QString::fromLatin1("JabberProtocol") )
+ else if( id == TQString::fromLatin1("JabberProtocol") )
dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
else
dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) );
- if( id == QString::fromLatin1("MSNProtocol") )
+ if( id == TQString::fromLatin1("MSNProtocol") )
{
- dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "groups" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
}
- else if( id == QString::fromLatin1("IRCProtocol") )
+ else if( id == TQString::fromLatin1("IRCProtocol") )
{
- dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "serverName" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serverName" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
}
- else if( id == QString::fromLatin1("JabberProtocol") )
+ else if( id == TQString::fromLatin1("JabberProtocol") )
{
- dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "accountId" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "accountId" ) );
dataField.appendChild( newList.createTextNode( strList[ idx ] ) );
- dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "groups" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) );
}
- else if( id == QString::fromLatin1( "SMSProtocol" ) &&
- ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != QString::fromLatin1( "." ) )
+ else if( id == TQString::fromLatin1( "SMSProtocol" ) &&
+ ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != TQString::fromLatin1( "." ) )
{
- dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "serviceName" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serviceName" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) );
- dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) );
+ dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "servicePrefs" ) );
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "servicePrefs" ) );
dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) );
// Add extra fields
@@ -744,30 +744,30 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi
// MSN, AIM, IRC, Oscar and SMS didn't store address book fields up
// to now, so create one
- if( id != QString::fromLatin1("ICQProtocol") && id != QString::fromLatin1("JabberProtocol") && id != QString::fromLatin1("WPProtocol") && id != QString::fromLatin1("GaduProtocol") )
+ if( id != TQString::fromLatin1("ICQProtocol") && id != TQString::fromLatin1("JabberProtocol") && id != TQString::fromLatin1("WPProtocol") && id != TQString::fromLatin1("GaduProtocol") )
{
- QDomElement addressBookField = newList.createElement( QString::fromLatin1( "address-book-field" ) );
+ TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) );
newMetaContact.appendChild( addressBookField );
- addressBookField.setAttribute( QString::fromLatin1( "app" ),
- QString::fromLatin1( "messaging/" ) + addressBookLabel );
- addressBookField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "All" ) );
+ addressBookField.setAttribute( TQString::fromLatin1( "app" ),
+ TQString::fromLatin1( "messaging/" ) + addressBookLabel );
+ addressBookField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "All" ) );
addressBookField.appendChild( newList.createTextNode( strList[ idx ] ) );
}
idx += fieldCount;
}
}
- else if( id == QString::fromLatin1("ContactNotesPlugin") || id == QString::fromLatin1("CryptographyPlugin") || id == QString::fromLatin1("TranslatorPlugin") )
+ else if( id == TQString::fromLatin1("ContactNotesPlugin") || id == TQString::fromLatin1("CryptographyPlugin") || id == TQString::fromLatin1("TranslatorPlugin") )
{
- QDomElement dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) );
+ TQDomElement dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) );
pluginData[ id ].appendChild( dataField );
- if( id == QString::fromLatin1("ContactNotesPlugin") )
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "notes" ) );
- else if( id == QString::fromLatin1("CryptographyPlugin") )
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "gpgKey" ) );
- else if( id == QString::fromLatin1("TranslatorPlugin") )
- dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "languageKey" ) );
+ if( id == TQString::fromLatin1("ContactNotesPlugin") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "notes" ) );
+ else if( id == TQString::fromLatin1("CryptographyPlugin") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "gpgKey" ) );
+ else if( id == TQString::fromLatin1("TranslatorPlugin") )
+ dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "languageKey" ) );
dataField.appendChild( newList.createTextNode( data ) );
}
@@ -776,48 +776,48 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi
oldContactNode = oldContactNode.nextSibling();
}
}
- else if( oldElement.tagName() == QString::fromLatin1("kopete-group") )
+ else if( oldElement.tagName() == TQString::fromLatin1("kopete-group") )
{
- QDomElement newGroup = newList.createElement( QString::fromLatin1( "kopete-group" ) );
+ TQDomElement newGroup = newList.createElement( TQString::fromLatin1( "kopete-group" ) );
newRoot.appendChild( newGroup );
- QDomNode oldGroupNode = oldNode.firstChild();
+ TQDomNode oldGroupNode = oldNode.firstChild();
while( !oldGroupNode.isNull() )
{
- QDomElement oldGroupElement = oldGroupNode.toElement();
+ TQDomElement oldGroupElement = oldGroupNode.toElement();
- if( oldGroupElement.tagName() == QString::fromLatin1("display-name") )
+ if( oldGroupElement.tagName() == TQString::fromLatin1("display-name") )
{
- QDomElement displayName = newList.createElement( QString::fromLatin1( "display-name" ) );
+ TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) );
displayName.appendChild( newList.createTextNode( oldGroupElement.text() ) );
newGroup.appendChild( displayName );
}
- if( oldGroupElement.tagName() == QString::fromLatin1("type") )
+ if( oldGroupElement.tagName() == TQString::fromLatin1("type") )
{
- if( oldGroupElement.text() == QString::fromLatin1("Temporary") )
- newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "temporary" ) );
- else if( oldGroupElement.text() == QString::fromLatin1( "TopLevel" ) )
- newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "top-level" ) );
+ if( oldGroupElement.text() == TQString::fromLatin1("Temporary") )
+ newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "temporary" ) );
+ else if( oldGroupElement.text() == TQString::fromLatin1( "TopLevel" ) )
+ newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "top-level" ) );
else
- newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "standard" ) );
+ newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) );
}
- if( oldGroupElement.tagName() == QString::fromLatin1("view") )
+ if( oldGroupElement.tagName() == TQString::fromLatin1("view") )
{
- if( oldGroupElement.text() == QString::fromLatin1("collapsed") )
- newGroup.setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( "collapsed" ) );
+ if( oldGroupElement.text() == TQString::fromLatin1("collapsed") )
+ newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "collapsed" ) );
else
- newGroup.setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( "expanded" ) );
+ newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) );
}
- else if( oldGroupElement.tagName() == QString::fromLatin1("plugin-data") )
+ else if( oldGroupElement.tagName() == TQString::fromLatin1("plugin-data") )
{
// Per-group plugin data
// FIXME: This needs updating too, ideally, convert this in a later
// contactlist.xml version
- QDomElement groupPluginData = newList.createElement( QString::fromLatin1( "plugin-data" ) );
+ TQDomElement groupPluginData = newList.createElement( TQString::fromLatin1( "plugin-data" ) );
newGroup.appendChild( groupPluginData );
- groupPluginData.setAttribute( QString::fromLatin1( "plugin-id" ),
- oldGroupElement.attribute( QString::fromLatin1( "plugin-id" ), QString::null ) );
+ groupPluginData.setAttribute( TQString::fromLatin1( "plugin-id" ),
+ oldGroupElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ) );
groupPluginData.appendChild( newList.createTextNode( oldGroupElement.text() ) );
}
@@ -836,13 +836,13 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi
// Close the file, and save the new file
contactListFile.close();
- QDir().rename( fileName, fileName + QString::fromLatin1( ".bak" ) );
+ TQDir().rename( fileName, fileName + TQString::fromLatin1( ".bak" ) );
// kdDebug( 14010 ) << k_funcinfo << "XML output:\n" << newList.toString( 2 ) << endl;
contactListFile.open( IO_WriteOnly );
- QTextStream stream( &contactListFile );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream( &contactListFile );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << newList.toString( 2 );
contactListFile.flush();
@@ -862,12 +862,12 @@ void Kopete::ContactList::saveXML()
return;
}
- QString contactListFileName = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) );
+ TQString contactListFileName = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) );
KSaveFile contactListFile( contactListFileName );
if( contactListFile.status() == 0 )
{
- QTextStream *stream = contactListFile.textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream *stream = contactListFile.textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
toXML().save( *stream, 4 );
if ( contactListFile.close() )
@@ -891,11 +891,11 @@ void Kopete::ContactList::saveXML()
d->saveTimer->start( 60000, true /* single-shot: will get restarted by us next time if it's still failing */ );
}
-const QDomDocument ContactList::toXML()
+const TQDomDocument ContactList::toXML()
{
- QDomDocument doc;
- doc.appendChild( doc.createElement( QString::fromLatin1("kopete-contact-list") ) );
- doc.documentElement().setAttribute( QString::fromLatin1("version"), QString::fromLatin1("1.0"));
+ TQDomDocument doc;
+ doc.appendChild( doc.createElement( TQString::fromLatin1("kopete-contact-list") ) );
+ doc.documentElement().setAttribute( TQString::fromLatin1("version"), TQString::fromLatin1("1.0"));
// Save group information. ie: Open/Closed, pehaps later icons? Who knows.
for( Kopete::Group *g = d->groups.first(); g; g = d->groups.next() )
@@ -909,18 +909,18 @@ const QDomDocument ContactList::toXML()
// Save myself metacontact information
if( Kopete::Config::enableGlobalIdentity() )
{
- QDomElement myselfElement = myself()->toXML(true); // Save minimal information.
- myselfElement.setTagName( QString::fromLatin1("myself-meta-contact") );
+ TQDomElement myselfElement = myself()->toXML(true); // Save minimal information.
+ myselfElement.setTagName( TQString::fromLatin1("myself-meta-contact") );
doc.documentElement().appendChild( doc.importNode( myselfElement, true ) );
}
return doc;
}
-QStringList ContactList::contacts() const
+TQStringList ContactList::contacts() const
{
- QStringList contacts;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQStringList contacts;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
contacts.append( it.current()->displayName() );
@@ -928,22 +928,22 @@ QStringList ContactList::contacts() const
return contacts;
}
-QStringList ContactList::contactStatuses() const
+TQStringList ContactList::contactStatuses() const
{
- QStringList meta_contacts;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQStringList meta_contacts;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
- meta_contacts.append( QString::fromLatin1( "%1 (%2)" ).
+ meta_contacts.append( TQString::fromLatin1( "%1 (%2)" ).
arg( it.current()->displayName(), it.current()->statusString() ));
}
return meta_contacts;
}
-QStringList ContactList::reachableContacts() const
+TQStringList ContactList::reachableContacts() const
{
- QStringList contacts;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQStringList contacts;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
if ( it.current()->isReachable() )
@@ -952,16 +952,16 @@ QStringList ContactList::reachableContacts() const
return contacts;
}
-QPtrList<Contact> ContactList::onlineContacts() const
+TQPtrList<Contact> ContactList::onlineContacts() const
{
- QPtrList<Kopete::Contact> result;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQPtrList<Kopete::Contact> result;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
if ( it.current()->isOnline() )
{
- QPtrList<Kopete::Contact> contacts = it.current()->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = it.current()->contacts();
+ TQPtrListIterator<Kopete::Contact> cit( contacts );
for( ; cit.current(); ++cit )
{
if ( cit.current()->isOnline() )
@@ -972,10 +972,10 @@ QPtrList<Contact> ContactList::onlineContacts() const
return result;
}
-QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts() const
+TQPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts() const
{
- QPtrList<Kopete::MetaContact> result;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQPtrList<Kopete::MetaContact> result;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
if ( it.current()->isOnline() )
@@ -984,17 +984,17 @@ QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts() const
return result;
}
-QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts( const QString &protocolId ) const
+TQPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts( const TQString &protocolId ) const
{
- QPtrList<Kopete::MetaContact> result;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQPtrList<Kopete::MetaContact> result;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
// FIXME: This loop is not very efficient :(
if ( it.current()->isOnline() )
{
- QPtrList<Kopete::Contact> contacts = it.current()->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = it.current()->contacts();
+ TQPtrListIterator<Kopete::Contact> cit( contacts );
for( ; cit.current(); ++cit )
{
if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId )
@@ -1005,17 +1005,17 @@ QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts( const QSt
return result;
}
-QPtrList<Kopete::Contact> Kopete::ContactList::onlineContacts( const QString &protocolId ) const
+TQPtrList<Kopete::Contact> Kopete::ContactList::onlineContacts( const TQString &protocolId ) const
{
- QPtrList<Kopete::Contact> result;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQPtrList<Kopete::Contact> result;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
// FIXME: This loop is not very efficient :(
if ( it.current()->isOnline() )
{
- QPtrList<Kopete::Contact> contacts = it.current()->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = it.current()->contacts();
+ TQPtrListIterator<Kopete::Contact> cit( contacts );
for( ; cit.current(); ++cit )
{
if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId )
@@ -1026,10 +1026,10 @@ QPtrList<Kopete::Contact> Kopete::ContactList::onlineContacts( const QString &pr
return result;
}
-QStringList Kopete::ContactList::fileTransferContacts() const
+TQStringList Kopete::ContactList::fileTransferContacts() const
{
- QStringList contacts;
- QPtrListIterator<Kopete::MetaContact> it( d->contacts );
+ TQStringList contacts;
+ TQPtrListIterator<Kopete::MetaContact> it( d->contacts );
for( ; it.current(); ++it )
{
if ( it.current()->canAcceptFiles() )
@@ -1038,8 +1038,8 @@ QStringList Kopete::ContactList::fileTransferContacts() const
return contacts;
}
-void Kopete::ContactList::sendFile( const QString &displayName, const KURL &sourceURL,
- const QString &altFileName, const long unsigned int fileSize)
+void Kopete::ContactList::sendFile( const TQString &displayName, const KURL &sourceURL,
+ const TQString &altFileName, const long unsigned int fileSize)
{
// kdDebug(14010) << "Send To Display Name: " << displayName << "\n";
@@ -1048,7 +1048,7 @@ void Kopete::ContactList::sendFile( const QString &displayName, const KURL &sour
c->sendFile( sourceURL, altFileName, fileSize );
}
-void Kopete::ContactList::messageContact( const QString &contactId, const QString &messageText )
+void Kopete::ContactList::messageContact( const TQString &contactId, const TQString &messageText )
{
Kopete::MetaContact *mc = findMetaContactByContactId( contactId );
if (!mc) return;
@@ -1062,17 +1062,17 @@ void Kopete::ContactList::messageContact( const QString &contactId, const QStrin
}
-QStringList Kopete::ContactList::contactFileProtocols(const QString &displayName)
+TQStringList Kopete::ContactList::contactFileProtocols(const TQString &displayName)
{
// kdDebug(14010) << "Get contacts for: " << displayName << "\n";
- QStringList protocols;
+ TQStringList protocols;
Kopete::MetaContact *c = findMetaContactByDisplayName( displayName );
if( c )
{
- QPtrList<Kopete::Contact> mContacts = c->contacts();
+ TQPtrList<Kopete::Contact> mContacts = c->contacts();
kdDebug(14010) << mContacts.count() << endl;
- QPtrListIterator<Kopete::Contact> jt( mContacts );
+ TQPtrListIterator<Kopete::Contact> jt( mContacts );
for ( ; jt.current(); ++jt )
{
kdDebug(14010) << "1" << jt.current()->protocol()->pluginId() << endl;
@@ -1083,7 +1083,7 @@ QStringList Kopete::ContactList::contactFileProtocols(const QString &displayName
}
return protocols;
}
- return QStringList();
+ return TQStringList();
}