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/oscaraccount.cpp | 222 ++++++++++++++++---------------- 1 file changed, 111 insertions(+), 111 deletions(-) (limited to 'kopete/protocols/oscar/oscaraccount.cpp') diff --git a/kopete/protocols/oscar/oscaraccount.cpp b/kopete/protocols/oscar/oscaraccount.cpp index 353e3201..2a9b4e82 100644 --- a/kopete/protocols/oscar/oscaraccount.cpp +++ b/kopete/protocols/oscar/oscaraccount.cpp @@ -32,14 +32,14 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -72,29 +72,29 @@ public: Q_UINT32 ssiLastModTime; //contacts waiting on SSI add ack and their metacontact - QMap addContactMap; + TQMap addContactMap; //contacts waiting on their group to be added - QMap contactAddQueue; - QMap contactChangeQueue; + TQMap contactAddQueue; + TQMap contactChangeQueue; OscarListNonServerContacts* olnscDialog; unsigned int versionUpdaterStamp; bool versionAlreadyUpdated; - virtual QTextCodec* codecForContact( const QString& contactName ) const + virtual TQTextCodec* codecForContact( const TQString& contactName ) const { return account.contactCodec( Oscar::normalize( contactName ) ); } - virtual QTextCodec* codecForAccount() const + virtual TQTextCodec* codecForAccount() const { return account.defaultCodec(); } }; -OscarAccount::OscarAccount(Kopete::Protocol *parent, const QString &accountID, const char *name, bool isICQ) +OscarAccount::OscarAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name, bool isICQ) : Kopete::PasswordedAccount( parent, accountID, isICQ ? 8 : 16, name ) { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << " accountID='" << accountID << @@ -113,19 +113,19 @@ OscarAccount::OscarAccount(Kopete::Protocol *parent, const QString &accountID, c d->engine->setCodecProvider( d ); d->olnscDialog = 0L; - QObject::connect( d->engine, SIGNAL( loggedIn() ), this, SLOT( loginActions() ) ); - QObject::connect( d->engine, SIGNAL( messageReceived( const Oscar::Message& ) ), - this, SLOT( messageReceived(const Oscar::Message& ) ) ); - QObject::connect( d->engine, SIGNAL( socketError( int, const QString& ) ), - this, SLOT( slotSocketError( int, const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( taskError( const Oscar::SNAC&, int, bool ) ), - this, SLOT( slotTaskError( const Oscar::SNAC&, int, bool ) ) ); - QObject::connect( d->engine, SIGNAL( userStartedTyping( const QString& ) ), - this, SLOT( userStartedTyping( const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( userStoppedTyping( const QString& ) ), - this, SLOT( userStoppedTyping( const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( iconNeedsUploading() ), - this, SLOT( slotSendBuddyIcon() ) ); + TQObject::connect( d->engine, TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loginActions() ) ); + TQObject::connect( d->engine, TQT_SIGNAL( messageReceived( const Oscar::Message& ) ), + this, TQT_SLOT( messageReceived(const Oscar::Message& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( socketError( int, const TQString& ) ), + this, TQT_SLOT( slotSocketError( int, const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( taskError( const Oscar::SNAC&, int, bool ) ), + this, TQT_SLOT( slotTaskError( const Oscar::SNAC&, int, bool ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( userStartedTyping( const TQString& ) ), + this, TQT_SLOT( userStartedTyping( const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( userStoppedTyping( const TQString& ) ), + this, TQT_SLOT( userStoppedTyping( const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( iconNeedsUploading() ), + this, TQT_SLOT( slotSendBuddyIcon() ) ); } OscarAccount::~OscarAccount() @@ -144,18 +144,18 @@ void OscarAccount::logOff( Kopete::Account::DisconnectReason reason ) kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "accountId='" << accountId() << "'" << endl; //disconnect the signals Kopete::ContactList* kcl = Kopete::ContactList::self(); - QObject::disconnect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::disconnect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( contactAdded( const Oscar::SSI& ) ), - this, SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( groupAdded( const Oscar::SSI& ) ), - this, SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( groupUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( contactUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( contactAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( groupAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( groupUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( contactUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); d->engine->close(); myself()->setOnlineStatus( Kopete::OnlineStatus::Offline ); @@ -198,19 +198,19 @@ void OscarAccount::processSSIList() { //disconnect signals so we don't attempt to add things to SSI! Kopete::ContactList* kcl = Kopete::ContactList::self(); - QObject::disconnect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::disconnect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; SSIManager* listManager = d->engine->ssiManager(); //first add groups - QValueList groupList = listManager->groupList(); - QValueList::const_iterator git = groupList.constBegin(); - QValueList::const_iterator listEnd = groupList.constEnd(); + TQValueList groupList = listManager->groupList(); + TQValueList::const_iterator git = groupList.constBegin(); + TQValueList::const_iterator listEnd = groupList.constEnd(); //the protocol dictates that there is at least one group that has contacts //so i don't have to check for an empty group list @@ -223,9 +223,9 @@ void OscarAccount::processSSIList() } //then add contacts - QValueList contactList = listManager->contactList(); - QValueList::const_iterator bit = contactList.constBegin(); - QValueList::const_iterator blistEnd = contactList.constEnd(); + TQValueList contactList = listManager->contactList(); + TQValueList::const_iterator bit = contactList.constBegin(); + TQValueList::const_iterator blistEnd = contactList.constEnd(); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Adding " << contactList.count() << " contacts to contact list" << endl; for ( ; bit != blistEnd; ++bit ) { @@ -245,26 +245,26 @@ void OscarAccount::processSSIList() oc->setSSIItem( item ); } else - addContact( ( *bit ).name(), QString::null, group, Kopete::Account::DontChangeKABC ); + addContact( ( *bit ).name(), TQString::null, group, Kopete::Account::DontChangeKABC ); } - QObject::connect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::connect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); - QObject::connect( listManager, SIGNAL( contactAdded( const Oscar::SSI& ) ), - this, SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( groupAdded( const Oscar::SSI& ) ), - this, SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( groupUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( contactUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); + TQObject::connect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::connect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( contactAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( groupAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( groupUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( contactUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); //TODO: check the kopete contact list and handle non server side contacts appropriately. - QDict nonServerContacts = contacts(); - QDictIterator it( nonServerContacts ); - QStringList nonServerContactList; + TQDict nonServerContacts = contacts(); + TQDictIterator it( nonServerContacts ); + TQStringList nonServerContactList; for ( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast( ( *it ) ); @@ -276,12 +276,12 @@ void OscarAccount::processSSIList() } kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "the following contacts are not on the server side list" << nonServerContactList << endl; - bool showMissingContactsDialog = configGroup()->readBoolEntry(QString::fromLatin1("ShowMissingContactsDialog"), true); + bool showMissingContactsDialog = configGroup()->readBoolEntry(TQString::fromLatin1("ShowMissingContactsDialog"), true); if ( !nonServerContactList.isEmpty() && showMissingContactsDialog ) { d->olnscDialog = new OscarListNonServerContacts( Kopete::UI::Global::mainWidget() ); - QObject::connect( d->olnscDialog, SIGNAL( closing() ), - this, SLOT( nonServerAddContactDialogClosed() ) ); + TQObject::connect( d->olnscDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( nonServerAddContactDialogClosed() ) ); d->olnscDialog->addContacts( nonServerContactList ); d->olnscDialog->show(); } @@ -292,15 +292,15 @@ void OscarAccount::nonServerAddContactDialogClosed() if ( !d->olnscDialog ) return; - if ( d->olnscDialog->result() == QDialog::Accepted ) + if ( d->olnscDialog->result() == TQDialog::Accepted ) { //start adding contacts kdDebug(OSCAR_GEN_DEBUG) << "adding non server contacts to the contact list" << endl; //get the contact list. get the OscarContact object, then the group //check if the group is on ssi, if not, add it //if so, add the contact. - QStringList offliners = d->olnscDialog->nonServerContactList(); - QStringList::iterator it, itEnd = offliners.end(); + TQStringList offliners = d->olnscDialog->nonServerContactList(); + TQStringList::iterator it, itEnd = offliners.end(); for ( it = offliners.begin(); it != itEnd; ++it ) { OscarContact* oc = dynamic_cast( contacts()[( *it )] ); @@ -334,7 +334,7 @@ void OscarAccount::nonServerAddContactDialogClosed() } bool showOnce = d->olnscDialog->onlyShowOnce(); - configGroup()->writeEntry( QString::fromLatin1("ShowMissingContactsDialog") , !showOnce); + configGroup()->writeEntry( TQString::fromLatin1("ShowMissingContactsDialog") , !showOnce); configGroup()->sync(); d->olnscDialog->delayedDestruct(); @@ -363,7 +363,7 @@ void OscarAccount::kopeteGroupAdded( Kopete::Group* group ) d->engine->addGroup( group->displayName() ); } -void OscarAccount::kopeteGroupRenamed( Kopete::Group* group, const QString& oldName ) +void OscarAccount::kopeteGroupRenamed( Kopete::Group* group, const TQString& oldName ) { if ( isConnected() ) d->engine->renameGroup( oldName, group->displayName() ); @@ -385,11 +385,11 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) * Get the sanitized message back * Append to the chat window */ - QString sender = Oscar::normalize( message.sender() ); + TQString sender = Oscar::normalize( message.sender() ); if ( !contacts()[sender] ) { kdDebug(OSCAR_RAW_DEBUG) << "Adding '" << sender << "' as temporary contact" << endl; - addContact( sender, QString::null, 0, Kopete::Account::Temporary ); + addContact( sender, TQString::null, 0, Kopete::Account::Temporary ); } OscarContact* ocSender = static_cast ( contacts()[sender] ); //should exist now @@ -413,10 +413,10 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) //decode message - QString realText( message.text( contactCodec( ocSender ) ) ); + TQString realText( message.text( contactCodec( ocSender ) ) ); //sanitize; - QString sanitizedMsg = sanitizedMessage( realText ); + TQString sanitizedMsg = sanitizedMessage( realText ); Kopete::ContactPtrList me; me.append( myself() ); @@ -427,25 +427,25 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) } -void OscarAccount::setServerAddress(const QString &server) +void OscarAccount::setServerAddress(const TQString &server) { - configGroup()->writeEntry( QString::fromLatin1( "Server" ), server ); + configGroup()->writeEntry( TQString::fromLatin1( "Server" ), server ); } void OscarAccount::setServerPort(int port) { if ( port > 0 ) - configGroup()->writeEntry( QString::fromLatin1( "Port" ), port ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), port ); else //set to default 5190 - configGroup()->writeEntry( QString::fromLatin1( "Port" ), 5190 ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), 5190 ); } -QTextCodec* OscarAccount::defaultCodec() const +TQTextCodec* OscarAccount::defaultCodec() const { - return QTextCodec::codecForMib( configGroup()->readNumEntry( "DefaultEncoding", 4 ) ); + return TQTextCodec::codecForMib( configGroup()->readNumEntry( "DefaultEncoding", 4 ) ); } -QTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const +TQTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const { if ( contact ) return contact->contactCodec(); @@ -453,7 +453,7 @@ QTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const return defaultCodec(); } -QTextCodec* OscarAccount::contactCodec( const QString& contactName ) const +TQTextCodec* OscarAccount::contactCodec( const TQString& contactName ) const { // XXX Need const_cast because Kopete::Account::contacts() // XXX method is not const for some strange reason. @@ -469,20 +469,20 @@ void OscarAccount::setBuddyIcon( KURL url ) } else { - QImage image( url.path() ); + TQImage image( url.path() ); if ( image.isNull() ) return; - const QSize size = ( d->engine->isIcq() ) ? QSize( 52, 64 ) : QSize( 48, 48 ); + const TQSize size = ( d->engine->isIcq() ) ? TQSize( 52, 64 ) : TQSize( 48, 48 ); - image = image.smoothScale( size, QImage::ScaleMax ); + image = image.smoothScale( size, TQImage::ScaleMax ); if( image.width() > size.width()) image = image.copy( ( image.width() - size.width() ) / 2, 0, size.width(), image.height() ); if( image.height() > size.height()) image = image.copy( 0, ( image.height() - size.height() ) / 2, image.width(), size.height() ); - QString newlocation( locateLocal( "appdata", "oscarpictures/"+ accountId() + ".jpg" ) ); + TQString newlocation( locateLocal( "appdata", "oscarpictures/"+ accountId() + ".jpg" ) ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Saving buddy icon: " << newlocation << endl; if ( !image.save( newlocation, "JPEG" ) ) @@ -494,7 +494,7 @@ void OscarAccount::setBuddyIcon( KURL url ) emit buddyIconChanged(); } -bool OscarAccount::addContactToSSI( const QString& contactName, const QString& groupName, bool autoAddGroup ) +bool OscarAccount::addContactToSSI( const TQString& contactName, const TQString& groupName, bool autoAddGroup ) { SSIManager* listManager = d->engine->ssiManager(); if ( !listManager->findGroup( groupName ) ) @@ -516,7 +516,7 @@ bool OscarAccount::addContactToSSI( const QString& contactName, const QString& g return true; } -bool OscarAccount::changeContactGroupInSSI( const QString& contact, const QString& newGroupName, bool autoAddGroup ) +bool OscarAccount::changeContactGroupInSSI( const TQString& contact, const TQString& newGroupName, bool autoAddGroup ) { SSIManager* listManager = d->engine->ssiManager(); if ( !listManager->findGroup( newGroupName ) ) @@ -538,7 +538,7 @@ bool OscarAccount::changeContactGroupInSSI( const QString& contact, const QStrin return true; } -Connection* OscarAccount::setupConnection( const QString& server, uint port ) +Connection* OscarAccount::setupConnection( const TQString& server, uint port ) { //set up the connector KNetworkConnector* knc = new KNetworkConnector( 0 ); @@ -554,7 +554,7 @@ Connection* OscarAccount::setupConnection( const QString& server, uint port ) } -bool OscarAccount::createContact(const QString &contactId, +bool OscarAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact) { /* We're not even online or connecting @@ -576,7 +576,7 @@ bool OscarAccount::createContact(const QString &contactId, 2.c. create kopete contact */ - QValueList dummyList; + TQValueList dummyList; if ( parentContact->isTemporary() ) { SSI tempItem( contactId, 0, 0, 0xFFFF, dummyList, 0 ); @@ -607,7 +607,7 @@ bool OscarAccount::createContact(const QString &contactId, kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Adding " << contactId << " to server side list" << endl; - QString groupName; + TQString groupName; Kopete::GroupList kopeteGroups = parentContact->groups(); //get the group list if ( kopeteGroups.isEmpty() || kopeteGroups.first() == Kopete::Group::topLevel() ) @@ -618,7 +618,7 @@ bool OscarAccount::createContact(const QString &contactId, else { //apparently kopeteGroups.first() can be invalid. Attempt to prevent - //crashes in SSIData::findGroup(const QString& name) + //crashes in SSIData::findGroup(const TQString& name) groupName = kopeteGroups.first() ? kopeteGroups.first()->displayName() : i18n("Buddies"); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Contact with group." << " No. of groups = " << kopeteGroups.count() << @@ -665,7 +665,7 @@ void OscarAccount::ssiGroupAdded( const Oscar::SSI& item ) //check the contact add queue for any contacts matching the //group name we just added kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Looking for contacts to be added in group " << item.name() << endl; - QMap::iterator it; + TQMap::iterator it; for ( it = d->contactAddQueue.begin(); it != d->contactAddQueue.end(); ++it ) { if ( Oscar::normalize( it.data() ) == Oscar::normalize( item.name() ) ) @@ -704,7 +704,7 @@ void OscarAccount::ssiContactUpdated( const Oscar::SSI& item ) } } -void OscarAccount::userStartedTyping( const QString & contact ) +void OscarAccount::userStartedTyping( const TQString & contact ) { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; if ( ct && contact != accountId() ) @@ -714,7 +714,7 @@ void OscarAccount::userStartedTyping( const QString & contact ) } } -void OscarAccount::userStoppedTyping( const QString & contact ) +void OscarAccount::userStoppedTyping( const TQString & contact ) { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; if ( ct && contact != accountId() ) @@ -724,7 +724,7 @@ void OscarAccount::userStoppedTyping( const QString & contact ) } } -void OscarAccount::slotSocketError( int errCode, const QString& errString ) +void OscarAccount::slotSocketError( int errCode, const TQString& errString ) { Q_UNUSED( errCode ); KPassivePopup::message( i18n( "account has been disconnected", "%1 disconnected" ).arg( accountId() ), @@ -740,7 +740,7 @@ void OscarAccount::slotTaskError( const Oscar::SNAC& s, int code, bool fatal ) kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "service: " << s.family << " subtype: " << s.subtype << " code: " << code << endl; - QString message; + TQString message; if ( s.family == 0 && s.subtype == 0 ) { message = getFLAPErrorMessage( code ); @@ -781,34 +781,34 @@ void OscarAccount::slotTaskError( const Oscar::SNAC& s, int code, bool fatal ) void OscarAccount::slotSendBuddyIcon() { //need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotSendBuddyIcon() ) ); - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotSendBuddyIcon() ) ); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); if ( photoPath.isEmpty() ) return; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << photoPath << endl; - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); if ( iconFile.open( IO_ReadOnly ) ) { if ( !engine()->hasIconConnection() ) { //will send icon when we connect to icon server - QObject::connect( engine(), SIGNAL( iconServerConnected() ), - this, SLOT( slotSendBuddyIcon() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( slotSendBuddyIcon() ) ); return; } - QByteArray imageData = iconFile.readAll(); + TQByteArray imageData = iconFile.readAll(); engine()->sendBuddyIcon( imageData ); } } -QString OscarAccount::getFLAPErrorMessage( int code ) +TQString OscarAccount::getFLAPErrorMessage( int code ) { bool isICQ = d->engine->isIcq(); - QString acctType = isICQ ? i18n("ICQ") : i18n("AIM"); - QString acctDescription = isICQ ? i18n("ICQ user id", "UIN") : i18n("AIM user id", "screen name"); - QString reason; + TQString acctType = isICQ ? i18n("ICQ") : i18n("AIM"); + TQString acctDescription = isICQ ? i18n("ICQ user id", "UIN") : i18n("AIM user id", "screen name"); + TQString reason; //FLAP errors are always fatal //negative codes are things added by liboscar developers //to indicate generic errors in the task -- cgit v1.2.1