diff options
Diffstat (limited to 'kopete/protocols')
773 files changed, 15603 insertions, 15603 deletions
diff --git a/kopete/protocols/gadu/gaduaccount.cpp b/kopete/protocols/gadu/gaduaccount.cpp index 9d7846d5..2293143f 100644 --- a/kopete/protocols/gadu/gaduaccount.cpp +++ b/kopete/protocols/gadu/gaduaccount.cpp @@ -46,13 +46,13 @@ #include <ktempfile.h> #include <kio/netaccess.h> -#include <qapplication.h> -#include <qdialog.h> -#include <qtimer.h> -#include <qtextcodec.h> -#include <qptrlist.h> -#include <qtextstream.h> -#include <qhostaddress.h> +#include <tqapplication.h> +#include <tqdialog.h> +#include <tqtimer.h> +#include <tqtextcodec.h> +#include <tqptrlist.h> +#include <tqtextstream.h> +#include <tqhostaddress.h> #include <netinet/in.h> @@ -64,9 +64,9 @@ public: GaduSession* session_; GaduDCC* gaduDcc_; - QTimer* pingTimer_; + TQTimer* pingTimer_; - QTextCodec* textcodec_; + TQTextCodec* textcodec_; KFileDialog* saveListDialog; KFileDialog* loadListDialog; @@ -85,12 +85,12 @@ public: bool forFriends; bool ignoreAnons; - QTimer* exportTimer_; + TQTimer* exportTimer_; bool exportUserlist; KConfigGroup* config; Kopete::OnlineStatus status; - QValueList<unsigned int> servers; + TQValueList<unsigned int> servers; KGaduLoginParams loginInfo; }; @@ -114,10 +114,10 @@ static const char* const servers_ip[] = { #define NUM_SERVERS (sizeof(servers_ip)/sizeof(char*)) - GaduAccount::GaduAccount( Kopete::Protocol* parent, const QString& accountID,const char* name ) + GaduAccount::GaduAccount( Kopete::Protocol* parent, const TQString& accountID,const char* name ) : Kopete::PasswordedAccount( parent, accountID, 0, name ) { - QHostAddress ip; + TQHostAddress ip; p = new GaduAccountPrivate; p->pingTimer_ = NULL; @@ -125,7 +125,7 @@ static const char* const servers_ip[] = { p->loadListDialog = NULL; p->forFriends = false; - p->textcodec_ = QTextCodec::codecForName( "CP1250" ); + p->textcodec_ = TQTextCodec::codecForName( "CP1250" ); p->session_ = new GaduSession( this, "GaduSession" ); KGlobal::config()->setGroup( "Gadu" ); @@ -133,10 +133,10 @@ static const char* const servers_ip[] = { setMyself( new GaduContact( accountId().toInt(), accountId(), this, Kopete::ContactList::self()->myself() ) ); p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ); - p->lastDescription = QString::null; + p->lastDescription = TQString::null; for ( unsigned int i = 0; i < NUM_SERVERS ; i++ ) { - ip.setAddress( QString( servers_ip[i] ) ); + ip.setAddress( TQString( servers_ip[i] ) ); p->servers.append( htonl( ip.toIPv4Address() ) ); kdDebug( 14100 ) << "adding IP: " << p->servers[ i ] << " to cache" << endl; } @@ -151,8 +151,8 @@ static const char* const servers_ip[] = { p->loginInfo.client_port = 0; p->loginInfo.client_addr = 0; - p->pingTimer_ = new QTimer( this ); - p->exportTimer_ = new QTimer( this ); + p->pingTimer_ = new TQTimer( this ); + p->exportTimer_ = new TQTimer( this ); p->exportUserlist = false; p->gaduDcc_ = NULL; @@ -165,13 +165,13 @@ static const char* const servers_ip[] = { initConnections(); initActions(); - QString nick = p->config->readEntry( QString::fromAscii( "nickName" ) ); + TQString nick = p->config->readEntry( TQString::fromAscii( "nickName" ) ); if ( !nick.isNull() ) { myself()->setProperty( Kopete::Global::Properties::self()->nickName(), nick ); } else { myself()->setProperty( Kopete::Global::Properties::self()->nickName(), accountId() ); - p->config->writeEntry( QString::fromAscii( "nickName" ), accountId() ); + p->config->writeEntry( TQString::fromAscii( "nickName" ), accountId() ); } } @@ -184,15 +184,15 @@ void GaduAccount::initActions() { p->searchAction = new KAction( i18n( "&Search for Friends" ), "", 0, - this, SLOT( slotSearch() ), this, "actionSearch" ); + this, TQT_SLOT( slotSearch() ), this, "actionSearch" ); p->listputAction = new KAction( i18n( "Export Contacts to Server" ), "", 0, - this, SLOT( slotExportContactsList() ), this, "actionListput" ); + this, TQT_SLOT( slotExportContactsList() ), this, "actionListput" ); p->listToFileAction = new KAction( i18n( "Export Contacts to File..." ), "", 0, - this, SLOT( slotExportContactsListToFile() ), this, "actionListputFile" ); + this, TQT_SLOT( slotExportContactsListToFile() ), this, "actionListputFile" ); p->listFromFileAction = new KAction( i18n( "Import Contacts From File..." ), "", 0, - this, SLOT( slotImportContactsFromFile() ), this, "actionListgetFile" ); + this, TQT_SLOT( slotImportContactsFromFile() ), this, "actionListgetFile" ); p->friendsModeAction = new KToggleAction( i18n( "Only for Friends" ), "", 0, - this, SLOT( slotFriendsMode() ), this, + this, TQT_SLOT( slotFriendsMode() ), this, "actionFriendsMode" ); static_cast<KToggleAction*>(p->friendsModeAction)->setChecked( p->forFriends ); @@ -201,38 +201,38 @@ GaduAccount::initActions() void GaduAccount::initConnections() { - QObject::connect( p->session_, SIGNAL( error( const QString&, const QString& ) ), - SLOT( error( const QString&, const QString& ) ) ); - QObject::connect( p->session_, SIGNAL( messageReceived( KGaduMessage* ) ), - SLOT( messageReceived( KGaduMessage* ) ) ); - QObject::connect( p->session_, SIGNAL( contactStatusChanged( KGaduNotify* ) ), - SLOT( contactStatusChanged( KGaduNotify* ) ) ); - QObject::connect( p->session_, SIGNAL( connectionFailed( gg_failure_t )), - SLOT( connectionFailed( gg_failure_t ) ) ); - QObject::connect( p->session_, SIGNAL( connectionSucceed( ) ), - SLOT( connectionSucceed( ) ) ); - QObject::connect( p->session_, SIGNAL( disconnect( Kopete::Account::DisconnectReason ) ), - SLOT( slotSessionDisconnect( Kopete::Account::DisconnectReason ) ) ); - QObject::connect( p->session_, SIGNAL( ackReceived( unsigned int ) ), - SLOT( ackReceived( unsigned int ) ) ); - QObject::connect( p->session_, SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), - SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); - QObject::connect( p->session_, SIGNAL( userListExported() ), - SLOT( userListExportDone() ) ); - QObject::connect( p->session_, SIGNAL( userListRecieved( const QString& ) ), - SLOT( userlist( const QString& ) ) ); - QObject::connect( p->session_, SIGNAL( incomingCtcp( unsigned int ) ), - SLOT( slotIncomingDcc( unsigned int ) ) ); - - QObject::connect( p->pingTimer_, SIGNAL( timeout() ), - SLOT( pingServer() ) ); - - QObject::connect( p->exportTimer_, SIGNAL( timeout() ), - SLOT( slotUserlistSynch() ) ); + TQObject::connect( p->session_, TQT_SIGNAL( error( const TQString&, const TQString& ) ), + TQT_SLOT( error( const TQString&, const TQString& ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( messageReceived( KGaduMessage* ) ), + TQT_SLOT( messageReceived( KGaduMessage* ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( contactStatusChanged( KGaduNotify* ) ), + TQT_SLOT( contactStatusChanged( KGaduNotify* ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( connectionFailed( gg_failure_t )), + TQT_SLOT( connectionFailed( gg_failure_t ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( connectionSucceed( ) ), + TQT_SLOT( connectionSucceed( ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( disconnect( Kopete::Account::DisconnectReason ) ), + TQT_SLOT( slotSessionDisconnect( Kopete::Account::DisconnectReason ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( ackReceived( unsigned int ) ), + TQT_SLOT( ackReceived( unsigned int ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), + TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( userListExported() ), + TQT_SLOT( userListExportDone() ) ); + TQObject::connect( p->session_, TQT_SIGNAL( userListRecieved( const TQString& ) ), + TQT_SLOT( userlist( const TQString& ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( incomingCtcp( unsigned int ) ), + TQT_SLOT( slotIncomingDcc( unsigned int ) ) ); + + TQObject::connect( p->pingTimer_, TQT_SIGNAL( timeout() ), + TQT_SLOT( pingServer() ) ); + + TQObject::connect( p->exportTimer_, TQT_SIGNAL( timeout() ), + TQT_SLOT( slotUserlistSynch() ) ); } void -GaduAccount::setAway( bool isAway, const QString& awayMessage ) +GaduAccount::setAway( bool isAway, const TQString& awayMessage ) { unsigned int currentStatus; @@ -288,22 +288,22 @@ GaduAccount::actionMenu() } p->actionMenu_->insert( new KAction( i18n( "Go O&nline" ), GaduProtocol::protocol()->convertStatus( GG_STATUS_AVAIL ).iconFor( this ), - 0, this, SLOT( slotGoOnline() ), this, "actionGaduConnect" ) ); + 0, this, TQT_SLOT( slotGoOnline() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Busy" ), GaduProtocol::protocol()->convertStatus( GG_STATUS_BUSY ).iconFor( this ), - 0, this, SLOT( slotGoBusy() ), this, "actionGaduConnect" ) ); + 0, this, TQT_SLOT( slotGoBusy() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Invisible" ), GaduProtocol::protocol()->convertStatus( GG_STATUS_INVISIBLE ).iconFor( this ), - 0, this, SLOT( slotGoInvisible() ), this, "actionGaduConnect" ) ); + 0, this, TQT_SLOT( slotGoInvisible() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Go &Offline" ), GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ).iconFor( this ), - 0, this, SLOT( slotGoOffline() ), this, "actionGaduConnect" ) ); + 0, this, TQT_SLOT( slotGoOffline() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Description..." ), "info", - 0, this, SLOT( slotDescription() ), this, "actionGaduDescription" ) ); + 0, this, TQT_SLOT( slotDescription() ), this, "actionGaduDescription" ) ); p->actionMenu_->insert( p->friendsModeAction ); @@ -324,7 +324,7 @@ GaduAccount::actionMenu() } void -GaduAccount::connectWithPassword(const QString& password) +GaduAccount::connectWithPassword(const TQString& password) { if (password.isEmpty()) { return; @@ -350,7 +350,7 @@ GaduAccount::disconnect( DisconnectReason reason ) } void -GaduAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason ) +GaduAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason ) { kdDebug(14100) << k_funcinfo << "Called" << endl; changeStatus( status, reason); @@ -375,7 +375,7 @@ GaduAccount::userlistChanged() } bool -GaduAccount::createContact( const QString& contactId, Kopete::MetaContact* parentContact ) +GaduAccount::createContact( const TQString& contactId, Kopete::MetaContact* parentContact ) { kdDebug(14100) << "createContact " << contactId << endl; @@ -390,7 +390,7 @@ GaduAccount::createContact( const QString& contactId, Kopete::MetaContact* paren } void -GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const QString& descr ) +GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& descr ) { unsigned int ns; @@ -477,7 +477,7 @@ GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const QString& de } void -GaduAccount::slotLogin( int status, const QString& dscr ) +GaduAccount::slotLogin( int status, const TQString& dscr ) { p->lastDescription = dscr; @@ -581,7 +581,7 @@ GaduAccount::sendMessage( uin_t recipient, const Kopete::Message& msg, int msgCl } void -GaduAccount::error( const QString& title, const QString& message ) +GaduAccount::error( const TQString& title, const TQString& message ) { KMessageBox::error( Kopete::UI::Global::mainWidget(), title, message ); } @@ -590,7 +590,7 @@ void GaduAccount::messageReceived( KGaduMessage* gaduMessage ) { GaduContact* contact = 0; - QPtrList<Kopete::Contact> contactsListTmp; + TQPtrList<Kopete::Contact> contactsListTmp; // FIXME:check for ignored users list @@ -600,7 +600,7 @@ GaduAccount::messageReceived( KGaduMessage* gaduMessage ) return; } - contact = static_cast<GaduContact*> ( contacts()[ QString::number( gaduMessage->sender_id ) ] ); + contact = static_cast<GaduContact*> ( contacts()[ TQString::number( gaduMessage->sender_id ) ] ); if ( !contact ) { if ( p->ignoreAnons == true ) { @@ -610,7 +610,7 @@ GaduAccount::messageReceived( KGaduMessage* gaduMessage ) Kopete::MetaContact* metaContact = new Kopete::MetaContact (); metaContact->setTemporary ( true ); contact = new GaduContact( gaduMessage->sender_id, - QString::number( gaduMessage->sender_id ), this, metaContact ); + TQString::number( gaduMessage->sender_id ), this, metaContact ); Kopete::ContactList::self ()->addMetaContact( metaContact ); addNotify( gaduMessage->sender_id ); } @@ -625,7 +625,7 @@ GaduAccount::ackReceived( unsigned int recipient ) { GaduContact* contact; - contact = static_cast<GaduContact*> ( contacts()[ QString::number( recipient ) ] ); + contact = static_cast<GaduContact*> ( contacts()[ TQString::number( recipient ) ] ); if ( contact ) { kdDebug(14100) << "####" << "Received an ACK from " << contact->uin() << endl; contact->messageAck(); @@ -642,7 +642,7 @@ GaduAccount::contactStatusChanged( KGaduNotify* gaduNotify ) GaduContact* contact; - contact = static_cast<GaduContact*>( contacts()[ QString::number( gaduNotify->contact_id ) ] ); + contact = static_cast<GaduContact*>( contacts()[ TQString::number( gaduNotify->contact_id ) ] ); if( !contact ) { kdDebug(14100) << "Notify not in the list " << gaduNotify->contact_id << endl; return; @@ -668,7 +668,7 @@ void GaduAccount::connectionFailed( gg_failure_t failure ) { bool tryReconnect = false; - QString pass; + TQString pass; switch (failure) { @@ -682,7 +682,7 @@ GaduAccount::connectionFailed( gg_failure_t failure ) default: if ( p->connectWithSSL ) { if ( useTls() != TLS_only ) { - slotCommandDone( QString::null, i18n( "connection using SSL was not possible, retrying without." ) ); + slotCommandDone( TQString::null, i18n( "connection using SSL was not possible, retrying without." ) ); kdDebug( 14100 ) << "try without tls now" << endl; p->connectWithSSL = false; tryReconnect = true; @@ -753,7 +753,7 @@ GaduAccount::slotIncomingDcc( unsigned int uin ) return; } - contact = static_cast<GaduContact*>( contacts()[ QString::number( uin ) ] ); + contact = static_cast<GaduContact*>( contacts()[ TQString::number( uin ) ] ); if ( !contact ) { kdDebug(14100) << "attempt to make dcc connection from unknown uin " << uin << endl; @@ -798,7 +798,7 @@ GaduAccount::startNotify() return; } - QDictIterator<Kopete::Contact> kopeteContactsList( contacts() ); + TQDictIterator<Kopete::Contact> kopeteContactsList( contacts() ); uin_t* userlist = 0; userlist = new uin_t[ contacts().count() ]; @@ -832,13 +832,13 @@ GaduAccount::slotSessionDisconnect( Kopete::Account::DisconnectReason reason ) } void -GaduAccount::userlist( const QString& contactsListString ) +GaduAccount::userlist( const TQString& contactsListString ) { kdDebug(14100)<<"### Got userlist - gadu account"<<endl; GaduContactsList contactsList( contactsListString ); - QString contactName; - QStringList groups; + TQString contactName; + TQStringList groups; GaduContact* contact; Kopete::MetaContact* metaContact; unsigned int i; @@ -880,8 +880,8 @@ GaduAccount::userlist( const QString& contactsListString ) metaContact = contact->metaContact(); metaContact->removeFromGroup( Kopete::Group::topLevel() ); // put him in all desired groups: - groups = QStringList::split( ",", contactsList[i].group ); - for ( QStringList::Iterator groupsIterator = groups.begin(); groupsIterator != groups.end(); ++groupsIterator ) { + groups = TQStringList::split( ",", contactsList[i].group ); + for ( TQStringList::Iterator groupsIterator = groups.begin(); groupsIterator != groups.end(); ++groupsIterator ) { metaContact->addToGroup( Kopete::ContactList::self ()->findGroup ( *groupsIterator) ); } } @@ -894,7 +894,7 @@ GaduAccount::userlist( const QString& contactsListString ) void GaduAccount::userListExportDone() { - slotCommandDone( QString::null, i18n( "Contacts exported to the server.") ); + slotCommandDone( TQString::null, i18n( "Contacts exported to the server.") ); } void @@ -922,21 +922,21 @@ GaduAccount::slotExportContactsListToFile() return; } - p->saveListDialog = new KFileDialog( "::kopete-gadu" + accountId(), QString::null, + p->saveListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString::null, Kopete::UI::Global::mainWidget(), "gadu-list-save", false ); p->saveListDialog->setCaption( i18n("Save Contacts List for Account %1 As").arg( myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) ); - if ( p->saveListDialog->exec() == QDialog::Accepted ) { - QCString list = p->textcodec_->fromUnicode( userlist()->asString() ); + if ( p->saveListDialog->exec() == TQDialog::Accepted ) { + TQCString list = p->textcodec_->fromUnicode( userlist()->asString() ); if ( tempFile.status() ) { // say cheese, can't create file..... error( i18n( "Unable to create temporary file." ), i18n( "Save Contacts List Failed" ) ); } else { - QTextStream* tempStream = tempFile.textStream(); + TQTextStream* tempStream = tempFile.textStream(); (*tempStream) << list.data(); tempFile.close(); @@ -960,25 +960,25 @@ void GaduAccount::slotImportContactsFromFile() { KURL url; - QCString list; - QString oname; + TQCString list; + TQString oname; if ( p->loadListDialog ) { kdDebug( 14100 ) << "load contacts from file: alread waiting for input " << endl ; return; } - p->loadListDialog = new KFileDialog( "::kopete-gadu" + accountId(), QString::null, + p->loadListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString::null, Kopete::UI::Global::mainWidget(), "gadu-list-load", true ); p->loadListDialog->setCaption( i18n("Load Contacts List for Account %1 As").arg( myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) ); - if ( p->loadListDialog->exec() == QDialog::Accepted ) { + if ( p->loadListDialog->exec() == TQDialog::Accepted ) { url = p->loadListDialog->selectedURL(); kdDebug(14100) << "a:" << url << "\nb:" << oname << endl; if ( KIO::NetAccess::download( url, oname, Kopete::UI::Global::mainWidget() ) ) { - QFile tempFile( oname ); + TQFile tempFile( oname ); if ( tempFile.open( IO_ReadOnly ) ) { list = tempFile.readAll(); tempFile.close(); @@ -1034,7 +1034,7 @@ GaduAccount::userlist() return contactsList; } - QDictIterator<Kopete::Contact> contactsIterator( contacts() ); + TQDictIterator<Kopete::Contact> contactsIterator( contacts() ); for( i=0 ; contactsIterator.current() ; ++contactsIterator ) { contact = static_cast<GaduContact*>( *contactsIterator ); @@ -1058,7 +1058,7 @@ GaduAccount::slotChangePassword() } void -GaduAccount::slotCommandDone( const QString& /*title*/, const QString& what ) +GaduAccount::slotCommandDone( const TQString& /*title*/, const TQString& what ) { //FIXME: any chance to have my own title in event popup ? KNotifyClient::userEvent( 0, what, @@ -1066,7 +1066,7 @@ GaduAccount::slotCommandDone( const QString& /*title*/, const QString& what ) } void -GaduAccount::slotCommandError(const QString& title, const QString& what ) +GaduAccount::slotCommandError(const TQString& title, const TQString& what ) { error( title, what ); } @@ -1076,7 +1076,7 @@ GaduAccount::slotDescription() { GaduAway* away = new GaduAway( this ); - if( away->exec() == QDialog::Accepted ) { + if( away->exec() == TQDialog::Accepted ) { changeStatus( GaduProtocol::protocol()->convertStatus( away->status() ), away->awayText() ); } @@ -1102,7 +1102,7 @@ GaduAccount::slotSearchResult( const SearchResult& result, unsigned int seq ) } void -GaduAccount::sendFile( GaduContact* peer, QString& filePath ) +GaduAccount::sendFile( GaduContact* peer, TQString& filePath ) { GaduDCCTransaction* gtran = new GaduDCCTransaction( p->gaduDcc_ ); gtran->setupOutgoing( peer, filePath ); @@ -1120,9 +1120,9 @@ GaduAccount::dccRequest( GaduContact* peer ) bool GaduAccount::dccEnabled() { - QString s = p->config->readEntry( QString::fromAscii( "useDcc" ) ); + TQString s = p->config->readEntry( TQString::fromAscii( "useDcc" ) ); kdDebug( 14100 ) << "dccEnabled: "<< s << endl; - if ( s == QString::fromAscii( "enabled" ) ) { + if ( s == TQString::fromAscii( "enabled" ) ) { return true; } return false; @@ -1131,18 +1131,18 @@ GaduAccount::dccEnabled() bool GaduAccount::setDcc( bool d ) { - QString s; + TQString s; bool f = true; if ( d == false ) { dccOff(); - s = QString::fromAscii( "disabled" ); + s = TQString::fromAscii( "disabled" ); } else { - s = QString::fromAscii( "enabled" ); + s = TQString::fromAscii( "enabled" ); } - p->config->writeEntry( QString::fromAscii( "useDcc" ), s ); + p->config->writeEntry( TQString::fromAscii( "useDcc" ), s ); if ( p->session_->isConnected() && d ) { dccOn(); @@ -1156,18 +1156,18 @@ GaduAccount::setDcc( bool d ) void GaduAccount::saveFriendsMode( bool i ) { - p->config->writeEntry( QString::fromAscii( "forFriends" ), - i == true ? QString::fromAscii( "1" ) : QString::fromAscii( "0" ) ); + p->config->writeEntry( TQString::fromAscii( "forFriends" ), + i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) ); } bool GaduAccount::loadFriendsMode() { - QString s; + TQString s; bool r; int n; - s = p->config->readEntry( QString::fromAscii( "forFriends" ) ); + s = p->config->readEntry( TQString::fromAscii( "forFriends" ) ); n = s.toInt( &r ); if ( n ) { @@ -1182,11 +1182,11 @@ GaduAccount::loadFriendsMode() bool GaduAccount::ignoreAnons() { - QString s; + TQString s; bool r; int n; - s = p->config->readEntry( QString::fromAscii( "ignoreAnons" ) ); + s = p->config->readEntry( TQString::fromAscii( "ignoreAnons" ) ); n = s.toInt( &r ); if ( n ) { @@ -1201,19 +1201,19 @@ void GaduAccount::setIgnoreAnons( bool i ) { p->ignoreAnons = i; - p->config->writeEntry( QString::fromAscii( "ignoreAnons" ), - i == true ? QString::fromAscii( "1" ) : QString::fromAscii( "0" ) ); + p->config->writeEntry( TQString::fromAscii( "ignoreAnons" ), + i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) ); } GaduAccount::tlsConnection GaduAccount::useTls() { - QString s; + TQString s; bool c; unsigned int oldC; tlsConnection Tls; - s = p->config->readEntry( QString::fromAscii( "useEncryptedConnection" ) ); + s = p->config->readEntry( TQString::fromAscii( "useEncryptedConnection" ) ); oldC = s.toUInt( &c ); // we have old format if ( c ) { @@ -1221,7 +1221,7 @@ GaduAccount::useTls() oldC << " willl be converted to new string value" << endl; setUseTls( (tlsConnection) oldC ); // should be string now, unless there was an error reading - s = p->config->readEntry( QString::fromAscii( "useEncryptedConnection" ) ); + s = p->config->readEntry( TQString::fromAscii( "useEncryptedConnection" ) ); kdDebug( 14100 ) << "new useEncryptedConnection value : " << s << endl; } @@ -1239,7 +1239,7 @@ GaduAccount::useTls() void GaduAccount::setUseTls( tlsConnection ut ) { - QString s; + TQString s; switch( ut ) { case TLS_ifAvaliable: s = "TLS_ifAvaliable"; @@ -1255,7 +1255,7 @@ GaduAccount::setUseTls( tlsConnection ut ) break; } - p->config->writeEntry( QString::fromAscii( "useEncryptedConnection" ), s ); + p->config->writeEntry( TQString::fromAscii( "useEncryptedConnection" ), s ); } #include "gaduaccount.moc" diff --git a/kopete/protocols/gadu/gaduaccount.h b/kopete/protocols/gadu/gaduaccount.h index 22d68842..234f3514 100644 --- a/kopete/protocols/gadu/gaduaccount.h +++ b/kopete/protocols/gadu/gaduaccount.h @@ -32,10 +32,10 @@ #include <libgadu.h> -#include <qhostaddress.h> -#include <qmap.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqhostaddress.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqptrlist.h> #include <kaction.h> #include <kfiledialog.h> @@ -56,13 +56,13 @@ class GaduAccount : public Kopete::PasswordedAccount Q_OBJECT public: - GaduAccount( Kopete::Protocol*, const QString& accountID, const char* name = 0L ); + GaduAccount( Kopete::Protocol*, const TQString& accountID, const char* name = 0L ); ~GaduAccount(); //{ - void setAway( bool isAway, const QString& awayMessage = QString::null ); + void setAway( bool isAway, const TQString& awayMessage = TQString::null ); KActionMenu* actionMenu(); void dccRequest( GaduContact* ); - void sendFile( GaduContact* , QString& ); + void sendFile( GaduContact* , TQString& ); //} enum tlsConnection{ TLS_ifAvaliable = 0, TLS_only, TLS_no }; unsigned int getPersonalInformation(); @@ -70,14 +70,14 @@ public: public slots: //{ - void connectWithPassword(const QString &password); + void connectWithPassword(const TQString &password); void disconnect( DisconnectReason ); void disconnect(); - void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); //} - void changeStatus( const Kopete::OnlineStatus& status, const QString& descr = QString::null ); - void slotLogin( int status = GG_STATUS_AVAIL, const QString& dscr = QString::null ); + void changeStatus( const Kopete::OnlineStatus& status, const TQString& descr = TQString::null ); + void slotLogin( int status = GG_STATUS_AVAIL, const TQString& dscr = TQString::null ); void slotLogoff(); void slotGoOnline(); void slotGoOffline(); @@ -94,7 +94,7 @@ public slots: void sendMessage( uin_t recipient, const Kopete::Message& msg, int msgClass = GG_CLASS_CHAT ); - void error( const QString& title, const QString& message ); + void error( const TQString& title, const TQString& message ); void pong(); void pingServer(); @@ -126,7 +126,7 @@ signals: protected: //{ - bool createContact( const QString& contactId, + bool createContact( const TQString& contactId, Kopete::MetaContact* parentContact ); //} @@ -143,7 +143,7 @@ private slots: void slotImportContactsFromFile(); void slotFriendsMode(); - void userlist( const QString& contacts ); + void userlist( const TQString& contacts ); GaduContactsList* userlist(); void slotUserlistSynch(); @@ -152,8 +152,8 @@ private slots: void slotChangePassword(); - void slotCommandDone( const QString&, const QString& ); - void slotCommandError( const QString&, const QString& ); + void slotCommandDone( const TQString&, const TQString& ); + void slotCommandError( const TQString&, const TQString& ); void slotSearchResult( const SearchResult& result, unsigned int seq ); void userListExportDone(); diff --git a/kopete/protocols/gadu/gaduaddcontactpage.cpp b/kopete/protocols/gadu/gaduaddcontactpage.cpp index 2b914bab..89645afd 100644 --- a/kopete/protocols/gadu/gaduaddcontactpage.cpp +++ b/kopete/protocols/gadu/gaduaddcontactpage.cpp @@ -34,22 +34,22 @@ #include <kopetecontactlist.h> #include <kopetegroup.h> -#include <qwidget.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qptrlist.h> -#include <qcombobox.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqptrlist.h> +#include <tqcombobox.h> #include <krestrictedline.h> -GaduAddContactPage::GaduAddContactPage( GaduAccount* owner, QWidget* parent, const char* name ) +GaduAddContactPage::GaduAddContactPage( GaduAccount* owner, TQWidget* parent, const char* name ) : AddContactPage( parent, name ) { account_ = owner; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); addUI_ = new GaduAddUI( this ); - connect( addUI_->addEdit_, SIGNAL( textChanged( const QString & ) ), SLOT( slotUinChanged( const QString & ) ) ); + connect( addUI_->addEdit_, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotUinChanged( const TQString & ) ) ); addUI_->addEdit_->setValidChars( "1234567890" ); addUI_->addEdit_->setText( "" ); addUI_->groups->setDisabled( TRUE ); @@ -69,23 +69,23 @@ GaduAddContactPage::fillGroups() { /* Kopete::Group *g; - QPtrList<Kopete::Group> gl = Kopete::ContactList::self()->groups(); + TQPtrList<Kopete::Group> gl = Kopete::ContactList::self()->groups(); for( g = gl.first(); g; g = gl.next() ) { - QCheckListItem* item = new QCheckListItem( addUI_->groups, g->displayName(), QCheckListItem::CheckBox ); + TQCheckListItem* item = new TQCheckListItem( addUI_->groups, g->displayName(), TQCheckListItem::CheckBox ); kdDebug(14100) << g->displayName() << " " << g->groupId() << endl; } */ } void -GaduAddContactPage::showEvent( QShowEvent* e ) +GaduAddContactPage::showEvent( TQShowEvent* e ) { - slotUinChanged( QString::null ); + slotUinChanged( TQString::null ); AddContactPage::showEvent( e ); } void -GaduAddContactPage::slotUinChanged( const QString & ) +GaduAddContactPage::slotUinChanged( const TQString & ) { emit dataValid( this, validateData() ); } @@ -108,8 +108,8 @@ bool GaduAddContactPage::apply( Kopete::Account* a , Kopete::MetaContact* mc ) { if ( validateData() ) { - QString userid = addUI_->addEdit_->text().stripWhiteSpace(); - QString name = addUI_->nickEdit_->text().stripWhiteSpace(); + TQString userid = addUI_->addEdit_->text().stripWhiteSpace(); + TQString name = addUI_->nickEdit_->text().stripWhiteSpace(); if ( a != account_ ) { kdDebug(14100) << "Problem because accounts differ: " << a->accountId() << " , " << account_->accountId() << endl; diff --git a/kopete/protocols/gadu/gaduaddcontactpage.h b/kopete/protocols/gadu/gaduaddcontactpage.h index e922bde7..8ba36bc8 100644 --- a/kopete/protocols/gadu/gaduaddcontactpage.h +++ b/kopete/protocols/gadu/gaduaddcontactpage.h @@ -39,23 +39,23 @@ class GaduAddContactPage : public AddContactPage Q_OBJECT public: - GaduAddContactPage( GaduAccount*, QWidget* parent = 0, const char* name = 0 ); + GaduAddContactPage( GaduAccount*, TQWidget* parent = 0, const char* name = 0 ); ~GaduAddContactPage(); virtual bool validateData(); virtual bool apply( Kopete::Account* , Kopete::MetaContact * ); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); public slots: - void slotUinChanged( const QString& ); + void slotUinChanged( const TQString& ); private: void fillGroups(); GaduAccount* account_; GaduAddUI* addUI_; - QLabel* noaddMsg1_; - QLabel* noaddMsg2_; + TQLabel* noaddMsg1_; + TQLabel* noaddMsg2_; }; #endif diff --git a/kopete/protocols/gadu/gaduaway.cpp b/kopete/protocols/gadu/gaduaway.cpp index 3fe42d62..dd86fa23 100644 --- a/kopete/protocols/gadu/gaduaway.cpp +++ b/kopete/protocols/gadu/gaduaway.cpp @@ -29,14 +29,14 @@ #include <ktextedit.h> #include <klocale.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qlineedit.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> #include "gaduawayui.h" #include "gaduaway.h" -GaduAway::GaduAway( GaduAccount* account, QWidget* parent, const char* name ) +GaduAway::GaduAway( GaduAccount* account, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Away Dialog" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ), account_( account ) @@ -59,7 +59,7 @@ GaduAway::GaduAway( GaduAccount* account, QWidget* parent, const char* name ) } ui_->textEdit_->setText( account->myself()->property( "awayMessage" ).value().toString() ); - connect( this, SIGNAL( applyClicked() ), SLOT( slotApply() ) ); + connect( this, TQT_SIGNAL( applyClicked() ), TQT_SLOT( slotApply() ) ); } int diff --git a/kopete/protocols/gadu/gaduaway.h b/kopete/protocols/gadu/gaduaway.h index 525291d2..c7ec2f5f 100644 --- a/kopete/protocols/gadu/gaduaway.h +++ b/kopete/protocols/gadu/gaduaway.h @@ -24,7 +24,7 @@ #define GADUAWAY_H #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> class GaduAccount; class GaduAwayUI; @@ -34,9 +34,9 @@ class GaduAway : public KDialogBase Q_OBJECT public: - GaduAway( GaduAccount*, QWidget* parent = 0, const char* name = 0 ); + GaduAway( GaduAccount*, TQWidget* parent = 0, const char* name = 0 ); int status() const; - QString awayText() const; + TQString awayText() const; protected slots: void slotApply(); diff --git a/kopete/protocols/gadu/gaducommands.cpp b/kopete/protocols/gadu/gaducommands.cpp index 00a571ff..2be539c0 100644 --- a/kopete/protocols/gadu/gaducommands.cpp +++ b/kopete/protocols/gadu/gaducommands.cpp @@ -27,18 +27,18 @@ #include "gaducommands.h" #include "gadusession.h" -#include <qsocketnotifier.h> -#include <qregexp.h> -#include <qtextcodec.h> -#include <qimage.h> +#include <tqsocketnotifier.h> +#include <tqregexp.h> +#include <tqtextcodec.h> +#include <tqimage.h> #include <klocale.h> #include <kdebug.h> #include <errno.h> -GaduCommand::GaduCommand( QObject* parent, const char* name ) -: QObject( parent, name ), read_( 0 ), write_( 0 ) +GaduCommand::GaduCommand( TQObject* parent, const char* name ) +: TQObject( parent, name ), read_( 0 ), write_( 0 ) { } @@ -57,13 +57,13 @@ GaduCommand::done() const void GaduCommand::checkSocket( int fd, int checkWhat ) { - read_ = new QSocketNotifier( fd, QSocketNotifier::Read, this ); + read_ = new TQSocketNotifier( fd, TQSocketNotifier::Read, this ); read_->setEnabled( false ); - QObject::connect( read_, SIGNAL( activated(int) ), SLOT( forwarder() ) ); + TQObject::connect( read_, TQT_SIGNAL( activated(int) ), TQT_SLOT( forwarder() ) ); - write_ = new QSocketNotifier( fd, QSocketNotifier::Write, this ); + write_ = new TQSocketNotifier( fd, TQSocketNotifier::Write, this ); write_->setEnabled( false ); - QObject::connect( write_, SIGNAL( activated(int) ), SLOT( forwarder() ) ); + TQObject::connect( write_, TQT_SIGNAL( activated(int) ), TQT_SLOT( forwarder() ) ); enableNotifiers( checkWhat ); } @@ -114,12 +114,12 @@ GaduCommand::forwarder() emit socketReady(); } -RegisterCommand::RegisterCommand( QObject* parent, const char* name ) +RegisterCommand::RegisterCommand( TQObject* parent, const char* name ) :GaduCommand( parent, name ), state( RegisterStateNoToken ), session_( 0 ), uin( 0 ) { } -RegisterCommand::RegisterCommand( const QString& email, const QString& password, QObject* parent, const char* name ) +RegisterCommand::RegisterCommand( const TQString& email, const TQString& password, TQObject* parent, const char* name ) :GaduCommand( parent, name ), state( RegisterStateNoToken ), email_( email ), password_( password ), session_( 0 ), uin( 0 ) { } @@ -148,14 +148,14 @@ RegisterCommand::requestToken() return; } - connect( this, SIGNAL( socketReady() ), SLOT( watcher() ) ); + connect( this, TQT_SIGNAL( socketReady() ), TQT_SLOT( watcher() ) ); checkSocket( session_->fd, session_->check ); return; } void -RegisterCommand::setUserinfo( const QString& email, const QString& password, const QString& token ) +RegisterCommand::setUserinfo( const TQString& email, const TQString& password, const TQString& token ) { email_ = email; password_ = password; @@ -184,7 +184,7 @@ RegisterCommand::execute() return; } state = RegisterStateWaitingForNumber; - connect( this, SIGNAL( socketReady() ), SLOT( watcher() ) ); + connect( this, TQT_SIGNAL( socketReady() ), TQT_SLOT( watcher() ) ); checkSocket( session_->fd, session_->check ); } @@ -225,7 +225,7 @@ void RegisterCommand::watcher() kdDebug( 14100 ) << "got Token!, ID: " << tokenId << endl; deleteNotifiers(); if ( pubDir->success ) { - QPixmap tokenImg; + TQPixmap tokenImg; tokenImg.loadFromData( (const unsigned char *)session_->body, session_->body_size ); state = RegisterStateGotToken; emit tokenRecieved( tokenImg, tokenId ); @@ -237,7 +237,7 @@ void RegisterCommand::watcher() } gg_token_free( session_ ); session_ = NULL; - disconnect( this, SLOT( watcher() ) ); + disconnect( this, TQT_SLOT( watcher() ) ); return; break; } @@ -283,7 +283,7 @@ void RegisterCommand::watcher() } gg_free_register( session_ ); session_ = NULL; - disconnect( this, SLOT( watcher() ) ); + disconnect( this, TQT_SLOT( watcher() ) ); deleteLater(); return; break; @@ -293,12 +293,12 @@ void RegisterCommand::watcher() } } -RemindPasswordCommand::RemindPasswordCommand( QObject* parent, const char* name ) +RemindPasswordCommand::RemindPasswordCommand( TQObject* parent, const char* name ) : GaduCommand( parent, name ), uin_( 0 ), session_( 0 ) { } -RemindPasswordCommand::RemindPasswordCommand( uin_t uin, QObject* parent, const char* name ) +RemindPasswordCommand::RemindPasswordCommand( uin_t uin, TQObject* parent, const char* name ) : GaduCommand( parent, name ), uin_( uin ), session_( 0 ) { } @@ -341,7 +341,7 @@ RemindPasswordCommand::watcher() if ( session_->state == GG_STATE_DONE ) { struct gg_pubdir* p = static_cast<struct gg_pubdir*>( session_->data ); - QString finished = (p->success) ? i18n( "Successfully" ) : i18n( "Unsuccessful. Please retry." ); + TQString finished = (p->success) ? i18n( "Successfully" ) : i18n( "Unsuccessful. Please retry." ); emit done( i18n( "Remind Password" ), i18n( "Remind password finished: " ) + finished ); gg_free_remind_passwd( session_ ); done_ = true; @@ -351,7 +351,7 @@ RemindPasswordCommand::watcher() enableNotifiers( session_->check ); } -ChangePasswordCommand::ChangePasswordCommand( QObject* parent, const char* name ) +ChangePasswordCommand::ChangePasswordCommand( TQObject* parent, const char* name ) : GaduCommand( parent, name ), session_( 0 ) { } @@ -361,7 +361,7 @@ ChangePasswordCommand::~ChangePasswordCommand() } void -ChangePasswordCommand::setInfo( uin_t uin, const QString& passwd, const QString& newpasswd, const QString& newemail ) +ChangePasswordCommand::setInfo( uin_t uin, const TQString& passwd, const TQString& newpasswd, const TQString& newemail ) { uin_ = uin; passwd_ = passwd; diff --git a/kopete/protocols/gadu/gaducommands.h b/kopete/protocols/gadu/gaducommands.h index 7253734e..2c56ba8a 100644 --- a/kopete/protocols/gadu/gaducommands.h +++ b/kopete/protocols/gadu/gaducommands.h @@ -29,7 +29,7 @@ #include <libgadu.h> -#include <qobject.h> +#include <tqobject.h> class QSocketNotifier; class QStringList; @@ -40,7 +40,7 @@ class GaduCommand : public QObject Q_OBJECT public: - GaduCommand( QObject* parent = 0, const char* name = 0 ); + GaduCommand( TQObject* parent = 0, const char* name = 0 ); virtual ~GaduCommand(); virtual void execute() = 0; @@ -49,10 +49,10 @@ public: signals: //e.g. emit done( i18n("Done"), i18n("Registration complete") ); - void done( const QString& title, const QString& what ); - void error( const QString& title, const QString& error ); + void done( const TQString& title, const TQString& what ); + void error( const TQString& title, const TQString& error ); void socketReady(); - void operationStatus( const QString ); + void operationStatus( const TQString ); protected: void checkSocket( int, int ); @@ -66,8 +66,8 @@ protected slots: void forwarder(); private: - QSocketNotifier* read_; - QSocketNotifier* write_; + TQSocketNotifier* read_; + TQSocketNotifier* write_; }; class RegisterCommand : public GaduCommand @@ -75,19 +75,19 @@ class RegisterCommand : public GaduCommand Q_OBJECT public: - RegisterCommand( QObject* parent = 0, const char* name = 0 ); - RegisterCommand( const QString& email, const QString& password , - QObject* parent = 0, const char* name = 0 ); + RegisterCommand( TQObject* parent = 0, const char* name = 0 ); + RegisterCommand( const TQString& email, const TQString& password , + TQObject* parent = 0, const char* name = 0 ); ~RegisterCommand(); - void setUserinfo( const QString& email, const QString& password, const QString& token ); + void setUserinfo( const TQString& email, const TQString& password, const TQString& token ); void execute(); unsigned int newUin(); void requestToken(); void cancel(); signals: - void tokenRecieved( QPixmap, QString ); + void tokenRecieved( TQPixmap, TQString ); protected slots: void watcher(); @@ -108,8 +108,8 @@ class RemindPasswordCommand : public GaduCommand Q_OBJECT public: - RemindPasswordCommand( uin_t uin, QObject* parent = 0, const char* name = 0 ); - RemindPasswordCommand( QObject* parent = 0, const char* name = 0 ); + RemindPasswordCommand( uin_t uin, TQObject* parent = 0, const char* name = 0 ); + RemindPasswordCommand( TQObject* parent = 0, const char* name = 0 ); ~RemindPasswordCommand(); void setUIN( uin_t ); @@ -128,11 +128,11 @@ class ChangePasswordCommand : public GaduCommand Q_OBJECT public: - ChangePasswordCommand( QObject* parent = 0, const char* name = 0 ); + ChangePasswordCommand( TQObject* parent = 0, const char* name = 0 ); ~ChangePasswordCommand(); - void setInfo( uin_t uin, const QString& passwd, const QString& newpasswd, - const QString& newemail ); + void setInfo( uin_t uin, const TQString& passwd, const TQString& newpasswd, + const TQString& newemail ); void execute(); protected slots: diff --git a/kopete/protocols/gadu/gaducontact.cpp b/kopete/protocols/gadu/gaducontact.cpp index 2cb4806f..dfbb93a4 100644 --- a/kopete/protocols/gadu/gaducontact.cpp +++ b/kopete/protocols/gadu/gaducontact.cpp @@ -44,8 +44,8 @@ using Kopete::UserInfoDialog; -GaduContact::GaduContact( uin_t uin, const QString& name, Kopete::Account* account, Kopete::MetaContact* parent ) -: Kopete::Contact( account, QString::number( uin ), parent ), uin_( uin ) +GaduContact::GaduContact( uin_t uin, const TQString& name, Kopete::Account* account, Kopete::MetaContact* parent ) +: Kopete::Contact( account, TQString::number( uin ), parent ), uin_( uin ) { msgManager_ = 0L; account_ = static_cast<GaduAccount*>( account ); @@ -78,7 +78,7 @@ GaduContact::identityId() const } void -GaduContact::setParentIdentity( const QString& id) +GaduContact::setParentIdentity( const TQString& id) { parentIdentity_ = id; } @@ -90,13 +90,13 @@ GaduContact::uin() const } void -GaduContact::sendFile( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ ) +GaduContact::sendFile( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ ) { - QString filePath; + TQString filePath; //If the file location is null, then get it from a file open dialog if( !sourceURL.isValid() ) - filePath = KFileDialog::getOpenFileName(QString::null, "*", 0l , i18n("Kopete File Transfer")); + filePath = KFileDialog::getOpenFileName(TQString::null, "*", 0l , i18n("Kopete File Transfer")); else filePath = sourceURL.path(-1); @@ -129,7 +129,7 @@ GaduContact::changedStatus( KGaduNotify* newstatus ) } -QHostAddress& +TQHostAddress& GaduContact::contactIp() { return remote_ip; @@ -146,9 +146,9 @@ GaduContact::manager( Kopete::Contact::CanCreateFlags canCreate ) { if ( !msgManager_ && canCreate ) { msgManager_ = Kopete::ChatSessionManager::self()->create( account_->myself(), thisContact_, GaduProtocol::protocol() ); - connect( msgManager_, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession*) ), - this, SLOT( messageSend( Kopete::Message&, Kopete::ChatSession*) ) ); - connect( msgManager_, SIGNAL( destroyed() ), this, SLOT( slotChatSessionDestroyed() ) ); + connect( msgManager_, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession*) ), + this, TQT_SLOT( messageSend( Kopete::Message&, Kopete::ChatSession*) ) ); + connect( msgManager_, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotChatSessionDestroyed() ) ); } kdDebug(14100) << "GaduContact::manager returning: " << msgManager_ << endl; @@ -164,8 +164,8 @@ GaduContact::slotChatSessionDestroyed() void GaduContact::initActions() { - actionSendMessage_ = KopeteStdAction::sendMessage( this, SLOT( execute() ), this, "actionMessage" ); - actionInfo_ = KopeteStdAction::contactInfo( this, SLOT( slotUserInfo() ), this, "actionInfo" ); + actionSendMessage_ = KopeteStdAction::sendMessage( this, TQT_SLOT( execute() ), this, "actionMessage" ); + actionInfo_ = KopeteStdAction::contactInfo( this, TQT_SLOT( slotUserInfo() ), this, "actionInfo" ); } void @@ -190,19 +190,19 @@ GaduContact::isReachable() return account_->isConnected(); } -QPtrList<KAction>* +TQPtrList<KAction>* GaduContact::customContextMenuActions() { - QPtrList<KAction> *fakeCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *fakeCollection = new TQPtrList<KAction>(); //show profile KAction* actionShowProfile = new KAction( i18n("Show Profile") , "info", 0, - this, SLOT( slotShowPublicProfile() ), + this, TQT_SLOT( slotShowPublicProfile() ), this, "actionShowPublicProfile" ); fakeCollection->append( actionShowProfile ); KAction* actionEditContact = new KAction( i18n("Edit...") , "edit", 0, - this, SLOT( slotEditContact() ), + this, TQT_SLOT( slotEditContact() ), this, "actionEditContact" ); fakeCollection->append( actionEditContact ); @@ -229,7 +229,7 @@ GaduContact::slotUserInfo() UserInfoDialog *dlg = new UserInfoDialog( i18n( "Gadu contact" ) ); dlg->setName( metaContact()->displayName() ); - dlg->setId( QString::number( uin_ ) ); + dlg->setId( TQString::number( uin_ ) ); dlg->setStatus( onlineStatus().description() ); dlg->setAwayMessage( description_ ); dlg->show(); @@ -250,7 +250,7 @@ GaduContact::deleteContact() } void -GaduContact::serialize( QMap<QString, QString>& serializedData, QMap<QString, QString>& ) +GaduContact::serialize( TQMap<TQString, TQString>& serializedData, TQMap<TQString, TQString>& ) { serializedData[ "email" ] = property( GaduProtocol::protocol()->propEmail ).value().toString(); serializedData[ "FirstName" ] = property( GaduProtocol::protocol()->propFirstName ).value().toString(); @@ -288,11 +288,11 @@ GaduContact::contactDetails() cl->phonenr = property( GaduProtocol::protocol()->propPhoneNr ).value().toString(); cl->ignored = ignored_; //( property( "ignored" ).value().toString() == "true" ); - cl->uin = QString::number( uin_ ); + cl->uin = TQString::number( uin_ ); cl->displayname = metaContact()->displayName(); cl->offlineTo = false; - cl->landline = QString(""); + cl->landline = TQString(""); groupList = metaContact()->groups(); @@ -318,7 +318,7 @@ GaduContact::contactDetails() QString GaduContact::findBestContactName( const GaduContactsList::ContactLine* cl ) { - QString name; + TQString name; if ( cl == NULL ) { return name; diff --git a/kopete/protocols/gadu/gaducontact.h b/kopete/protocols/gadu/gaducontact.h index 16278215..a96c1ded 100644 --- a/kopete/protocols/gadu/gaducontact.h +++ b/kopete/protocols/gadu/gaducontact.h @@ -23,8 +23,8 @@ #ifndef GADUCONTACT_H #define GADUCONTACT_H -#include <qpoint.h> -#include <qhostaddress.h> +#include <tqpoint.h> +#include <tqhostaddress.h> #include "gaducontactlist.h" @@ -47,12 +47,12 @@ class GaduContact : public Kopete::Contact Q_OBJECT public: - GaduContact( unsigned int, const QString&, Kopete::Account*, Kopete::MetaContact* ); + GaduContact( unsigned int, const TQString&, Kopete::Account*, Kopete::MetaContact* ); virtual bool isReachable(); - virtual void serialize( QMap<QString, QString>&, QMap<QString, QString>& ); - virtual QPtrList<KAction>* customContextMenuActions(); - virtual QString identityId() const; + virtual void serialize( TQMap<TQString, TQString>&, TQMap<TQString, TQString>& ); + virtual TQPtrList<KAction>* customContextMenuActions(); + virtual TQString identityId() const; GaduContactsList::ContactLine* contactDetails(); @@ -61,16 +61,16 @@ public: // uin is const for GaduContact, and displayname needs to be changed through metaContact bool setContactDetails( const GaduContactsList::ContactLine* ); - void setParentIdentity( const QString& ); + void setParentIdentity( const TQString& ); void setIgnored( bool ); bool ignored(); - static QString findBestContactName( const GaduContactsList::ContactLine* ); + static TQString findBestContactName( const GaduContactsList::ContactLine* ); void changedStatus( KGaduNotify* ); uin_t uin() const; - QHostAddress& contactIp(); + TQHostAddress& contactIp(); unsigned short contactPort(); public slots: @@ -82,7 +82,7 @@ public slots: void slotShowPublicProfile(); void slotEditContact(); virtual void sendFile( const KURL &sourceURL = KURL(), - const QString &fileName = QString::null, uint fileSize = 0L ); + const TQString &fileName = TQString::null, uint fileSize = 0L ); protected: @@ -102,10 +102,10 @@ private: KAction* actionInfo_; KAction* actionRemove_; - QPtrList<Kopete::Contact> thisContact_; + TQPtrList<Kopete::Contact> thisContact_; - QHostAddress remote_ip; + TQHostAddress remote_ip; unsigned int remote_port; unsigned int version; unsigned int image_size; diff --git a/kopete/protocols/gadu/gaducontactlist.cpp b/kopete/protocols/gadu/gaducontactlist.cpp index 6601800d..314e661f 100644 --- a/kopete/protocols/gadu/gaducontactlist.cpp +++ b/kopete/protocols/gadu/gaducontactlist.cpp @@ -22,7 +22,7 @@ #include "gaducontactlist.h" -#include "qstringlist.h" +#include "tqstringlist.h" #include "kdebug.h" GaduContactsList::GaduContactsList() @@ -33,11 +33,11 @@ GaduContactsList::~GaduContactsList() { } -GaduContactsList::GaduContactsList( QString sList ) +GaduContactsList::GaduContactsList( TQString sList ) { - QStringList::iterator stringIterator; - QStringList strList; - QString empty; + TQStringList::iterator stringIterator; + TQStringList strList; + TQString empty; ContactLine cl; bool email; @@ -49,17 +49,17 @@ GaduContactsList::GaduContactsList( QString sList ) return; } - QStringList ln = QStringList::split( QChar( '\n' ), sList, true ); - QStringList::iterator lni = ln.begin( ); + TQStringList ln = TQStringList::split( TQChar( '\n' ), sList, true ); + TQStringList::iterator lni = ln.begin( ); while( lni != ln.end() ) { - QString cline = (*lni); + TQString cline = (*lni); if ( cline.isNull() ) { break; } - strList = QStringList::split( QChar( ';' ), cline, true ); + strList = TQStringList::split( TQChar( ';' ), cline, true ); stringIterator = strList.begin(); @@ -78,7 +78,7 @@ GaduContactsList::GaduContactsList( QString sList ) cl.firstname = (*stringIterator); - if ( cl.firstname == QString( "i" ) ) { + if ( cl.firstname == TQString( "i" ) ) { kdDebug(14100) << cline << " ignored" << endl; cl.ignored = true; cl.uin = strList[6]; @@ -105,7 +105,7 @@ GaduContactsList::GaduContactsList( QString sList ) ++stringIterator; if ( stringIterator != strList.end() ) { - cl.offlineTo = (*++stringIterator) == QString("0") ? false : true; + cl.offlineTo = (*++stringIterator) == TQString("0") ? false : true; cl.landline = (*++stringIterator); } } @@ -133,17 +133,17 @@ GaduContactsList::addContact( ContactLine& cl ) void GaduContactsList::addContact( - QString& displayname, - QString& group, - QString& uin, - QString& firstname, - QString& surname, - QString& nickname, - QString& phonenr, - QString& email, + TQString& displayname, + TQString& group, + TQString& uin, + TQString& firstname, + TQString& surname, + TQString& nickname, + TQString& phonenr, + TQString& email, bool ignored, bool offlineTo, - QString& landline + TQString& landline ) { ContactLine cl; @@ -167,7 +167,7 @@ GaduContactsList::addContact( QString GaduContactsList::asString() { - QString contacts; + TQString contacts; for ( it = cList.begin(); it != cList.end(); ++it ) { if ( (*it).ignored ) { @@ -185,7 +185,7 @@ GaduContactsList::asString() (*it).uin + ";"+ (*it).email + ";;0;0;;" + - ((*it).offlineTo == true ? QString("1") : QString("0")) + ((*it).offlineTo == true ? TQString("1") : TQString("0")) + ";" + (*it).landline + ";\r\n"; diff --git a/kopete/protocols/gadu/gaducontactlist.h b/kopete/protocols/gadu/gaducontactlist.h index d4aa9e6e..389a8443 100644 --- a/kopete/protocols/gadu/gaducontactlist.h +++ b/kopete/protocols/gadu/gaducontactlist.h @@ -23,7 +23,7 @@ #ifndef GADUCONTACTLIST_H #define GADUCONTACTLIST_H -#include <qvaluelist.h> +#include <tqvaluelist.h> class QString; @@ -32,35 +32,35 @@ class GaduContactsList public: struct ContactLine { - QString displayname; - QString group; - QString uin; - QString firstname; - QString surname; - QString nickname; - QString phonenr; - QString email; + TQString displayname; + TQString group; + TQString uin; + TQString firstname; + TQString surname; + TQString nickname; + TQString phonenr; + TQString email; bool ignored; bool offlineTo; - QString landline; + TQString landline; }; GaduContactsList(); - GaduContactsList( QString ); + GaduContactsList( TQString ); ~GaduContactsList(); - QString asString(); + TQString asString(); void addContact( ContactLine &cl ); - void addContact( QString& displayname, QString& group, - QString& uin, QString& firstname, - QString& surname, QString& nickname, - QString& phonenr, QString& email, + void addContact( TQString& displayname, TQString& group, + TQString& uin, TQString& firstname, + TQString& surname, TQString& nickname, + TQString& phonenr, TQString& email, bool ignored, bool offlineTo, - QString& landline + TQString& landline ); unsigned int size(); const GaduContactsList::ContactLine& operator[]( unsigned int i ); private: - typedef QValueList<ContactLine> CList; + typedef TQValueList<ContactLine> CList; CList cList; CList::iterator it; }; diff --git a/kopete/protocols/gadu/gadudcc.cpp b/kopete/protocols/gadu/gadudcc.cpp index d81eaf67..4235d4e3 100644 --- a/kopete/protocols/gadu/gadudcc.cpp +++ b/kopete/protocols/gadu/gadudcc.cpp @@ -35,23 +35,23 @@ #include "libgadu.h" -#include <qsocketnotifier.h> -#include <qhostaddress.h> -#include <qmutex.h> -#include <qmap.h> -#include <qstring.h> +#include <tqsocketnotifier.h> +#include <tqhostaddress.h> +#include <tqmutex.h> +#include <tqmap.h> +#include <tqstring.h> volatile unsigned int GaduDCC::referenceCount = 0; GaduDCCServer* GaduDCC::dccServer = NULL; -static QMutex initmutex; +static TQMutex initmutex; -typedef QMap< unsigned int, GaduAccount* > gaduAccounts; +typedef TQMap< unsigned int, GaduAccount* > gaduAccounts; static gaduAccounts accounts; -GaduDCC::GaduDCC( QObject* parent, const char* name ) -:QObject( parent, name ) +GaduDCC::GaduDCC( TQObject* parent, const char* name ) +:TQObject( parent, name ) { } @@ -135,7 +135,7 @@ GaduDCC::registerAccount( GaduAccount* account ) dccServer = new GaduDCCServer(); } - connect( dccServer, SIGNAL( incoming( gg_dcc*, bool& ) ), SLOT( slotIncoming( gg_dcc*, bool& ) ) ); + connect( dccServer, TQT_SIGNAL( incoming( gg_dcc*, bool& ) ), TQT_SLOT( slotIncoming( gg_dcc*, bool& ) ) ); initmutex.unlock(); diff --git a/kopete/protocols/gadu/gadudcc.h b/kopete/protocols/gadu/gadudcc.h index 25ae27cf..05d5c992 100644 --- a/kopete/protocols/gadu/gadudcc.h +++ b/kopete/protocols/gadu/gadudcc.h @@ -23,7 +23,7 @@ #ifndef GADUDCC_H #define GADUDCC_H -#include <qobject.h> +#include <tqobject.h> class QSocketNotifier; class QHostAddress; @@ -33,10 +33,10 @@ class GaduDCCTransaction; class GaduAccount; class GaduDCCServer; -class GaduDCC: public QObject { +class GaduDCC: public TQObject { Q_OBJECT public: - GaduDCC( QObject* parent, const char* name = NULL ); + GaduDCC( TQObject* parent, const char* name = NULL ); ~GaduDCC(); bool unregisterAccount(); bool registerAccount( GaduAccount* ); @@ -45,7 +45,7 @@ public: void execute(); GaduAccount* account( unsigned int ); - QMap<unsigned int,QString> requests; + TQMap<unsigned int,TQString> requests; signals: void dccConnect( GaduDCCTransaction* dccTransaction ); diff --git a/kopete/protocols/gadu/gadudccserver.cpp b/kopete/protocols/gadu/gadudccserver.cpp index d3f37982..6e6c370b 100644 --- a/kopete/protocols/gadu/gadudccserver.cpp +++ b/kopete/protocols/gadu/gadudccserver.cpp @@ -32,12 +32,12 @@ #include "libgadu.h" #include "gaduaccount.h" -#include <qobject.h> -#include <qsocketnotifier.h> -#include <qhostaddress.h> +#include <tqobject.h> +#include <tqsocketnotifier.h> +#include <tqhostaddress.h> -GaduDCCServer::GaduDCCServer( QHostAddress* dccIp, unsigned int port ) -:QObject() +GaduDCCServer::GaduDCCServer( TQHostAddress* dccIp, unsigned int port ) +:TQObject() { kdDebug( 14100 ) << "dcc socket NULL, creating new liteining socket " << endl; @@ -115,15 +115,15 @@ GaduDCCServer::createNotifiers( bool connect ) return; } - read_ = new QSocketNotifier( dccSock->fd, QSocketNotifier::Read, this ); + read_ = new TQSocketNotifier( dccSock->fd, TQSocketNotifier::Read, this ); read_->setEnabled( false ); - write_ = new QSocketNotifier( dccSock->fd, QSocketNotifier::Write, this ); + write_ = new TQSocketNotifier( dccSock->fd, TQSocketNotifier::Write, this ); write_->setEnabled( false ); if ( connect ) { - QObject::connect( read_, SIGNAL( activated( int ) ), SLOT( watcher() ) ); - QObject::connect( write_, SIGNAL( activated( int ) ), SLOT( watcher() ) ); + TQObject::connect( read_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) ); + TQObject::connect( write_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) ); } } diff --git a/kopete/protocols/gadu/gadudccserver.h b/kopete/protocols/gadu/gadudccserver.h index df984650..7db791e5 100644 --- a/kopete/protocols/gadu/gadudccserver.h +++ b/kopete/protocols/gadu/gadudccserver.h @@ -23,8 +23,8 @@ #ifndef GADUDCCSERVER_H #define GADUDCCSERVER_H -#include <qobject.h> -#include <qhostaddress.h> +#include <tqobject.h> +#include <tqhostaddress.h> class QSocketNotifier; class QString; @@ -32,10 +32,10 @@ class gg_dcc; class GaduDCCTransaction; class GaduAccount; -class GaduDCCServer: public QObject { +class GaduDCCServer: public TQObject { Q_OBJECT public: - GaduDCCServer( QHostAddress* dccIp = NULL, unsigned int port = 1550 ); + GaduDCCServer( TQHostAddress* dccIp = NULL, unsigned int port = 1550 ); ~GaduDCCServer(); unsigned int listeingPort(); @@ -54,13 +54,13 @@ private: void createNotifiers( bool ); void closeDCC(); - QHostAddress config_dccip; - QHostAddress config_extip; + TQHostAddress config_dccip; + TQHostAddress config_extip; gg_dcc* dccSock; - QSocketNotifier* read_; - QSocketNotifier* write_; + TQSocketNotifier* read_; + TQSocketNotifier* write_; }; #endif diff --git a/kopete/protocols/gadu/gadudcctransaction.cpp b/kopete/protocols/gadu/gadudcctransaction.cpp index 92d9ffa8..7ec8d2ac 100644 --- a/kopete/protocols/gadu/gadudcctransaction.cpp +++ b/kopete/protocols/gadu/gadudcctransaction.cpp @@ -34,8 +34,8 @@ #include "kopetemetacontact.h" #include "kopeteuiglobal.h" -#include <qsocketnotifier.h> -#include <qfile.h> +#include <tqsocketnotifier.h> +#include <tqfile.h> #include "gadudcctransaction.h" #include "gaducontact.h" @@ -45,7 +45,7 @@ #include "libgadu.h" GaduDCCTransaction::GaduDCCTransaction( GaduDCC* parent, const char* name ) -:QObject( parent, name ), gaduDCC_( parent ) +:TQObject( parent, name ), gaduDCC_( parent ) { read_ = NULL; write_ = NULL; @@ -79,7 +79,7 @@ GaduDCCTransaction::peerUIN() } bool -GaduDCCTransaction::setupOutgoing( GaduContact* peerContact, QString& filePath ) +GaduDCCTransaction::setupOutgoing( GaduContact* peerContact, TQString& filePath ) { GaduContact* me; GaduAccount* metoo; @@ -90,7 +90,7 @@ GaduDCCTransaction::setupOutgoing( GaduContact* peerContact, QString& filePath ) me = static_cast<GaduContact*>( peerContact->account()->myself() ); - QString aaa = peerContact->contactIp().toString(); + TQString aaa = peerContact->contactIp().toString(); kdDebug( 14100 ) << "slotOutgoin for UIN: " << peerContact->uin() << " port " << peerContact->contactPort() << " ip " <<aaa<< endl; kdDebug( 14100 ) << "File path is " << filePath << endl; @@ -121,7 +121,7 @@ GaduDCCTransaction::setupIncoming( const unsigned int uin, GaduContact* peerCont return false; } - QString aaa = peerContact->contactIp().toString(); + TQString aaa = peerContact->contactIp().toString(); kdDebug( 14100 ) << "setupIncoming for UIN: " << uin << " port " << peerContact->contactPort() << " ip " <<aaa<< endl; peer = peerContact->uin(); @@ -144,10 +144,10 @@ GaduDCCTransaction::setupIncoming( gg_dcc* dccS ) peer = dccS->uin; - connect ( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString & ) ), - this, SLOT( slotIncomingTransferAccepted ( Kopete::Transfer *, const QString & ) ) ); - connect ( Kopete::TransferManager::transferManager(), SIGNAL( refused( const Kopete::FileTransferInfo & ) ), - this, SLOT( slotTransferRefused( const Kopete::FileTransferInfo & ) ) ); + connect ( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString & ) ), + this, TQT_SLOT( slotIncomingTransferAccepted ( Kopete::Transfer *, const TQString & ) ) ); + connect ( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused( const Kopete::FileTransferInfo & ) ), + this, TQT_SLOT( slotTransferRefused( const Kopete::FileTransferInfo & ) ) ); incoming = true; createNotifiers( true ); @@ -189,15 +189,15 @@ GaduDCCTransaction::createNotifiers( bool connect ) return; } - read_ = new QSocketNotifier( dccSock_->fd, QSocketNotifier::Read, this ); + read_ = new TQSocketNotifier( dccSock_->fd, TQSocketNotifier::Read, this ); read_->setEnabled( false ); - write_ = new QSocketNotifier( dccSock_->fd, QSocketNotifier::Write, this ); + write_ = new TQSocketNotifier( dccSock_->fd, TQSocketNotifier::Write, this ); write_->setEnabled( false ); if ( connect ) { - QObject::connect( read_, SIGNAL( activated( int ) ), SLOT( watcher() ) ); - QObject::connect( write_, SIGNAL( activated( int ) ), SLOT( watcher() ) ); + TQObject::connect( read_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) ); + TQObject::connect( write_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) ); } } @@ -223,7 +223,7 @@ GaduDCCTransaction::disableNotifiers() } } void -GaduDCCTransaction::slotIncomingTransferAccepted ( Kopete::Transfer* transfer, const QString& fileName ) +GaduDCCTransaction::slotIncomingTransferAccepted ( Kopete::Transfer* transfer, const TQString& fileName ) { if ( (long)transfer->info().transferId () != transferId_ ) { @@ -280,7 +280,7 @@ GaduDCCTransaction::slotIncomingTransferAccepted ( Kopete::Transfer* transfer, c dccSock_->file_fd = localFile_.handle(); } - connect ( transfer, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotTransferResult() ) ); + connect ( transfer, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotTransferResult() ) ); // reenable notifiers enableNotifiers( dccSock_->check ); @@ -310,7 +310,7 @@ GaduDCCTransaction::askIncommingTransfer() { transferId_ = Kopete::TransferManager::transferManager()->askIncomingTransfer ( contact, - QString( (const char*)dccSock_->file_info.filename ), dccSock_->file_info.size ); + TQString( (const char*)dccSock_->file_info.filename ), dccSock_->file_info.size ); } @@ -345,10 +345,10 @@ GaduDCCTransaction::watcher() { } if ( !peer ) { - contact = static_cast<GaduContact*> (account->contacts()[ QString::number( dccSock_->peer_uin ) ]); + contact = static_cast<GaduContact*> (account->contacts()[ TQString::number( dccSock_->peer_uin ) ]); } else { - contact = static_cast<GaduContact*> (account->contacts()[ QString::number( peer ) ]); + contact = static_cast<GaduContact*> (account->contacts()[ TQString::number( peer ) ]); } if ( contact == NULL ) { @@ -385,7 +385,7 @@ GaduDCCTransaction::watcher() { break; case GG_EVENT_DCC_NEED_FILE_INFO: if (gaduDCC_->requests.contains(dccSock_->peer_uin)) { - QString filePath = gaduDCC_->requests[dccSock_->peer_uin]; + TQString filePath = gaduDCC_->requests[dccSock_->peer_uin]; kdDebug() << "Callback request found. Sending " << filePath << endl; gaduDCC_->requests.remove(dccSock_->peer_uin); gg_dcc_fill_file_info(dccSock_,filePath.ascii()); diff --git a/kopete/protocols/gadu/gadudcctransaction.h b/kopete/protocols/gadu/gadudcctransaction.h index 541f3838..8f5b57b8 100644 --- a/kopete/protocols/gadu/gadudcctransaction.h +++ b/kopete/protocols/gadu/gadudcctransaction.h @@ -23,8 +23,8 @@ #ifndef GADUDCCTRANS_H #define GADUDCCTRANS_H -#include <qobject.h> -#include <qfile.h> +#include <tqobject.h> +#include <tqfile.h> class QSocketNotifier; class gg_dcc; @@ -34,7 +34,7 @@ namespace Kopete { class Transfer; } namespace Kopete { class FileTransferInfo; } class GaduDCC; -class GaduDCCTransaction: QObject { +class GaduDCCTransaction: TQObject { Q_OBJECT public: GaduDCCTransaction( GaduDCC*, const char* name = NULL ); @@ -42,7 +42,7 @@ public: bool setupIncoming( const unsigned int, GaduContact* ); bool setupIncoming( gg_dcc* ); - bool setupOutgoing( GaduContact*, QString& ); + bool setupOutgoing( GaduContact*, TQString& ); unsigned int recvUIN(); unsigned int peerUIN(); @@ -56,7 +56,7 @@ protected slots: private slots: void watcher(); - void slotIncomingTransferAccepted ( Kopete::Transfer*, const QString& ); + void slotIncomingTransferAccepted ( Kopete::Transfer*, const TQString& ); void slotTransferRefused ( const Kopete::FileTransferInfo& ); void slotTransferResult(); @@ -71,14 +71,14 @@ private: gg_dcc* dccSock_; - QSocketNotifier* read_; - QSocketNotifier* write_; + TQSocketNotifier* read_; + TQSocketNotifier* write_; GaduContact* contact; Kopete::Transfer* transfer_; long transferId_; - QFile localFile_; + TQFile localFile_; int peer; unsigned int incoming; GaduDCC* gaduDCC_; diff --git a/kopete/protocols/gadu/gadueditaccount.cpp b/kopete/protocols/gadu/gadueditaccount.cpp index cf38c4bc..08987c16 100644 --- a/kopete/protocols/gadu/gadueditaccount.cpp +++ b/kopete/protocols/gadu/gadueditaccount.cpp @@ -24,16 +24,16 @@ #include "gaduprotocol.h" #include "gadusession.h" -#include <qradiobutton.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qstring.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qbutton.h> -#include <qregexp.h> -#include <qpushbutton.h> -#include <qgroupbox.h> +#include <tqradiobutton.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqbutton.h> +#include <tqregexp.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> #include <klineedit.h> #include <kmessagebox.h> @@ -43,7 +43,7 @@ #include "kopetepasswordwidget.h" -GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, QWidget* parent, const char* name ) +GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, TQWidget* parent, const char* name ) : GaduAccountEditUI( parent, name ), KopeteEditAccountWidget( ident ), protocol_( proto ), rcmd( 0 ) { @@ -69,7 +69,7 @@ GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, Q passwordWidget_->load( &account_->password() ); - QString nick = account()->myself()->property( + TQString nick = account()->myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( nick.isEmpty() ) { nick = account_->myself()->contactId(); @@ -82,18 +82,18 @@ GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, Q useTls_->setCurrentItem( isSsl ? ( account_->useTls() ) : 2 ); ignoreCheck_->setChecked( account_->ignoreAnons() ); - connect( account(), SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), - SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); + connect( account(), TQT_SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), + TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); connectLabel->setText( i18n( "personal information being fetched from server", "<p align=\"center\">Fetching from server</p>" ) ); seqNr = account_->getPersonalInformation(); } - connect( registerNew, SIGNAL( clicked( ) ), SLOT( registerNewAccount( ) ) ); + connect( registerNew, TQT_SIGNAL( clicked( ) ), TQT_SLOT( registerNewAccount( ) ) ); - QWidget::setTabOrder( loginEdit_, passwordWidget_->mRemembered ); - QWidget::setTabOrder( passwordWidget_->mRemembered, passwordWidget_->mPassword ); - QWidget::setTabOrder( passwordWidget_->mPassword, autoLoginCheck_ ); + TQWidget::setTabOrder( loginEdit_, passwordWidget_->mRemembered ); + TQWidget::setTabOrder( passwordWidget_->mRemembered, passwordWidget_->mPassword ); + TQWidget::setTabOrder( passwordWidget_->mPassword, autoLoginCheck_ ); } void @@ -114,11 +114,11 @@ GaduEditAccount::publishUserInfo() kdDebug(14100) << uiGender->currentItem() << " gender " << endl; if ( uiGender->currentItem() == 1 ) { kdDebug(14100) << "so you become female now" << endl; - sr.gender = QString( GG_PUBDIR50_GENDER_SET_FEMALE ); + sr.gender = TQString( GG_PUBDIR50_GENDER_SET_FEMALE ); } if ( uiGender->currentItem() == 2 ) { kdDebug(14100) << "so you become male now" << endl; - sr.gender = QString( GG_PUBDIR50_GENDER_SET_MALE ); + sr.gender = TQString( GG_PUBDIR50_GENDER_SET_MALE ); } if ( account_ ) { @@ -142,12 +142,12 @@ GaduEditAccount::slotSearchResult( const SearchResult& result, unsigned int seq uiCity->setText( result[0].city ); kdDebug( 14100 ) << "gender found: " << result[0].gender << endl; - if ( result[0].gender == QString( GG_PUBDIR50_GENDER_SET_FEMALE ) ) { + if ( result[0].gender == TQString( GG_PUBDIR50_GENDER_SET_FEMALE ) ) { uiGender->setCurrentItem( 1 ); kdDebug(14100) << "looks like female" << endl; } else { - if ( result[0].gender == QString( GG_PUBDIR50_GENDER_SET_MALE ) ) { + if ( result[0].gender == TQString( GG_PUBDIR50_GENDER_SET_MALE ) ) { uiGender->setCurrentItem( 2 ); kdDebug( 14100 ) <<" looks like male" << endl; } @@ -158,7 +158,7 @@ GaduEditAccount::slotSearchResult( const SearchResult& result, unsigned int seq enableUserInfo( true ); - disconnect( SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); + disconnect( TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); } void @@ -180,8 +180,8 @@ GaduEditAccount::registerNewAccount() { registerNew->setDisabled( true ); regDialog = new GaduRegisterAccount( NULL , "Register account dialog" ); - connect( regDialog, SIGNAL( registeredNumber( unsigned int, QString ) ), SLOT( newUin( unsigned int, QString ) ) ); - if ( regDialog->exec() != QDialog::Accepted ) { + connect( regDialog, TQT_SIGNAL( registeredNumber( unsigned int, TQString ) ), TQT_SLOT( newUin( unsigned int, TQString ) ) ); + if ( regDialog->exec() != TQDialog::Accepted ) { loginEdit_->setText( "" ); return; } @@ -195,10 +195,10 @@ GaduEditAccount::registrationFailed() } void -GaduEditAccount::newUin( unsigned int uin, QString password ) +GaduEditAccount::newUin( unsigned int uin, TQString password ) { if ( uin ) { - loginEdit_->setText( QString::number( uin ) ); + loginEdit_->setText( TQString::number( uin ) ); passwordWidget_->setPassword( password ); } else { @@ -246,7 +246,7 @@ GaduEditAccount::apply() account_->myself()->setProperty( Kopete::Global::Properties::self()->nickName(), nickName->text() ); // this is changed only here, so i won't add any proper handling now - account_->configGroup()->writeEntry( QString::fromAscii( "nickName" ), nickName->text() ); + account_->configGroup()->writeEntry( TQString::fromAscii( "nickName" ), nickName->text() ); account_->setExcludeConnect( autoLoginCheck_->isChecked() ); account_->setUseTls( (GaduAccount::tlsConnection) useTls_->currentItem() ); diff --git a/kopete/protocols/gadu/gadueditaccount.h b/kopete/protocols/gadu/gadueditaccount.h index 4782cb68..1b870496 100644 --- a/kopete/protocols/gadu/gadueditaccount.h +++ b/kopete/protocols/gadu/gadueditaccount.h @@ -37,13 +37,13 @@ class GaduEditAccount : public GaduAccountEditUI, public KopeteEditAccountWidget Q_OBJECT public: - GaduEditAccount( GaduProtocol*, Kopete::Account*, QWidget* parent = 0, const char* name = 0 ); + GaduEditAccount( GaduProtocol*, Kopete::Account*, TQWidget* parent = 0, const char* name = 0 ); virtual bool validateData(); Kopete::Account* apply(); private slots: void registerNewAccount(); - void newUin( unsigned int, QString ); + void newUin( unsigned int, TQString ); void registrationFailed(); void slotSearchResult( const SearchResult&, unsigned int ); diff --git a/kopete/protocols/gadu/gadueditcontact.cpp b/kopete/protocols/gadu/gadueditcontact.cpp index 24aa8940..985a9874 100644 --- a/kopete/protocols/gadu/gadueditcontact.cpp +++ b/kopete/protocols/gadu/gadueditcontact.cpp @@ -34,19 +34,19 @@ #include <kopetecontactlist.h> #include <kopetemetacontact.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qlineedit.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qptrlist.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqptrlist.h> #include <krestrictedline.h> // FIXME: this and gaduadcontactpage should have one base class, with some code duplicated in both. GaduEditContact::GaduEditContact( GaduAccount* account, GaduContact* contact, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Edit Contact's Properties" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ), account_( account ), contact_( contact ) @@ -64,7 +64,7 @@ GaduEditContact::GaduEditContact( GaduAccount* account, GaduContact* contact, } GaduEditContact::GaduEditContact( GaduAccount* account, GaduContactsList::ContactLine* clin, - QWidget* parent , const char* name ) + TQWidget* parent , const char* name ) : KDialogBase( parent, name, true, i18n( "Edit Contact's Properties" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ), account_( account ), contact_( NULL ) @@ -83,8 +83,8 @@ void GaduEditContact::fillGroups() { Kopete::Group *g, *cg; - QPtrList<Kopete::Group> cgl; - QPtrList<Kopete::Group> gl; + TQPtrList<Kopete::Group> cgl; + TQPtrList<Kopete::Group> gl; if ( contact_ ) { cgl = contact_->metaContact()->groups(); @@ -96,7 +96,7 @@ GaduEditContact::fillGroups() if ( g->type() == Kopete::Group::Temporary ) { continue; } - QCheckListItem* item = new QCheckListItem( ui_->groups, g->displayName(), QCheckListItem::CheckBox ); + TQCheckListItem* item = new TQCheckListItem( ui_->groups, g->displayName(), TQCheckListItem::CheckBox ); // FIXME: optimize this O(2) search for( cg = cgl.first(); cg; cg = cgl.next() ) { if ( cg->groupId() == g->groupId() ) { @@ -118,12 +118,12 @@ GaduEditContact::init() // fill values from cl into proper fields on widget show(); - connect( this, SIGNAL( okClicked() ), SLOT( slotApply() ) ); - connect( ui_->groups, SIGNAL( clicked( QListViewItem * ) ), SLOT( listClicked( QListViewItem * ) ) ); + connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotApply() ) ); + connect( ui_->groups, TQT_SIGNAL( clicked( TQListViewItem * ) ), TQT_SLOT( listClicked( TQListViewItem * ) ) ); } void -GaduEditContact::listClicked( QListViewItem* /*item*/ ) +GaduEditContact::listClicked( TQListViewItem* /*item*/ ) { } @@ -147,7 +147,7 @@ GaduEditContact::fillIn() void GaduEditContact::slotApply() { - QPtrList<Kopete::Group> gl; + TQPtrList<Kopete::Group> gl; Kopete::Group* group; cl_->firstname = ui_->fornameEdit_->text().stripWhiteSpace(); @@ -173,8 +173,8 @@ GaduEditContact::slotApply() contact_->setContactDetails( cl_ ); gl = Kopete::ContactList::self()->groups(); - for ( QListViewItemIterator it( ui_->groups ); it.current(); ++it ) { - QCheckListItem *check = dynamic_cast<QCheckListItem *>( it.current() ); + for ( TQListViewItemIterator it( ui_->groups ); it.current(); ++it ) { + TQCheckListItem *check = dynamic_cast<TQCheckListItem *>( it.current() ); if ( !check ) { continue; diff --git a/kopete/protocols/gadu/gadueditcontact.h b/kopete/protocols/gadu/gadueditcontact.h index 9c4596fa..c27a5e7e 100644 --- a/kopete/protocols/gadu/gadueditcontact.h +++ b/kopete/protocols/gadu/gadueditcontact.h @@ -40,12 +40,12 @@ class GaduEditContact : public KDialogBase public: GaduEditContact( GaduAccount*, GaduContact*, - QWidget* parent = 0, const char* name = 0 ); + TQWidget* parent = 0, const char* name = 0 ); GaduEditContact( GaduAccount*, GaduContactsList::ContactLine*, - QWidget* parent = 0, const char* name = 0 ); + TQWidget* parent = 0, const char* name = 0 ); protected slots: void slotApply(); - void listClicked( QListViewItem* ); + void listClicked( TQListViewItem* ); private: void init(); diff --git a/kopete/protocols/gadu/gaduprotocol.cpp b/kopete/protocols/gadu/gaduprotocol.cpp index 1e0e06a9..1a59f17f 100644 --- a/kopete/protocols/gadu/gaduprotocol.cpp +++ b/kopete/protocols/gadu/gaduprotocol.cpp @@ -45,7 +45,7 @@ K_EXPORT_COMPONENT_FACTORY( kopete_gadu, KGenericFactory<GaduProtocol>( "kopete_ GaduProtocol* GaduProtocol::protocolStatic_ = 0L; -GaduProtocol::GaduProtocol( QObject* parent, const char* name, const QStringList& ) +GaduProtocol::GaduProtocol( TQObject* parent, const char* name, const TQStringList& ) :Kopete::Protocol( GaduProtocolFactory::instance(), parent, name ), propFirstName(Kopete::Global::Properties::self()->firstName()), propLastName(Kopete::Global::Properties::self()->lastName()), @@ -58,17 +58,17 @@ GaduProtocol::GaduProtocol( QObject* parent, const char* name, const QStringList gaduStatusOffline_( Kopete::OnlineStatus::Offline, GG_STATUS_NOT_AVAIL, this, GG_STATUS_NOT_AVAIL, "gg_offline", i18n( "Offline" ) , i18n( "O&ffline" ) , Kopete::OnlineStatusManager::Offline ), gaduStatusOfflineDescr_( Kopete::OnlineStatus::Offline, GG_STATUS_NOT_AVAIL_DESCR, this, GG_STATUS_NOT_AVAIL_DESCR, - QStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Offline" ), i18n( "A&way" ) , Kopete::OnlineStatusManager::Offline ), + TQStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Offline" ), i18n( "A&way" ) , Kopete::OnlineStatusManager::Offline ), gaduStatusBusy_(Kopete::OnlineStatus::Away, GG_STATUS_BUSY, this, GG_STATUS_BUSY, "contact_away_overlay", i18n( "Busy" ) , i18n( "B&usy" ) , Kopete::OnlineStatusManager::Busy ), gaduStatusBusyDescr_(Kopete::OnlineStatus::Away, GG_STATUS_BUSY_DESCR, this, GG_STATUS_BUSY_DESCR, - QStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Busy" ) , i18n( "B&usy" ) , Kopete::OnlineStatusManager::Idle ), + TQStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Busy" ) , i18n( "B&usy" ) , Kopete::OnlineStatusManager::Idle ), gaduStatusInvisible_( Kopete::OnlineStatus::Invisible, GG_STATUS_INVISIBLE, this, GG_STATUS_INVISIBLE, "contact_invisible_overlay", i18n( "Invisible" ) , i18n( "I&nvisible" ) , Kopete::OnlineStatusManager::Invisible), gaduStatusInvisibleDescr_(Kopete::OnlineStatus::Invisible, GG_STATUS_INVISIBLE_DESCR, this, GG_STATUS_INVISIBLE_DESCR, - QStringList::split( '|', "contact_invisible_overlay|gg_description_overlay" ), i18n( "Invisible" ) , i18n( "I&nvisible" )), + TQStringList::split( '|', "contact_invisible_overlay|gg_description_overlay" ), i18n( "Invisible" ) , i18n( "I&nvisible" )), gaduStatusAvail_(Kopete::OnlineStatus::Online, GG_STATUS_AVAIL, this, GG_STATUS_AVAIL, - QString::null, i18n( "Online" ) , i18n( "&Online" ) , Kopete::OnlineStatusManager::Online ), + TQString::null, i18n( "Online" ) , i18n( "&Online" ) , Kopete::OnlineStatusManager::Online ), gaduStatusAvailDescr_(Kopete::OnlineStatus::Online, GG_STATUS_AVAIL_DESCR, this, GG_STATUS_AVAIL_DESCR, "gg_description_overlay", i18n( "Online" ) , i18n( "&Online" )), gaduConnecting_(Kopete::OnlineStatus::Offline, GG_STATUS_CONNECTING, this, GG_STATUS_CONNECTING, @@ -99,7 +99,7 @@ GaduProtocol::protocol() } AddContactPage* -GaduProtocol::createAddContactWidget( QWidget* parent, Kopete::Account* account ) +GaduProtocol::createAddContactWidget( TQWidget* parent, Kopete::Account* account ) { return new GaduAddContactPage( static_cast<GaduAccount*>( account ), parent ); } @@ -111,15 +111,15 @@ GaduProtocol::settingsChanged() Kopete::Contact * GaduProtocol::deserializeContact( Kopete::MetaContact* metaContact, - const QMap<QString, QString>& serializedData, - const QMap<QString, QString>& /* addressBookData */ ) + const TQMap<TQString, TQString>& serializedData, + const TQMap<TQString, TQString>& /* addressBookData */ ) { - const QString aid = serializedData[ "accountId" ]; - const QString cid = serializedData[ "contactId" ]; - const QString dn = serializedData[ "displayName" ]; + const TQString aid = serializedData[ "accountId" ]; + const TQString cid = serializedData[ "contactId" ]; + const TQString dn = serializedData[ "displayName" ]; - QDict<Kopete::Account> daccounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> daccounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account* account = daccounts[ aid ]; if (!account) { @@ -228,14 +228,14 @@ GaduProtocol::convertStatus( uint status ) const } Kopete::Account* -GaduProtocol::createNewAccount( const QString& accountId ) +GaduProtocol::createNewAccount( const TQString& accountId ) { defaultAccount_ = new GaduAccount( this, accountId ); return defaultAccount_ ; } KopeteEditAccountWidget* -GaduProtocol::createEditAccountWidget( Kopete::Account* account, QWidget* parent ) +GaduProtocol::createEditAccountWidget( Kopete::Account* account, TQWidget* parent ) { return( new GaduEditAccount( this, account, parent ) ); } diff --git a/kopete/protocols/gadu/gaduprotocol.h b/kopete/protocols/gadu/gaduprotocol.h index 7baf481c..f277ef35 100644 --- a/kopete/protocols/gadu/gaduprotocol.h +++ b/kopete/protocols/gadu/gaduprotocol.h @@ -23,7 +23,7 @@ #ifndef GADUPROTOCOL_H #define GADUPROTOCOL_H -#include <qmap.h> +#include <tqmap.h> #include "kopeteprotocol.h" #include "kopeteonlinestatus.h" @@ -52,21 +52,21 @@ class GaduProtocol : public Kopete::Protocol Q_OBJECT public: - GaduProtocol( QObject* parent, const char* name, const QStringList& str); + GaduProtocol( TQObject* parent, const char* name, const TQStringList& str); ~GaduProtocol(); static GaduProtocol *protocol(); // Plugin reimplementation // { - AddContactPage* createAddContactWidget( QWidget* parent, Kopete::Account* account ); - Kopete::Account* createNewAccount( const QString& accountId ); - KopeteEditAccountWidget *createEditAccountWidget( Kopete::Account* account, QWidget* parent ); + AddContactPage* createAddContactWidget( TQWidget* parent, Kopete::Account* account ); + Kopete::Account* createNewAccount( const TQString& accountId ); + KopeteEditAccountWidget *createEditAccountWidget( Kopete::Account* account, TQWidget* parent ); bool canSendOffline() const { return true; } virtual Kopete::Contact *deserializeContact( Kopete::MetaContact* metaContact, - const QMap<QString, QString>& serializedData, - const QMap<QString, QString>& addressBookData ); + const TQMap<TQString, TQString>& serializedData, + const TQMap<TQString, TQString>& addressBookData ); // } //!Plugin reimplementation diff --git a/kopete/protocols/gadu/gadupubdir.cpp b/kopete/protocols/gadu/gadupubdir.cpp index 2b61d3ff..1c329cf0 100644 --- a/kopete/protocols/gadu/gadupubdir.cpp +++ b/kopete/protocols/gadu/gadupubdir.cpp @@ -27,12 +27,12 @@ #include "gaduaccount.h" #include "gaduprotocol.h" -#include <qwidgetstack.h> -#include <qlistview.h> -#include <qptrlist.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qcheckbox.h> +#include <tqwidgetstack.h> +#include <tqlistview.h> +#include <tqptrlist.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> #include <kcombobox.h> #include <krestrictedline.h> @@ -40,8 +40,8 @@ #include <klistview.h> #include <klocale.h> -GaduPublicDir::GaduPublicDir( GaduAccount* account, QWidget* parent, const char* name ) -: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 ) +GaduPublicDir::GaduPublicDir( GaduAccount* account, TQWidget* parent, const char* name ) +: KDialogBase( parent, name, false, TQString::null, User1|User2|User3|Cancel, User2 ) { mAccount = account; createWidget(); @@ -50,8 +50,8 @@ GaduPublicDir::GaduPublicDir( GaduAccount* account, QWidget* parent, const char* show(); } -GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, QWidget* parent, const char* name ) -: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 ) +GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, TQWidget* parent, const char* name ) +: KDialogBase( parent, name, false, TQString::null, User1|User2|User3|Cancel, User2 ) { ResLine rs; @@ -80,7 +80,7 @@ GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, QWidget* pare // now it is time to switch to Right Page(tm) rs.uin = searchFor; - fName = fSurname = fNick = fCity = QString::null; + fName = fSurname = fNick = fCity = TQString::null; fUin = searchFor; fGender = fAgeFrom = fAgeTo = 0; fOnlyOnline = false; @@ -118,7 +118,7 @@ void GaduPublicDir::slotAddContact() { GaduContactsList::ContactLine* cl = new GaduContactsList::ContactLine; - QListViewItem* item = mMainWidget->listFound->currentItem(); + TQListViewItem* item = mMainWidget->listFound->currentItem(); cl->ignored = false; cl->firstname = item->text( 1 ); @@ -134,7 +134,7 @@ GaduPublicDir::slotAddContact() void GaduPublicDir::slotListSelected( ) { - QListViewItem* item = mMainWidget->listFound->currentItem(); + TQListViewItem* item = mMainWidget->listFound->currentItem(); if ( item ) { enableButton( User3, true ); } @@ -146,35 +146,35 @@ GaduPublicDir::slotListSelected( ) void GaduPublicDir::initConnections() { - connect( this, SIGNAL( user2Clicked() ), SLOT( slotSearch() ) ); - connect( this, SIGNAL( user1Clicked() ), SLOT( slotNewSearch() ) ); - connect( this, SIGNAL( user3Clicked() ), SLOT( slotAddContact() ) ); + connect( this, TQT_SIGNAL( user2Clicked() ), TQT_SLOT( slotSearch() ) ); + connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotNewSearch() ) ); + connect( this, TQT_SIGNAL( user3Clicked() ), TQT_SLOT( slotAddContact() ) ); - connect( mAccount, SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), - SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); + connect( mAccount, TQT_SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), + TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); - connect( mMainWidget->nameS, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->surname, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->nick, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->UIN, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->cityS, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->gender, SIGNAL( activated( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->ageFrom, SIGNAL( valueChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->ageTo, SIGNAL( valueChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->radioByData, SIGNAL( toggled( bool ) ), SLOT( inputChanged( bool ) ) ); + connect( mMainWidget->nameS, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->surname, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->nick, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->UIN, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->cityS, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->gender, TQT_SIGNAL( activated( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->ageFrom, TQT_SIGNAL( valueChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->ageTo, TQT_SIGNAL( valueChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->radioByData, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( inputChanged( bool ) ) ); - connect( mMainWidget->listFound, SIGNAL( selectionChanged () ), SLOT( slotListSelected() ) ); + connect( mMainWidget->listFound, TQT_SIGNAL( selectionChanged () ), TQT_SLOT( slotListSelected() ) ); } void GaduPublicDir::inputChanged( bool ) { - inputChanged( QString::null ); + inputChanged( TQString::null ); } void -GaduPublicDir::inputChanged( const QString& ) +GaduPublicDir::inputChanged( const TQString& ) { if ( validateData() == false ) { enableButton( User2, false ); @@ -217,7 +217,7 @@ GaduPublicDir::validateData() CHECK_INT( fAgeTo ); } else { - fSurname = QString::null; + fSurname = TQString::null; CHECK_INT( fUin ); } return false; @@ -227,7 +227,7 @@ GaduPublicDir::validateData() QPixmap GaduPublicDir::iconForStatus( uint status ) { - QPixmap n; + TQPixmap n; if ( GaduProtocol::protocol() ) { return GaduProtocol::protocol()->convertStatus( status ).protocolIcon(); @@ -238,23 +238,23 @@ GaduPublicDir::iconForStatus( uint status ) void GaduPublicDir::slotSearchResult( const SearchResult& result, unsigned int ) { - QListView* list = mMainWidget->listFound; + TQListView* list = mMainWidget->listFound; kdDebug(14100) << "searchResults(" << result.count() <<")" << endl; - QListViewItem* sl; + TQListViewItem* sl; SearchResult::const_iterator r; for ( r = result.begin(); r != result.end() ; ++r ){ kdDebug(14100) << "adding" << (*r).uin << endl; - sl= new QListViewItem( - list, QString::fromAscii(""), + sl= new TQListViewItem( + list, TQString::fromAscii(""), (*r).firstname, (*r).nickname, (*r).age, (*r).city, - QString::number( (*r).uin ).ascii() + TQString::number( (*r).uin ).ascii() ); sl->setPixmap( 0, iconForStatus( (*r).status ) ); } @@ -282,7 +282,7 @@ GaduPublicDir::slotNewSearch() showButton( User1, false ); showButton( User3, false ); enableButton( User2, false ); - inputChanged( QString::null ); + inputChanged( TQString::null ); mAccount->pubDirSearchClose(); } @@ -291,7 +291,7 @@ GaduPublicDir::slotSearch() { mMainWidget->listFound->clear(); - QString empty; + TQString empty; // search more, or search ? if ( mMainWidget->pubsearch->id( mMainWidget->pubsearch->visibleWidget() ) == 0 ) { diff --git a/kopete/protocols/gadu/gadupubdir.h b/kopete/protocols/gadu/gadupubdir.h index 022c353d..b69c21b0 100644 --- a/kopete/protocols/gadu/gadupubdir.h +++ b/kopete/protocols/gadu/gadupubdir.h @@ -41,16 +41,16 @@ class GaduPublicDir : public KDialogBase Q_OBJECT public: - GaduPublicDir( GaduAccount* , QWidget *parent = 0, const char* name = "GaduPublicDir" ); - GaduPublicDir( GaduAccount* , int searchFor, QWidget* parent = 0, const char* name = "GaduPublicDir" ); - QPixmap iconForStatus( uint status ); + GaduPublicDir( GaduAccount* , TQWidget *parent = 0, const char* name = "GaduPublicDir" ); + GaduPublicDir( GaduAccount* , int searchFor, TQWidget* parent = 0, const char* name = "GaduPublicDir" ); + TQPixmap iconForStatus( uint status ); private slots: void slotSearch(); void slotNewSearch(); void slotSearchResult( const SearchResult& result, unsigned int seq ); void slotAddContact(); - void inputChanged( const QString& ); + void inputChanged( const TQString& ); void inputChanged( bool ); void slotListSelected(); diff --git a/kopete/protocols/gadu/gaduregisteraccount.cpp b/kopete/protocols/gadu/gaduregisteraccount.cpp index 92126cb5..b2ee0bc1 100644 --- a/kopete/protocols/gadu/gaduregisteraccount.cpp +++ b/kopete/protocols/gadu/gaduregisteraccount.cpp @@ -19,10 +19,10 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA // 02110-1301, USA. -#include <qstring.h> -#include <qregexp.h> -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqstring.h> +#include <tqregexp.h> +#include <tqpushbutton.h> +#include <tqlabel.h> #include <klineedit.h> #include <kmessagebox.h> @@ -35,7 +35,7 @@ #include "gaduregisteraccount.h" #include "gaducommands.h" -GaduRegisterAccount::GaduRegisterAccount( QWidget* parent, const char* name ) +GaduRegisterAccount::GaduRegisterAccount( TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Register New Account" ), KDialogBase::User1 | KDialogBase::Ok, KDialogBase::User1, true ) { ui = new GaduRegisterAccountUI( this ); @@ -48,21 +48,21 @@ GaduRegisterAccount::GaduRegisterAccount( QWidget* parent, const char* name ) cRegister = new RegisterCommand( this ); - emailRegexp = new QRegExp( "[\\w\\d.+_-]{1,}@[\\w\\d.-]{1,}" ); + emailRegexp = new TQRegExp( "[\\w\\d.+_-]{1,}@[\\w\\d.-]{1,}" ); hintPixmap = KGlobal::iconLoader()->loadIcon ( "gadu_protocol", KIcon::Small ); - connect( this, SIGNAL( user1Clicked() ), SLOT( doRegister() ) ); - connect( this, SIGNAL( okClicked() ), SLOT( slotClose() ) ); + connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( doRegister() ) ); + connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotClose() ) ); - connect( ui->valueEmailAddress, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( ui->valuePassword, SIGNAL( textChanged( const QString & ) ), SLOT( inputChanged( const QString & ) ) ); - connect( ui->valuePasswordVerify, SIGNAL( textChanged( const QString & ) ), SLOT( inputChanged( const QString & ) ) ); - connect( ui->valueVerificationSequence, SIGNAL( textChanged( const QString & ) ), SLOT( inputChanged( const QString & ) ) ); + connect( ui->valueEmailAddress, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( ui->valuePassword, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( ui->valuePasswordVerify, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( ui->valueVerificationSequence, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( inputChanged( const TQString & ) ) ); - connect( cRegister, SIGNAL( tokenRecieved( QPixmap, QString ) ), SLOT( displayToken( QPixmap, QString ) ) ); - connect( cRegister, SIGNAL( done( const QString&, const QString& ) ), SLOT( registrationDone( const QString&, const QString& ) ) ); - connect( cRegister, SIGNAL( error( const QString&, const QString& ) ), SLOT( registrationError( const QString&, const QString& ) ) ); - connect( cRegister, SIGNAL( operationStatus( const QString ) ), SLOT( updateStatus( const QString ) ) ); + connect( cRegister, TQT_SIGNAL( tokenRecieved( TQPixmap, TQString ) ), TQT_SLOT( displayToken( TQPixmap, TQString ) ) ); + connect( cRegister, TQT_SIGNAL( done( const TQString&, const TQString& ) ), TQT_SLOT( registrationDone( const TQString&, const TQString& ) ) ); + connect( cRegister, TQT_SIGNAL( error( const TQString&, const TQString& ) ), TQT_SLOT( registrationError( const TQString&, const TQString& ) ) ); + connect( cRegister, TQT_SIGNAL( operationStatus( const TQString ) ), TQT_SLOT( updateStatus( const TQString ) ) ); updateStatus( i18n( "Retrieving token" ) ); cRegister->requestToken(); @@ -138,13 +138,13 @@ GaduRegisterAccount::validateInput() } void -GaduRegisterAccount::inputChanged( const QString & ) +GaduRegisterAccount::inputChanged( const TQString & ) { validateInput(); } void -GaduRegisterAccount::registrationDone( const QString& /*title*/, const QString& /*what */ ) +GaduRegisterAccount::registrationDone( const TQString& /*title*/, const TQString& /*what */ ) { ui->valueEmailAddress->setDisabled( true ); ui->valuePassword->setDisabled( true ); @@ -156,21 +156,21 @@ GaduRegisterAccount::registrationDone( const QString& /*title*/, const QString ui->labelVerificationSequence->setDisabled( true ); ui->labelInstructions->setDisabled( true ); emit registeredNumber( cRegister->newUin(), ui->valuePassword->text() ); - updateStatus( i18n( "Account created; your new UIN is %1." ).arg(QString::number( cRegister->newUin() ) ) ); + updateStatus( i18n( "Account created; your new UIN is %1." ).arg(TQString::number( cRegister->newUin() ) ) ); enableButton( User1, false ); setButtonText( Ok, i18n( "&Close" ) ); } void -GaduRegisterAccount::registrationError( const QString& title, const QString& what ) +GaduRegisterAccount::registrationError( const TQString& title, const TQString& what ) { updateStatus( i18n( "Registration failed: %1" ).arg( what ) ); KMessageBox::sorry( this, "Registration was unsucessful, please try again.", title ); - disconnect( this, SLOT( displayToken( QPixmap, QString ) ) ); - disconnect( this, SLOT( registrationDone( const QString&, const QString& ) ) ); - disconnect( this, SLOT( registrationError( const QString&, const QString& ) ) ); - disconnect( this, SLOT( updateStatus( const QString ) ) ); + disconnect( this, TQT_SLOT( displayToken( TQPixmap, TQString ) ) ); + disconnect( this, TQT_SLOT( registrationDone( const TQString&, const TQString& ) ) ); + disconnect( this, TQT_SLOT( registrationError( const TQString&, const TQString& ) ) ); + disconnect( this, TQT_SLOT( updateStatus( const TQString ) ) ); ui->valueVerificationSequence->setDisabled( true ); ui->valueVerificationSequence->setText( "" ); @@ -178,13 +178,13 @@ GaduRegisterAccount::registrationError( const QString& title, const QString& w updateStatus( "" ); // emit UIN 0, to enable 'register new account' button again in dialog below - emit registeredNumber( 0, QString( "" ) ); + emit registeredNumber( 0, TQString( "" ) ); deleteLater(); } void -GaduRegisterAccount::displayToken( QPixmap image, QString /*tokenId */ ) +GaduRegisterAccount::displayToken( TQPixmap image, TQString /*tokenId */ ) { ui->valueVerificationSequence->setDisabled( false ); ui->pixmapToken->setPixmap( image ); @@ -192,7 +192,7 @@ GaduRegisterAccount::displayToken( QPixmap image, QString /*tokenId */ ) } void -GaduRegisterAccount::updateStatus( const QString status ) +GaduRegisterAccount::updateStatus( const TQString status ) { ui->labelStatusMessage->setAlignment( AlignCenter ); ui->labelStatusMessage->setText( status ); diff --git a/kopete/protocols/gadu/gaduregisteraccount.h b/kopete/protocols/gadu/gaduregisteraccount.h index 27a0c7b5..f3f03260 100644 --- a/kopete/protocols/gadu/gaduregisteraccount.h +++ b/kopete/protocols/gadu/gaduregisteraccount.h @@ -35,27 +35,27 @@ class GaduRegisterAccount : public KDialogBase Q_OBJECT public: - GaduRegisterAccount( QWidget* , const char* ); + GaduRegisterAccount( TQWidget* , const char* ); ~GaduRegisterAccount( ); signals: - void registeredNumber( unsigned int, QString ); + void registeredNumber( unsigned int, TQString ); protected slots: void slotClose(); - void displayToken( QPixmap, QString ); - void registrationError( const QString&, const QString& ); - void registrationDone( const QString&, const QString& ); - void inputChanged( const QString & ); + void displayToken( TQPixmap, TQString ); + void registrationError( const TQString&, const TQString& ); + void registrationDone( const TQString&, const TQString& ); + void inputChanged( const TQString & ); void doRegister(); - void updateStatus( const QString status ); + void updateStatus( const TQString status ); private: void validateInput(); GaduRegisterAccountUI* ui; RegisterCommand* cRegister; - QRegExp* emailRegexp; + TQRegExp* emailRegexp; QPixmap hintPixmap; }; diff --git a/kopete/protocols/gadu/gadurichtextformat.cpp b/kopete/protocols/gadu/gadurichtextformat.cpp index 049d665b..fd567bf6 100644 --- a/kopete/protocols/gadu/gadurichtextformat.cpp +++ b/kopete/protocols/gadu/gadurichtextformat.cpp @@ -26,8 +26,8 @@ #include "gadurichtextformat.h" #include "gadusession.h" -#include <qstring.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqregexp.h> GaduRichTextFormat::GaduRichTextFormat() { @@ -38,9 +38,9 @@ GaduRichTextFormat::~GaduRichTextFormat() } QString -GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, void* formatStructure) +GaduRichTextFormat::convertToHtml( const TQString& msg, unsigned int formats, void* formatStructure) { - QString tmp, nb; + TQString tmp, nb; gg_msg_richtext_format *format; char *pointer = (char*) formatStructure; @@ -59,7 +59,7 @@ GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, voi format = (gg_msg_richtext_format*) pointer; unsigned int position = format->position; char font = format->font; - QString style; + TQString style; if ( position < j || position > msg.length() ) { break; @@ -100,9 +100,9 @@ GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, voi g = (int)color->green; b = (int)color->blue; } - style += QString(" color: rgb( %1, %2, %3 ); ").arg( r ).arg( g ).arg( b ); + style += TQString(" color: rgb( %1, %2, %3 ); ").arg( r ).arg( g ).arg( b ); - tmp += formatOpeningTag( QString::fromLatin1("span"), QString::fromLatin1("style=\"%1\"").arg( style ) ); + tmp += formatOpeningTag( TQString::fromLatin1("span"), TQString::fromLatin1("style=\"%1\"").arg( style ) ); opened = true; } @@ -122,16 +122,16 @@ GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, voi } QString -GaduRichTextFormat::formatOpeningTag( const QString& tag, const QString& attributes ) +GaduRichTextFormat::formatOpeningTag( const TQString& tag, const TQString& attributes ) { - QString res = "<" + tag; + TQString res = "<" + tag; if(!attributes.isEmpty()) res.append(" " + attributes); return res + ">"; } QString -GaduRichTextFormat::formatClosingTag( const QString& tag ) +GaduRichTextFormat::formatClosingTag( const TQString& tag ) { return "</" + tag + ">"; } @@ -140,18 +140,18 @@ GaduRichTextFormat::formatClosingTag( const QString& tag ) KGaduMessage* GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) { - QString htmlString = message.escapedBody(); + TQString htmlString = message.escapedBody(); KGaduMessage* output = new KGaduMessage; rtcs.blue = rtcs.green = rtcs.red = 0; - color = QColor(); + color = TQColor(); int position = 0; rtf.resize( sizeof( gg_msg_richtext) ); output->rtf.resize(0); // test first if there is any HTML formating in it - if( htmlString.find( QString::fromLatin1("</span") ) > -1 ) { - QRegExp findTags( QString::fromLatin1("<span style=\"(.*)\">(.*)</span>") ); + if( htmlString.find( TQString::fromLatin1("</span") ) > -1 ) { + TQRegExp findTags( TQString::fromLatin1("<span style=\"(.*)\">(.*)</span>") ); findTags.setMinimal( true ); int pos = 0; int lastpos = 0; @@ -160,7 +160,7 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) pos = findTags.search( htmlString ); rtfs.font = 0; if ( pos != lastpos ) { - QString tmp; + TQString tmp; if ( pos < 0 ) { tmp = htmlString.mid( lastpos ); } @@ -180,16 +180,16 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) } if ( pos > -1 ) { - QString styleHTML = findTags.cap(1); - QString replacement = findTags.cap(2); - QStringList styleAttrs = QStringList::split( ';', styleHTML ); + TQString styleHTML = findTags.cap(1); + TQString replacement = findTags.cap(2); + TQStringList styleAttrs = TQStringList::split( ';', styleHTML ); rtfs.font = 0; lastpos = pos + replacement.length(); - for( QStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair ) { - QString attribute = (*attrPair).section(':',0,0); - QString value = (*attrPair).section(':',1); + for( TQStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair ) { + TQString attribute = (*attrPair).section(':',0,0); + TQString value = (*attrPair).section(':',1); parseAttributes( attribute, value ); } @@ -198,7 +198,7 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) return NULL; } - QString rep = QString("<span style=\"%1\">%2</span>" ).arg( styleHTML ).arg( replacement ); + TQString rep = TQString("<span style=\"%1\">%2</span>" ).arg( styleHTML ).arg( replacement ); htmlString.replace( findTags.pos( 0 ), rep.length(), replacement ); replacement = unescapeGaduMessage( replacement ); @@ -224,35 +224,35 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) } void -GaduRichTextFormat::parseAttributes( const QString attribute, const QString value ) +GaduRichTextFormat::parseAttributes( const TQString attribute, const TQString value ) { - if( attribute == QString::fromLatin1("color") ) { + if( attribute == TQString::fromLatin1("color") ) { color.setNamedColor( value ); } - if( attribute == QString::fromLatin1("font-weight") && value == QString::fromLatin1("600") ) { + if( attribute == TQString::fromLatin1("font-weight") && value == TQString::fromLatin1("600") ) { rtfs.font |= GG_FONT_BOLD; } - if( attribute == QString::fromLatin1("text-decoration") && value == QString::fromLatin1("underline") ) { + if( attribute == TQString::fromLatin1("text-decoration") && value == TQString::fromLatin1("underline") ) { rtfs.font |= GG_FONT_UNDERLINE ; } - if( attribute == QString::fromLatin1("font-style") && value == QString::fromLatin1("italic") ) { + if( attribute == TQString::fromLatin1("font-style") && value == TQString::fromLatin1("italic") ) { rtfs.font |= GG_FONT_ITALIC; } } QString -GaduRichTextFormat::unescapeGaduMessage( QString& ns ) +GaduRichTextFormat::unescapeGaduMessage( TQString& ns ) { - QString s; + TQString s; s = Kopete::Message::unescape( ns ); - s.replace( QString::fromAscii( "\n" ), QString::fromAscii( "\r\n" ) ); + s.replace( TQString::fromAscii( "\n" ), TQString::fromAscii( "\r\n" ) ); return s; } bool GaduRichTextFormat::insertRtf( uint position) { - if ( color != QColor( rtcs.red, rtcs.green, rtcs.blue ) ) { + if ( color != TQColor( rtcs.red, rtcs.green, rtcs.blue ) ) { rtcs.red = color.red(); rtcs.green = color.green(); rtcs.blue = color.blue(); @@ -280,12 +280,12 @@ GaduRichTextFormat::insertRtf( uint position) } QString -GaduRichTextFormat::escapeBody( QString& input ) +GaduRichTextFormat::escapeBody( TQString& input ) { - input.replace( '<', QString::fromLatin1("<") ); - input.replace( '>', QString::fromLatin1(">") ); - input.replace( '\n', QString::fromLatin1( "<br />" ) ); - input.replace( '\t', QString::fromLatin1( " " ) ); - input.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( " " ) ); + input.replace( '<', TQString::fromLatin1("<") ); + input.replace( '>', TQString::fromLatin1(">") ); + input.replace( '\n', TQString::fromLatin1( "<br />" ) ); + input.replace( '\t', TQString::fromLatin1( " " ) ); + input.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " " ) ); return input; } diff --git a/kopete/protocols/gadu/gadurichtextformat.h b/kopete/protocols/gadu/gadurichtextformat.h index 4f508f17..9476539e 100644 --- a/kopete/protocols/gadu/gadurichtextformat.h +++ b/kopete/protocols/gadu/gadurichtextformat.h @@ -33,17 +33,17 @@ class GaduRichTextFormat { public: GaduRichTextFormat(); ~GaduRichTextFormat(); - QString convertToHtml( const QString&, unsigned int, void* ); + TQString convertToHtml( const TQString&, unsigned int, void* ); KGaduMessage* convertToGaduMessage( const Kopete::Message& ); private: - QString formatOpeningTag( const QString& , const QString& = QString::null ); - QString formatClosingTag( const QString& ); + TQString formatOpeningTag( const TQString& , const TQString& = TQString::null ); + TQString formatClosingTag( const TQString& ); bool insertRtf( uint ); - QString unescapeGaduMessage( QString& ); - void parseAttributes( const QString, const QString ); - QString escapeBody( QString& ); - QColor color; + TQString unescapeGaduMessage( TQString& ); + void parseAttributes( const TQString, const TQString ); + TQString escapeBody( TQString& ); + TQColor color; gg_msg_richtext_format rtfs; gg_msg_richtext_color rtcs; gg_msg_richtext* header; diff --git a/kopete/protocols/gadu/gadusession.cpp b/kopete/protocols/gadu/gadusession.cpp index 3f7c6617..63b696d4 100644 --- a/kopete/protocols/gadu/gadusession.cpp +++ b/kopete/protocols/gadu/gadusession.cpp @@ -29,19 +29,19 @@ #include <kdebug.h> #include "kopetemessage.h" -#include <qsocketnotifier.h> -#include <qtextcodec.h> -#include <qdatetime.h> +#include <tqsocketnotifier.h> +#include <tqtextcodec.h> +#include <tqdatetime.h> #include "gadurichtextformat.h" #include <errno.h> #include <string.h> #include <netinet/in.h> -GaduSession::GaduSession( QObject* parent, const char* name ) -: QObject( parent, name ), session_( 0 ), searchSeqNr_( 0 ) +GaduSession::GaduSession( TQObject* parent, const char* name ) +: TQObject( parent, name ), session_( 0 ), searchSeqNr_( 0 ) { - textcodec = QTextCodec::codecForName( "CP1250" ); + textcodec = TQTextCodec::codecForName( "CP1250" ); rtf = new GaduRichTextFormat; } @@ -114,15 +114,15 @@ GaduSession::createNotifiers( bool connect ) return; } - read_ = new QSocketNotifier( session_->fd, QSocketNotifier::Read, this ); + read_ = new TQSocketNotifier( session_->fd, TQSocketNotifier::Read, this ); read_->setEnabled( false ); - write_ = new QSocketNotifier( session_->fd, QSocketNotifier::Write, this ); + write_ = new TQSocketNotifier( session_->fd, TQSocketNotifier::Write, this ); write_->setEnabled( false ); if ( connect ) { - QObject::connect( read_, SIGNAL( activated( int ) ), SLOT( checkDescriptor() ) ); - QObject::connect( write_, SIGNAL( activated( int ) ), SLOT( checkDescriptor() ) ); + TQObject::connect( read_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( checkDescriptor() ) ); + TQObject::connect( write_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( checkDescriptor() ) ); } } @@ -159,7 +159,7 @@ GaduSession::dccRequest( const unsigned int uin ) void GaduSession::login( KGaduLoginParams* loginp ) { - QCString desc = textcodec->fromUnicode( loginp->statusDescr ); + TQCString desc = textcodec->fromUnicode( loginp->statusDescr ); memset( ¶ms_, 0, sizeof(params_) ); @@ -248,8 +248,8 @@ GaduSession::removeNotify( uin_t uin ) int GaduSession::sendMessage( uin_t recipient, const Kopete::Message& msg, int msgClass ) { - QString sendMsg; - QCString cpMsg; + TQString sendMsg; + TQCString cpMsg; KGaduMessage* gadumessage; if ( isConnected() ) { @@ -265,7 +265,7 @@ GaduSession::sendMessage( uin_t recipient, const Kopete::Message& msg, int msgCl } else { sendMsg = msg.plainBody(); - sendMsg.replace( QString::fromAscii( "\n" ), QString::fromAscii( "\r\n" ) ); + sendMsg.replace( TQString::fromAscii( "\n" ), TQString::fromAscii( "\r\n" ) ); cpMsg = textcodec->fromUnicode( sendMsg ); return gg_send_message( session_, msgClass, recipient, (const unsigned char *)cpMsg.data() ); @@ -293,9 +293,9 @@ GaduSession::changeStatus( int status, bool forFriends ) } int -GaduSession::changeStatusDescription( int status, const QString& descr, bool forFriends ) +GaduSession::changeStatusDescription( int status, const TQString& descr, bool forFriends ) { - QCString ndescr; + TQCString ndescr; ndescr= textcodec->fromUnicode(descr); @@ -393,7 +393,7 @@ GaduSession::publishPersonalInformation( ResLine& d ) unsigned int GaduSession::pubDirSearch( ResLine& query, int ageFrom, int ageTo, bool onlyAlive ) { - QString bufYear; + TQString bufYear; unsigned int reqNr; gg_pubdir50_t searchRequest; @@ -424,8 +424,8 @@ GaduSession::pubDirSearch( ResLine& query, int ageFrom, int ageTo, bool onlyAli (const char*)textcodec->fromUnicode( query.city ) ); } if ( ageFrom || ageTo ) { - QString yearFrom = QString::number( QDate::currentDate().year() - ageFrom ); - QString yearTo = QString::number( QDate::currentDate().year() - ageTo ); + TQString yearFrom = TQString::number( TQDate::currentDate().year() - ageFrom ); + TQString yearTo = TQString::number( TQDate::currentDate().year() - ageTo ); if ( ageFrom && ageTo ) { gg_pubdir50_add( searchRequest, GG_PUBDIR50_BIRTHYEAR, @@ -452,10 +452,10 @@ GaduSession::pubDirSearch( ResLine& query, int ageFrom, int ageTo, bool onlyAli } // otherwise we are looking only for one fellow with this nice UIN else{ - gg_pubdir50_add( searchRequest, GG_PUBDIR50_UIN, QString::number( query.uin ).ascii() ); + gg_pubdir50_add( searchRequest, GG_PUBDIR50_UIN, TQString::number( query.uin ).ascii() ); } - gg_pubdir50_add( searchRequest, GG_PUBDIR50_START, QString::number( searchSeqNr_ ).ascii() ); + gg_pubdir50_add( searchRequest, GG_PUBDIR50_START, TQString::number( searchSeqNr_ ).ascii() ); reqNr = gg_pubdir50( session_, searchRequest ); gg_pubdir50_free( searchRequest ); @@ -476,13 +476,13 @@ GaduSession::sendResult( gg_pubdir50_t result ) } for ( i = 0; i < count; i++ ) { - resultLine.uin = QString( gg_pubdir50_get( result, i, GG_PUBDIR50_UIN ) ).toInt(); + resultLine.uin = TQString( gg_pubdir50_get( result, i, GG_PUBDIR50_UIN ) ).toInt(); resultLine.firstname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FIRSTNAME ) ); resultLine.surname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_LASTNAME ) ); resultLine.nickname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_NICKNAME ) ); resultLine.age = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_BIRTHYEAR ) ); resultLine.city = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_CITY ) ); - QString stat = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_STATUS ) ); + TQString stat = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_STATUS ) ); resultLine.orgin = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FAMILYCITY ) ); resultLine.meiden = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FAMILYNAME ) ); resultLine.gender = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_GENDER ) ); @@ -490,7 +490,7 @@ GaduSession::sendResult( gg_pubdir50_t result ) resultLine.status = stat.toInt(); age = resultLine.age.toInt(); if ( age ) { - resultLine.age = QString::number( QDate::currentDate().year() - age ); + resultLine.age = TQString::number( TQDate::currentDate().year() - age ); } else { resultLine.age.truncate( 0 ); @@ -522,7 +522,7 @@ GaduSession::requestContacts() void GaduSession::exportContactsOnServer( GaduContactsList* contactsList ) { - QCString plist; + TQCString plist; if ( !session_ || session_->state != GG_STATE_CONNECTED ) { kdDebug( 14100 ) << "you need to connect to export Contacts list " << endl; @@ -544,7 +544,7 @@ GaduSession::exportContactsOnServer( GaduContactsList* contactsList ) void GaduSession::handleUserlist( gg_event* event ) { - QString ul; + TQString ul; switch( event->event.userlist.type ) { case GG_USERLIST_GET_REPLY: if ( event->event.userlist.reply ) { @@ -617,7 +617,7 @@ GaduSession::errorDescription( int err ) case GG_ERROR_WRITING: return i18n( "Writing error." ); default: - return i18n( "Unknown error number %1." ).arg( QString::number( (unsigned int)err ) ); + return i18n( "Unknown error number %1." ).arg( TQString::number( (unsigned int)err ) ); } } @@ -638,11 +638,11 @@ GaduSession::failureDescription( gg_failure_t f ) case GG_FAILURE_PASSWORD: return i18n( "Incorrect password." ); case GG_FAILURE_404: - return QString::fromAscii( "404." ); + return TQString::fromAscii( "404." ); case GG_FAILURE_TLS: return i18n( "Unable to connect over encrypted channel.\nTry to turn off encryption support in Gadu account settings and reconnect." ); default: - return i18n( "Unknown error number %1." ).arg( QString::number( (unsigned int)f ) ); + return i18n( "Unknown error number %1." ).arg( TQString::number( (unsigned int)f ) ); } } @@ -730,7 +730,7 @@ GaduSession::checkDescriptor() gaduNotify.description = textcodec->toUnicode( event->event.status.descr ); } else { - gaduNotify.description = QString::null; + gaduNotify.description = TQString::null; } gaduNotify.remote_port = 0; gaduNotify.version = 0; @@ -747,7 +747,7 @@ GaduSession::checkDescriptor() gaduNotify.description = textcodec->toUnicode( event->event.status60.descr ); } else { - gaduNotify.description = QString::null; + gaduNotify.description = TQString::null; } gaduNotify.remote_ip.setAddress( ntohl( event->event.status60.remote_ip ) ); gaduNotify.remote_port = event->event.status60.remote_port; diff --git a/kopete/protocols/gadu/gadusession.h b/kopete/protocols/gadu/gadusession.h index 9ace0f18..f690ed46 100644 --- a/kopete/protocols/gadu/gadusession.h +++ b/kopete/protocols/gadu/gadusession.h @@ -25,14 +25,14 @@ #include "kopeteaccount.h" -#include <qvaluelist.h> -#include <qptrlist.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qdatetime.h> -#include <qcstring.h> -#include <qhostaddress.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqdatetime.h> +#include <tqcstring.h> +#include <tqhostaddress.h> #include "gaducontactlist.h" @@ -47,10 +47,10 @@ struct KGaduMessage { struct KGaduLoginParams { uin_t uin; - QString password; + TQString password; bool useTls; int status; - QString statusDescr; + TQString statusDescr; unsigned int server; bool forFriends; unsigned int client_addr; @@ -59,30 +59,30 @@ struct KGaduLoginParams { struct KGaduNotify { int status; - QHostAddress remote_ip; + TQHostAddress remote_ip; unsigned short remote_port; bool fileCap; int version; int image_size; int time; - QString description; + TQString description; unsigned int contact_id; }; struct ResLine{ unsigned int uin; - QString firstname; - QString surname; - QString nickname; - QString age; - QString city; - QString orgin; - QString meiden; - QString gender; + TQString firstname; + TQString surname; + TQString nickname; + TQString age; + TQString city; + TQString orgin; + TQString meiden; + TQString gender; int status; }; -typedef QValueList<ResLine> SearchResult; +typedef TQValueList<ResLine> SearchResult; class QSocketNotifier; class QStringList; @@ -94,15 +94,15 @@ class GaduSession : public QObject Q_OBJECT public: - GaduSession( QObject* parent = 0, const char* name = 0 ); + GaduSession( TQObject* parent = 0, const char* name = 0 ); virtual ~GaduSession(); bool isConnected() const; int status() const; - QString contactsToString( GaduContactsList* contactsList ); - bool stringToContacts( GaduContactsList& , const QString& ); - static QString failureDescription( gg_failure_t ); - static QString errorDescription( int err ); - static QString stateDescription( int state ); + TQString contactsToString( GaduContactsList* contactsList ); + bool stringToContacts( GaduContactsList& , const TQString& ); + static TQString failureDescription( gg_failure_t ); + static TQString errorDescription( int err ); + static TQString stateDescription( int state ); void dccRequest( const unsigned int ); unsigned int getPersonalInformation(); /* @@ -124,7 +124,7 @@ public slots: int removeNotify( uin_t ); int sendMessage( uin_t recipient, const Kopete::Message& msg, int msgClass ); int changeStatus( int, bool forFriends = false ); - int changeStatusDescription( int, const QString&, bool forFriends = false ); + int changeStatusDescription( int, const TQString&, bool forFriends = false ); int ping(); void requestContacts(); @@ -138,7 +138,7 @@ public slots: bool publishPersonalInformation( ResLine& ); signals: - void error( const QString&, const QString& ); + void error( const TQString&, const TQString& ); void messageReceived( KGaduMessage* ); void ackReceived( unsigned int ); void contactStatusChanged( KGaduNotify* ); @@ -147,7 +147,7 @@ signals: void connectionSucceed( ); void disconnect( Kopete::Account::DisconnectReason ); void pubDirSearchResult( const SearchResult&, unsigned int ); - void userListRecieved( const QString& ); + void userListRecieved( const TQString& ); void userListExported(); void incomingCtcp( unsigned int ); @@ -167,10 +167,10 @@ private: void createNotifiers( bool connect ); gg_session* session_; - QSocketNotifier* read_; - QSocketNotifier* write_; + TQSocketNotifier* read_; + TQSocketNotifier* write_; gg_login_params params_; - QTextCodec* textcodec; + TQTextCodec* textcodec; int searchSeqNr_; GaduRichTextFormat* rtf; }; diff --git a/kopete/protocols/groupwise/gwaccount.cpp b/kopete/protocols/groupwise/gwaccount.cpp index 48ef3833..b2951233 100644 --- a/kopete/protocols/groupwise/gwaccount.cpp +++ b/kopete/protocols/groupwise/gwaccount.cpp @@ -20,7 +20,7 @@ #include <sys/utsname.h> -#include <qvalidator.h> +#include <tqvalidator.h> #include <kaboutdata.h> #include <kapplication.h> @@ -65,7 +65,7 @@ #include "gwaccount.h" -GroupWiseAccount::GroupWiseAccount( GroupWiseProtocol *parent, const QString& accountID, const char *name ) +GroupWiseAccount::GroupWiseAccount( GroupWiseProtocol *parent, const TQString& accountID, const char *name ) : Kopete::ManagedConnectionAccount ( parent, accountID, 0, "groupwiseaccount" ) { Q_UNUSED( name ); @@ -74,17 +74,17 @@ GroupWiseAccount::GroupWiseAccount( GroupWiseProtocol *parent, const QString& ac myself()->setOnlineStatus( GroupWiseProtocol::protocol()->groupwiseOffline ); // Contact list management - QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ), - SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) ); - QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRemoved( Kopete::Group * ) ), - SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) ); - - m_actionAutoReply = new KAction ( i18n( "&Set Auto-Reply..." ), QString::null, 0, this, - SLOT( slotSetAutoReply() ), this, "actionSetAutoReply"); - m_actionJoinChatRoom = new KAction ( i18n( "&Join Channel..." ), QString::null, 0, this, - SLOT( slotJoinChatRoom() ), this, "actionJoinChatRoom"); - m_actionManagePrivacy = new KAction ( i18n( "&Manage Privacy..." ), QString::null, 0, this, - SLOT( slotPrivacy() ), this, "actionPrivacy"); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ), + TQT_SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) ); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRemoved( Kopete::Group * ) ), + TQT_SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) ); + + m_actionAutoReply = new KAction ( i18n( "&Set Auto-Reply..." ), TQString::null, 0, this, + TQT_SLOT( slotSetAutoReply() ), this, "actionSetAutoReply"); + m_actionJoinChatRoom = new KAction ( i18n( "&Join Channel..." ), TQString::null, 0, this, + TQT_SLOT( slotJoinChatRoom() ), this, "actionJoinChatRoom"); + m_actionManagePrivacy = new KAction ( i18n( "&Manage Privacy..." ), TQString::null, 0, this, + TQT_SLOT( slotPrivacy() ), this, "actionPrivacy"); m_connector = 0; m_QCATLS = 0; @@ -112,8 +112,8 @@ KActionMenu* GroupWiseAccount::actionMenu() m_actionMenu->insert( m_actionJoinChatRoom ); /* Used for debugging */ /* - theActionMenu->insert( new KAction ( "Test rtfize()", QString::null, 0, this, - SLOT( slotTestRTFize() ), this, + theActionMenu->insert( new KAction ( "Test rtfize()", TQString::null, 0, this, + TQT_SLOT( slotTestRTFize() ), this, "actionTestRTFize") ); */ return m_actionMenu; @@ -124,7 +124,7 @@ int GroupWiseAccount::port() const return configGroup()->readNumEntry( "Port" ); } -const QString GroupWiseAccount::server() const +const TQString GroupWiseAccount::server() const { return configGroup()->readEntry( "Server" ); } @@ -178,8 +178,8 @@ GroupWiseChatSession * GroupWiseAccount::chatSession( Kopete::ContactPtrList oth m_chatSessions.append( chatSession ); // listen for the message manager telling us that the user //has left the conference so we remove it from our map - QObject::connect( chatSession, SIGNAL( leavingConference( GroupWiseChatSession * ) ), - SLOT( slotLeavingConference( GroupWiseChatSession * ) ) ); + TQObject::connect( chatSession, TQT_SIGNAL( leavingConference( GroupWiseChatSession * ) ), + TQT_SLOT( slotLeavingConference( GroupWiseChatSession * ) ) ); break; } //kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << @@ -193,7 +193,7 @@ GroupWiseChatSession * GroupWiseAccount::chatSession( Kopete::ContactPtrList oth GroupWiseChatSession * GroupWiseAccount::findChatSessionByGuid( const GroupWise::ConferenceGuid & guid ) { GroupWiseChatSession * chatSession = 0; - QValueList<GroupWiseChatSession *>::ConstIterator it; + TQValueList<GroupWiseChatSession *>::ConstIterator it; for ( it = m_chatSessions.begin(); it != m_chatSessions.end(); ++it ) { if ( (*it)->guid() == guid ) @@ -205,9 +205,9 @@ GroupWiseChatSession * GroupWiseAccount::findChatSessionByGuid( const GroupWise: return chatSession; } -GroupWiseContact * GroupWiseAccount::contactForDN( const QString & dn ) +GroupWiseContact * GroupWiseAccount::contactForDN( const TQString & dn ) { - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); // check if we have a DN for them for( ; it.current(); ++it ) { @@ -219,12 +219,12 @@ GroupWiseContact * GroupWiseAccount::contactForDN( const QString & dn ) return static_cast< GroupWiseContact * >( contacts()[ protocol()->dnToDotted( dn ).section( '.', 0, 0 ) ] ); } -void GroupWiseAccount::setAway( bool away, const QString & reason ) +void GroupWiseAccount::setAway( bool away, const TQString & reason ) { if ( away ) { if ( Kopete::Away::getInstance()->idleTime() > 10 ) // don't go AwayIdle unless the user has actually been idle this long - setOnlineStatus( protocol()->groupwiseAwayIdle, QString::null ); + setOnlineStatus( protocol()->groupwiseAwayIdle, TQString::null ); else setOnlineStatus( protocol()->groupwiseAway, reason ); } @@ -232,7 +232,7 @@ void GroupWiseAccount::setAway( bool away, const QString & reason ) setOnlineStatus( protocol()->groupwiseAvailable ); } -void GroupWiseAccount::performConnectWithPassword( const QString &password ) +void GroupWiseAccount::performConnectWithPassword( const TQString &password ) { if ( password.isEmpty() ) { @@ -268,86 +268,86 @@ void GroupWiseAccount::performConnectWithPassword( const QString &password ) m_tlsHandler = new QCATLSHandler( m_QCATLS ); m_clientStream = new ClientStream( m_connector, m_tlsHandler, 0); - QObject::connect( m_connector, SIGNAL( error() ), this, SLOT( slotConnError() ) ); - QObject::connect( m_connector, SIGNAL( connected() ), this, SLOT( slotConnConnected() ) ); + TQObject::connect( m_connector, TQT_SIGNAL( error() ), this, TQT_SLOT( slotConnError() ) ); + TQObject::connect( m_connector, TQT_SIGNAL( connected() ), this, TQT_SLOT( slotConnConnected() ) ); - QObject::connect (m_clientStream, SIGNAL (connectionClosed()), - this, SLOT (slotCSDisconnected())); - QObject::connect (m_clientStream, SIGNAL (delayedCloseFinished()), - this, SLOT (slotCSDisconnected())); + TQObject::connect (m_clientStream, TQT_SIGNAL (connectionClosed()), + this, TQT_SLOT (slotCSDisconnected())); + TQObject::connect (m_clientStream, TQT_SIGNAL (delayedCloseFinished()), + this, TQT_SLOT (slotCSDisconnected())); // Notify us when the transport layer is connected - QObject::connect( m_clientStream, SIGNAL( connected() ), SLOT( slotCSConnected() ) ); + TQObject::connect( m_clientStream, TQT_SIGNAL( connected() ), TQT_SLOT( slotCSConnected() ) ); // it's necessary to catch this signal and tell the TLS handler to proceed // even if we don't check cert validity - QObject::connect( m_tlsHandler, SIGNAL(tlsHandshaken()), SLOT( slotTLSHandshaken()) ); + TQObject::connect( m_tlsHandler, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT( slotTLSHandshaken()) ); // starts the client once the security layer is up, but see below - QObject::connect( m_clientStream, SIGNAL( securityLayerActivated(int) ), SLOT( slotTLSReady(int) ) ); + TQObject::connect( m_clientStream, TQT_SIGNAL( securityLayerActivated(int) ), TQT_SLOT( slotTLSReady(int) ) ); // we could handle login etc in start(), in which case we would emit this signal after that - //QObject::connect (jabberClientStream, SIGNAL (authenticated()), - // this, SLOT (slotCSAuthenticated ())); + //TQObject::connect (jabberClientStream, TQT_SIGNAL (authenticated()), + // this, TQT_SLOT (slotCSAuthenticated ())); // we could also get do the actual login in response to this.. - //QObject::connect (m_clientStream, SIGNAL (needAuthParams(bool, bool, bool)), - // this, SLOT (slotCSNeedAuthParams (bool, bool, bool))); + //TQObject::connect (m_clientStream, TQT_SIGNAL (needAuthParams(bool, bool, bool)), + // this, TQT_SLOT (slotCSNeedAuthParams (bool, bool, bool))); // not implemented: warning - QObject::connect( m_clientStream, SIGNAL( warning(int) ), SLOT( slotCSWarning(int) ) ); + TQObject::connect( m_clientStream, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotCSWarning(int) ) ); // not implemented: error - QObject::connect( m_clientStream, SIGNAL( error(int) ), SLOT( slotCSError(int) ) ); + TQObject::connect( m_clientStream, TQT_SIGNAL( error(int) ), TQT_SLOT( slotCSError(int) ) ); m_client = new Client( 0, CMSGPRES_GW_6_5 ); - // NB these are prefixed with QObject:: to avoid any chance of a clash with our connect() methods. + // NB these are prefixed with TQObject:: to avoid any chance of a clash with our connect() methods. // we connected successfully - QObject::connect( m_client, SIGNAL( loggedIn() ), SLOT( slotLoggedIn() ) ); + TQObject::connect( m_client, TQT_SIGNAL( loggedIn() ), TQT_SLOT( slotLoggedIn() ) ); // or connection failed - QObject::connect( m_client, SIGNAL( loginFailed() ), SLOT( slotLoginFailed() ) ); + TQObject::connect( m_client, TQT_SIGNAL( loginFailed() ), TQT_SLOT( slotLoginFailed() ) ); // folder listed - QObject::connect( m_client, SIGNAL( folderReceived( const FolderItem & ) ), SLOT( receiveFolder( const FolderItem & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( folderReceived( const FolderItem & ) ), TQT_SLOT( receiveFolder( const FolderItem & ) ) ); // contact listed - QObject::connect( m_client, SIGNAL( contactReceived( const ContactItem & ) ), SLOT( receiveContact( const ContactItem & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( contactReceived( const ContactItem & ) ), TQT_SLOT( receiveContact( const ContactItem & ) ) ); // contact details listed - QObject::connect( m_client, SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ), SLOT( receiveContactUserDetails( const GroupWise::ContactDetails & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ), TQT_SLOT( receiveContactUserDetails( const GroupWise::ContactDetails & ) ) ); // contact status changed - QObject::connect( m_client, SIGNAL( statusReceived( const QString &, Q_UINT16, const QString & ) ), SLOT( receiveStatus( const QString &, Q_UINT16 , const QString & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( statusReceived( const TQString &, Q_UINT16, const TQString & ) ), TQT_SLOT( receiveStatus( const TQString &, Q_UINT16 , const TQString & ) ) ); // incoming message - QObject::connect( m_client, SIGNAL( messageReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( messageReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) ); // auto reply to one of our messages because the recipient is away - QObject::connect( m_client, SIGNAL( autoReplyReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( autoReplyReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) ); - QObject::connect( m_client, SIGNAL( ourStatusChanged( GroupWise::Status, const QString &, const QString & ) ), SLOT( changeOurStatus( GroupWise::Status, const QString &, const QString & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( ourStatusChanged( GroupWise::Status, const TQString &, const TQString & ) ), TQT_SLOT( changeOurStatus( GroupWise::Status, const TQString &, const TQString & ) ) ); // conference events - QObject::connect( m_client, - SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ), - SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ) ); - QObject::connect( m_client, SIGNAL( conferenceCreationFailed( const int, const int ) ), SIGNAL( conferenceCreationFailed( const int, const int ) ) ); - QObject::connect( m_client, SIGNAL( invitationReceived( const ConferenceEvent & ) ), SLOT( receiveInvitation( const ConferenceEvent & ) ) ); - QObject::connect( m_client, SIGNAL( conferenceLeft( const ConferenceEvent & ) ), SLOT( receiveConferenceLeft( const ConferenceEvent & ) ) ); - QObject::connect( m_client, SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ), SLOT( receiveConferenceJoinNotify( const ConferenceEvent & ) ) ); - QObject::connect( m_client, SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ), SLOT( receiveInviteNotify( const ConferenceEvent & ) ) ); - QObject::connect( m_client, SIGNAL( invitationDeclined( const ConferenceEvent & ) ), SLOT( receiveInviteDeclined( const ConferenceEvent & ) ) ); - - QObject::connect( m_client, SIGNAL( conferenceJoined( const GroupWise::ConferenceGuid &, const QStringList &, const QStringList & ) ), SLOT( receiveConferenceJoin( const GroupWise::ConferenceGuid &, const QStringList & , const QStringList & ) ) ); + TQObject::connect( m_client, + TQT_SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ), + TQT_SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( conferenceCreationFailed( const int, const int ) ), TQT_SIGNAL( conferenceCreationFailed( const int, const int ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( invitationReceived( const ConferenceEvent & ) ), TQT_SLOT( receiveInvitation( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( conferenceLeft( const ConferenceEvent & ) ), TQT_SLOT( receiveConferenceLeft( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ), TQT_SLOT( receiveConferenceJoinNotify( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ), TQT_SLOT( receiveInviteNotify( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( invitationDeclined( const ConferenceEvent & ) ), TQT_SLOT( receiveInviteDeclined( const ConferenceEvent & ) ) ); + + TQObject::connect( m_client, TQT_SIGNAL( conferenceJoined( const GroupWise::ConferenceGuid &, const TQStringList &, const TQStringList & ) ), TQT_SLOT( receiveConferenceJoin( const GroupWise::ConferenceGuid &, const TQStringList & , const TQStringList & ) ) ); // typing events - QObject::connect( m_client, SIGNAL( contactTyping( const ConferenceEvent & ) ), - SIGNAL( contactTyping( const ConferenceEvent & ) ) ); - QObject::connect( m_client, SIGNAL( contactNotTyping( const ConferenceEvent & ) ), - SIGNAL( contactNotTyping( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ), + TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ), + TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ) ); // misc - QObject::connect( m_client, SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails &) ), SLOT( receiveAccountDetails( const GroupWise::ContactDetails & ) ) ); - QObject::connect( m_client, SIGNAL( connectedElsewhere() ), SLOT( slotConnectedElsewhere() ) ); + TQObject::connect( m_client, TQT_SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails &) ), TQT_SLOT( receiveAccountDetails( const GroupWise::ContactDetails & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( connectedElsewhere() ), TQT_SLOT( slotConnectedElsewhere() ) ); // privacy - contacts can't connect directly to this signal because myself() is initialised before m_client - QObject::connect( m_client->privacyManager(), SIGNAL( privacyChanged( const QString &, bool ) ), SIGNAL( privacyChanged( const QString &, bool ) ) ); + TQObject::connect( m_client->privacyManager(), TQT_SIGNAL( privacyChanged( const TQString &, bool ) ), TQT_SIGNAL( privacyChanged( const TQString &, bool ) ) ); // GW7 - QObject::connect( m_client, SIGNAL( broadcastReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) ); - QObject::connect( m_client, SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( broadcastReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) ); + TQObject::connect( m_client, TQT_SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) ); struct utsname utsBuf; uname (&utsBuf); m_client->setClientName ("Kopete"); m_client->setClientVersion ( kapp->aboutData ()->version () ); - m_client->setOSName (QString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2)); + m_client->setOSName (TQString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2)); kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Connecting to GroupWise server " << server() << ":" << port() << endl; @@ -358,7 +358,7 @@ void GroupWiseAccount::performConnectWithPassword( const QString &password ) myself()->setOnlineStatus( protocol()->groupwiseConnecting ); m_client->connectToServer( m_clientStream, dn, true ); - QObject::connect( m_client, SIGNAL( messageSendingFailed() ), SLOT( slotMessageSendingFailed() ) ); + TQObject::connect( m_client, TQT_SIGNAL( messageSendingFailed() ), TQT_SLOT( slotMessageSendingFailed() ) ); } void GroupWiseAccount::slotMessageSendingFailed() @@ -367,7 +367,7 @@ void GroupWiseAccount::slotMessageSendingFailed() i18n("Message Sending Failed", "Kopete was not able to send the last message sent on account '%1'.\nIf possible, please send the console output from Kopete to <wstephenson@novell.com> for analysis." ).arg( accountId() ) , i18n ("Unable to Send Message on Account '%1'").arg( accountId() ) ); } -void GroupWiseAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString &reason ) +void GroupWiseAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString &reason ) { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl; if ( status == protocol()->groupwiseUnknown @@ -415,7 +415,7 @@ void GroupWiseAccount::disconnect( Kopete::Account::DisconnectReason reason ) if( isConnected () ) { kdDebug (GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << "Still connected, closing connection..." << endl; - QValueList<GroupWiseChatSession *>::ConstIterator it; + TQValueList<GroupWiseChatSession *>::ConstIterator it; for ( it = m_chatSessions.begin() ; it != m_chatSessions.end(); ++it ) (*it)->setClosed(); @@ -448,7 +448,7 @@ void GroupWiseAccount::cleanup() m_client = 0; } -void GroupWiseAccount::createConference( const int clientId, const QStringList& invitees ) +void GroupWiseAccount::createConference( const int clientId, const TQStringList& invitees ) { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl; // TODO: remove this it prevents sending a list of participants with the createconf @@ -456,7 +456,7 @@ void GroupWiseAccount::createConference( const int clientId, const QStringList& m_client->createConference( clientId , invitees ); } -void GroupWiseAccount::sendInvitation( const GroupWise::ConferenceGuid & guid, const QString & dn, const QString & message ) +void GroupWiseAccount::sendInvitation( const GroupWise::ConferenceGuid & guid, const TQString & dn, const TQString & message ) { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl; if ( isConnected() ) @@ -508,7 +508,7 @@ void GroupWiseAccount::reconcileOfflineChanges() // // affecting other protocols' contacts // set flag to warn user that incompatible changes were made on other client bool conflicts = false; - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for ( ; it.current(); ++it ) { if ( *it == myself() ) @@ -516,17 +516,17 @@ void GroupWiseAccount::reconcileOfflineChanges() GroupWiseContact * c = static_cast< GroupWiseContact *>( *it ); GWContactInstanceList instances = m_serverListModel->instancesWithDn( c->dn() ); - QPtrList<Kopete::Group> groups = c->metaContact()->groups(); - QPtrListIterator<Kopete::Group> grpIt( groups ); + TQPtrList<Kopete::Group> groups = c->metaContact()->groups(); + TQPtrListIterator<Kopete::Group> grpIt( groups ); while ( *grpIt ) { - QPtrListIterator<Kopete::Group> candidate = grpIt; + TQPtrListIterator<Kopete::Group> candidate = grpIt; ++grpIt; bool found = false; GWContactInstanceList::Iterator instIt = instances.begin(); for ( ; instIt != instances.end(); ++instIt ) { - QString groupId = ( *candidate )->pluginData( protocol(), accountId() + " objectId" ); + TQString groupId = ( *candidate )->pluginData( protocol(), accountId() + " objectId" ); if ( groupId.isEmpty() ) if ( *candidate == Kopete::Group::topLevel() ) groupId = "0"; // hack the top level's objectId to 0 @@ -590,7 +590,7 @@ void GroupWiseAccount::slotKopeteGroupRenamed( Kopete::Group * renamedGroup ) { if ( isConnected() ) { - QString objectIdString = renamedGroup->pluginData( protocol(), accountId() + " objectId" ); + TQString objectIdString = renamedGroup->pluginData( protocol(), accountId() + " objectId" ); // if this group exists on the server if ( !objectIdString.isEmpty() ) { @@ -623,7 +623,7 @@ void GroupWiseAccount::slotKopeteGroupRemoved( Kopete::Group * group ) kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl; // the member contacts should be deleted separately, so just delete the folder here // get the folder object id - QString objectIdString = group->pluginData( protocol(), accountId() + " objectId" ); + TQString objectIdString = group->pluginData( protocol(), accountId() + " objectId" ); if ( !objectIdString.isEmpty() ) { kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "deleting folder with objectId: " << objectIdString << endl; @@ -661,7 +661,7 @@ void GroupWiseAccount::slotCSDisconnected() { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Disconnected from Groupwise server." << endl; myself()->setOnlineStatus( protocol()->groupwiseOffline ); - QValueList<GroupWiseChatSession *>::ConstIterator it; + TQValueList<GroupWiseChatSession *>::ConstIterator it; for ( it = m_chatSessions.begin() ; it != m_chatSessions.end(); ++it ) (*it)->setClosed(); setAllContactsStatus( protocol()->groupwiseOffline ); @@ -710,9 +710,9 @@ void GroupWiseAccount::slotTLSHandshaken() } } -int GroupWiseAccount::handleTLSWarning (int warning, QString server, QString accountId) +int GroupWiseAccount::handleTLSWarning (int warning, TQString server, TQString accountId) { - QString validityString, code; + TQString validityString, code; switch(warning) { @@ -776,7 +776,7 @@ int GroupWiseAccount::handleTLSWarning (int warning, QString server, QString acc arg(validityString), i18n("GroupWise Connection Certificate Problem"), KStdGuiItem::cont(), - QString("KopeteTLSWarning") + server + code); + TQString("KopeteTLSWarning") + server + code); } void GroupWiseAccount::slotTLSReady( int secLayerCode ) @@ -789,7 +789,7 @@ void GroupWiseAccount::slotTLSReady( int secLayerCode ) void GroupWiseAccount::handleIncomingMessage( const ConferenceEvent & message ) { - QString typeName = "UNKNOWN"; + TQString typeName = "UNKNOWN"; if ( message.type == ReceiveMessage ) typeName = "message"; else if ( message.type == ReceiveAutoReply ) @@ -818,23 +818,23 @@ void GroupWiseAccount::handleIncomingMessage( const ConferenceEvent & message ) GroupWiseChatSession *sess = chatSession( contactList, message.guid, Kopete::Contact::CanCreate ); // add an auto-reply indicator if needed - QString messageMunged = message.message; + TQString messageMunged = message.message; if ( message.type == ReceiveAutoReply ) { - QString prefix = i18n("Prefix used for automatically generated auto-reply" + TQString prefix = i18n("Prefix used for automatically generated auto-reply" " messages when the contact is Away, contains contact's name", "Auto reply from %1: " ).arg( sender->metaContact()->displayName() ); messageMunged = prefix + message.message; } if ( message.type == GroupWise::ReceivedBroadcast ) { - QString prefix = i18n("Prefix used for broadcast messages", + TQString prefix = i18n("Prefix used for broadcast messages", "Broadcast message from %1: " ).arg( sender->metaContact()->displayName() ); messageMunged = prefix + message.message; } if ( message.type == GroupWise::ReceivedSystemBroadcast ) { - QString prefix = i18n("Prefix used for system broadcast messages", + TQString prefix = i18n("Prefix used for system broadcast messages", "System Broadcast message from %1: " ).arg( sender->metaContact()->displayName() ); messageMunged = prefix + message.message; } @@ -868,15 +868,15 @@ void GroupWiseAccount::receiveFolder( const FolderItem & folder ) // either find a local group and record these details there, or create a new group to suit Kopete::Group * found = 0; - QPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups(); + TQPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups(); for ( Kopete::Group *grp = groupList.first(); grp; grp = groupList.next() ) { // see if there is already a local group that matches this group - QString groupId = grp->pluginData( protocol(), accountId() + " objectId" ); + TQString groupId = grp->pluginData( protocol(), accountId() + " objectId" ); if ( groupId.isEmpty() ) if ( folder.name == grp->displayName() ) // no match on id, match on display name instead { - grp->setPluginData( protocol(), accountId() + " objectId", QString::number( folder.id ) ); + grp->setPluginData( protocol(), accountId() + " objectId", TQString::number( folder.id ) ); found = grp; break; } @@ -900,7 +900,7 @@ void GroupWiseAccount::receiveFolder( const FolderItem & folder ) kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " - not found locally, creating Kopete::Group" << endl; Kopete::Group * grp = new Kopete::Group( folder.name ); grp->setPluginData( protocol(), accountId() + " serverDisplayName", folder.name ); - grp->setPluginData( protocol(), accountId() + " objectId", QString::number( folder.id ) ); + grp->setPluginData( protocol(), accountId() + " objectId", TQString::number( folder.id ) ); Kopete::ContactList::self()->addGroup( grp ); } } @@ -940,7 +940,7 @@ void GroupWiseAccount::receiveContact( const ContactItem & contact ) kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " - ERROR - contact's folder doesn't exist on server" << endl; DeleteItemTask * dit = new DeleteItemTask( client()->rootTask() ); dit->item( contact.parentId, contact.id ); -// QObject::connect( dit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) ); +// TQObject::connect( dit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) ); dit->go( true ); return; } @@ -1019,7 +1019,7 @@ void GroupWiseAccount::receiveContactUserDetails( const ContactDetails & details } } -GroupWiseContact * GroupWiseAccount::createTemporaryContact( const QString & dn ) +GroupWiseContact * GroupWiseAccount::createTemporaryContact( const TQString & dn ) { ContactDetails details = client()->userDetailsManager()->details( dn ); GroupWiseContact * c = static_cast<GroupWiseContact *>( contacts()[ details.dn.lower() ] ); @@ -1029,7 +1029,7 @@ GroupWiseContact * GroupWiseAccount::createTemporaryContact( const QString & dn // the client is telling us about a temporary contact we need to know about so add them Kopete::MetaContact *metaContact = new Kopete::MetaContact (); metaContact->setTemporary (true); - QString displayName = details.fullName; + TQString displayName = details.fullName; if ( displayName.isEmpty() ) displayName = details.givenName + " " + details.surname; @@ -1047,7 +1047,7 @@ GroupWiseContact * GroupWiseAccount::createTemporaryContact( const QString & dn return c; } -void GroupWiseAccount::receiveStatus( const QString & contactId, Q_UINT16 status, const QString &awayMessage ) +void GroupWiseAccount::receiveStatus( const TQString & contactId, Q_UINT16 status, const TQString &awayMessage ) { kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "got status for: " << contactId << ", status: " << status << ", away message: " << awayMessage << endl; GroupWiseContact * c = contactForDN( contactId ); @@ -1062,7 +1062,7 @@ void GroupWiseAccount::receiveStatus( const QString & contactId, Q_UINT16 status kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " couldn't find " << contactId << endl; } -void GroupWiseAccount::changeOurStatus( GroupWise::Status status, const QString & awayMessage, const QString & autoReply ) +void GroupWiseAccount::changeOurStatus( GroupWise::Status status, const TQString & awayMessage, const TQString & autoReply ) { if ( status == GroupWise::Offline ) myself()->setOnlineStatus( protocol()->groupwiseAppearOffline ); @@ -1083,7 +1083,7 @@ void GroupWiseAccount::sendMessage( const GroupWise::ConferenceGuid &guid, const outMsg.message = message.plainBody(); outMsg.rtfMessage = protocol()->rtfizeText( message.plainBody() ); // make a list of DNs to send to - QStringList addresseeDNs; + TQStringList addresseeDNs; Kopete::ContactPtrList addressees = message.to(); for ( Kopete::Contact * contact = addressees.first(); contact; contact = addressees.next() ) addresseeDNs.append( static_cast< GroupWiseContact* >( contact )->dn() ); @@ -1092,7 +1092,7 @@ void GroupWiseAccount::sendMessage( const GroupWise::ConferenceGuid &guid, const } } -bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaContact* parentContact ) +bool GroupWiseAccount::createContact( const TQString& contactId, Kopete::MetaContact* parentContact ) { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "contactId: " << contactId << endl; @@ -1100,7 +1100,7 @@ bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaCont // record, in a folderitem, their display names and groupwise object id // Set object id to 0 if not found - they do not exist on the server bool topLevel = false; - QValueList< FolderItem > folders; + TQValueList< FolderItem > folders; Kopete::GroupList groupList = parentContact->groups(); for ( Kopete::Group *group = groupList.first(); group; group = groupList.next() ) { @@ -1146,7 +1146,7 @@ bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaCont // we have to create the contact optimistically. GroupWiseContact * gc = new GroupWiseContact( this, contactId, parentContact, 0, 0, 0 ); ContactDetails dt = client()->userDetailsManager()->details( contactId ); - QString displayAs; + TQString displayAs; if ( dt.fullName.isEmpty() ) displayAs = dt.givenName + " " + dt.surname; else @@ -1165,7 +1165,7 @@ bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaCont // get the contact's full name to use as the display name of the created contact CreateContactTask * cct = new CreateContactTask( client()->rootTask() ); cct->contactFromUserId( contactId, parentContact->displayName(), highestFreeSequence, folders, topLevel ); - QObject::connect( cct, SIGNAL( finished() ), SLOT( receiveContactCreated() ) ); + TQObject::connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( receiveContactCreated() ) ); cct->go( true ); return true; } @@ -1188,7 +1188,7 @@ void GroupWiseAccount::receiveContactCreated() } else { - client()->requestDetails( QStringList( cct->dn() ) ); + client()->requestDetails( TQStringList( cct->dn() ) ); client()->requestStatus( cct->dn() ); } } @@ -1228,7 +1228,7 @@ void GroupWiseAccount::deleteContact( GroupWiseContact * contact ) { DeleteItemTask * dit = new DeleteItemTask( client()->rootTask() ); dit->item( ::qt_cast<GWFolder*>( (*it)->parent() )->id, (*it)->id ); - QObject::connect( dit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) ); + TQObject::connect( dit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) ); dit->go( true ); } } @@ -1279,13 +1279,13 @@ void GroupWiseAccount::receiveInvitation( const ConferenceEvent & event ) } -void GroupWiseAccount::receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const QStringList & participants, const QStringList & invitees ) +void GroupWiseAccount::receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const TQStringList & participants, const TQStringList & invitees ) { // get a new GWMM Kopete::ContactPtrList others; GroupWiseChatSession * sess = chatSession( others, guid, Kopete::Contact::CanCreate); // find each contact and add them to the GWMM, and tell them they are in the conference - for ( QValueList<QString>::ConstIterator it = participants.begin(); it != participants.end(); ++it ) + for ( TQValueList<TQString>::ConstIterator it = participants.begin(); it != participants.end(); ++it ) { //kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " adding participant " << *it << endl; GroupWiseContact * c = contactForDN( *it ); @@ -1294,7 +1294,7 @@ void GroupWiseAccount::receiveConferenceJoin( const GroupWise::ConferenceGuid & sess->joined( c ); } // add each invitee too - for ( QValueList<QString>::ConstIterator it = invitees.begin(); it != invitees.end(); ++it ) + for ( TQValueList<TQString>::ConstIterator it = invitees.begin(); it != invitees.end(); ++it ) { //kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " adding invitee " << *it << endl; GroupWiseContact * c = contactForDN( *it ); @@ -1388,9 +1388,9 @@ void GroupWiseAccount::slotLeavingConference( GroupWiseChatSession * sess ) void GroupWiseAccount::slotSetAutoReply() { bool ok; - QRegExp rx( ".*" ); - QRegExpValidator validator( rx, this ); - QString newAutoReply = KInputDialog::getText( i18n( "Enter Auto-Reply Message" ), + TQRegExp rx( ".*" ); + TQRegExpValidator validator( rx, this ); + TQString newAutoReply = KInputDialog::getText( i18n( "Enter Auto-Reply Message" ), i18n( "Please enter an Auto-Reply message that will be shown to users who message you while Away or Busy" ), configGroup()->readEntry( "AutoReply" ), &ok, Kopete::UI::Global::mainWidget(), "autoreplymessagedlg", &validator ); if ( ok ) @@ -1400,14 +1400,14 @@ void GroupWiseAccount::slotSetAutoReply() void GroupWiseAccount::slotTestRTFize() { /* bool ok; - const QString query = QString::fromLatin1("Enter a string to rtfize:"); - QString testText = KLineEditDlg::getText( query, QString::null, &ok, Kopete::UI::Global::mainWidget() ); + const TQString query = TQString::fromLatin1("Enter a string to rtfize:"); + TQString testText = KLineEditDlg::getText( query, TQString::null, &ok, Kopete::UI::Global::mainWidget() ); if ( ok ) kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "Converted text is: '" << protocol()->rtfizeText( testText ) << "'" << endl;*/ // bool ok; -// const QString query = i18n("Enter a contactId:"); -// QString testText = KInputDialog::getText( query, i18n("This is a test dialog and will not be in the final product!" ), QString::null, &ok, Kopete::UI::Global::mainWidget() ); +// const TQString query = i18n("Enter a contactId:"); +// TQString testText = KInputDialog::getText( query, i18n("This is a test dialog and will not be in the final product!" ), TQString::null, &ok, Kopete::UI::Global::mainWidget() ); // if ( !ok ) // return; // kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "Trying to add contact: '" << protocol()->rtfizeText( testText ) << "'" << endl; @@ -1427,7 +1427,7 @@ void GroupWiseAccount::slotJoinChatRoom() new GroupWiseChatSearchDialog( this, Kopete::UI::Global::mainWidget(), "gwjoinchatdialog" ); } -bool GroupWiseAccount::isContactBlocked( const QString & dn ) +bool GroupWiseAccount::isContactBlocked( const TQString & dn ) { if ( isConnected() ) return client()->privacyManager()->isBlocked( dn ); @@ -1439,7 +1439,7 @@ void GroupWiseAccount::dumpManagers() { kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " for: " << accountId() << " containing: " << m_chatSessions.count() << " managers " << endl; - QValueList<GroupWiseChatSession *>::ConstIterator it; + TQValueList<GroupWiseChatSession *>::ConstIterator it; for ( it = m_chatSessions.begin() ; it != m_chatSessions.end(); ++it ) kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "guid: " << (*it)->guid() << endl; } @@ -1479,16 +1479,16 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact ) int nextFreeSequence = m_serverListModel->maxSequenceNumber() + 1; // 1) // make a list of all the groups the metacontact is in - QPtrList<Kopete::Group> groupList = contact->metaContact()->groups(); + TQPtrList<Kopete::Group> groupList = contact->metaContact()->groups(); // make a list of all the groups this contact is in, according to the server model GWContactInstanceList instances = m_serverListModel->instancesWithDn( contact->dn() ); // seek corresponding pairs in both lists and remove // ( for each group ) - QPtrListIterator< Kopete::Group > grpIt( groupList ); + TQPtrListIterator< Kopete::Group > grpIt( groupList ); while ( *grpIt ) { - QPtrListIterator< Kopete::Group > candidateGrp( groupList ); + TQPtrListIterator< Kopete::Group > candidateGrp( groupList ); candidateGrp = grpIt; ++grpIt; @@ -1521,7 +1521,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact ) // ( take the first pair and carry out a move ) while ( *grpIt && !instances.isEmpty() ) { - QPtrListIterator< Kopete::Group > candidateGrp( groupList ); + TQPtrListIterator< Kopete::Group > candidateGrp( groupList ); candidateGrp = grpIt; ++grpIt; GWContactInstanceList::Iterator instIt = instances.begin(); @@ -1541,21 +1541,21 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact ) { MoveContactTask * mit = new MoveContactTask( client()->rootTask() ); mit->moveContact( instance, destinationFolder->id ); - QObject::connect( mit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) ); + TQObject::connect( mit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) ); mit->go(); } else if ( *candidateGrp == Kopete::Group::topLevel() ) { MoveContactTask * mit = new MoveContactTask( client()->rootTask() ); mit->moveContact( instance, 0 ); - QObject::connect( mit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) ); + TQObject::connect( mit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) ); mit->go(); } else { MoveContactTask * mit = new MoveContactTask( client()->rootTask() ); - QObject::connect( mit, SIGNAL( gotContactDeleted( const ContactItem & ) ), - SLOT( receiveContactDeleted( const ContactItem & ) ) ); + TQObject::connect( mit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), + TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) ); // discover the next free sequence number and add the group using that mit->moveContactToNewFolder( instance, nextFreeSequence++, ( *candidateGrp )->displayName() ); @@ -1569,7 +1569,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact ) grpIt.toFirst(); while ( *grpIt ) { - QPtrListIterator< Kopete::Group > candidateGrp( groupList ); + TQPtrListIterator< Kopete::Group > candidateGrp( groupList ); candidateGrp = grpIt; ++grpIt; GWFolder * destinationFolder = m_serverListModel->findFolderByName( ( ( *candidateGrp )->displayName() ) ); @@ -1609,7 +1609,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact ) DeleteItemTask * dit = new DeleteItemTask( client()->rootTask() ); dit->item( folder->id, (*candidateInst)->id ); - QObject::connect( dit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) ); + TQObject::connect( dit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) ); dit->go( true ); instances.remove( candidateInst ); @@ -1625,7 +1625,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact ) const GWContactInstanceList::Iterator end = instances.end(); for ( ; it != end; ++it ) { - QValueList< ContactItem > instancesToChange; + TQValueList< ContactItem > instancesToChange; ContactItem instance; instance.id = (*it)->id; instance.parentId = ::qt_cast<GWFolder *>( (*it)->parent() )->id; @@ -1636,7 +1636,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact ) UpdateContactTask * uct = new UpdateContactTask( client()->rootTask() ); uct->renameContact( contact->metaContact()->displayName(), instancesToChange ); - QObject::connect ( uct, SIGNAL( finished() ), contact, SLOT( renamedOnServer() ) ); + TQObject::connect ( uct, TQT_SIGNAL( finished() ), contact, TQT_SLOT( renamedOnServer() ) ); uct->go( true ); } } diff --git a/kopete/protocols/groupwise/gwaccount.h b/kopete/protocols/groupwise/gwaccount.h index 2e8f8348..fd137154 100644 --- a/kopete/protocols/groupwise/gwaccount.h +++ b/kopete/protocols/groupwise/gwaccount.h @@ -58,7 +58,7 @@ class GroupWiseAccount : public Kopete::ManagedConnectionAccount { Q_OBJECT public: - GroupWiseAccount( GroupWiseProtocol *parent, const QString& accountID, const char *name = 0 ); + GroupWiseAccount( GroupWiseProtocol *parent, const TQString& accountID, const char *name = 0 ); ~GroupWiseAccount(); /** @@ -73,7 +73,7 @@ public: * Creates a protocol specific Kopete::Contact subclass and adds it to the supplied * Kopete::MetaContact */ - virtual bool createContact(const QString& contactId, Kopete::MetaContact* parentContact); + virtual bool createContact(const TQString& contactId, Kopete::MetaContact* parentContact); /** * Delete a contact on the server */ @@ -81,7 +81,7 @@ public: /** * Called when Kopete is set globally away */ - virtual void setAway(bool away, const QString& reason); + virtual void setAway(bool away, const TQString& reason); /** * Utility access to the port given by the user */ @@ -89,7 +89,7 @@ public: /** * Utility access to the server given by the user */ - const QString server() const; + const TQString server() const; /** * Utility access to our protocol */ @@ -108,11 +108,11 @@ public: * Look up a contact given a DN * Returns 0 if none found */ - GroupWiseContact * contactForDN( const QString & dn ); + GroupWiseContact * contactForDN( const TQString & dn ); /** * Create a conference (start a chat) on the server */ - void createConference( const int clientId, const QStringList& invitees ); + void createConference( const int clientId, const TQStringList& invitees ); /** * Send a message @@ -122,17 +122,17 @@ public: /** * Invite someone to join a conference */ - void sendInvitation( const ConferenceGuid & guid, const QString & dn, const QString & message ); + void sendInvitation( const ConferenceGuid & guid, const TQString & dn, const TQString & message ); /** * Check a contact's blocking status * Only works when connected - otherwise always returns false */ - bool isContactBlocked( const QString & m_dn ); + bool isContactBlocked( const TQString & m_dn ); /** * Set up a temporary contact (not on our contact list but is messaging us or involved in a conversation that we have been invited to. */ - GroupWiseContact * createTemporaryContact( const QString & dn ); + GroupWiseContact * createTemporaryContact( const TQString & dn ); /** * Check whether sync is not currently needed @@ -146,20 +146,20 @@ public slots: void slotTestRTFize(); /* Connects to the server. */ - void performConnectWithPassword ( const QString &password ); + void performConnectWithPassword ( const TQString &password ); /* Disconnects from the server. */ virtual void disconnect(); virtual void disconnect( Kopete::Account::DisconnectReason reason ); /** Set the online status for the account. Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); signals: void conferenceCreated( const int mmId, const GroupWise::ConferenceGuid & guid ); void conferenceCreationFailed( const int mmId, const int statusCode ); void contactTyping( const ConferenceEvent & ); void contactNotTyping( const ConferenceEvent & ); - void privacyChanged( const QString & dn, bool allowed ); + void privacyChanged( const TQString & dn, bool allowed ); protected slots: @@ -224,11 +224,11 @@ protected slots: /** * A contact changed status */ - void receiveStatus( const QString &, Q_UINT16, const QString & ); + void receiveStatus( const TQString &, Q_UINT16, const TQString & ); /** * Our status changed on the server */ - void changeOurStatus( GroupWise::Status, const QString &, const QString & ); + void changeOurStatus( GroupWise::Status, const TQString &, const TQString & ); /** * Called when we've been disconnected for logging in as this user somewhere else */ @@ -244,7 +244,7 @@ protected slots: /** * We joined a conference having accepted an invitation, create a message manager */ - void receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const QStringList & participants, const QStringList & invitees ); + void receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const TQStringList & participants, const TQStringList & invitees ); /** * Someone joined a conference, add them to the appropriate message manager */ @@ -306,9 +306,9 @@ protected: /** * Sends a status message to the server - called by the status specific slotGoAway etc */ - //void setStatus( GroupWise::Status status, const QString & reason = QString::null ); + //void setStatus( GroupWise::Status status, const TQString & reason = TQString::null ); - int handleTLSWarning (int warning, QString server, QString accountId); + int handleTLSWarning (int warning, TQString server, TQString accountId); GroupWiseChatSession * findChatSessionByGuid( const GroupWise::ConferenceGuid & guid ); /** @@ -333,8 +333,8 @@ private: // Client, entry point of libgroupwise Client * m_client; - QString m_initialReason; - QValueList<GroupWiseChatSession*> m_chatSessions; + TQString m_initialReason; + TQValueList<GroupWiseChatSession*> m_chatSessions; bool m_dontSync; GWContactList * m_serverListModel; }; @@ -347,14 +347,14 @@ private: { Q_OBJECT public: - OnlineStatusMessageAction ( const Kopete::OnlineStatus& status, const QString &text, const QString &message, const QIconSet &pix, QObject *parent=0, const char *name=0); + OnlineStatusMessageAction ( const Kopete::OnlineStatus& status, const TQString &text, const TQString &message, const TQIconSet &pix, TQObject *parent=0, const char *name=0); signals: - void activated( const Kopete::OnlineStatus& status, const QString & ); + void activated( const Kopete::OnlineStatus& status, const TQString & ); private slots: void slotActivated(); private: Kopete::OnlineStatus m_status; - QString m_message; + TQString m_message; }; */ #endif diff --git a/kopete/protocols/groupwise/gwbytestream.cpp b/kopete/protocols/groupwise/gwbytestream.cpp index cd476070..e3c71483 100644 --- a/kopete/protocols/groupwise/gwbytestream.cpp +++ b/kopete/protocols/groupwise/gwbytestream.cpp @@ -17,7 +17,7 @@ * * ***************************************************************************/ -#include <qobject.h> +#include <tqobject.h> #include <kbufferedsocket.h> #include <kdebug.h> #include <kresolver.h> @@ -25,7 +25,7 @@ #include "gwbytestream.h" #include "gwerror.h" -KNetworkByteStream::KNetworkByteStream ( QObject *parent, const char */*name*/ ) +KNetworkByteStream::KNetworkByteStream ( TQObject *parent, const char */*name*/ ) : ByteStream ( parent ) { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Instantiating new KNetwork byte stream." << endl; @@ -39,15 +39,15 @@ KNetworkByteStream::KNetworkByteStream ( QObject *parent, const char */*name*/ ) mSocket->enableRead ( true ); // connect signals and slots - QObject::connect ( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) ); - QObject::connect ( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) ); - QObject::connect ( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) ); - QObject::connect ( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) ); - QObject::connect ( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) ); } -bool KNetworkByteStream::connect ( QString host, QString service ) +bool KNetworkByteStream::connect ( TQString host, TQString service ) { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Connecting to " << host << ", service " << service << endl; @@ -77,7 +77,7 @@ int KNetworkByteStream::tryWrite () { // send all data from the buffers to the socket - QByteArray writeData = takeWrite(); + TQByteArray writeData = takeWrite(); socket()->writeBlock ( writeData.data (), writeData.size () ); return writeData.size (); @@ -128,7 +128,7 @@ void KNetworkByteStream::slotReadyRead () { // stuff all available data into our buffers - QByteArray readBuffer ( socket()->bytesAvailable () ); + TQByteArray readBuffer ( socket()->bytesAvailable () ); socket()->readBlock ( readBuffer.data (), readBuffer.size () ); diff --git a/kopete/protocols/groupwise/gwbytestream.h b/kopete/protocols/groupwise/gwbytestream.h index 9422f9c3..0cd95f77 100644 --- a/kopete/protocols/groupwise/gwbytestream.h +++ b/kopete/protocols/groupwise/gwbytestream.h @@ -37,11 +37,11 @@ class KNetworkByteStream : public ByteStream Q_OBJECT public: - KNetworkByteStream ( QObject *parent = 0, const char *name = 0 ); + KNetworkByteStream ( TQObject *parent = 0, const char *name = 0 ); ~KNetworkByteStream (); - bool connect ( QString host, QString service ); + bool connect ( TQString host, TQString service ); virtual bool isOpen () const; virtual void close (); diff --git a/kopete/protocols/groupwise/gwconnector.cpp b/kopete/protocols/groupwise/gwconnector.cpp index c145ddfe..946116b6 100644 --- a/kopete/protocols/groupwise/gwconnector.cpp +++ b/kopete/protocols/groupwise/gwconnector.cpp @@ -25,7 +25,7 @@ #include "gwerror.h" #include "gwbytestream.h" -KNetworkConnector::KNetworkConnector ( QObject *parent, const char */*name*/ ) +KNetworkConnector::KNetworkConnector ( TQObject *parent, const char */*name*/ ) : Connector ( parent ) { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "New KNetwork connector." << endl; @@ -34,8 +34,8 @@ KNetworkConnector::KNetworkConnector ( QObject *parent, const char */*name*/ ) mByteStream = new KNetworkByteStream ( this ); - connect ( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - connect ( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) ); + connect ( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + connect ( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); mPort = 0; } @@ -46,7 +46,7 @@ KNetworkConnector::~KNetworkConnector () } -void KNetworkConnector::connectToServer ( const QString &server ) +void KNetworkConnector::connectToServer ( const TQString &server ) { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Initiating connection to " << mHost << endl; Q_ASSERT( !mHost.isNull() ); @@ -60,7 +60,7 @@ void KNetworkConnector::connectToServer ( const QString &server ) mErrorCode = KNetwork::KSocketBase::NoError; - if ( !mByteStream->connect ( mHost, QString::number ( mPort ) ) ) + if ( !mByteStream->connect ( mHost, TQString::number ( mPort ) ) ) { // Houston, we have a problem mErrorCode = mByteStream->socket()->error (); @@ -75,7 +75,7 @@ void KNetworkConnector::slotConnected () // FIXME: setPeerAddress() is something different, find out correct usage later //KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 (); - //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); + //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); emit connected (); @@ -109,7 +109,7 @@ void KNetworkConnector::done () mByteStream->close (); } -void KNetworkConnector::setOptHostPort ( const QString &host, Q_UINT16 port ) +void KNetworkConnector::setOptHostPort ( const TQString &host, Q_UINT16 port ) { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl; diff --git a/kopete/protocols/groupwise/gwconnector.h b/kopete/protocols/groupwise/gwconnector.h index 12dc59d2..bfd6c260 100644 --- a/kopete/protocols/groupwise/gwconnector.h +++ b/kopete/protocols/groupwise/gwconnector.h @@ -37,15 +37,15 @@ class KNetworkConnector : public Connector Q_OBJECT public: - KNetworkConnector ( QObject *parent = 0, const char *name = 0 ); + KNetworkConnector ( TQObject *parent = 0, const char *name = 0 ); virtual ~KNetworkConnector (); - virtual void connectToServer ( const QString &server ); + virtual void connectToServer ( const TQString &server ); virtual ByteStream *stream () const; virtual void done (); - void setOptHostPort ( const QString &host, Q_UINT16 port ); + void setOptHostPort ( const TQString &host, Q_UINT16 port ); void setOptSSL ( bool ); int errorCode (); @@ -55,7 +55,7 @@ private slots: void slotError ( int ); private: - QString mHost; + TQString mHost; Q_UINT16 mPort; int mErrorCode; diff --git a/kopete/protocols/groupwise/gwcontact.cpp b/kopete/protocols/groupwise/gwcontact.cpp index 6dbb8c1b..d15c76b9 100644 --- a/kopete/protocols/groupwise/gwcontact.cpp +++ b/kopete/protocols/groupwise/gwcontact.cpp @@ -25,7 +25,7 @@ ************************************************************************* */ -#include <qmap.h> +#include <tqmap.h> #include <kaction.h> #include <kdebug.h> @@ -46,7 +46,7 @@ using namespace GroupWise; -GroupWiseContact::GroupWiseContact( Kopete::Account* account, const QString &dn, +GroupWiseContact::GroupWiseContact( Kopete::Account* account, const TQString &dn, Kopete::MetaContact *parent, const int objectId, const int parentId, const int sequence ) : Kopete::Contact( account, GroupWiseProtocol::dnToDotted( dn ), parent ), m_objectId( objectId ), m_parentId( parentId ), @@ -56,8 +56,8 @@ GroupWiseContact::GroupWiseContact( Kopete::Account* account, const QString &dn, { m_dn = dn; } - connect( static_cast< GroupWiseAccount *>( account ), SIGNAL( privacyChanged( const QString &, bool ) ), - SLOT( receivePrivacyChanged( const QString &, bool ) ) ); + connect( static_cast< GroupWiseAccount *>( account ), TQT_SIGNAL( privacyChanged( const TQString &, bool ) ), + TQT_SLOT( receivePrivacyChanged( const TQString &, bool ) ) ); setOnlineStatus( ( parent && parent->isTemporary() ) ? protocol()->groupwiseUnknown : protocol()->groupwiseOffline ); } @@ -70,7 +70,7 @@ GroupWiseContact::~GroupWiseContact() account()->client()->userDetailsManager()->removeContact( contactId() ); } -QString GroupWiseContact::dn() const +TQString GroupWiseContact::dn() const { return m_dn; } @@ -94,7 +94,7 @@ void GroupWiseContact::updateDetails( const ContactDetails & details ) m_serverProperties = details.properties; - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>::Iterator it; // work phone number if ( ( it = m_serverProperties.find( "telephoneNumber" ) ) != m_serverProperties.end() ) @@ -143,7 +143,7 @@ bool GroupWiseContact::isReachable() return false; } -void GroupWiseContact::serialize( QMap< QString, QString > &serializedData, QMap< QString, QString > & /* addressBookData */ ) +void GroupWiseContact::serialize( TQMap< TQString, TQString > &serializedData, TQMap< TQString, TQString > & /* addressBookData */ ) { serializedData[ "DN" ] = m_dn; } @@ -155,18 +155,18 @@ Kopete::ChatSession * GroupWiseContact::manager( Kopete::Contact::CanCreateFlags Kopete::ContactPtrList chatMembers; chatMembers.append( this ); - return account()->chatSession( chatMembers, QString::null, canCreate ); + return account()->chatSession( chatMembers, TQString::null, canCreate ); } -QPtrList<KAction> *GroupWiseContact::customContextMenuActions() +TQPtrList<KAction> *GroupWiseContact::customContextMenuActions() { - QPtrList<KAction> *m_actionCollection = new QPtrList<KAction>; + TQPtrList<KAction> *m_actionCollection = new TQPtrList<KAction>; // Block/unblock Contact - QString label = account()->isContactBlocked( m_dn ) ? i18n( "Unblock User" ) : i18n( "Block User" ); + TQString label = account()->isContactBlocked( m_dn ) ? i18n( "Unblock User" ) : i18n( "Block User" ); if( !m_actionBlock ) { - m_actionBlock = new KAction( label, "msn_blocked",0, this, SLOT( slotBlock() ), + m_actionBlock = new KAction( label, "msn_blocked",0, this, TQT_SLOT( slotBlock() ), this, "actionBlock" ); } else @@ -183,7 +183,7 @@ void GroupWiseContact::slotUserInfo() new GroupWiseContactProperties( this, Kopete::UI::Global::mainWidget(), "gwcontactproperties" ); } -QMap< QString, QString > GroupWiseContact::serverProperties() +TQMap< TQString, TQString > GroupWiseContact::serverProperties() { return m_serverProperties; } @@ -218,7 +218,7 @@ void GroupWiseContact::slotBlock() } } -void GroupWiseContact::receivePrivacyChanged( const QString & dn, bool allow ) +void GroupWiseContact::receivePrivacyChanged( const TQString & dn, bool allow ) { Q_UNUSED( allow ); if ( dn == m_dn ) // set the online status back to itself. this will set the blocking state @@ -236,7 +236,7 @@ void GroupWiseContact::setOnlineStatus( const Kopete::OnlineStatus& status ) if ( account()->isContactBlocked( m_dn ) && status.internalStatus() < 15 ) { Kopete::Contact::setOnlineStatus(Kopete::OnlineStatus(status.status() , (status.weight()==0) ? 0 : (status.weight() -1) , - protocol() , status.internalStatus()+15 , QString::fromLatin1("msn_blocked"), + protocol() , status.internalStatus()+15 , TQString::fromLatin1("msn_blocked"), i18n("%1|Blocked").arg( status.description() ) ) ); } else diff --git a/kopete/protocols/groupwise/gwcontact.h b/kopete/protocols/groupwise/gwcontact.h index e5079387..64486e75 100644 --- a/kopete/protocols/groupwise/gwcontact.h +++ b/kopete/protocols/groupwise/gwcontact.h @@ -27,8 +27,8 @@ #ifndef GW_CONTACT_H #define GW_CONTACT_H -#include <qdict.h> -#include <qmap.h> +#include <tqdict.h> +#include <tqmap.h> #include "kopetecontact.h" #include "kopetemessage.h" @@ -63,7 +63,7 @@ public: * @param parentId The ID of this contact's parent (folder). * @param sequence This contact's sequence number (The position it appears in within its parent). */ - GroupWiseContact( Kopete::Account* account, const QString &uniqueName, + GroupWiseContact( Kopete::Account* account, const TQString &uniqueName, Kopete::MetaContact *parent, const int objectId, const int parentId, const int sequence ); @@ -82,7 +82,7 @@ public: /** * Get the contact's DN (used for communications with the server, not the contactId ) */ - QString dn() const; + TQString dn() const; /** * Update the contact's status and metadata from the supplied fields @@ -94,12 +94,12 @@ public: * Serialize the contact's data into a key-value map * suitable for writing to a file */ - virtual void serialize(QMap< QString, QString >& serializedData, - QMap< QString, QString >& addressBookData); + virtual void serialize(TQMap< TQString, TQString >& serializedData, + TQMap< TQString, TQString >& addressBookData); /** * Return the actions for this contact */ - virtual QPtrList<KAction> *customContextMenuActions(); + virtual TQPtrList<KAction> *customContextMenuActions(); /** * Returns a Kopete::ChatSession associated with this contact @@ -109,7 +109,7 @@ public: /** * Access the contact's server properties */ - QMap< QString, QString > serverProperties(); + TQMap< TQString, TQString > serverProperties(); /** * Updates this contact's group membership and display name on the server */ @@ -170,20 +170,20 @@ protected slots: /** * Receive notification that this contact's privacy setting changed - update status */ - void receivePrivacyChanged( const QString &, bool ); + void receivePrivacyChanged( const TQString &, bool ); protected: KActionCollection* m_actionCollection; int m_objectId; int m_parentId; int m_sequence; - QString m_dn; - QString m_displayName; + TQString m_dn; + TQString m_displayName; KAction* m_actionPrefs; KAction *m_actionBlock; // Novell Messenger Properties, as received by the server. // Unfortunately we don't the domain of the set of keys, so they are not easily mappable to KopeteContactProperties - QMap< QString, QString > m_serverProperties; + TQMap< TQString, TQString > m_serverProperties; bool m_archiving; // HACK: flag used to differentiate between 'all contact list instances gone while we are moving on the server' // and 'all contact list instances gone because we wanted to delete them all' diff --git a/kopete/protocols/groupwise/gwcontactlist.cpp b/kopete/protocols/groupwise/gwcontactlist.cpp index 2af6d42a..3f8b5c4d 100644 --- a/kopete/protocols/groupwise/gwcontactlist.cpp +++ b/kopete/protocols/groupwise/gwcontactlist.cpp @@ -15,18 +15,18 @@ ************************************************************************* */ -#include <qobjectlist.h> +#include <tqobjectlist.h> #include <kdebug.h> #include "gwcontactlist.h" #include "gwerror.h" //debug area -GWContactList::GWContactList( QObject * parent ) - : QObject( parent ), rootFolder( new GWFolder( this, 0, 0, QString::null ) ) +GWContactList::GWContactList( TQObject * parent ) + : TQObject( parent ), rootFolder( new GWFolder( this, 0, 0, TQString::null ) ) { } -GWFolder * GWContactList::addFolder( unsigned int id, unsigned int sequence, const QString & displayName ) +GWFolder * GWContactList::addFolder( unsigned int id, unsigned int sequence, const TQString & displayName ) { if ( rootFolder ) return new GWFolder( rootFolder, id, sequence, displayName ); @@ -34,11 +34,11 @@ 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 QString & displayName, const QString & dn ) +GWContactInstance * GWContactList::addContactInstance( unsigned int id, unsigned int parent, unsigned int sequence, const TQString & displayName, const TQString & dn ) { - QObjectList * l = queryList( "GWFolder", 0, false, true ); - QObjectListIt it( *l ); // iterate over the buttons - QObject *obj; + TQObjectList * l = queryList( "GWFolder", 0, false, true ); + TQObjectListIt it( *l ); // iterate over the buttons + TQObject *obj; GWContactInstance * contact = 0; while ( (obj = it.current()) != 0 ) { @@ -56,9 +56,9 @@ GWContactInstance * GWContactList::addContactInstance( unsigned int id, unsigned GWFolder * GWContactList::findFolderById( unsigned int id ) { - QObjectList * l = queryList( "GWFolder", 0, false, true ); - QObjectListIt it( *l ); // iterate over the buttons - QObject *obj; + TQObjectList * l = queryList( "GWFolder", 0, false, true ); + TQObjectListIt it( *l ); // iterate over the buttons + TQObject *obj; GWFolder * candidate, * folder = 0; while ( (obj = it.current()) != 0 ) { @@ -74,11 +74,11 @@ GWFolder * GWContactList::findFolderById( unsigned int id ) return folder; } -GWFolder * GWContactList::findFolderByName( const QString & displayName ) +GWFolder * GWContactList::findFolderByName( const TQString & displayName ) { - QObjectList * l = queryList( "GWFolder", 0, false, true ); - QObjectListIt it( *l ); // iterate over the buttons - QObject *obj; + TQObjectList * l = queryList( "GWFolder", 0, false, true ); + TQObjectListIt it( *l ); // iterate over the buttons + TQObject *obj; GWFolder * folder = 0; while ( (obj = it.current()) != 0 ) { @@ -96,9 +96,9 @@ GWFolder * GWContactList::findFolderByName( const QString & displayName ) int GWContactList::maxSequenceNumber() { - QObjectList * l = queryList( "GWFolder", 0, false, true ); - QObjectListIt it( *l ); // iterate over the buttons - QObject *obj; + TQObjectList * l = queryList( "GWFolder", 0, false, true ); + TQObjectListIt it( *l ); // iterate over the buttons + TQObject *obj; unsigned int sequence = 0; while ( (obj = it.current()) != 0 ) { @@ -110,11 +110,11 @@ int GWContactList::maxSequenceNumber() return sequence; } -GWContactInstanceList GWContactList::instancesWithDn( const QString & dn ) +GWContactInstanceList GWContactList::instancesWithDn( const TQString & dn ) { - QObjectList * l = queryList( "GWContactInstance", 0, false, true ); - QObjectListIt it( *l ); // iterate over the buttons - QObject *obj; + TQObjectList * l = queryList( "GWContactInstance", 0, false, true ); + TQObjectListIt it( *l ); // iterate over the buttons + TQObject *obj; GWContactInstanceList matches; while ( (obj = it.current()) != 0 ) { @@ -134,9 +134,9 @@ void GWContactList::removeInstance( GWContactListItem * instance ) void GWContactList::removeInstanceById( unsigned int id ) { - QObjectList * l = queryList( "GWContactInstance", 0, false, true ); - QObjectListIt it( *l ); // iterate over the buttons - QObject *obj; + TQObjectList * l = queryList( "GWContactInstance", 0, false, true ); + TQObjectListIt it( *l ); // iterate over the buttons + TQObject *obj; GWContactInstanceList matches; while ( (obj = it.current()) != 0 ) { @@ -154,11 +154,11 @@ void GWContactList::removeInstanceById( unsigned int id ) void GWContactList::dump() { kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl; - const QObjectList * l = children(); + const TQObjectList * l = children(); if ( l && !l->isEmpty() ) { - QObjectListIt it( *l ); // iterate over the buttons - QObject *obj; + TQObjectListIt it( *l ); // iterate over the buttons + TQObject *obj; while ( (obj = it.current()) != 0 ) { GWFolder * folder = ::qt_cast< GWFolder * >( obj ); @@ -174,11 +174,11 @@ void GWContactList::dump() void GWContactList::clear() { kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl; - const QObjectList * l = children(); + const TQObjectList * l = children(); if ( l && !l->isEmpty() ) { - QObjectListIt it( *l ); - QObject *obj; + TQObjectListIt it( *l ); + TQObject *obj; while ( (obj = it.current()) != 0 ) { delete obj; @@ -187,24 +187,24 @@ void GWContactList::clear() } } -GWContactListItem::GWContactListItem( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName ) : - QObject( parent), id( theId ), sequence( theSequence ), displayName( theDisplayName ) +GWContactListItem::GWContactListItem( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ) : + TQObject( parent), id( theId ), sequence( theSequence ), displayName( theDisplayName ) { } -GWFolder::GWFolder( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName ) : +GWFolder::GWFolder( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ) : GWContactListItem( parent, theId, theSequence, theDisplayName ) { } void GWFolder::dump( unsigned int depth ) { - QString s; + TQString s; s.fill( ' ', ++depth * 2 ); kdDebug( GROUPWISE_DEBUG_GLOBAL ) << s <<"Folder " << displayName << " id: " << id << " contains: " << endl; - const QObjectList * l = children(); + const TQObjectList * l = children(); if ( l ) { - QObjectListIt it( *l ); // iterate over the buttons - QObject *obj; + TQObjectListIt it( *l ); // iterate over the buttons + TQObject *obj; while ( (obj = it.current()) != 0 ) { ++it; @@ -223,13 +223,13 @@ void GWFolder::dump( unsigned int depth ) kdDebug( GROUPWISE_DEBUG_GLOBAL ) << s << " no contacts." << endl; } -GWContactInstance::GWContactInstance( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName, const QString & theDn ) : +GWContactInstance::GWContactInstance( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName, const TQString & theDn ) : GWContactListItem( parent, theId, theSequence, theDisplayName ), dn( theDn ) { } void GWContactInstance::dump( unsigned int depth ) { - QString s; + TQString s; s.fill( ' ', ++depth * 2 ); kdDebug( GROUPWISE_DEBUG_GLOBAL ) << s << "Contact " << displayName << " id: " << id << " dn: " << dn << endl; } diff --git a/kopete/protocols/groupwise/gwcontactlist.h b/kopete/protocols/groupwise/gwcontactlist.h index e596b96c..613e1b3f 100644 --- a/kopete/protocols/groupwise/gwcontactlist.h +++ b/kopete/protocols/groupwise/gwcontactlist.h @@ -17,7 +17,7 @@ // GROUPWISE SERVER SIDE CONTACT LIST MODEL -#include <qobject.h> +#include <tqobject.h> #ifndef GW_CONTACTLIST_H #define GW_CONTACTLIST_H @@ -26,7 +26,7 @@ class GWFolder; class GWContactInstance; class GWContactListItem; -typedef QValueList<GWContactInstance *> GWContactInstanceList; +typedef TQValueList<GWContactInstance *> GWContactInstanceList; /** * These functions model the server side contact list structure enough to allow Kopete to manipulate it correctly @@ -43,12 +43,12 @@ class GWContactList : public QObject { Q_OBJECT public: - GWContactList( QObject * parent ); - GWFolder * addFolder( unsigned int id, unsigned int sequence, const QString & displayName ); - GWContactInstance * addContactInstance( unsigned int id, unsigned int parent, unsigned int sequence, const QString & displayName, const QString & dn ); + GWContactList( TQObject * parent ); + GWFolder * addFolder( unsigned int id, unsigned int sequence, const TQString & displayName ); + GWContactInstance * addContactInstance( unsigned int id, unsigned int parent, unsigned int sequence, const TQString & displayName, const TQString & dn ); GWFolder * findFolderById( unsigned int id ); - GWFolder * findFolderByName( const QString & name ); - GWContactInstanceList instancesWithDn( const QString & dn ); + GWFolder * findFolderByName( const TQString & name ); + GWContactInstanceList instancesWithDn( const TQString & dn ); void removeInstance( GWContactListItem * instance ); void removeInstanceById( unsigned int id ); int maxSequenceNumber(); @@ -61,18 +61,18 @@ class GWContactListItem : public QObject { Q_OBJECT public: - GWContactListItem( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName ); + GWContactListItem( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ); unsigned int id; // OBJECT_ID unsigned int sequence; // SEQUENCE_NUMBER - QString displayName; // DISPLAY_NAME + TQString displayName; // DISPLAY_NAME }; class GWFolder : public GWContactListItem { Q_OBJECT public: - GWFolder( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName ); + GWFolder( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName ); virtual void dump( unsigned int depth ); }; @@ -80,8 +80,8 @@ class GWContactInstance : public GWContactListItem { Q_OBJECT public: - GWContactInstance( QObject * parent, unsigned int theId, unsigned int theSequence, const QString & theDisplayName, const QString & theDn ); - QString dn; // DN + GWContactInstance( TQObject * parent, unsigned int theId, unsigned int theSequence, const TQString & theDisplayName, const TQString & theDn ); + TQString dn; // DN virtual void dump( unsigned int depth ); }; diff --git a/kopete/protocols/groupwise/gwmessagemanager.cpp b/kopete/protocols/groupwise/gwmessagemanager.cpp index d9467dfd..7a792486 100644 --- a/kopete/protocols/groupwise/gwmessagemanager.cpp +++ b/kopete/protocols/groupwise/gwmessagemanager.cpp @@ -10,8 +10,8 @@ // // -#include <qlabel.h> -#include <qvalidator.h> +#include <tqlabel.h> +#include <tqvalidator.h> #include <kdebug.h> #include <kdialogbase.h> #include <kiconloader.h> @@ -53,22 +53,22 @@ GroupWiseChatSession::GroupWiseChatSession(const Kopete::Contact* user, Kopete:: // make sure Kopete knows about this instance Kopete::ChatSessionManager::self()->registerChatSession ( this ); - connect ( this, SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), - SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); - connect( this, SIGNAL( myselfTyping ( bool ) ), SLOT( slotSendTypingNotification ( bool ) ) ); - connect( account(), SIGNAL( contactTyping( const ConferenceEvent & ) ), - SLOT( slotGotTypingNotification( const ConferenceEvent & ) ) ); - connect( account(), SIGNAL( contactNotTyping( const ConferenceEvent & ) ), - SLOT( slotGotNotTypingNotification( const ConferenceEvent & ) ) ); + connect ( this, TQT_SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); + connect( this, TQT_SIGNAL( myselfTyping ( bool ) ), TQT_SLOT( slotSendTypingNotification ( bool ) ) ); + connect( account(), TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ), + TQT_SLOT( slotGotTypingNotification( const ConferenceEvent & ) ) ); + connect( account(), TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ), + TQT_SLOT( slotGotNotTypingNotification( const ConferenceEvent & ) ) ); // Set up the Invite menu m_actionInvite = new KActionMenu( i18n( "&Invite" ), actionCollection() , "gwInvite" ); - connect( m_actionInvite->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT(slotActionInviteAboutToShow() ) ) ; + connect( m_actionInvite->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT(slotActionInviteAboutToShow() ) ) ; - m_secure = new KAction( i18n( "Security Status" ), "encrypted", KShortcut(), this, SLOT( slotShowSecurity() ), actionCollection(), "gwSecureChat" ); + m_secure = new KAction( i18n( "Security Status" ), "encrypted", KShortcut(), this, TQT_SLOT( slotShowSecurity() ), actionCollection(), "gwSecureChat" ); m_secure->setToolTip( i18n( "Conversation is secure" ) ); - m_logging = new KAction( i18n( "Archiving Status" ), "logchat", KShortcut(), this, SLOT( slotShowArchiving() ), actionCollection(), "gwLoggingChat" ); + m_logging = new KAction( i18n( "Archiving Status" ), "logchat", KShortcut(), this, TQT_SLOT( slotShowArchiving() ), actionCollection(), "gwLoggingChat" ); updateArchiving(); setXMLFile("gwchatui.rc"); @@ -116,7 +116,7 @@ bool GroupWiseChatSession::secure() void GroupWiseChatSession::setClosed() { kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " Conference " << m_guid << " is now Closed " << endl; - m_guid = QString::null; + m_guid = TQString::null; m_flags = m_flags | GroupWise::Closed; } @@ -147,15 +147,15 @@ void GroupWiseChatSession::createConference() { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl; // form a list of invitees - QStringList invitees; + TQStringList invitees; Kopete::ContactPtrList chatMembers = members(); for ( Kopete::Contact * contact = chatMembers.first(); contact; contact = chatMembers.next() ) { invitees.append( static_cast< GroupWiseContact * >( contact )->dn() ); } // this is where we will set the GUID and send any pending messages - connect( account(), SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ), SLOT( receiveGuid( const int, const GroupWise::ConferenceGuid & ) ) ); - connect( account(), SIGNAL( conferenceCreationFailed( const int, const int ) ), SLOT( slotCreationFailed( const int, const int ) ) ); + connect( account(), TQT_SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ), TQT_SLOT( receiveGuid( const int, const GroupWise::ConferenceGuid & ) ) ); + connect( account(), TQT_SIGNAL( conferenceCreationFailed( const int, const int ) ), TQT_SLOT( slotCreationFailed( const int, const int ) ) ); // create the conference account()->createConference( mmId(), invitees ); @@ -175,7 +175,7 @@ void GroupWiseChatSession::receiveGuid( const int newMmId, const GroupWise::Conf // they are removed from the chat member list GUI. By re-adding them here, we guarantee they appear // in the UI again, at the price of a debug message when starting up a new chatwindow - QPtrListIterator< Kopete::Contact > it( members() ); + TQPtrListIterator< Kopete::Contact > it( members() ); Kopete::Contact * contact; while ( ( contact = it.current() ) ) { @@ -276,14 +276,14 @@ void GroupWiseChatSession::slotGotNotTypingNotification( const ConferenceEvent& void GroupWiseChatSession::dequeueMessagesAndInvites() { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl; - for ( QValueListIterator< Kopete::Message > it = m_pendingOutgoingMessages.begin(); + for ( TQValueListIterator< Kopete::Message > it = m_pendingOutgoingMessages.begin(); it != m_pendingOutgoingMessages.end(); ++it ) { slotMessageSent( *it, this ); } m_pendingOutgoingMessages.clear(); - QPtrListIterator< Kopete::Contact > it( m_pendingInvites ); + TQPtrListIterator< Kopete::Contact > it( m_pendingInvites ); Kopete::Contact * contact; while ( ( contact = it.current() ) ) { @@ -304,19 +304,19 @@ void GroupWiseChatSession::slotActionInviteAboutToShow() m_actionInvite->popupMenu()->clear(); - QDictIterator<Kopete::Contact> it( account()->contacts() ); + TQDictIterator<Kopete::Contact> it( account()->contacts() ); for( ; it.current(); ++it ) { if( !members().contains( it.current() ) && it.current()->isOnline() && it.current() != myself() ) { KAction *a=new KopeteContactAction( it.current(), this, - SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite ); + TQT_SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite ); m_actionInvite->insert( a ); m_inviteActions.append( a ) ; } } // Invite someone off-list - KAction *b=new KAction( i18n ("&Other..."), 0, this, SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" ); + KAction *b=new KAction( i18n ("&Other..."), 0, this, TQT_SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" ); m_actionInvite->insert( b ); m_inviteActions.append( b ) ; } @@ -330,13 +330,13 @@ void GroupWiseChatSession::slotInviteContact( Kopete::Contact * contact ) } else { - QWidget * w = view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : 0L; + TQWidget * w = view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : 0L; bool ok; - QRegExp rx( ".*" ); - QRegExpValidator validator( rx, this ); - QString inviteMessage = KInputDialog::getText( i18n( "Enter Invitation Message" ), - i18n( "Enter the reason for the invitation, or leave blank for no reason:" ), QString(), + TQRegExp rx( ".*" ); + TQRegExpValidator validator( rx, this ); + TQString inviteMessage = KInputDialog::getText( i18n( "Enter Invitation Message" ), + i18n( "Enter the reason for the invitation, or leave blank for no reason:" ), TQString(), &ok, w ? w : Kopete::UI::Global::mainWidget(), "invitemessagedlg", &validator ); if ( ok ) { @@ -346,7 +346,7 @@ void GroupWiseChatSession::slotInviteContact( Kopete::Contact * contact ) } } -void GroupWiseChatSession::inviteContact( const QString &contactId ) +void GroupWiseChatSession::inviteContact( const TQString &contactId ) { Kopete::Contact * contact = account()->contacts()[ contactId ]; if ( contact ) @@ -358,12 +358,12 @@ void GroupWiseChatSession::slotInviteOtherContact() if ( !m_searchDlg ) { // show search dialog - QWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : + TQWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : Kopete::UI::Global::mainWidget() ); m_searchDlg = new KDialogBase( w, "invitesearchdialog", false, i18n( "Search for Contact to Invite" ), KDialogBase::Ok|KDialogBase::Cancel ); - m_search = new GroupWiseContactSearch( account(), QListView::Single, true, m_searchDlg, "invitesearchwidget" ); + m_search = new GroupWiseContactSearch( account(), TQListView::Single, true, m_searchDlg, "invitesearchwidget" ); m_searchDlg->setMainWidget( m_search ); - connect( m_search, SIGNAL( selectionValidates( bool ) ), m_searchDlg, SLOT( enableButtonOK( bool ) ) ); + connect( m_search, TQT_SIGNAL( selectionValidates( bool ) ), m_searchDlg, TQT_SLOT( enableButtonOK( bool ) ) ); m_searchDlg->enableButtonOK( false ); } m_searchDlg->show(); @@ -372,17 +372,17 @@ void GroupWiseChatSession::slotInviteOtherContact() void GroupWiseChatSession::slotSearchedForUsers() { // create an item for each result, in the block list - QValueList< ContactDetails > selected = m_search->selectedResults(); + TQValueList< ContactDetails > selected = m_search->selectedResults(); if ( selected.count() ) { - QWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : + TQWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : Kopete::UI::Global::mainWidget() ); ContactDetails cd = selected.first(); bool ok; - QRegExp rx( ".*" ); - QRegExpValidator validator( rx, this ); - QString inviteMessage = KInputDialog::getText( i18n( "Enter Invitation Message" ), - i18n( "Enter the reason for the invitation, or leave blank for no reason:" ), QString(), + TQRegExp rx( ".*" ); + TQRegExpValidator validator( rx, this ); + TQString inviteMessage = KInputDialog::getText( i18n( "Enter Invitation Message" ), + i18n( "Enter the reason for the invitation, or leave blank for no reason:" ), TQString(), &ok, w , "invitemessagedlg", &validator ); if ( ok ) { @@ -395,7 +395,7 @@ void GroupWiseChatSession::addInvitee( const Kopete::Contact * c ) { // create a placeholder contact for each invitee kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl; - QString pending = i18n("label attached to contacts who have been invited but are yet to join a chat", "(pending)"); + TQString pending = i18n("label attached to contacts who have been invited but are yet to join a chat", "(pending)"); Kopete::MetaContact * inviteeMC = new Kopete::MetaContact(); inviteeMC->setDisplayName( c->metaContact()->displayName() + pending ); GroupWiseContact * invitee = new GroupWiseContact( account(), c->contactId() + " " + pending, inviteeMC, 0, 0, 0 ); @@ -417,7 +417,7 @@ void GroupWiseChatSession::joined( GroupWiseContact * c ) { if ( pending->contactId().startsWith( c->contactId() ) ) { - removeContact( pending, QString::null, Kopete::Message::PlainText, true ); + removeContact( pending, TQString::null, Kopete::Message::PlainText, true ); break; } } @@ -459,13 +459,13 @@ void GroupWiseChatSession::inviteDeclined( GroupWiseContact * c ) { if ( pending->contactId().startsWith( c->contactId() ) ) { - removeContact( pending, QString::null, Kopete::Message::PlainText, true ); + removeContact( pending, TQString::null, Kopete::Message::PlainText, true ); break; } } m_invitees.remove( pending ); - QString from = c->metaContact()->displayName(); + TQString from = c->metaContact()->displayName(); Kopete::Message declined = Kopete::Message( myself(), members(), i18n("%1 has rejected an invitation to join this conversation.").arg( from ), @@ -476,7 +476,7 @@ void GroupWiseChatSession::inviteDeclined( GroupWiseContact * c ) void GroupWiseChatSession::updateArchiving() { bool archiving = false; - QPtrListIterator< Kopete::Contact > it( members() ); + TQPtrListIterator< Kopete::Contact > it( members() ); GroupWiseContact * contact; while ( ( contact = static_cast<GroupWiseContact*>( it.current() ) ) ) { @@ -501,14 +501,14 @@ void GroupWiseChatSession::updateArchiving() void GroupWiseChatSession::slotShowSecurity() { - QWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : + TQWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : Kopete::UI::Global::mainWidget() ); KMessageBox::queuedMessageBox( w, KMessageBox::Information, i18n( "This conversation is secured with SSL security." ), i18n("Security Status" ) ); } void GroupWiseChatSession::slotShowArchiving() { - QWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : + TQWidget * w = ( view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : Kopete::UI::Global::mainWidget() ); KMessageBox::queuedMessageBox( w, KMessageBox::Information, i18n( "This conversation is being logged administratively." ), i18n("Archiving Status" ) ); } diff --git a/kopete/protocols/groupwise/gwmessagemanager.h b/kopete/protocols/groupwise/gwmessagemanager.h index 5413fd23..5d1fd48b 100644 --- a/kopete/protocols/groupwise/gwmessagemanager.h +++ b/kopete/protocols/groupwise/gwmessagemanager.h @@ -12,7 +12,7 @@ #ifndef GWMESSAGEMANAGER_H #define GWMESSAGEMANAGER_H -#include <qptrqueue.h> +#include <tqptrqueue.h> #include <kopetemessage.h> #include <kopetechatsession.h> @@ -87,7 +87,7 @@ public: /** * Reimplemented from Kopete::ChatSession - invites contacts via DND */ - virtual void inviteContact(const QString& ); + virtual void inviteContact(const TQString& ); signals: /** * Tell the contact we got a GUID so it can route incoming messages here. @@ -150,10 +150,10 @@ private: ConferenceGuid m_guid; // The conference's globally unique identifier, which is given to it by the server int m_flags; // flags for secure connections, central logging and "conference closed" as given by the server - QValueList< Kopete::Message > m_pendingOutgoingMessages; // messages queued while we wait for the server to tell us the conference is created. + TQValueList< Kopete::Message > m_pendingOutgoingMessages; // messages queued while we wait for the server to tell us the conference is created. Kopete::ContactPtrList m_pendingInvites; // people we wanted to invite to the conference, queued while waiting for the conference to be created. KActionMenu *m_actionInvite; - QPtrList<KAction> m_inviteActions; + TQPtrList<KAction> m_inviteActions; // labels showing secure and logging status KAction *m_secure; KAction *m_logging; diff --git a/kopete/protocols/groupwise/gwprotocol.cpp b/kopete/protocols/groupwise/gwprotocol.cpp index dcf92a17..6eb489a2 100644 --- a/kopete/protocols/groupwise/gwprotocol.cpp +++ b/kopete/protocols/groupwise/gwprotocol.cpp @@ -19,8 +19,8 @@ * * ************************************************************************* */ -#include <qregexp.h> -#include <qstringlist.h> +#include <tqregexp.h> +#include <tqstringlist.h> #include <kgenericfactory.h> #include <kdebug.h> @@ -41,12 +41,12 @@ K_EXPORT_COMPONENT_FACTORY( kopete_groupwise, GroupWiseProtocolFactory( "kopete_ GroupWiseProtocol *GroupWiseProtocol::s_protocol = 0L; -GroupWiseProtocol::GroupWiseProtocol( QObject* parent, const char *name, const QStringList &/*args*/ ) +GroupWiseProtocol::GroupWiseProtocol( TQObject* parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Protocol( GroupWiseProtocolFactory::instance(), parent, name ), /* initialise Kopete::OnlineStatus that should be user selectable in the user interface */ - groupwiseOffline ( Kopete::OnlineStatus::Offline, 0, this, GroupWise::Offline, QString::null, + groupwiseOffline ( Kopete::OnlineStatus::Offline, 0, this, GroupWise::Offline, TQString::null, i18n( "Offline" ), i18n( "O&ffline" ), Kopete::OnlineStatusManager::Offline ), - groupwiseAvailable ( Kopete::OnlineStatus::Online, 25, this, GroupWise::Available, QString::null, + groupwiseAvailable ( Kopete::OnlineStatus::Online, 25, this, GroupWise::Available, TQString::null, i18n( "Online" ), i18n( "&Online" ), Kopete::OnlineStatusManager::Online ), groupwiseBusy ( Kopete::OnlineStatus::Away, 18, this, GroupWise::Busy, "contact_busy_overlay", i18n( "Busy" ), i18n( "&Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ), @@ -68,8 +68,8 @@ GroupWiseProtocol::GroupWiseProtocol( QObject* parent, const char *name, const Q propLastName( Kopete::Global::Properties::self()->lastName() ), propFullName( Kopete::Global::Properties::self()->fullName() ), propAwayMessage( Kopete::Global::Properties::self()->awayMessage() ), - propAutoReply( "groupwiseAutoReply", i18n( "Auto Reply Message" ), QString::null, false, false ), - propCN( "groupwiseCommonName", i18n( "Common Name" ), QString::null, true, false ), + propAutoReply( "groupwiseAutoReply", i18n( "Auto Reply Message" ), TQString::null, false, false ), + propCN( "groupwiseCommonName", i18n( "Common Name" ), TQString::null, true, false ), propPhoneWork( Kopete::Global::Properties::self()->workPhone() ), propPhoneMobile( Kopete::Global::Properties::self()->privateMobilePhone() ), propEmail( Kopete::Global::Properties::self()->emailAddress() ) @@ -87,17 +87,17 @@ GroupWiseProtocol::~GroupWiseProtocol() } Kopete::Contact *GroupWiseProtocol::deserializeContact( - Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &/* addressBookData */) + Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &/* addressBookData */) { - QString dn = serializedData[ "DN" ]; - QString accountId = serializedData[ "accountId" ]; - QString displayName = serializedData[ "displayName" ]; + TQString dn = serializedData[ "DN" ]; + TQString accountId = serializedData[ "accountId" ]; + TQString displayName = serializedData[ "displayName" ]; int objectId = serializedData[ "objectId" ].toInt(); int parentId = serializedData[ "parentId" ].toInt(); int sequence = serializedData[ "sequenceNumber" ].toInt(); - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[ accountId ]; if ( !account ) @@ -110,19 +110,19 @@ Kopete::Contact *GroupWiseProtocol::deserializeContact( return new GroupWiseContact(account, dn, metaContact, objectId, parentId, sequence ); } -AddContactPage * GroupWiseProtocol::createAddContactWidget( QWidget *parent, Kopete::Account * account ) +AddContactPage * GroupWiseProtocol::createAddContactWidget( TQWidget *parent, Kopete::Account * account ) { kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "Creating Add Contact Page" << endl; return new GroupWiseAddContactPage( account, parent, "addcontactpage"); } -KopeteEditAccountWidget * GroupWiseProtocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent ) +KopeteEditAccountWidget * GroupWiseProtocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) { kdDebug(GROUPWISE_DEBUG_GLOBAL) << "Creating Edit Account Page" << endl; return new GroupWiseEditAccountWidget( parent, account ); } -Kopete::Account *GroupWiseProtocol::createNewAccount( const QString &accountId ) +Kopete::Account *GroupWiseProtocol::createNewAccount( const TQString &accountId ) { return new GroupWiseAccount( this, accountId ); } @@ -165,7 +165,7 @@ Kopete::OnlineStatus GroupWiseProtocol::gwStatusToKOS( const int gwInternal ) return status; } -QString GroupWiseProtocol::rtfizeText( const QString & plain ) +TQString GroupWiseProtocol::rtfizeText( const TQString & plain ) { // transcode a utf-8 encoded string into an rtf string // iterate through the input string converting each char into the equivalent rtf @@ -173,12 +173,12 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) // of multi-byte UTF-8 characters 2 to 6 bytes long (with first byte > 0x7f), these are recoded as 32 bit values, escaped as \u<val>? strings // vanilla RTF "envelope" that doesn't say much but causes other clients to accept the message - QString rtfTemplate = QString::fromLatin1("{\\rtf1\\ansi\n" + TQString rtfTemplate = TQString::fromLatin1("{\\rtf1\\ansi\n" "{\\fonttbl{\\f0\\fnil Unknown;}}\n" "{\\colortbl ;\\red0\\green0\\blue0;}\n" "\\uc1\\cf1\\f0\\fs18 %1\\par\n}"); - QString outputText; // output text - QCString plainUtf8 = plain.utf8(); // encoded as UTF8, because that's what this encoding algorithm, taken from Gaim's Novell plugin + TQString outputText; // output text + TQCString plainUtf8 = plain.utf8(); // encoded as UTF8, because that's what this encoding algorithm, taken from Gaim's Novell plugin uint index = 0; // current char to transcode while ( index < plainUtf8.length() ) { @@ -190,13 +190,13 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) case '{': case '}': case '\\': - outputText.append( QString( "\\%1" ).arg( QChar( current ) ) ); + outputText.append( TQString( "\\%1" ).arg( TQChar( current ) ) ); break; case '\n': outputText.append( "\\par " ); break; default: - outputText.append( QChar( current ) ); + outputText.append( TQChar( current ) ); break; } ++index; @@ -205,7 +205,7 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) { Q_UINT32 ucs4Char; int bytesEncoded; - QString escapedUnicodeChar; + TQString escapedUnicodeChar; if ( current <= 0xDF ) { ucs4Char = (( plainUtf8.data()[ index ] & 0x001F) << 6) | @@ -248,12 +248,12 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) } else { - kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "bogus utf-8 lead byte: 0x" << QTextStream::hex << current << endl; + kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "bogus utf-8 lead byte: 0x" << TQTextStream::hex << current << endl; ucs4Char = 0x003F; bytesEncoded = 1; } index += bytesEncoded; - escapedUnicodeChar = QString("\\u%1?").arg( ucs4Char ); + escapedUnicodeChar = TQString("\\u%1?").arg( ucs4Char ); kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "unicode escaped char: " << escapedUnicodeChar << endl; outputText.append( escapedUnicodeChar ); } @@ -261,21 +261,21 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) return rtfTemplate.arg( outputText ); } -QString GroupWiseProtocol::dnToDotted( const QString & dn ) +TQString GroupWiseProtocol::dnToDotted( const TQString & dn ) { - QRegExp rx("[a-zA-Z]*=(.*)$", false ); + TQRegExp rx("[a-zA-Z]*=(.*)$", false ); if( !dn.find( '=' ) ) // if it's not a DN, return it unprocessed return dn; // split the dn into elements - QStringList elements = QStringList::split( ',', dn ); + TQStringList elements = TQStringList::split( ',', dn ); // remove the key, keep the value - for ( QStringList::Iterator it = elements.begin(); it != elements.end(); ++it ) + for ( TQStringList::Iterator it = elements.begin(); it != elements.end(); ++it ) { if ( rx.search( *it ) != -1 ) *it = rx.cap( 1 ); } - QString dotted = elements.join( "." ); + TQString dotted = elements.join( "." ); // reassemble as dotted return dotted; diff --git a/kopete/protocols/groupwise/gwprotocol.h b/kopete/protocols/groupwise/gwprotocol.h index c3271f18..f0c439f1 100644 --- a/kopete/protocols/groupwise/gwprotocol.h +++ b/kopete/protocols/groupwise/gwprotocol.h @@ -35,7 +35,7 @@ class GroupWiseProtocol : public Kopete::Protocol { Q_OBJECT public: - GroupWiseProtocol(QObject *parent, const char *name, const QStringList &args); + GroupWiseProtocol(TQObject *parent, const char *name, const TQStringList &args); ~GroupWiseProtocol(); /** * Convert the serialised data back into a GroupWiseContact and add this @@ -43,21 +43,21 @@ public: */ virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap< QString, QString > & serializedData, - const QMap< QString, QString > & addressBookData + const TQMap< TQString, TQString > & serializedData, + const TQMap< TQString, TQString > & addressBookData ); /** * Generate the widget needed to add GroupWiseContacts */ - virtual AddContactPage * createAddContactWidget( QWidget *parent, Kopete::Account *account ); + virtual AddContactPage * createAddContactWidget( TQWidget *parent, Kopete::Account *account ); /** * Generate the widget needed to add/edit accounts for this protocol */ - virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent ); + virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); /** * Generate a GroupWiseAccount */ - virtual Kopete::Account * createNewAccount( const QString &accountId ); + virtual Kopete::Account * createNewAccount( const TQString &accountId ); /** * Access the instance of this protocol */ @@ -71,13 +71,13 @@ public: * @param plain unformatted text * @return RTF text (in UCS-4 encoding) */ - QString rtfizeText( const QString & plain ); + TQString rtfizeText( const TQString & plain ); /** * Convert full DNs to dotted-untyped format * Assumes the DN is normalised - comma separated, no spaces between elements * eg cn=wstephenson,o=suse becomes wstephenson.suse */ - static QString dnToDotted( const QString & dn ); + static TQString dnToDotted( const TQString & dn ); /** * Online statuses used for contacts' presence */ diff --git a/kopete/protocols/groupwise/libgroupwise/bytestream.cpp b/kopete/protocols/groupwise/libgroupwise/bytestream.cpp index ad860b98..0b20c050 100644 --- a/kopete/protocols/groupwise/libgroupwise/bytestream.cpp +++ b/kopete/protocols/groupwise/libgroupwise/bytestream.cpp @@ -35,7 +35,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>. +//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -59,13 +59,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -95,7 +95,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -109,7 +109,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { return takeRead(bytes); } @@ -130,9 +130,9 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -153,14 +153,14 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { appendArray(&d->readBuf, block); } //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { appendArray(&d->writeBuf, block); } @@ -169,7 +169,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { return takeArray(&d->readBuf, size, del); } @@ -178,21 +178,21 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { return takeArray(&d->writeBuf, size, del); } //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { return d->writeBuf; } @@ -207,7 +207,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -218,9 +218,9 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/groupwise/libgroupwise/bytestream.h b/kopete/protocols/groupwise/libgroupwise/bytestream.h index b90f109d..f10b46a1 100644 --- a/kopete/protocols/groupwise/libgroupwise/bytestream.h +++ b/kopete/protocols/groupwise/libgroupwise/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include<qobject.h> -#include<qcstring.h> +#include<tqobject.h> +#include<tqcstring.h> // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp b/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp index adbb66de..3ee9b947 100644 --- a/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp +++ b/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp @@ -16,8 +16,8 @@ ************************************************************************* */ -#include <qmap.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqvaluelist.h> #include <kdebug.h> @@ -29,7 +29,7 @@ #include "chatroommanager.h" ChatroomManager::ChatroomManager( Client * parent, const char *name) - : QObject(parent, name), m_client( parent ), m_replace( false ) + : TQObject(parent, name), m_client( parent ), m_replace( false ) { } @@ -52,7 +52,7 @@ void ChatroomManager::getChatrooms( bool refresh ) m_replace = !refresh; SearchChatTask * sct = new SearchChatTask( m_client->rootTask() ); sct->search( ( refresh ? SearchChatTask::SinceLastSearch : SearchChatTask::FetchAll ) ); - connect( sct, SIGNAL( finished() ), SLOT( slotGotChatroomList() ) ); + connect( sct, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotChatroomList() ) ); sct->go( true ); } @@ -65,9 +65,9 @@ void ChatroomManager::slotGotChatroomList() if ( m_replace ) m_rooms.clear(); - QValueList<ChatroomSearchResult> roomsFound = sct->results(); - QValueList<ChatroomSearchResult>::Iterator it = roomsFound.begin(); - const QValueList<ChatroomSearchResult>::Iterator end = roomsFound.end(); + TQValueList<ChatroomSearchResult> roomsFound = sct->results(); + TQValueList<ChatroomSearchResult>::Iterator it = roomsFound.begin(); + const TQValueList<ChatroomSearchResult>::Iterator end = roomsFound.end(); for ( ; it != end; ++it ) { GroupWise::Chatroom c( *it ); @@ -80,7 +80,7 @@ void ChatroomManager::slotGotChatroomList() void ChatroomManager::updateCounts() { ChatCountsTask * cct = new ChatCountsTask( m_client->rootTask() ); - connect( cct, SIGNAL( finished() ), SLOT( slotGotChatCounts() ) ); + connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotChatCounts() ) ); cct->go( true ); } @@ -89,9 +89,9 @@ void ChatroomManager::slotGotChatCounts() ChatCountsTask * cct = (ChatCountsTask *)sender(); if ( cct ) { - QMap< QString, int > newCounts = cct->results(); - QMap< QString, int >::iterator it = newCounts.begin(); - const QMap< QString, int >::iterator end = newCounts.end(); + TQMap< TQString, int > newCounts = cct->results(); + TQMap< TQString, int >::iterator it = newCounts.begin(); + const TQMap< TQString, int >::iterator end = newCounts.end(); for ( ; it != end; ++it ) if ( m_rooms.contains( it.key() ) ) @@ -100,7 +100,7 @@ void ChatroomManager::slotGotChatCounts() emit updated(); } -void ChatroomManager::requestProperties( const QString & displayName ) +void ChatroomManager::requestProperties( const TQString & displayName ) { if ( 0 /*m_rooms.contains( displayName ) */) emit gotProperties( m_rooms[ displayName ] ); @@ -108,7 +108,7 @@ void ChatroomManager::requestProperties( const QString & displayName ) { ChatPropertiesTask * cpt = new ChatPropertiesTask( m_client->rootTask() ); cpt->setChat( displayName ); - connect ( cpt, SIGNAL( finished() ), SLOT( slotGotChatProperties() ) ); + connect ( cpt, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotChatProperties() ) ); cpt->go( true ); } } diff --git a/kopete/protocols/groupwise/libgroupwise/chatroommanager.h b/kopete/protocols/groupwise/libgroupwise/chatroommanager.h index 4d0e888b..5fff7b73 100644 --- a/kopete/protocols/groupwise/libgroupwise/chatroommanager.h +++ b/kopete/protocols/groupwise/libgroupwise/chatroommanager.h @@ -19,7 +19,7 @@ #ifndef CHATROOMMANAGER_H #define CHATROOMMANAGER_H -#include <qobject.h> +#include <tqobject.h> #include "gwchatrooms.h" @@ -36,7 +36,7 @@ class ChatroomManager : public QObject ChatroomManager( Client * client, const char *name = 0); ~ChatroomManager(); GroupWise::ChatroomMap rooms(); - void requestProperties( const QString & displayName ); + void requestProperties( const TQString & displayName ); void updateRooms(); void updateCounts(); signals: diff --git a/kopete/protocols/groupwise/libgroupwise/client.cpp b/kopete/protocols/groupwise/libgroupwise/client.cpp index 274a9ea8..1a88fbc3 100644 --- a/kopete/protocols/groupwise/libgroupwise/client.cpp +++ b/kopete/protocols/groupwise/libgroupwise/client.cpp @@ -19,8 +19,8 @@ ************************************************************************* */ -#include <qapplication.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "chatroommanager.h" #include "gwclientstream.h" @@ -53,8 +53,8 @@ public: ClientStream *stream; int id_seed; Task *root; - QString host, user, userDN, pass; - QString osname, tzname, clientName, clientVersion; + TQString host, user, userDN, pass; + TQString osname, tzname, clientName, clientVersion; uint port; /* int tzoffset;*/ bool active; @@ -63,12 +63,12 @@ public: UserDetailsManager * userDetailsMgr; PrivacyManager * privacyMgr; uint protocolVersion; - QValueList<GroupWise::CustomStatus> customStatuses; - QTimer * keepAliveTimer; + TQValueList<GroupWise::CustomStatus> customStatuses; + TQTimer * keepAliveTimer; }; -Client::Client(QObject *par, uint protocolVersion ) -:QObject(par, "groupwiseclient") +Client::Client(TQObject *par, uint protocolVersion ) +:TQObject(par, "groupwiseclient") { d = new ClientPrivate; /* d->tzoffset = 0;*/ @@ -85,8 +85,8 @@ Client::Client(QObject *par, uint protocolVersion ) d->stream = 0; d->protocolVersion = protocolVersion; // Sends regular keepalives so the server knows we are still running - d->keepAliveTimer = new QTimer( this ); - connect( d->keepAliveTimer, SIGNAL( timeout() ), SLOT( sendKeepAlive() ) ); + d->keepAliveTimer = new TQTimer( this ); + connect( d->keepAliveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( sendKeepAlive() ) ); } Client::~Client() @@ -100,32 +100,32 @@ Client::~Client() void Client::connectToServer( ClientStream *s, const NovellDN &server, bool auth ) { d->stream = s; - //connect(d->stream, SIGNAL(connected()), SLOT(streamConnected())); - //connect(d->stream, SIGNAL(handshaken()), SLOT(streamHandshaken())); - connect(d->stream, SIGNAL(error(int)), SLOT(streamError(int))); - //connect(d->stream, SIGNAL(sslCertificateReady(const QSSLCert &)), SLOT(streamSSLCertificateReady(const QSSLCert &))); - connect(d->stream, SIGNAL(readyRead()), SLOT(streamReadyRead())); - //connect(d->stream, SIGNAL(closeFinished()), SLOT(streamCloseFinished())); + //connect(d->stream, TQT_SIGNAL(connected()), TQT_SLOT(streamConnected())); + //connect(d->stream, TQT_SIGNAL(handshaken()), TQT_SLOT(streamHandshaken())); + connect(d->stream, TQT_SIGNAL(error(int)), TQT_SLOT(streamError(int))); + //connect(d->stream, TQT_SIGNAL(sslCertificateReady(const QSSLCert &)), TQT_SLOT(streamSSLCertificateReady(const QSSLCert &))); + connect(d->stream, TQT_SIGNAL(readyRead()), TQT_SLOT(streamReadyRead())); + //connect(d->stream, TQT_SIGNAL(closeFinished()), TQT_SLOT(streamCloseFinished())); d->stream->connectToServer(server, auth); } -void Client::setOSName(const QString &name) +void Client::setOSName(const TQString &name) { d->osname = name; } -void Client::setClientName(const QString &s) +void Client::setClientName(const TQString &s) { d->clientName = s; } -void Client::setClientVersion(const QString &s) +void Client::setClientVersion(const TQString &s) { d->clientVersion = s; } -void Client::start( const QString &host, const uint port, const QString &userId, const QString &pass ) +void Client::start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ) { d->host = host; d->port = port; @@ -136,27 +136,27 @@ void Client::start( const QString &host, const uint port, const QString &userId, LoginTask * login = new LoginTask( d->root ); - connect( login, SIGNAL( gotMyself( const GroupWise::ContactDetails & ) ), - this, SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails & ) ) ); + connect( login, TQT_SIGNAL( gotMyself( const GroupWise::ContactDetails & ) ), + this, TQT_SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails & ) ) ); - connect( login, SIGNAL( gotFolder( const FolderItem & ) ), - this, SIGNAL( folderReceived( const FolderItem & ) ) ); + connect( login, TQT_SIGNAL( gotFolder( const FolderItem & ) ), + this, TQT_SIGNAL( folderReceived( const FolderItem & ) ) ); - connect( login, SIGNAL( gotContact( const ContactItem & ) ), - this, SIGNAL( contactReceived( const ContactItem & ) ) ); + connect( login, TQT_SIGNAL( gotContact( const ContactItem & ) ), + this, TQT_SIGNAL( contactReceived( const ContactItem & ) ) ); - connect( login, SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), - this, SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ) ; + connect( login, TQT_SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), + this, TQT_SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ) ; - connect( login, SIGNAL( gotPrivacySettings( bool, bool, const QStringList &, const QStringList & ) ), - privacyManager(), SLOT( slotGotPrivacySettings( bool, bool, const QStringList &, const QStringList & ) ) ); + connect( login, TQT_SIGNAL( gotPrivacySettings( bool, bool, const TQStringList &, const TQStringList & ) ), + privacyManager(), TQT_SLOT( slotGotPrivacySettings( bool, bool, const TQStringList &, const TQStringList & ) ) ); - connect( login, SIGNAL( gotCustomStatus( const GroupWise::CustomStatus & ) ), - SLOT( lt_gotCustomStatus( const GroupWise::CustomStatus & ) ) ); + connect( login, TQT_SIGNAL( gotCustomStatus( const GroupWise::CustomStatus & ) ), + TQT_SLOT( lt_gotCustomStatus( const GroupWise::CustomStatus & ) ) ); - connect( login, SIGNAL( gotKeepalivePeriod( int ) ), SLOT( lt_gotKeepalivePeriod( int ) ) ); + connect( login, TQT_SIGNAL( gotKeepalivePeriod( int ) ), TQT_SLOT( lt_gotKeepalivePeriod( int ) ) ); - connect( login, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + connect( login, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); login->initialise(); login->go( true ); @@ -175,7 +175,7 @@ void Client::close() } } -QString Client::host() +TQString Client::host() { return d->host; } @@ -185,7 +185,7 @@ int Client::port() return d->port; } -QValueList<GroupWise::CustomStatus> Client::customStatuses() +TQValueList<GroupWise::CustomStatus> Client::customStatuses() { return d->customStatuses; } @@ -194,51 +194,51 @@ void Client::initialiseEventTasks() { // The StatusTask handles incoming status changes StatusTask * st = new StatusTask( d->root ); // FIXME - add an additional EventRoot? - connect( st, SIGNAL( gotStatus( const QString &, Q_UINT16, const QString & ) ), SIGNAL( statusReceived( const QString &, Q_UINT16, const QString & ) ) ); + connect( st, TQT_SIGNAL( gotStatus( const TQString &, Q_UINT16, const TQString & ) ), TQT_SIGNAL( statusReceived( const TQString &, Q_UINT16, const TQString & ) ) ); // The ConferenceTask handles incoming conference events, messages, joins, leaves, etc ConferenceTask * ct = new ConferenceTask( d->root ); - connect( ct, SIGNAL( message( const ConferenceEvent & ) ), SLOT( ct_messageReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( typing( const ConferenceEvent & ) ), SIGNAL( contactTyping( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( notTyping( const ConferenceEvent & ) ), SIGNAL( contactNotTyping( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( joined( const ConferenceEvent & ) ), SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( left( const ConferenceEvent & ) ), SIGNAL( conferenceLeft( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( invited( const ConferenceEvent & ) ), SIGNAL( invitationReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( otherInvited( const ConferenceEvent & ) ), SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( invitationDeclined( const ConferenceEvent & ) ), SIGNAL( invitationDeclined( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( closed( const ConferenceEvent & ) ), SIGNAL( conferenceClosed( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( autoReply( const ConferenceEvent & ) ), SIGNAL( autoReplyReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( broadcast( const ConferenceEvent & ) ), SIGNAL( broadcastReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( systemBroadcast( const ConferenceEvent & ) ), SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( message( const ConferenceEvent & ) ), TQT_SLOT( ct_messageReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( typing( const ConferenceEvent & ) ), TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( notTyping( const ConferenceEvent & ) ), TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( joined( const ConferenceEvent & ) ), TQT_SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( left( const ConferenceEvent & ) ), TQT_SIGNAL( conferenceLeft( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( invited( const ConferenceEvent & ) ), TQT_SIGNAL( invitationReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( otherInvited( const ConferenceEvent & ) ), TQT_SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( invitationDeclined( const ConferenceEvent & ) ), TQT_SIGNAL( invitationDeclined( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( closed( const ConferenceEvent & ) ), TQT_SIGNAL( conferenceClosed( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( autoReply( const ConferenceEvent & ) ), TQT_SIGNAL( autoReplyReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( broadcast( const ConferenceEvent & ) ), TQT_SIGNAL( broadcastReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( systemBroadcast( const ConferenceEvent & ) ), TQT_SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ) ); // The ConnectionTask handles incoming connection events ConnectionTask* cont = new ConnectionTask( d->root ); - connect( cont, SIGNAL( connectedElsewhere() ), SIGNAL( connectedElsewhere() ) ); + connect( cont, TQT_SIGNAL( connectedElsewhere() ), TQT_SIGNAL( connectedElsewhere() ) ); } -void Client::setStatus( GroupWise::Status status, const QString & reason, const QString & autoReply ) +void Client::setStatus( GroupWise::Status status, const TQString & reason, const TQString & autoReply ) { - debug( QString("Setting status to %1").arg( status ) );; + debug( TQString("Setting status to %1").arg( status ) );; SetStatusTask * sst = new SetStatusTask( d->root ); sst->status( status, reason, autoReply ); - connect( sst, SIGNAL( finished() ), this, SLOT( sst_statusChanged() ) ); + connect( sst, TQT_SIGNAL( finished() ), this, TQT_SLOT( sst_statusChanged() ) ); sst->go( true ); // TODO: set status change in progress flag } -void Client::requestStatus( const QString & userDN ) +void Client::requestStatus( const TQString & userDN ) { GetStatusTask * gst = new GetStatusTask( d->root ); gst->userDN( userDN ); - connect( gst, SIGNAL( gotStatus( const QString &, Q_UINT16, const QString & ) ), SIGNAL( statusReceived( const QString &, Q_UINT16, const QString & ) ) ); + connect( gst, TQT_SIGNAL( gotStatus( const TQString &, Q_UINT16, const TQString & ) ), TQT_SIGNAL( statusReceived( const TQString &, Q_UINT16, const TQString & ) ) ); gst->go( true ); } -void Client::sendMessage( const QStringList & addresseeDNs, const OutgoingMessage & message ) +void Client::sendMessage( const TQStringList & addresseeDNs, const OutgoingMessage & message ) { SendMessageTask * smt = new SendMessageTask( d->root ); smt->message( addresseeDNs, message ); - connect( smt, SIGNAL( finished() ), SLOT( smt_messageSent() ) ); + connect( smt, TQT_SIGNAL( finished() ), TQT_SLOT( smt_messageSent() ) ); smt->go( true ); } @@ -251,23 +251,23 @@ void Client::sendTyping( const GroupWise::ConferenceGuid & conferenceGuid, bool void Client::createConference( const int clientId ) { - QStringList dummy; + TQStringList dummy; createConference( clientId, dummy ); } -void Client::createConference( const int clientId, const QStringList & participants ) +void Client::createConference( const int clientId, const TQStringList & participants ) { CreateConferenceTask * cct = new CreateConferenceTask( d->root ); cct->conference( clientId, participants ); - connect( cct, SIGNAL( finished() ), SLOT( cct_conferenceCreated() ) ); + connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( cct_conferenceCreated() ) ); cct->go( true ); } -void Client::requestDetails( const QStringList & userDNs ) +void Client::requestDetails( const TQStringList & userDNs ) { GetDetailsTask * gdt = new GetDetailsTask( d->root ); gdt->userDNs( userDNs ); - connect( gdt, SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), - this, SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ); + connect( gdt, TQT_SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), + this, TQT_SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ); gdt->go( true ); } @@ -275,7 +275,7 @@ void Client::joinConference( const GroupWise::ConferenceGuid & guid ) { JoinConferenceTask * jct = new JoinConferenceTask( d->root ); jct->join( guid ); - connect( jct, SIGNAL( finished() ), SLOT( jct_joinConfCompleted() ) ); + connect( jct, TQT_SIGNAL( finished() ), TQT_SLOT( jct_joinConfCompleted() ) ); jct->go( true ); } @@ -291,14 +291,14 @@ void Client::leaveConference( const GroupWise::ConferenceGuid & guid ) { LeaveConferenceTask * lct = new LeaveConferenceTask( d->root ); lct->leave( guid ); - //connect( lct, SIGNAL( finished() ), SLOT( lct_leftConference() ) ); + //connect( lct, TQT_SIGNAL( finished() ), TQT_SLOT( lct_leftConference() ) ); lct->go( true ); } -void Client::sendInvitation( const GroupWise::ConferenceGuid & guid, const QString & dn, const GroupWise::OutgoingMessage & message ) +void Client::sendInvitation( const GroupWise::ConferenceGuid & guid, const TQString & dn, const GroupWise::OutgoingMessage & message ) { SendInviteTask * sit = new SendInviteTask( d->root ); - QStringList invitees( dn ); + TQStringList invitees( dn ); sit->invite( guid, dn, message ); sit->go( true ); } @@ -306,7 +306,7 @@ void Client::sendInvitation( const GroupWise::ConferenceGuid & guid, const QStri // SLOTS // void Client::streamError( int error ) { - debug( QString( "CLIENT ERROR (Error %1)" ).arg( error ) ); + debug( TQString( "CLIENT ERROR (Error %1)" ).arg( error ) ); } void Client::streamReadyRead() @@ -326,7 +326,7 @@ void Client::lt_loginFinished() debug( "Client::lt_loginFinished() LOGIN SUCCEEDED" ); // set our initial status SetStatusTask * sst = new SetStatusTask( d->root ); - sst->status( GroupWise::Available, QString::null, QString::null ); + sst->status( GroupWise::Available, TQString::null, TQString::null ); sst->go( true ); emit loggedIn(); // fetch details for any privacy list items that aren't in our contact list. @@ -357,17 +357,17 @@ void Client::ct_messageReceived( const ConferenceEvent & messageEvent ) debug( "parsing received message's RTF" ); ConferenceEvent transformedEvent = messageEvent; RTF2HTML parser; - QString rtf = messageEvent.message; + TQString rtf = messageEvent.message; if ( !rtf.isEmpty() ) transformedEvent.message = parser.Parse( rtf.latin1(), "" ); // fixes for RTF to HTML conversion problems // we can drop these once the server reenables the sending of unformatted text // redundant linebreak at the end of the message - QRegExp rx(" </span> </span> </span><br>$"); + TQRegExp rx(" </span> </span> </span><br>$"); transformedEvent.message.replace( rx, "</span></span></span>" ); // missing linebreak after first line of an encrypted message - QRegExp ry("-----BEGIN PGP MESSAGE----- </span> </span> </span>"); + TQRegExp ry("-----BEGIN PGP MESSAGE----- </span> </span> </span>"); transformedEvent.message.replace( ry, "-----BEGIN PGP MESSAGE-----</span></span></span><br/>" ); emit messageReceived( transformedEvent ); @@ -390,14 +390,14 @@ void Client::jct_joinConfCompleted() { const JoinConferenceTask * jct = ( JoinConferenceTask * )sender(); #ifdef LIBGW_DEBUG - debug( QString( "Joined conference %1, participants are: " ).arg( jct->guid() ) ); - QStringList parts = jct->participants(); - for ( QStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) - debug( QString( " - %1" ).arg(*it) ); + debug( TQString( "Joined conference %1, participants are: " ).arg( jct->guid() ) ); + TQStringList parts = jct->participants(); + for ( TQStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) + debug( TQString( " - %1" ).arg(*it) ); debug( "invitees are: " ); - QStringList invitees = jct->invitees(); - for ( QStringList::Iterator it = invitees.begin(); it != invitees.end(); ++it ) - debug( QString( " - %1" ).arg(*it) ); + TQStringList invitees = jct->invitees(); + for ( TQStringList::Iterator it = invitees.begin(); it != invitees.end(); ++it ) + debug( TQString( " - %1" ).arg(*it) ); #endif emit conferenceJoined( jct->guid(), jct->participants(), jct->invitees() ); } @@ -409,32 +409,32 @@ void Client::lt_gotCustomStatus( const GroupWise::CustomStatus & custom ) // INTERNALS // -QString Client::userId() +TQString Client::userId() { return d->user; } -void Client::setUserDN( const QString & userDN ) +void Client::setUserDN( const TQString & userDN ) { d->userDN = userDN; } -QString Client::userDN() +TQString Client::userDN() { return d->userDN; } -QString Client::password() +TQString Client::password() { return d->pass; } -QString Client::userAgent() +TQString Client::userAgent() { - return QString::fromLatin1( "%1/%2 (%3)" ).arg( d->clientName, d->clientVersion, d->osname ); + return TQString::fromLatin1( "%1/%2 (%3)" ).arg( d->clientName, d->clientVersion, d->osname ); } -QCString Client::ipAddress() +TQCString Client::ipAddress() { // TODO: remove hardcoding return "10.10.11.103"; @@ -456,14 +456,14 @@ void Client::send( Request * request ) debug( "CLIENT - NO STREAM TO SEND ON!"); return; } -// QString out = request.toString(); -// debug(QString("Client: outgoing: [\n%1]\n").arg(out)); +// TQString out = request.toString(); +// debug(TQString("Client: outgoing: [\n%1]\n").arg(out)); // xmlOutgoing(out); d->stream->write( request ); } -void Client::debug( const QString &str ) +void Client::debug( const TQString &str ) { #ifdef LIBGW_USE_KDEBUG kdDebug( GROUPWISE_DEBUG_LIBGW ) << "debug: " << str << endl; @@ -472,9 +472,9 @@ void Client::debug( const QString &str ) #endif } -QString Client::genUniqueId() +TQString Client::genUniqueId() { - QString s; + TQString s; s.sprintf("a%x", d->id_seed); d->id_seed += 0x10; return s; diff --git a/kopete/protocols/groupwise/libgroupwise/client.h b/kopete/protocols/groupwise/libgroupwise/client.h index 102b0c27..9cdb7c68 100644 --- a/kopete/protocols/groupwise/libgroupwise/client.h +++ b/kopete/protocols/groupwise/libgroupwise/client.h @@ -21,7 +21,7 @@ #ifndef LIBGW_CLIENT_H #define LIBGW_CLIENT_H -#include <qstring.h> +#include <tqstring.h> #include "gwclientstream.h" #include "gwerror.h" @@ -46,12 +46,12 @@ Q_OBJECT EXTERNAL API *************/ - Client( QObject *parent = 0, uint protocolVersion = 2 ); + Client( TQObject *parent = 0, uint protocolVersion = 2 ); ~Client(); - void setOSName( const QString &name ); - void setClientName( const QString &s ); - void setClientVersion( const QString &s ); - void setUserDN( const QString & userDN ); + void setOSName( const TQString &name ); + void setClientName( const TQString &s ); + void setClientVersion( const TQString &s ); + void setUserDN( const TQString & userDN ); /** * Start a connection to the server using the supplied @ref ClientStream. * This is only a transport layer connection. @@ -69,11 +69,11 @@ Q_OBJECT * @param user The user name to log in as. fd * @param password */ - void start( const QString &host, const uint port, const QString &userId, const QString &pass ); + void start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ); /** * Logout and disconnect - * Protocol action P4 void distribute(const QDomElement &); + * Protocol action P4 void distribute(const TQDomElement &); */ void close(); @@ -81,7 +81,7 @@ fd * @param password /** * Accessors needed for login */ - QString host(); + TQString host(); int port(); /** @@ -91,14 +91,14 @@ fd * @param password * @param reason custom status name for away statuses * @param autoReply auto reply message for use in this status */ - void setStatus( GroupWise::Status status, const QString & reason, const QString & autoReply ); + void setStatus( GroupWise::Status status, const TQString & reason, const TQString & autoReply ); /** * Send a message * Protocol action P10 * @param message contains the text and the recipient. */ - void sendMessage( const QStringList & addresseeDNs, const OutgoingMessage & message ); + void sendMessage( const TQStringList & addresseeDNs, const OutgoingMessage & message ); /** * Send a typing notification @@ -112,12 +112,12 @@ fd * @param password * Request details for one or more users, for example, if we receive a message from someone who isn't on our contact list * @param userDNs A list of one or more user's DNs to fetch details for */ - void requestDetails( const QStringList & userDNs ); + void requestDetails( const TQStringList & userDNs ); /** * Request the status of a single user, for example, if they have messaged us and are not on our contact list */ - void requestStatus( const QString & userDN ); + void requestStatus( const TQString & userDN ); /** * Add a contact to the contact list @@ -137,7 +137,7 @@ fd * @param password /** * Overloaded version of the above to create a conference with a supplied list of invitees */ - void createConference( const int clientId, const QStringList & participants ); + void createConference( const int clientId, const TQStringList & participants ); /** * Join a conference, accepting an invitation @@ -161,7 +161,7 @@ fd * @param password * Send an invitation to join a conference * Protocol action P9 */ - void sendInvitation( const ConferenceGuid & guid, const QString & dn, const GroupWise::OutgoingMessage & message ); + void sendInvitation( const ConferenceGuid & guid, const TQString & dn, const GroupWise::OutgoingMessage & message ); /************* INTERNAL (FOR USE BY TASKS) METHODS *************/ @@ -172,7 +172,7 @@ fd * @param password /** * Print a debug statement */ - void debug( const QString &str ); + void debug( const TQString &str ); /** * The protocol version of the Client @@ -181,36 +181,36 @@ fd * @param password /** * Generate a unique ID for Tasks. */ - QString genUniqueId(); + TQString genUniqueId(); /** * The current user's user ID */ - QString userId(); + TQString userId(); /** * The current user's DN */ - QString userDN(); + TQString userDN(); /** * The current user's password */ - QString password(); + TQString password(); /** * User agent details for this host */ - QString userAgent(); + TQString userAgent(); /** * Host's IP address */ - QCString ipAddress(); + TQCString ipAddress(); /** * Obtain the list of custom statuses stored on the server */ - QValueList<GroupWise::CustomStatus> customStatuses(); + TQValueList<GroupWise::CustomStatus> customStatuses(); /** * Get a reference to the RequestFactory for this Client. @@ -276,11 +276,11 @@ fd * @param password /** * A remote contact changed status */ - void statusReceived( const QString & contactId, Q_UINT16 status, const QString & statusText ); + void statusReceived( const TQString & contactId, Q_UINT16 status, const TQString & statusText ); /** * Our status changed on the server */ - void ourStatusChanged( GroupWise::Status status, const QString & statusText, const QString & autoReply ); + void ourStatusChanged( GroupWise::Status status, const TQString & statusText, const TQString & autoReply ); /** CONFERENCE (MANAGEMENT) EVENTS */ /** @@ -324,7 +324,7 @@ fd * @param password /** * We joined a conference. */ - void conferenceJoined( const GroupWise::ConferenceGuid &, const QStringList &, const QStringList & ); + void conferenceJoined( const GroupWise::ConferenceGuid &, const TQStringList &, const TQStringList & ); /** * We received an "is typing" event in a conference */ diff --git a/kopete/protocols/groupwise/libgroupwise/connector.cpp b/kopete/protocols/groupwise/libgroupwise/connector.cpp index 55e866ee..57e4d222 100644 --- a/kopete/protocols/groupwise/libgroupwise/connector.cpp +++ b/kopete/protocols/groupwise/libgroupwise/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setUseSSL(false); setPeerAddressNone(); @@ -41,7 +41,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -59,11 +59,11 @@ void Connector::setUseSSL(bool b) void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/groupwise/libgroupwise/connector.h b/kopete/protocols/groupwise/libgroupwise/connector.h index 1cae3426..b1c31743 100644 --- a/kopete/protocols/groupwise/libgroupwise/connector.h +++ b/kopete/protocols/groupwise/libgroupwise/connector.h @@ -21,8 +21,8 @@ #ifndef LIBGW_CONNECTOR_H #define LIBGW_CONNECTOR_H -#include <qhostaddress.h> -#include <qobject.h> +#include <tqhostaddress.h> +#include <tqobject.h> class ByteStream; @@ -30,16 +30,16 @@ class Connector : public QObject { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool useSSL() const; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -49,12 +49,12 @@ signals: protected: void setUseSSL(bool b); void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool ssl; bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; diff --git a/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp b/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp index 1e15287e..4c811eba 100644 --- a/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp +++ b/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp @@ -24,9 +24,9 @@ #include <iostream> #include <stdlib.h> -#include <qdatastream.h> -#include <qdatetime.h> -#include <qtextstream.h> +#include <tqdatastream.h> +#include <tqdatetime.h> +#include <tqtextstream.h> #include <kdebug.h> @@ -62,7 +62,7 @@ url_escape_string( const char *src) static const char hex_table[17] = "0123456789abcdef"; if (src == NULL) { - return QCString(); + return TQCString(); } /* Find number of chars to escape */ @@ -73,7 +73,7 @@ url_escape_string( const char *src) } } - QCString encoded((p - src) + (escape * 2) + 1); + TQCString encoded((p - src) + (escape * 2) + 1); /* Escape the string */ for (p = src, q = 0; *p != '\0'; p++) { @@ -102,7 +102,7 @@ url_escape_string( const char *src) return encoded; } -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_eventProtocol = new EventProtocol( this, "eventprotocol" ); m_responseProtocol = new ResponseProtocol( this, "responseprotocol" ); @@ -117,7 +117,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::debug( const QString &str ) +void CoreProtocol::debug( const TQString &str ) { #ifdef LIBGW_USE_KDEBUG kdDebug( 14191 ) << "debug: " << str << endl; @@ -126,7 +126,7 @@ void CoreProtocol::debug( const QString &str ) #endif } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { // store locally debug( "CoreProtocol::addIncomingData()"); @@ -142,13 +142,13 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) while ( m_in.size() && ( parsedBytes = wireToTransfer( m_in ) ) ) { transferCount++; - debug( QString( "CoreProtocol::addIncomingData() - parsed transfer #%1 in chunk" ).arg( transferCount ) ); + debug( TQString( "CoreProtocol::addIncomingData() - parsed transfer #%1 in chunk" ).arg( transferCount ) ); int size = m_in.size(); if ( parsedBytes < size ) { debug( " - more data in chunk!" ); // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -182,10 +182,10 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef LIBGW_DEBUG - CoreProtocol::debug( QString( "contains: %1 bytes" ).arg( bytes.count() ) ); + CoreProtocol::debug( TQString( "contains: %1 bytes" ).arg( bytes.count() ) ); for ( uint i = 0; i < bytes.count(); ++i ) { printf( "%02x ", bytes[ i ] ); @@ -214,19 +214,19 @@ void CoreProtocol::outgoingTransfer( Request* outgoing ) fields.append( fld ); // convert to QByteArray - QByteArray bytesOut; - QTextStream dout( bytesOut, IO_WriteOnly ); - dout.setEncoding( QTextStream::Latin1 ); - //dout.setByteOrder( QDataStream::LittleEndian ); + TQByteArray bytesOut; + TQTextStream dout( bytesOut, IO_WriteOnly ); + dout.setEncoding( TQTextStream::Latin1 ); + //dout.setByteOrder( TQDataStream::LittleEndian ); // strip out any embedded host and port in the command string - QCString command, host, port; + TQCString command, host, port; if ( request->command().section( ':', 0, 0 ) == "login" ) { command = "login"; host = request->command().section( ':', 1, 1 ).ascii(); port = request->command().section( ':', 2, 2 ).ascii(); - debug( QString( "Host: %1 Port: %2" ).arg( host.data() ).arg( port.data() ) ); + debug( TQString( "Host: %1 Port: %2" ).arg( host.data() ).arg( port.data() ) ); } else command = request->command().ascii(); @@ -246,7 +246,7 @@ void CoreProtocol::outgoingTransfer( Request* outgoing ) else dout << "\r\n"; - debug( QString( "data out: %1" ).arg( bytesOut.data() ) ); + debug( TQString( "data out: %1" ).arg( bytesOut.data() ) ); emit outgoingData( bytesOut ); // now convert @@ -261,7 +261,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) debug( "CoreProtocol::fieldsToWire()"); int subFieldCount = 0; - // TODO: consider constructing this as a QStringList and then join()ing it. + // TODO: consider constructing this as a TQStringList and then join()ing it. Field::FieldListIterator it; Field::FieldListIterator end = fields.end(); Field::FieldBase* field; @@ -269,9 +269,9 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) { field = *it; //debug( " - writing a field" ); - QByteArray bytesOut; - QDataStream dout( bytesOut, IO_WriteOnly ); - dout.setByteOrder( QDataStream::LittleEndian ); + TQByteArray bytesOut; + TQDataStream dout( bytesOut, IO_WriteOnly ); + dout.setByteOrder( TQDataStream::LittleEndian ); // these fields are ignored by Gaim's novell if ( field->type() == NMFIELD_TYPE_BINARY || field->method() == NMFIELD_METHOD_IGNORE ) @@ -299,7 +299,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) { //debug( " - it's a single string" ); const Field::SingleField *sField = static_cast<const Field::SingleField*>( field ); -// QString encoded = KURL::encode_string( sField->value().toString(), 106 /* UTF-8 */); +// TQString encoded = KURL::encode_string( sField->value().toString(), 106 /* UTF-8 */); // encoded.replace( "%20", "+" ); // dout << encoded.ascii(); @@ -313,7 +313,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) //debug( " - it's a multi" ); const Field::MultiField *mField = static_cast<const Field::MultiField*>( field ); subFieldCount = mField->fields().count(); // determines if we have a subarray to send after this field - //dout << QString::number( subFieldCount ).ascii(); + //dout << TQString::number( subFieldCount ).ascii(); snprintf( valString, NMFIELD_MAX_STR_LENGTH, "%u", subFieldCount ); break; } @@ -321,7 +321,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) { //debug( " - it's a number" ); const Field::SingleField *sField = static_cast<const Field::SingleField*>( field ); - //dout << QString::number( sField->value().toInt() ).ascii(); + //dout << TQString::number( sField->value().toInt() ).ascii(); snprintf( valString, NMFIELD_MAX_STR_LENGTH, "%u", sField->value().toInt() ); } } @@ -329,15 +329,15 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) // type //dout.writeRawBytes( GW_URLVAR_TYPE, sizeof( GW_URLVAR_TYPE ) ); - //dout << QString::number( field->type() ).ascii(); - QCString typeString; + //dout << TQString::number( field->type() ).ascii(); + TQCString typeString; typeString.setNum( field->type() ); - QCString outgoing = GW_URLVAR_TAG + field->tag() + TQCString outgoing = GW_URLVAR_TAG + field->tag() + GW_URLVAR_METHOD + (char)encode_method( field->method() ) + GW_URLVAR_VAL + (const char *)valString + GW_URLVAR_TYPE + typeString; - debug( QString( "CoreProtocol::fieldsToWire - outgoing data: %1" ).arg( outgoing.data() ) ); + debug( TQString( "CoreProtocol::fieldsToWire - outgoing data: %1" ).arg( outgoing.data() ) ); dout.writeRawBytes( outgoing.data(), outgoing.length() ); // write what we have so far, we may be calling this function recursively //kdDebug( 14999 ) << k_funcinfo << "writing \'" << bout << "\'" << endl; @@ -356,9 +356,9 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) if ( depth == 0 ) // this call to the function was not recursive, so the entire request has been sent at this point { // very important, don't send put the \r\n on the wire as a string or it will be preceded with the string length and 0 terminated, which the server reads as a request to disconnect. - QByteArray bytesOut; - QDataStream dout( bytesOut, IO_WriteOnly ); - dout.setByteOrder( QDataStream::LittleEndian ); + TQByteArray bytesOut; + TQDataStream dout( bytesOut, IO_WriteOnly ); + dout.setByteOrder( TQDataStream::LittleEndian ); dout.writeRawBytes( "\r\n", 2 ); emit outgoingData( bytesOut ); debug( "CoreProtocol::fieldsToWire - request completed" ); @@ -366,13 +366,13 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) //debug( " - method done" ); } -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { // processing incoming data and reassembling it into transfers // may be an event or a response uint bytesParsed = 0; - m_din = new QDataStream( wire, IO_ReadOnly ); - m_din->setByteOrder( QDataStream::LittleEndian ); + m_din = new TQDataStream( wire, IO_ReadOnly ); + m_din->setByteOrder( TQDataStream::LittleEndian ); // look at first four bytes and decide what to do with the chunk Q_UINT32 val; @@ -398,12 +398,12 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) } else // otherwise -> Event code { - debug( QString( "CoreProtocol::wireToTransfer() - looks like an EVENT: %1, length %2" ).arg( val ).arg( wire.size() ) ); + debug( TQString( "CoreProtocol::wireToTransfer() - looks like an EVENT: %1, length %2" ).arg( val ).arg( wire.size() ) ); Transfer * t = m_eventProtocol->parse( wire, bytesParsed ); if ( t ) { m_inTransfer = t; - debug( QString( "CoreProtocol::wireToTransfer() - got an EVENT: %1, parsed: %2" ).arg( val ).arg( bytesParsed ) ); + debug( TQString( "CoreProtocol::wireToTransfer() - got an EVENT: %1, parsed: %2" ).arg( val ).arg( bytesParsed ) ); m_state = Available; emit incomingData(); } @@ -423,9 +423,9 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -QChar CoreProtocol::encode_method( Q_UINT8 method ) +TQChar CoreProtocol::encode_method( Q_UINT8 method ) { - QChar str; + TQChar str; switch (method) { case NMFIELD_METHOD_EQUAL: @@ -484,9 +484,9 @@ QChar CoreProtocol::encode_method( Q_UINT8 method ) return str; } -void CoreProtocol::slotOutgoingData( const QCString &out ) +void CoreProtocol::slotOutgoingData( const TQCString &out ) { - debug( QString( "CoreProtocol::slotOutgoingData() %1" ).arg( out ) ); + debug( TQString( "CoreProtocol::slotOutgoingData() %1" ).arg( out ) ); } bool CoreProtocol::okToProceed() diff --git a/kopete/protocols/groupwise/libgroupwise/coreprotocol.h b/kopete/protocols/groupwise/libgroupwise/coreprotocol.h index 4cd30b88..e9a14122 100644 --- a/kopete/protocols/groupwise/libgroupwise/coreprotocol.h +++ b/kopete/protocols/groupwise/libgroupwise/coreprotocol.h @@ -21,9 +21,9 @@ #ifndef GW_CORE_PROTOCOL_H #define GW_CORE_PROTOCOL_H -#include <qcstring.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqcstring.h> +#include <tqobject.h> +#include <tqptrlist.h> #include "gwfield.h" @@ -124,7 +124,7 @@ public: /** * Debug output */ - static void debug(const QString &str); + static void debug(const TQString &str); /** * Reset the protocol, clear buffers @@ -135,7 +135,7 @@ public: * Accept data from the network, and buffer it into a useful message * @param incomingBytes Raw data in wire format. */ - void addIncomingData( const QByteArray& incomingBytes ); + void addIncomingData( const TQByteArray& incomingBytes ); /** * @return the incoming transfer or 0 if none is available. @@ -157,7 +157,7 @@ signals: /** * Emitted as the core protocol converts fields to wire ready data */ - void outgoingData( const QByteArray& ); + void outgoingData( const TQByteArray& ); /** * Emitted when there is incoming data, parsed into a Transfer */ @@ -166,7 +166,7 @@ protected slots: /** * Just a debug method to test emitting to the socket, atm - should go to the ClientStream */ - void slotOutgoingData( const QCString & ); + void slotOutgoingData( const TQCString & ); protected: /** @@ -177,7 +177,7 @@ protected: * Convert incoming wire data into a Transfer object and queue it * @return number of bytes from the input that were parsed into a Transfer */ - int wireToTransfer( const QByteArray& wire ); + int wireToTransfer( const TQByteArray& wire ); /** * Convert fields to a wire representation. Emits outgoingData as each field is written. * Calls itself recursively to process nested fields, hence @@ -187,10 +187,10 @@ protected: /** * encodes a method number (usually supplied as a #defined symbol) to a char */ - QChar encode_method( Q_UINT8 method ); + TQChar encode_method( Q_UINT8 method ); private: - QByteArray m_in; // buffer containing unprocessed bytes we received - QDataStream* m_din; // contains the packet currently being parsed + TQByteArray m_in; // buffer containing unprocessed bytes we received + TQDataStream* m_din; // contains the packet currently being parsed int m_error; Transfer* m_inTransfer; // the transfer that is being received int m_state; // represents the protocol's overall state diff --git a/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp b/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp index 05320676..da8025b7 100644 --- a/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp +++ b/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include <qbuffer.h> +#include <tqbuffer.h> #include "gwerror.h" @@ -25,7 +25,7 @@ using namespace GroupWise; -EventProtocol::EventProtocol(QObject *parent, const char *name) +EventProtocol::EventProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -34,14 +34,14 @@ EventProtocol::~EventProtocol() { } -Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) +Transfer * EventProtocol::parse( const TQByteArray & wire, uint& bytes ) { m_bytes = 0; - //m_din = new QDataStream( wire, IO_ReadOnly ); - QBuffer inBuf( wire ); + //m_din = new TQDataStream( wire, IO_ReadOnly ); + TQBuffer inBuf( wire ); inBuf.open( IO_ReadOnly); m_din.setDevice( &inBuf ); - m_din.setByteOrder( QDataStream::LittleEndian ); + m_din.setByteOrder( TQDataStream::LittleEndian ); Q_UINT32 type; if ( !okToProceed() ) @@ -53,16 +53,16 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) m_din >> type; m_bytes += sizeof( Q_UINT32 ); - debug( QString( "EventProtocol::parse() Reading event of type %1" ).arg( type ) ); + debug( TQString( "EventProtocol::parse() Reading event of type %1" ).arg( type ) ); if ( type > Stop ) { - debug( QString ( "EventProtocol::parse() - found unexpected event type %1 - assuming out of sync" ).arg( type ) ); + debug( TQString ( "EventProtocol::parse() - found unexpected event type %1 - assuming out of sync" ).arg( type ) ); m_state = OutOfSync; return 0; } // read the event source - QString source; + TQString source; if ( !readString( source ) ) { m_din.unsetDevice(); @@ -71,15 +71,15 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) // now create an event object //HACK: lowercased DN - EventTransfer * tentative = new EventTransfer( type, source.lower(), QDateTime::currentDateTime() ); + EventTransfer * tentative = new EventTransfer( type, source.lower(), TQDateTime::currentDateTime() ); // add any additional data depending on the type of event // Note: if there are any errors in the way the data is read below, we will soon be OutOfSync - QString statusText; - QString guid; + TQString statusText; + TQString guid; Q_UINT16 status; Q_UINT32 flags; - QString message; + TQString message; switch ( type ) { @@ -96,9 +96,9 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) m_din.unsetDevice(); return 0; } - debug( QString( "got status: %1").arg( status ) ); + debug( TQString( "got status: %1").arg( status ) ); tentative->setStatus( status ); - debug( QString( "tentative status: %1").arg( tentative->status() ) ); + debug( TQString( "tentative status: %1").arg( tentative->status() ) ); tentative->setStatusText( statusText ); break; case ConferenceJoined: // 106 - GUID + FLAGS @@ -191,7 +191,7 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) tentative->setMessage( message ); break; default: - debug( QString( "EventProtocol::parse() - found unexpected event type %1" ).arg( type ) ); + debug( TQString( "EventProtocol::parse() - found unexpected event type %1" ).arg( type ) ); break; } // if we got this far, the parse succeeded, return the Transfer diff --git a/kopete/protocols/groupwise/libgroupwise/eventprotocol.h b/kopete/protocols/groupwise/libgroupwise/eventprotocol.h index 4f6d94e5..cb9fe204 100644 --- a/kopete/protocols/groupwise/libgroupwise/eventprotocol.h +++ b/kopete/protocols/groupwise/libgroupwise/eventprotocol.h @@ -32,7 +32,7 @@ class EventTransfer; Ablauf: CoreProtocol receives data in addIncomingData, and passes to wireToTransfer. wireToTransfer detects an event. - Passes whole chunk to EventProtocol ( as QByteArray ) + Passes whole chunk to EventProtocol ( as TQByteArray ) In to EventProtocol - QByteArray Returned from EventProtocol - EventTransfer *, bytes read, set state? EventProtocol tries to parse data into eventTransfer @@ -50,7 +50,7 @@ class EventTransfer; All Events contain an event code, and a source ( a DN ) NOTHANDLED indicates that there is no further data and we don't handle events of that type, because they are not sent by the server NONE indicates there is no further data - STATUSTEXT, GUID, MESSAGE indicate a string encoded in the usual GroupWise binary string encoding: a UINT32 containing the string length in little-endian, followed by the string itself, as UTF-8 encoded unicode. The string length value includes a terminating NUL, so when converting to a QString, subtract one from the string length. + STATUSTEXT, GUID, MESSAGE indicate a string encoded in the usual GroupWise binary string encoding: a UINT32 containing the string length in little-endian, followed by the string itself, as UTF-8 encoded unicode. The string length value includes a terminating NUL, so when converting to a TQString, subtract one from the string length. FLAGS contains a UINT32 containing the server's flags for this conference. See gwerror.h for the possible values and meanings of these flags. Only Logging has been observed in practice. All events are timestamped with the local time on receipt. @@ -110,7 +110,7 @@ class EventProtocol : public InputProtocolBase { Q_OBJECT public: - EventProtocol(QObject *parent = 0, const char *name = 0); + EventProtocol(TQObject *parent = 0, const char *name = 0); ~EventProtocol(); /** * Attempt to parse the supplied data into an @ref EventTransfer object. @@ -119,7 +119,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an EventTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); protected: /** * Reads a conference's flags diff --git a/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp b/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp index 06178f21..fb3f3101 100644 --- a/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp +++ b/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp @@ -17,7 +17,7 @@ #include "eventtransfer.h" -EventTransfer::EventTransfer( const Q_UINT32 eventType, const QString & source, QDateTime timeStamp ) +EventTransfer::EventTransfer( const Q_UINT32 eventType, const TQString & source, TQDateTime timeStamp ) : Transfer(), m_eventType( eventType ), m_source( source ), m_timeStamp( timeStamp ) { m_contentFlags |= ( EventType | Source | TimeStamp ); @@ -77,12 +77,12 @@ int EventTransfer::eventType() return m_eventType; } -QString EventTransfer::source() +TQString EventTransfer::source() { return m_source; } -QDateTime EventTransfer::timeStamp() +TQDateTime EventTransfer::timeStamp() { return m_timeStamp; } @@ -97,7 +97,7 @@ Q_UINT32 EventTransfer::flags() return m_flags; } -QString EventTransfer::message() +TQString EventTransfer::message() { return m_message; } @@ -107,7 +107,7 @@ Q_UINT16 EventTransfer::status() return m_status; } -QString EventTransfer::statusText() +TQString EventTransfer::statusText() { return m_statusText; } @@ -125,7 +125,7 @@ void EventTransfer::setFlags( const Q_UINT32 flags ) m_flags = flags; } -void EventTransfer::setMessage( const QString & message ) +void EventTransfer::setMessage( const TQString & message ) { m_contentFlags |= Message; m_message = message; @@ -137,7 +137,7 @@ void EventTransfer::setStatus( const Q_UINT16 inStatus ) m_status = inStatus; } -void EventTransfer::setStatusText( const QString & statusText ) +void EventTransfer::setStatusText( const TQString & statusText ) { m_contentFlags |= StatusText; m_statusText = statusText; diff --git a/kopete/protocols/groupwise/libgroupwise/eventtransfer.h b/kopete/protocols/groupwise/libgroupwise/eventtransfer.h index 335d4593..d044fb55 100644 --- a/kopete/protocols/groupwise/libgroupwise/eventtransfer.h +++ b/kopete/protocols/groupwise/libgroupwise/eventtransfer.h @@ -18,8 +18,8 @@ #ifndef GW_EVENTTRANSFER_H #define GW_EVENTTRANSFER_H -#include <qcstring.h> -#include <qdatetime.h> +#include <tqcstring.h> +#include <tqdatetime.h> #include "gwerror.h" @@ -55,7 +55,7 @@ public: * @param source the user generating the event. * @param timeStamp the time at which the event was received. */ - EventTransfer( const Q_UINT32 eventType, const QString & source, QDateTime timeStamp ); + EventTransfer( const Q_UINT32 eventType, const TQString & source, TQDateTime timeStamp ); ~EventTransfer(); /** * Access the bitmask that describes the transfer's contents. Use @ref Contents to determine what it contains @@ -78,33 +78,33 @@ public: */ TransferType type() { return Transfer::EventTransfer; } int eventType(); - QString source(); - QDateTime timeStamp(); + TQString source(); + TQDateTime timeStamp(); GroupWise::ConferenceGuid guid(); Q_UINT32 flags(); - QString message(); + TQString message(); Q_UINT16 status(); - QString statusText(); + TQString statusText(); /** * Mutators to set the transfer's contents */ void setGuid( const GroupWise::ConferenceGuid & guid ); void setFlags( const Q_UINT32 flags ); - void setMessage( const QString & message ); + void setMessage( const TQString & message ); void setStatus( const Q_UINT16 status ); - void setStatusText( const QString & statusText); + void setStatusText( const TQString & statusText); private: Q_UINT32 m_contentFlags; int m_eventType; - QString m_source; - QDateTime m_timeStamp; + TQString m_source; + TQDateTime m_timeStamp; GroupWise::ConferenceGuid m_guid; Q_UINT32 m_flags; - QString m_message; + TQString m_message; Q_UINT16 m_status; - QString m_statusText; + TQString m_statusText; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h b/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h index 207531bb..4e73955a 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h +++ b/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h @@ -16,8 +16,8 @@ ************************************************************************* */ -#include <qdatetime.h> -#include <qvaluelist.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> #ifndef GROUPWISE_CHATROOMS_H #define GROUPWISE_CHATROOMS_H @@ -28,15 +28,15 @@ namespace GroupWise class ChatContact { public: - QString dn; + TQString dn; uint chatRights; }; -typedef QValueList<GroupWise::ChatContact> ChatContactList; +typedef TQValueList<GroupWise::ChatContact> ChatContactList; struct ChatroomSearchResult { - QString name; - QString ownerDN; + TQString name; + TQString ownerDN; uint participants; }; @@ -46,19 +46,19 @@ class Chatroom public: enum UserStatus { Participating, NotParticipating }; enum Rights { Read = 1, Write = 2, Modify = 4, Moderator = 8, Owner = 16 }; - QString creatorDN; - QString description; - QString disclaimer; - QString displayName; - QString objectId; - QString ownerDN; - QString query; - QString topic; + TQString creatorDN; + TQString description; + TQString disclaimer; + TQString displayName; + TQString objectId; + TQString ownerDN; + TQString query; + TQString topic; bool archive; uint maxUsers; uint chatRights; UserStatus userStatus; - QDateTime createdOn; + TQDateTime createdOn; uint participantsCount; // haveParticipants, Acl, Invites indicate if we have obtained these lists from the server, so we can tell 'not fetched list' and 'fetched empty list' apart. bool haveParticipants; @@ -72,7 +72,7 @@ class Chatroom Chatroom( ChatroomSearchResult csr ) { archive = false; maxUsers = 0; chatRights = 0; participantsCount = csr.participants; haveParticipants = false; haveAcl = false; haveInvites = false; ownerDN = csr.ownerDN; displayName = csr.name; } }; -typedef QValueList<Chatroom> ChatroomList; -typedef QMap<QString, Chatroom> ChatroomMap; +typedef TQValueList<Chatroom> ChatroomList; +typedef TQMap<TQString, Chatroom> ChatroomMap; } #endif diff --git a/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp b/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp index 7d58de93..5d964ad0 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp +++ b/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp @@ -19,8 +19,8 @@ ************************************************************************* */ -//#include<qtextstream.h> -//#include<qguardedptr.h> +//#include<tqtextstream.h> +//#include<tqguardedptr.h> // #include<qca.h> // #include<stdlib.h> // #include"bytestream.h" @@ -30,11 +30,11 @@ // #include"securestream.h" // #include"protocol.h" -#include <qapplication.h> // for qdebug -#include <qguardedptr.h> -#include <qobject.h> -#include <qptrqueue.h> -#include <qtimer.h> +#include <tqapplication.h> // for qdebug +#include <tqguardedptr.h> +#include <tqobject.h> +#include <tqptrqueue.h> +#include <tqtimer.h> #include "bytestream.h" #include "connector.h" @@ -49,7 +49,7 @@ //#define LIBGW_DEBUG 1 -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -101,14 +101,14 @@ public: } NovellDN id; - QString server; + TQString server; bool oldOnly; bool allowPlain, mutualAuth; bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; // int minimumSSF, maximumSSF; -// QString sasl_mech; +// TQString sasl_mech; bool doBinding; bool in_rrsig; @@ -122,7 +122,7 @@ public: CoreProtocol client; //CoreProtocol srv; - QString defRealm; + TQString defRealm; int mode; int state; @@ -132,30 +132,30 @@ public: bool tls_warned, using_tls; bool doAuth; -// QStringList sasl_mechlist; +// TQStringList sasl_mechlist; int errCond; - QString errText; + TQString errText; - QPtrQueue<Transfer> in; + TQPtrQueue<Transfer> in; - QTimer noopTimer; // probably not needed + TQTimer noopTimer; // probably not needed int noop_time; }; -ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, QObject *parent) +ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *parent) :Stream(parent) { d = new Private; d->mode = Client; d->conn = conn; - connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) ); - connect( d->conn, SIGNAL(error()), SLOT(cr_error()) ); - connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) ); - connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) ); + connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) ); + connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) ); + connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) ); + connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) ); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); d->tlsHandler = tlsHandler; // all the extra stuff happening in the larger ctor happens at connect time :) } @@ -250,7 +250,7 @@ bool ClientStream::isAuthenticated() const return (d->state == Active); } -// void ClientStream::setPassword(const QString &s) +// void ClientStream::setPassword(const TQString &s) // { // if(d->client.old) { // d->client.setPassword(s); @@ -261,7 +261,7 @@ bool ClientStream::isAuthenticated() const // } // } -// void ClientStream::setRealm(const QString &s) +// void ClientStream::setRealm(const TQString &s) // { // if(d->sasl) // d->sasl->setRealm(s); @@ -295,7 +295,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start(d->noop_time); } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -307,12 +307,12 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } -// QDomElement ClientStream::errorAppSpec() const +// TQDomElement ClientStream::errorAppSpec() const // { // return d->errAppSpec;cr_error // } @@ -374,11 +374,11 @@ void ClientStream::write( Request *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { //#define GW_CLIENTSTREAM_DEBUG 1 #ifdef GW_CLIENTSTREAM_DEBUG - CoreProtocol::debug( QString( "contains: %1 bytes " ).arg( bytes.count() ) ); + CoreProtocol::debug( TQString( "contains: %1 bytes " ).arg( bytes.count() ) ); uint count = 0; while ( count < bytes.count() ) { @@ -418,7 +418,7 @@ void cs_dump( const QByteArray &bytes ) #endif } -void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes ) +void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes ) { // take formatted bytes from CoreProtocol and put them on the wire #ifdef LIBGW_DEBUG @@ -440,23 +440,23 @@ void ClientStream::cp_incomingData() emit doReadyRead(); } else - CoreProtocol::debug( QString( " - client signalled incomingData but none was available, state is: %1" ).arg( d->client.state() ) ); + CoreProtocol::debug( TQString( " - client signalled incomingData but none was available, state is: %1" ).arg( d->client.state() ) ); } void ClientStream::cr_connected() { d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); d->ss = new SecureStream(d->bs); - connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead())); - connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int))); - connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken())); - connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed())); - connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int))); + connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead())); + connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int))); + connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken())); + connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed())); + connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int))); //d->client.startDialbackOut("andbit.net", "im.pyxa.org"); //d->client.startServerOut(d->server); @@ -474,7 +474,7 @@ void ClientStream::cr_connected() d->client.doTLS = d->tlsHandler ? true: false; d->client.doBinding = d->doBinding;*/ - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; emit connected(); if(!self) return; @@ -515,12 +515,12 @@ void ClientStream::bs_error(int) void ClientStream::ss_readyRead() { - QByteArray a; + TQByteArray a; a = d->ss->read(); #ifdef LIBGW_DEBUG - QCString cs(a.data(), a.size()+1); - CoreProtocol::debug( QString( "ClientStream: ss_readyRead() recv: %1 bytes" ).arg( a.size() ) ); + TQCString cs(a.data(), a.size()+1); + CoreProtocol::debug( TQString( "ClientStream: ss_readyRead() recv: %1 bytes" ).arg( a.size() ) ); cs_dump( a ); #endif @@ -532,7 +532,7 @@ void ClientStream::ss_readyRead() void ClientStream::ss_bytesWritten(int bytes) { #ifdef LIBGW_DEBUG - CoreProtocol::debug( QString( "ClientStream::ss_bytesWritten: %1 bytes written" ).arg( bytes ) ); + CoreProtocol::debug( TQString( "ClientStream::ss_bytesWritten: %1 bytes written" ).arg( bytes ) ); #else Q_UNUSED( bytes ); #endif @@ -540,7 +540,7 @@ void ClientStream::ss_bytesWritten(int bytes) void ClientStream::ss_tlsHandshaken() { - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; emit securityLayerActivated(LayerTLS); if(!self) return; @@ -556,7 +556,7 @@ void ClientStream::ss_tlsClosed() void ClientStream::ss_error(int x) { - CoreProtocol::debug( QString( "ClientStream::ss_error() x=%1 ").arg( x ) ); + CoreProtocol::debug( TQString( "ClientStream::ss_error() x=%1 ").arg( x ) ); if(x == SecureStream::ErrTLS) { reset(); d->errCond = TLSFail; @@ -574,7 +574,7 @@ void ClientStream::srvProcessNext() void ClientStream::doReadyRead() { - //QGuardedPtr<QObject> self = this; + //TQGuardedPtr<TQObject> self = this; emit readyRead(); //if(!self) // return; @@ -585,7 +585,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { //d->in_rrsig = true; - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } diff --git a/kopete/protocols/groupwise/libgroupwise/gwclientstream.h b/kopete/protocols/groupwise/libgroupwise/gwclientstream.h index 5ae5ec8c..2d0cef92 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwclientstream.h +++ b/kopete/protocols/groupwise/libgroupwise/gwclientstream.h @@ -33,8 +33,8 @@ class TLSHandler; typedef struct NovellDN { - QString dn; - QString server; + TQString dn; + TQString server; }; class ClientStream : public Stream @@ -86,7 +86,7 @@ public: BindConflict // resource in-use }; - ClientStream(Connector *conn, TLSHandler *tlsHandler=0, QObject *parent=0); + ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *parent=0); ~ClientStream(); void connectToServer(const NovellDN &id, bool auth=true); @@ -95,15 +95,15 @@ public: bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); - void setRealm(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); + void setRealm(const TQString &s); void continueAfterParams(); // security options (old protocol only uses the first !) void setAllowPlain(bool); void setRequireMutualAuth(bool); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); void close(); @@ -122,11 +122,11 @@ public: void write( Request * request ); int errorCondition() const; - QString errorText() const; -// # QDomElement errorAppSpec() const; // redondo + TQString errorText() const; +// # TQDomElement errorAppSpec() const; // redondo // extrahttp://bugs.kde.org/show_bug.cgi?id=85158 -/*# void writeDirect(const QString &s); // must be for debug testing*/ +/*# void writeDirect(const TQString &s); // must be for debug testing*/ void setNoopTime(int mills); signals: @@ -135,8 +135,8 @@ signals: //void needAuthParams(bool user, bool pass, bool realm); void authenticated(); // this signal is ordinarily emitted in processNext void warning(int); -// # void incomingXml(const QString &s); // signals emitted in processNext but don't seem to go anywhere... -// # void outgoingXml(const QString &s); // +// # void incomingXml(const TQString &s); // signals emitted in processNext but don't seem to go anywhere... +// # void outgoingXml(const TQString &s); // // void readyRead(); //signals that there is a transfer ready to be read - defined in stream public slots: void continueAfterWarning(); @@ -147,7 +147,7 @@ private slots: /** * collects wire ready outgoing data from the core protocol and sends */ - void cp_outgoingData( const QByteArray& ); + void cp_outgoingData( const TQByteArray& ); /** * collects parsed incoming data as a transfer from the core protocol and queues */ diff --git a/kopete/protocols/groupwise/libgroupwise/gwerror.cpp b/kopete/protocols/groupwise/libgroupwise/gwerror.cpp index 5338cea0..ba2a2a58 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwerror.cpp +++ b/kopete/protocols/groupwise/libgroupwise/gwerror.cpp @@ -19,9 +19,9 @@ #include "gwerror.h" -QString GroupWise::errorCodeToString( int errorCode ) +TQString GroupWise::errorCodeToString( int errorCode ) { - QString errorString; + TQString errorString; switch ( errorCode ) { #if 0 @@ -269,7 +269,7 @@ QString GroupWise::errorCodeToString( int errorCode ) errorString = "Chat has been removed from server"; break; default: - errorString = QString("Unrecognized error code: %s").arg( errorCode ); + errorString = TQString("Unrecognized error code: %s").arg( errorCode ); #endif } return errorString; diff --git a/kopete/protocols/groupwise/libgroupwise/gwerror.h b/kopete/protocols/groupwise/libgroupwise/gwerror.h index 5300f788..52a5ef36 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwerror.h +++ b/kopete/protocols/groupwise/libgroupwise/gwerror.h @@ -18,10 +18,10 @@ #ifndef GW_ERROR_H #define GW_ERROR_H -#include <qdatetime.h> -#include <qglobal.h> -#include <qmap.h> -#include <qstring.h> +#include <tqdatetime.h> +#include <tqglobal.h> +#include <tqmap.h> +#include <tqstring.h> typedef Q_UINT16 NMERR_T; #define GROUPWISE_DEBUG_GLOBAL 14190 @@ -94,29 +94,29 @@ namespace GroupWise Closed = 0x10000000 }; - QString errorCodeToString( int errorCode ); + TQString errorCodeToString( int errorCode ); // helpful structs used to pass data between the client library and the application using it - class ConferenceGuid : public QString + class ConferenceGuid : public TQString { public: ConferenceGuid(); - ConferenceGuid( const QString & string ); + ConferenceGuid( const TQString & string ); ~ConferenceGuid(); }; bool operator==( const ConferenceGuid & g1, const ConferenceGuid & g2 ); - bool operator==( const QString & s, const ConferenceGuid & g ); - bool operator==( const ConferenceGuid & g, const QString & s ); + bool operator==( const TQString & s, const ConferenceGuid & g ); + bool operator==( const ConferenceGuid & g, const TQString & s ); struct ConferenceEvent { Event type; ConferenceGuid guid; - QString user; - QDateTime timeStamp; + TQString user; + TQDateTime timeStamp; Q_UINT32 flags; - QString message; + TQString message; }; struct FolderItem @@ -124,7 +124,7 @@ namespace GroupWise uint id; uint sequence; uint parentId; - QString name; + TQString name; }; struct ContactItem @@ -132,13 +132,13 @@ namespace GroupWise uint id; uint parentId; uint sequence; - QString dn; - QString displayName; + TQString dn; + TQString displayName; }; struct ContactDetails { - QString cn, + TQString cn, dn, givenName, surname, @@ -147,28 +147,28 @@ namespace GroupWise authAttribute; int status; bool archive; - QMap< QString, QString > properties; + TQMap< TQString, TQString > properties; }; struct OutgoingMessage { ConferenceGuid guid; - QString message; - QString rtfMessage; + TQString message; + TQString rtfMessage; }; struct UserSearchQueryTerm { - QString field; - QString argument; + TQString field; + TQString argument; int operation; }; struct CustomStatus { GroupWise::Status status; - QString name; - QString autoReply; + TQString name; + TQString autoReply; }; } diff --git a/kopete/protocols/groupwise/libgroupwise/gwfield.cpp b/kopete/protocols/groupwise/libgroupwise/gwfield.cpp index e0d3c5db..6d025e47 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwfield.cpp +++ b/kopete/protocols/groupwise/libgroupwise/gwfield.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qcstring.h> +#include <tqcstring.h> #include "gwerror.h" @@ -36,13 +36,13 @@ FieldList::~FieldList() { } -FieldListIterator FieldList::find( QCString tag ) +FieldListIterator FieldList::find( TQCString tag ) { FieldListIterator it = begin(); return find( it, tag ); } -FieldListIterator FieldList::find( FieldListIterator &it, QCString tag ) +FieldListIterator FieldList::find( FieldListIterator &it, TQCString tag ) { FieldListIterator theEnd = end(); //cout << "FieldList::find() looking for " << tag.data() << endl; @@ -55,7 +55,7 @@ FieldListIterator FieldList::find( FieldListIterator &it, QCString tag ) return it; } -int FieldList::findIndex( QCString tag ) +int FieldList::findIndex( TQCString tag ) { FieldListIterator it = begin(); FieldListIterator theEnd = end(); @@ -74,7 +74,7 @@ void FieldList::dump( bool recursive, int offset ) kdDebug( GROUPWISE_DEBUG_LIBGW ) << k_funcinfo << ( recursive ? ", recursively" : ", non-recursive" ) << endl; for( FieldListIterator it = begin(); it != myEnd; ++it ) { - QString s; + TQString s; s.fill(' ', offset*2 ); s.append( (*it)->tag() ); SingleField * sf; @@ -105,13 +105,13 @@ void FieldList::purge() // THIS IS AN ATTEMPT TO HIDE THE POLYMORPHISM INSIDE THE LIST // HOWEVER IT FAILS BECAUSE WE NEED BOTH THE ITERATOR AND THE CASTED Single|MultiField it points to -SingleField * FieldList::findSingleField( QCString tag ) +SingleField * FieldList::findSingleField( TQCString tag ) { FieldListIterator it = begin(); return findSingleField( it, tag ); } -SingleField * FieldList::findSingleField( FieldListIterator &it, QCString tag ) +SingleField * FieldList::findSingleField( FieldListIterator &it, TQCString tag ) { FieldListIterator found = find( it, tag ); if ( found == end() ) @@ -120,13 +120,13 @@ SingleField * FieldList::findSingleField( FieldListIterator &it, QCString tag ) return dynamic_cast<SingleField *>( *found ); } -MultiField * FieldList::findMultiField( QCString tag ) +MultiField * FieldList::findMultiField( TQCString tag ) { FieldListIterator it = begin(); return findMultiField( it, tag ); } -MultiField * FieldList::findMultiField( FieldListIterator &it, QCString tag ) +MultiField * FieldList::findMultiField( FieldListIterator &it, TQCString tag ) { FieldListIterator found = find( it, tag ); if ( found == end() ) @@ -138,13 +138,13 @@ MultiField * FieldList::findMultiField( FieldListIterator &it, QCString tag ) /* === FieldBase ========================================================= */ -FieldBase::FieldBase( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ) +FieldBase::FieldBase( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ) : m_tag( tag ), m_method( method ), m_flags( flags ), m_type( type ) { } -QCString FieldBase::tag() const +TQCString FieldBase::tag() const { return m_tag; } @@ -171,12 +171,12 @@ void FieldBase::setFlags( const Q_UINT8 flags ) /* === SingleField ========================================================= */ -SingleField::SingleField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, QVariant value ) +SingleField::SingleField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, TQVariant value ) : FieldBase( tag, method, flags, type ), m_value( value ) { } -SingleField::SingleField( QCString tag, Q_UINT8 flags, Q_UINT8 type, QVariant value ) +SingleField::SingleField( TQCString tag, Q_UINT8 flags, Q_UINT8 type, TQVariant value ) : FieldBase( tag, NMFIELD_METHOD_VALID, flags, type ), m_value( value ) { } @@ -185,24 +185,24 @@ SingleField::~SingleField() { } -void SingleField::setValue( const QVariant v ) +void SingleField::setValue( const TQVariant v ) { m_value = v; } -QVariant SingleField::value() const +TQVariant SingleField::value() const { return m_value; } /* === MultiField ========================================================= */ -MultiField::MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields ) +MultiField::MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields ) : FieldBase( tag, method, flags, type ), m_fields( fields ) { } -MultiField::MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ) +MultiField::MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ) : FieldBase( tag, method, flags, type ) { } diff --git a/kopete/protocols/groupwise/libgroupwise/gwfield.h b/kopete/protocols/groupwise/libgroupwise/gwfield.h index 9362b5ad..0117b3e5 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwfield.h +++ b/kopete/protocols/groupwise/libgroupwise/gwfield.h @@ -146,10 +146,10 @@ #define NMFIELD_MAX_STR_LENGTH 32768 -#include <qglobal.h> -#include <qobject.h> -#include <qvariant.h> -#include <qvaluelist.h> +#include <tqglobal.h> +#include <tqobject.h> +#include <tqvariant.h> +#include <tqvaluelist.h> /** * Fields are typed units of information interchanged between the groupwise server and its clients. @@ -167,26 +167,26 @@ namespace Field { public: FieldBase() {} - FieldBase( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ); + FieldBase( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ); virtual ~FieldBase() {} - QCString tag() const; + TQCString tag() const; Q_UINT8 method() const; Q_UINT8 flags() const; Q_UINT8 type() const; void setFlags( const Q_UINT8 flags ); protected: - QCString m_tag; + TQCString m_tag; Q_UINT8 m_method; Q_UINT8 m_flags; Q_UINT8 m_type; // doch needed }; - typedef QValueListIterator<FieldBase *> FieldListIterator; - typedef QValueListConstIterator<FieldBase *> FieldListConstIterator; + typedef TQValueListIterator<FieldBase *> FieldListIterator; + typedef TQValueListConstIterator<FieldBase *> FieldListConstIterator; class SingleField; class MultiField; - class FieldList : public QValueList<FieldBase *> + class FieldList : public TQValueList<FieldBase *> { public: /** @@ -194,22 +194,22 @@ namespace Field */ virtual ~FieldList(); /** - * Locate the first occurrence of a given field in the list. Same semantics as QValueList::find(). + * Locate the first occurrence of a given field in the list. Same semantics as TQValueList::find(). * @param tag The tag name of the field to search for. * @return An iterator pointing to the first occurrence found, or end() if none was found. */ - FieldListIterator find( QCString tag ); + FieldListIterator find( TQCString tag ); /** * Locate the first occurrence of a given field in the list, starting at the supplied iterator * @param tag The tag name of the field to search for. * @param it An iterator within the list, to start searching from. * @return An iterator pointing to the first occurrence found, or end() if none was found. */ - FieldListIterator find( FieldListIterator &it, QCString tag ); + FieldListIterator find( FieldListIterator &it, TQCString tag ); /** * Get the index of the first occurrence of tag, or -1 if not found */ - int findIndex( QCString tag ); + int findIndex( TQCString tag ); /** * Debug function, dumps to stdout */ @@ -222,11 +222,11 @@ namespace Field * Utility functions for finding the first instance of a tag * @return 0 if no field of the right tag and type was found. */ - SingleField * findSingleField( QCString tag ); - MultiField * findMultiField( QCString tag ); + SingleField * findSingleField( TQCString tag ); + MultiField * findMultiField( TQCString tag ); protected: - SingleField * findSingleField( FieldListIterator &it, QCString tag ); - MultiField * findMultiField( FieldListIterator &it, QCString tag ); + SingleField * findSingleField( FieldListIterator &it, TQCString tag ); + MultiField * findMultiField( FieldListIterator &it, TQCString tag ); }; @@ -242,16 +242,16 @@ namespace Field /** * Single field constructor */ - SingleField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, QVariant value ); + SingleField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, TQVariant value ); /** * Convenience constructor for NMFIELD_METHOD_VALID fields */ - SingleField( QCString tag, Q_UINT8 flags, Q_UINT8 type, QVariant value ); + SingleField( TQCString tag, Q_UINT8 flags, Q_UINT8 type, TQVariant value ); ~SingleField(); - void setValue( const QVariant v ); - QVariant value() const; + void setValue( const TQVariant v ); + TQVariant value() const; private: - QVariant m_value; + TQVariant m_value; }; /** @@ -261,8 +261,8 @@ namespace Field class MultiField : public FieldBase { public: - MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ); - MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields ); + MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ); + MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields ); ~MultiField(); FieldList fields() const; void setFields( FieldList ); diff --git a/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp b/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp index 4ea25779..bb747945 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp +++ b/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp @@ -20,7 +20,7 @@ namespace GroupWise { ConferenceGuid::ConferenceGuid() {} - ConferenceGuid::ConferenceGuid( const QString & string ) : QString( string ) {} + ConferenceGuid::ConferenceGuid( const TQString & string ) : TQString( string ) {} ConferenceGuid::~ConferenceGuid() {} @@ -28,11 +28,11 @@ namespace GroupWise { return g1.left( CONF_GUID_END ) == g2.left( CONF_GUID_END ); } - bool operator==( const QString & s, const ConferenceGuid & g ) + bool operator==( const TQString & s, const ConferenceGuid & g ) { return s.left( CONF_GUID_END ) == g.left( CONF_GUID_END ); } - bool operator==( const ConferenceGuid & g, const QString & s ) + bool operator==( const ConferenceGuid & g, const TQString & s ) { return s.left( CONF_GUID_END ) == g.left( CONF_GUID_END ); } diff --git a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp index 30627a81..6dfb1d0f 100644 --- a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp +++ b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp @@ -23,8 +23,8 @@ #include "gwfield.h" #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(QObject *parent, const char *name) - : QObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) + : TQObject(parent, name) { } @@ -33,7 +33,7 @@ InputProtocolBase::~InputProtocolBase() { } -void InputProtocolBase::debug( const QString &str ) +void InputProtocolBase::debug( const TQString &str ) { #ifdef LIBGW_USE_KDEBUG kdDebug( 14191 ) << "debug: " << str << endl; @@ -47,13 +47,13 @@ uint InputProtocolBase::state() const return m_state; } -bool InputProtocolBase::readString( QString &message ) +bool InputProtocolBase::readString( TQString &message ) { uint len; - QCString rawData; + TQCString rawData; if ( !safeReadBytes( rawData, len ) ) return false; - message = QString::fromUtf8( rawData.data(), len - 1 ); + message = TQString::fromUtf8( rawData.data(), len - 1 ); return true; } @@ -73,7 +73,7 @@ bool InputProtocolBase::okToProceed() return false; } -bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) +bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes Q_UINT32 val; @@ -84,7 +84,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) if ( val > NMFIELD_MAX_STR_LENGTH ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); - QCString temp( val ); + TQCString temp( val ); if ( val != 0 ) { if ( !okToProceed() ) @@ -98,7 +98,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) // if ( (Q_UINT8)( * ( temp.data() + ( temp.length() - 1 ) ) ) == 0xFF ) if ( temp.length() < ( val - 1 ) ) { - debug( QString( "InputProtocol::safeReadBytes() - string broke, giving up, only got: %1 bytes out of %2" ).arg( temp.length() ).arg( val ) ); + debug( TQString( "InputProtocol::safeReadBytes() - string broke, giving up, only got: %1 bytes out of %2" ).arg( temp.length() ).arg( val ) ); m_state = NeedMore; return false; } diff --git a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h index efd2979f..529fea21 100644 --- a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h +++ b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h @@ -19,7 +19,7 @@ #ifndef INPUTPROTOCOLBASE_H #define INPUTPROTOCOLBASE_H -#include <qobject.h> +#include <tqobject.h> class Transfer; /** @@ -32,13 +32,13 @@ class InputProtocolBase : public QObject Q_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(QObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *parent = 0, const char *name = 0); ~InputProtocolBase(); /** * Debug output */ - static void debug(const QString &str); + static void debug(const TQString &str); /** * Returns a value describing the state of the object. @@ -51,13 +51,13 @@ public: * @param bytes this will be set to the number of bytes that were successfully parsed. It is no indication of the success of the whole procedure * @return On success, a Transfer object that the caller is responsible for deleting. It will be either an EventTransfer or a Response, delete as appropriate. On failure, returns 0. */ - virtual Transfer * parse( const QByteArray &, uint & bytes ) = 0 ; + virtual Transfer * parse( const TQByteArray &, uint & bytes ) = 0 ; protected: /** * Reads an arbitrary string * updates the bytes parsed counter */ - bool readString( QString &message ); + bool readString( TQString &message ); /** * Check that there is data to read, and set the protocol's state if there isn't any. */ @@ -67,12 +67,12 @@ protected: * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ - bool safeReadBytes( QCString & data, uint & len ); + bool safeReadBytes( TQCString & data, uint & len ); protected: uint m_state; uint m_bytes; - QDataStream m_din; + TQDataStream m_din; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp b/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp index 3d42207b..4960310a 100644 --- a/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp +++ b/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp @@ -23,7 +23,7 @@ #include "privacymanager.h" PrivacyManager::PrivacyManager( Client * client, const char *name) - : QObject(client, name), m_client( client ) + : TQObject(client, name), m_client( client ) { } @@ -41,12 +41,12 @@ bool PrivacyManager::defaultDeny() return m_defaultDeny; } -QStringList PrivacyManager::allowList() +TQStringList PrivacyManager::allowList() { return m_allowList; } -QStringList PrivacyManager::denyList() +TQStringList PrivacyManager::denyList() { return m_denyList; } @@ -56,7 +56,7 @@ bool PrivacyManager::isPrivacyLocked() return m_locked; } -bool PrivacyManager::isBlocked( const QString & dn ) +bool PrivacyManager::isBlocked( const TQString & dn ) { if ( m_defaultDeny ) return !m_allowList.contains( dn ); @@ -64,7 +64,7 @@ bool PrivacyManager::isBlocked( const QString & dn ) return m_denyList.contains( dn ); } -void PrivacyManager::setAllow( const QString & dn ) +void PrivacyManager::setAllow( const TQString & dn ) { if ( m_defaultDeny ) { @@ -78,7 +78,7 @@ void PrivacyManager::setAllow( const QString & dn ) } } -void PrivacyManager::setDeny( const QString & dn ) +void PrivacyManager::setDeny( const TQString & dn ) { if ( m_defaultDeny ) { @@ -97,7 +97,7 @@ void PrivacyManager::setDefaultAllow( bool allow ) { PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->defaultPolicy( !allow ); - connect( pit, SIGNAL( finished() ), SLOT( slotDefaultPolicyChanged() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDefaultPolicyChanged() ) ); pit->go( true ); } @@ -105,73 +105,73 @@ void PrivacyManager::setDefaultDeny( bool deny ) { PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->defaultPolicy( deny); - connect( pit, SIGNAL( finished() ), SLOT( slotDefaultPolicyChanged() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDefaultPolicyChanged() ) ); pit->go( true ); } -void PrivacyManager::addAllow( const QString & dn ) +void PrivacyManager::addAllow( const TQString & dn ) { // start off a CreatePrivacyItemTask PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->allow( dn ); - connect( pit, SIGNAL( finished() ), SLOT( slotAllowAdded() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotAllowAdded() ) ); pit->go( true ); } -void PrivacyManager::addDeny( const QString & dn ) +void PrivacyManager::addDeny( const TQString & dn ) { // start off a CreatePrivacyItemTask PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->deny( dn ); - connect( pit, SIGNAL( finished() ), SLOT( slotDenyAdded() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDenyAdded() ) ); pit->go( true ); } -void PrivacyManager::removeAllow( const QString & dn ) +void PrivacyManager::removeAllow( const TQString & dn ) { PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->removeAllow( dn ); - connect( pit, SIGNAL( finished() ), SLOT( slotAllowRemoved() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotAllowRemoved() ) ); pit->go( true ); } -void PrivacyManager::removeDeny( const QString & dn ) +void PrivacyManager::removeDeny( const TQString & dn ) { // start off a CreatePrivacyItemTask PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->removeDeny( dn ); - connect( pit, SIGNAL( finished() ), SLOT( slotDenyRemoved() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDenyRemoved() ) ); pit->go( true ); } -void PrivacyManager::setPrivacy( bool defaultIsDeny, const QStringList & allowList, const QStringList & denyList ) +void PrivacyManager::setPrivacy( bool defaultIsDeny, const TQStringList & allowList, const TQStringList & denyList ) { if ( defaultIsDeny != m_defaultDeny ) setDefaultDeny( defaultIsDeny ); // find the DNs no longer in the allow list - QStringList allowsToRemove = difference( m_allowList, allowList ); + TQStringList allowsToRemove = difference( m_allowList, allowList ); // find the DNs no longer in the deny list - QStringList denysToRemove = difference( m_denyList, denyList ); + TQStringList denysToRemove = difference( m_denyList, denyList ); // find the DNs new in the allow list - QStringList allowsToAdd = difference( allowList, m_allowList ); + TQStringList allowsToAdd = difference( allowList, m_allowList ); // find the DNs new in the deny list - QStringList denysToAdd = difference( denyList, m_denyList ); + TQStringList denysToAdd = difference( denyList, m_denyList ); - QStringList::ConstIterator end = allowsToRemove.end(); - for ( QStringList::ConstIterator it = allowsToRemove.begin(); it != end; ++it ) + TQStringList::ConstIterator end = allowsToRemove.end(); + for ( TQStringList::ConstIterator it = allowsToRemove.begin(); it != end; ++it ) removeAllow( *it ); end = denysToRemove.end(); - for ( QStringList::ConstIterator it = denysToRemove.begin(); it != end; ++it ) + for ( TQStringList::ConstIterator it = denysToRemove.begin(); it != end; ++it ) removeDeny( *it ); end = allowsToAdd.end(); - for ( QStringList::ConstIterator it = allowsToAdd.begin(); it != end; ++it ) + for ( TQStringList::ConstIterator it = allowsToAdd.begin(); it != end; ++it ) addAllow( *it ); end = denysToAdd.end(); - for ( QStringList::ConstIterator it = denysToAdd.begin(); it != end; ++it ) + for ( TQStringList::ConstIterator it = denysToAdd.begin(); it != end; ++it ) addDeny( *it ); } -void PrivacyManager::slotGotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList ) +void PrivacyManager::slotGotPrivacySettings( bool locked, bool defaultDeny, const TQStringList & allowList, const TQStringList & denyList ) { m_locked = locked; m_defaultDeny = defaultDeny; @@ -236,12 +236,12 @@ void PrivacyManager::slotDenyRemoved() } } -QStringList PrivacyManager::difference( const QStringList & lhs, const QStringList & rhs ) +TQStringList PrivacyManager::difference( const TQStringList & lhs, const TQStringList & rhs ) { - QStringList diff; - const QStringList::ConstIterator lhsEnd = lhs.end(); - const QStringList::ConstIterator rhsEnd = rhs.end(); - for ( QStringList::ConstIterator lhsIt = lhs.begin(); lhsIt != lhsEnd; ++lhsIt ) + TQStringList diff; + const TQStringList::ConstIterator lhsEnd = lhs.end(); + const TQStringList::ConstIterator rhsEnd = rhs.end(); + for ( TQStringList::ConstIterator lhsIt = lhs.begin(); lhsIt != lhsEnd; ++lhsIt ) { if ( rhs.find( *lhsIt ) == rhsEnd ) diff.append( *lhsIt ); diff --git a/kopete/protocols/groupwise/libgroupwise/privacymanager.h b/kopete/protocols/groupwise/libgroupwise/privacymanager.h index 102c2b0a..0f01eb89 100644 --- a/kopete/protocols/groupwise/libgroupwise/privacymanager.h +++ b/kopete/protocols/groupwise/libgroupwise/privacymanager.h @@ -19,8 +19,8 @@ #ifndef PRIVACYMANAGER_H #define PRIVACYMANAGER_H -#include <qobject.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstringlist.h> class Client; @@ -36,40 +36,40 @@ public: PrivacyManager( Client * client, const char *name = 0); ~PrivacyManager(); // accessors - bool isBlocked( const QString & dn ); - QStringList allowList(); - QStringList denyList(); + bool isBlocked( const TQString & dn ); + TQStringList allowList(); + TQStringList denyList(); bool isPrivacyLocked(); bool defaultDeny(); bool defaultAllow(); // mutators void setDefaultAllow( bool allow ); void setDefaultDeny( bool deny ); - void setAllow( const QString & dn ); - void setDeny( const QString & dn ); + void setAllow( const TQString & dn ); + void setDeny( const TQString & dn ); void getDetailsForPrivacyLists(); // change everything at once - void setPrivacy( bool defaultIsDeny, const QStringList & allowList, const QStringList & denyList ); + void setPrivacy( bool defaultIsDeny, const TQStringList & allowList, const TQStringList & denyList ); signals: - void privacyChanged( const QString &dn, bool allowed ); + void privacyChanged( const TQString &dn, bool allowed ); public slots: /** * Used to initialise the privacy manager using the server side privacy list */ - void slotGotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList ); + void slotGotPrivacySettings( bool locked, bool defaultDeny, const TQStringList & allowList, const TQStringList & denyList ); protected: - void addAllow( const QString & dn ); - void addDeny( const QString & dn ); - void removeAllow( const QString & dn ); - void removeDeny( const QString & dn ); + void addAllow( const TQString & dn ); + void addDeny( const TQString & dn ); + void removeAllow( const TQString & dn ); + void removeDeny( const TQString & dn ); /** * A set difference function * @param lhs The set of strings to be subtracted from * @param rhs The set of string to subtract * @return The difference between the two sets */ - QStringList difference( const QStringList & lhs, const QStringList & rhs ); + TQStringList difference( const TQStringList & lhs, const TQStringList & rhs ); protected slots: // Receive the results of Tasks manipulating the privacy lists void slotDefaultPolicyChanged(); @@ -81,8 +81,8 @@ private: Client * m_client; bool m_locked; bool m_defaultDeny; - QStringList m_allowList; - QStringList m_denyList; + TQStringList m_allowList; + TQStringList m_denyList; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp index e660ef42..10cae6b8 100644 --- a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp +++ b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp @@ -20,15 +20,15 @@ #include"qca.h" -#include<qptrlist.h> -#include<qdir.h> -#include<qfileinfo.h> -#include<qstringlist.h> -#include<qlibrary.h> -#include<qtimer.h> -#include<qhostaddress.h> -#include<qapplication.h> -#include<qguardedptr.h> +#include<tqptrlist.h> +#include<tqdir.h> +#include<tqfileinfo.h> +#include<tqstringlist.h> +#include<tqlibrary.h> +#include<tqtimer.h> +#include<tqhostaddress.h> +#include<tqapplication.h> +#include<tqguardedptr.h> #include<stdlib.h> #include"qcaprovider.h" @@ -46,11 +46,11 @@ class ProviderItem { public: QCAProvider *p; - QString fname; + TQString fname; - static ProviderItem *load(const QString &fname) + static ProviderItem *load(const TQString &fname) { - QLibrary *lib = new QLibrary(fname); + TQLibrary *lib = new TQLibrary(fname); if(!lib->load()) { delete lib; return 0; @@ -92,10 +92,10 @@ public: } private: - QLibrary *lib; + TQLibrary *lib; bool init_done; - ProviderItem(QLibrary *_lib, QCAProvider *_p) + ProviderItem(TQLibrary *_lib, QCAProvider *_p) { lib = _lib; p = _p; @@ -103,12 +103,12 @@ private: } }; -static QPtrList<ProviderItem> providerList; +static TQPtrList<ProviderItem> providerList; static bool qca_init = false; -static bool plugin_have(const QString &fname) +static bool plugin_have(const TQString &fname) { - QPtrListIterator<ProviderItem> it(providerList); + TQPtrListIterator<ProviderItem> it(providerList); for(ProviderItem *i; (i = it.current()); ++it) { if(i->fname == fname) return true; @@ -118,21 +118,21 @@ static bool plugin_have(const QString &fname) static void plugin_scan() { - QStringList dirs = QApplication::libraryPaths(); - for(QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { - QDir libpath(*it); - QDir dir(libpath.filePath("crypto")); + TQStringList dirs = TQApplication::libraryPaths(); + for(TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { + TQDir libpath(*it); + TQDir dir(libpath.filePath("crypto")); if(!dir.exists()) continue; - QStringList list = dir.entryList(); - for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - QFileInfo fi(dir.filePath(*it)); + TQStringList list = dir.entryList(); + for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + TQFileInfo fi(dir.filePath(*it)); if(fi.isDir()) continue; if(fi.extension() != PLUGIN_EXT) continue; - QString fname = fi.filePath(); + TQString fname = fi.filePath(); // don't load the same plugin again! if(plugin_have(fname)) @@ -166,26 +166,26 @@ static void plugin_unloadall() static int plugin_caps() { int caps = 0; - QPtrListIterator<ProviderItem> it(providerList); + TQPtrListIterator<ProviderItem> it(providerList); for(ProviderItem *i; (i = it.current()); ++it) caps |= i->p->capabilities(); return caps; } -QString QCA::arrayToHex(const QByteArray &a) +TQString QCA::arrayToHex(const TQByteArray &a) { - QString out; + TQString out; for(int n = 0; n < (int)a.size(); ++n) { - QString str; + TQString str; str.sprintf("%02x", (uchar)a[n]); out.append(str); } return out; } -QByteArray QCA::hexToArray(const QString &str) +TQByteArray QCA::hexToArray(const TQString &str) { - QByteArray out(str.length() / 2); + TQByteArray out(str.length() / 2); int at = 0; for(int n = 0; n + 1 < (int)str.length(); n += 2) { uchar a = str[n]; @@ -239,7 +239,7 @@ static void *getContext(int cap) if(!QCA::isSupported(cap)) return 0; - QPtrListIterator<ProviderItem> it(providerList); + TQPtrListIterator<ProviderItem> it(providerList); for(ProviderItem *i; (i = it.current()); ++it) { if(i->p->capabilities() & cap) { i->ensureInit(); @@ -303,14 +303,14 @@ void Hash::clear() d->reset(); } -void Hash::update(const QByteArray &a) +void Hash::update(const TQByteArray &a) { d->c->update(a.data(), a.size()); } -QByteArray Hash::final() +TQByteArray Hash::final() { - QByteArray buf; + TQByteArray buf; d->c->final(&buf); return buf; } @@ -343,11 +343,11 @@ public: QCA_CipherContext *c; int dir; int mode; - QByteArray key, iv; + TQByteArray key, iv; bool err; }; -Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) { d = new Private; d->c = c; @@ -377,27 +377,27 @@ Cipher::~Cipher() delete d; } -QByteArray Cipher::dyn_generateKey(int size) const +TQByteArray Cipher::dyn_generateKey(int size) const { - QByteArray buf; + TQByteArray buf; if(size != -1) buf.resize(size); else buf.resize(d->c->keySize()); if(!d->c->generateKey(buf.data(), size)) - return QByteArray(); + return TQByteArray(); return buf; } -QByteArray Cipher::dyn_generateIV() const +TQByteArray Cipher::dyn_generateIV() const { - QByteArray buf(d->c->blockSize()); + TQByteArray buf(d->c->blockSize()); if(!d->c->generateIV(buf.data())) - return QByteArray(); + return TQByteArray(); return buf; } -void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +void Cipher::reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) { d->reset(); @@ -411,7 +411,7 @@ void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &i } } -bool Cipher::update(const QByteArray &a) +bool Cipher::update(const TQByteArray &a) { if(d->err) return false; @@ -425,17 +425,17 @@ bool Cipher::update(const QByteArray &a) return true; } -QByteArray Cipher::final(bool *ok) +TQByteArray Cipher::final(bool *ok) { if(ok) *ok = false; if(d->err) - return QByteArray(); + return TQByteArray(); - QByteArray out; + TQByteArray out; if(!d->c->final(&out)) { d->err = true; - return QByteArray(); + return TQByteArray(); } if(ok) *ok = true; @@ -473,7 +473,7 @@ MD5::MD5() //---------------------------------------------------------------------------- // BlowFish //---------------------------------------------------------------------------- -BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +BlowFish::BlowFish(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_BlowFish), dir, mode, key, iv, pad) { } @@ -482,7 +482,7 @@ BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &i //---------------------------------------------------------------------------- // TripleDES //---------------------------------------------------------------------------- -TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +TripleDES::TripleDES(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_TripleDES), dir, mode, key, iv, pad) { } @@ -491,7 +491,7 @@ TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray //---------------------------------------------------------------------------- // AES128 //---------------------------------------------------------------------------- -AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +AES128::AES128(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_AES128), dir, mode, key, iv, pad) { } @@ -500,7 +500,7 @@ AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, b //---------------------------------------------------------------------------- // AES256 //---------------------------------------------------------------------------- -AES256::AES256(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +AES256::AES256(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_AES256), dir, mode, key, iv, pad) { } @@ -564,35 +564,35 @@ bool RSAKey::havePrivate() const return d->c->havePrivate(); } -QByteArray RSAKey::toDER(bool publicOnly) const +TQByteArray RSAKey::toDER(bool publicOnly) const { - QByteArray out; + TQByteArray out; if(!d->c->toDER(&out, publicOnly)) - return QByteArray(); + return TQByteArray(); return out; } -bool RSAKey::fromDER(const QByteArray &a) +bool RSAKey::fromDER(const TQByteArray &a) { return d->c->createFromDER(a.data(), a.size()); } -QString RSAKey::toPEM(bool publicOnly) const +TQString RSAKey::toPEM(bool publicOnly) const { - QByteArray out; + TQByteArray out; if(!d->c->toPEM(&out, publicOnly)) - return QByteArray(); + return TQByteArray(); - QCString cs; + TQCString cs; cs.resize(out.size()+1); memcpy(cs.data(), out.data(), out.size()); - return QString::fromLatin1(cs); + return TQString::fromLatin1(cs); } -bool RSAKey::fromPEM(const QString &str) +bool RSAKey::fromPEM(const TQString &str) { - QCString cs = str.latin1(); - QByteArray a(cs.length()); + TQCString cs = str.latin1(); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return d->c->createFromPEM(a.data(), a.size()); } @@ -602,18 +602,18 @@ bool RSAKey::fromNative(void *p) return d->c->createFromNative(p); } -bool RSAKey::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSAKey::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { - QByteArray out; + TQByteArray out; if(!d->c->encrypt(a, &out, oaep)) return false; *b = out; return true; } -bool RSAKey::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSAKey::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { - QByteArray out; + TQByteArray out; if(!d->c->decrypt(a, &out, oaep)) return false; *b = out; @@ -647,14 +647,14 @@ void RSA::setKey(const RSAKey &k) v_key = k; } -bool RSA::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSA::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { if(v_key.isNull()) return false; return v_key.encrypt(a, b, oaep); } -bool RSA::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSA::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { if(v_key.isNull()) return false; @@ -727,84 +727,84 @@ bool Cert::isNull() const return d->c->isNull(); } -QString Cert::commonName() const +TQString Cert::commonName() const { CertProperties props = subject(); return props["CN"]; } -QString Cert::serialNumber() const +TQString Cert::serialNumber() const { return d->c->serialNumber(); } -QString Cert::subjectString() const +TQString Cert::subjectString() const { return d->c->subjectString(); } -QString Cert::issuerString() const +TQString Cert::issuerString() const { return d->c->issuerString(); } CertProperties Cert::subject() const { - QValueList<QCA_CertProperty> list = d->c->subject(); + TQValueList<QCA_CertProperty> list = d->c->subject(); CertProperties props; - for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) + for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) props[(*it).var] = (*it).val; return props; } CertProperties Cert::issuer() const { - QValueList<QCA_CertProperty> list = d->c->issuer(); + TQValueList<QCA_CertProperty> list = d->c->issuer(); CertProperties props; - for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) + for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) props[(*it).var] = (*it).val; return props; } -QDateTime Cert::notBefore() const +TQDateTime Cert::notBefore() const { return d->c->notBefore(); } -QDateTime Cert::notAfter() const +TQDateTime Cert::notAfter() const { return d->c->notAfter(); } -QByteArray Cert::toDER() const +TQByteArray Cert::toDER() const { - QByteArray out; + TQByteArray out; if(!d->c->toDER(&out)) - return QByteArray(); + return TQByteArray(); return out; } -bool Cert::fromDER(const QByteArray &a) +bool Cert::fromDER(const TQByteArray &a) { return d->c->createFromDER(a.data(), a.size()); } -QString Cert::toPEM() const +TQString Cert::toPEM() const { - QByteArray out; + TQByteArray out; if(!d->c->toPEM(&out)) - return QByteArray(); + return TQByteArray(); - QCString cs; + TQCString cs; cs.resize(out.size()+1); memcpy(cs.data(), out.data(), out.size()); - return QString::fromLatin1(cs); + return TQString::fromLatin1(cs); } -bool Cert::fromPEM(const QString &str) +bool Cert::fromPEM(const TQString &str) { - QCString cs = str.latin1(); - QByteArray a(cs.length()); + TQCString cs = str.latin1(); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return d->c->createFromPEM(a.data(), a.size()); } @@ -842,7 +842,7 @@ public: tryMore = false; } - void appendArray(QByteArray *a, const QByteArray &b) + void appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -851,21 +851,21 @@ public: Cert cert; QCA_TLSContext *c; - QByteArray in, out, to_net, from_net; + TQByteArray in, out, to_net, from_net; int bytesEncoded; bool tryMore; bool handshaken; - QString host; + TQString host; bool hostMismatch; bool closing; Cert ourCert; RSAKey ourKey; - QPtrList<QCA_CertContext> store; + TQPtrList<QCA_CertContext> store; }; -TLS::TLS(QObject *parent) -:QObject(parent) +TLS::TLS(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -881,11 +881,11 @@ void TLS::setCertificate(const Cert &cert, const RSAKey &key) d->ourKey = key; } -void TLS::setCertificateStore(const QPtrList<Cert> &store) +void TLS::setCertificateStore(const TQPtrList<Cert> &store) { // convert the cert list into a context list d->store.clear(); - QPtrListIterator<Cert> it(store); + TQPtrListIterator<Cert> it(store); for(Cert *cert; (cert = it.current()); ++it) d->store.append(cert->d->c); } @@ -895,14 +895,14 @@ void TLS::reset() d->reset(); } -bool TLS::startClient(const QString &host) +bool TLS::startClient(const TQString &host) { d->reset(); d->host = host; if(!d->c->startClient(d->store, *d->ourCert.d->c, *d->ourKey.d->c)) return false; - QTimer::singleShot(0, this, SLOT(update())); + TQTimer::singleShot(0, this, TQT_SLOT(update())); return true; } @@ -912,7 +912,7 @@ bool TLS::startServer() if(!d->c->startServer(d->store, *d->ourCert.d->c, *d->ourKey.d->c)) return false; - QTimer::singleShot(0, this, SLOT(update())); + TQTimer::singleShot(0, this, TQT_SLOT(update())); return true; } @@ -922,7 +922,7 @@ void TLS::close() return; d->closing = true; - QTimer::singleShot(0, this, SLOT(update())); + TQTimer::singleShot(0, this, TQT_SLOT(update())); } bool TLS::isHandshaken() const @@ -930,35 +930,35 @@ bool TLS::isHandshaken() const return d->handshaken; } -void TLS::write(const QByteArray &a) +void TLS::write(const TQByteArray &a) { d->appendArray(&d->out, a); update(); } -QByteArray TLS::read() +TQByteArray TLS::read() { - QByteArray a = d->in.copy(); + TQByteArray a = d->in.copy(); d->in.resize(0); return a; } -void TLS::writeIncoming(const QByteArray &a) +void TLS::writeIncoming(const TQByteArray &a) { d->appendArray(&d->from_net, a); update(); } -QByteArray TLS::readOutgoing() +TQByteArray TLS::readOutgoing() { - QByteArray a = d->to_net.copy(); + TQByteArray a = d->to_net.copy(); d->to_net.resize(0); return a; } -QByteArray TLS::readUnprocessed() +TQByteArray TLS::readUnprocessed() { - QByteArray a = d->from_net.copy(); + TQByteArray a = d->from_net.copy(); d->from_net.resize(0); return a; } @@ -981,10 +981,10 @@ void TLS::update() bool force_read = false; bool eof = false; bool done = false; - QGuardedPtr<TLS> self = this; + TQGuardedPtr<TLS> self = this; if(d->closing) { - QByteArray a; + TQByteArray a; int r = d->c->shutdown(d->from_net, &a); d->from_net.resize(0); if(r == QCA_TLSContext::Error) { @@ -1000,7 +1000,7 @@ void TLS::update() } else { if(!d->handshaken) { - QByteArray a; + TQByteArray a; int r = d->c->handshake(d->from_net, &a); d->from_net.resize(0); if(r == QCA_TLSContext::Error) { @@ -1029,7 +1029,7 @@ void TLS::update() if(d->handshaken) { if(!d->out.isEmpty() || d->tryMore) { d->tryMore = false; - QByteArray a; + TQByteArray a; int enc; bool more = false; bool ok = d->c->encode(d->out, &a, &enc); @@ -1050,7 +1050,7 @@ void TLS::update() } } if(!d->from_net.isEmpty() || force_read) { - QByteArray a, b; + TQByteArray a, b; bool ok = d->c->decode(d->from_net, &a, &b); eof = d->c->eof(); d->from_net.resize(0); @@ -1096,7 +1096,7 @@ void TLS::update() //---------------------------------------------------------------------------- // SASL //---------------------------------------------------------------------------- -QString saslappname = "qca"; +TQString saslappname = "qca"; class SASL::Private { public: @@ -1118,22 +1118,22 @@ public: // security opts bool noPlain, noActive, noDict, noAnon, reqForward, reqCreds, reqMutual; int ssfmin, ssfmax; - QString ext_authid; + TQString ext_authid; int ext_ssf; bool tried; QCA_SASLContext *c; - QHostAddress localAddr, remoteAddr; + TQHostAddress localAddr, remoteAddr; int localPort, remotePort; - QByteArray stepData; + TQByteArray stepData; bool allowCSF; bool first, server; - QByteArray inbuf, outbuf; + TQByteArray inbuf, outbuf; }; -SASL::SASL(QObject *parent) -:QObject(parent) +SASL::SASL(TQObject *parent) +:TQObject(parent) { d = new Private; reset(); @@ -1144,7 +1144,7 @@ SASL::~SASL() delete d; } -void SASL::setAppName(const QString &name) +void SASL::setAppName(const TQString &name) { saslappname = name; } @@ -1222,7 +1222,7 @@ void SASL::setMaximumSSF(int x) d->ssfmax = x; } -void SASL::setExternalAuthID(const QString &authid) +void SASL::setExternalAuthID(const TQString &authid) { d->ext_authid = authid; } @@ -1232,19 +1232,19 @@ void SASL::setExternalSSF(int x) d->ext_ssf = x; } -void SASL::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void SASL::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->localAddr = addr; d->localPort = port; } -void SASL::setRemoteAddr(const QHostAddress &addr, Q_UINT16 port) +void SASL::setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port) { d->remoteAddr = addr; d->remotePort = port; } -bool SASL::startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst) +bool SASL::startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst) { QCA_SASLHostPort la, ra; if(d->localPort != -1) { @@ -1265,11 +1265,11 @@ bool SASL::startClient(const QString &service, const QString &host, const QStrin d->first = true; d->server = false; d->tried = false; - QTimer::singleShot(0, this, SLOT(tryAgain())); + TQTimer::singleShot(0, this, TQT_SLOT(tryAgain())); return true; } -bool SASL::startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist) +bool SASL::startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist) { QCA_SASLHostPort la, ra; if(d->localPort != -1) { @@ -1292,13 +1292,13 @@ bool SASL::startServer(const QString &service, const QString &host, const QStrin return true; } -void SASL::putServerFirstStep(const QString &mech) +void SASL::putServerFirstStep(const TQString &mech) { int r = d->c->serverFirstStep(mech, 0); handleServerFirstStep(r); } -void SASL::putServerFirstStep(const QString &mech, const QByteArray &clientInit) +void SASL::putServerFirstStep(const TQString &mech, const TQByteArray &clientInit) { int r = d->c->serverFirstStep(mech, &clientInit); handleServerFirstStep(r); @@ -1316,28 +1316,28 @@ void SASL::handleServerFirstStep(int r) error(ErrAuth); } -void SASL::putStep(const QByteArray &stepData) +void SASL::putStep(const TQByteArray &stepData) { d->stepData = stepData.copy(); tryAgain(); } -void SASL::setUsername(const QString &user) +void SASL::setUsername(const TQString &user) { d->c->setClientParams(&user, 0, 0, 0); } -void SASL::setAuthzid(const QString &authzid) +void SASL::setAuthzid(const TQString &authzid) { d->c->setClientParams(0, &authzid, 0, 0); } -void SASL::setPassword(const QString &pass) +void SASL::setPassword(const TQString &pass) { d->c->setClientParams(0, 0, &pass, 0); } -void SASL::setRealm(const QString &realm) +void SASL::setRealm(const TQString &realm) { d->c->setClientParams(0, 0, 0, &realm); } @@ -1399,8 +1399,8 @@ void SASL::tryAgain() return; } - QString mech = d->c->mech(); - const QByteArray *clientInit = d->c->clientInit(); + TQString mech = d->c->mech(); + const TQByteArray *clientInit = d->c->clientInit(); d->first = false; d->tried = false; @@ -1443,9 +1443,9 @@ int SASL::ssf() const return d->c->security(); } -void SASL::write(const QByteArray &a) +void SASL::write(const TQByteArray &a) { - QByteArray b; + TQByteArray b; if(!d->c->encode(a, &b)) { error(ErrCrypt); return; @@ -1456,16 +1456,16 @@ void SASL::write(const QByteArray &a) readyReadOutgoing(a.size()); } -QByteArray SASL::read() +TQByteArray SASL::read() { - QByteArray a = d->inbuf.copy(); + TQByteArray a = d->inbuf.copy(); d->inbuf.resize(0); return a; } -void SASL::writeIncoming(const QByteArray &a) +void SASL::writeIncoming(const TQByteArray &a) { - QByteArray b; + TQByteArray b; if(!d->c->decode(a, &b)) { error(ErrCrypt); return; @@ -1476,9 +1476,9 @@ void SASL::writeIncoming(const QByteArray &a) readyRead(); } -QByteArray SASL::readOutgoing() +TQByteArray SASL::readOutgoing() { - QByteArray a = d->outbuf.copy(); + TQByteArray a = d->outbuf.copy(); d->outbuf.resize(0); return a; } diff --git a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h index 1a52a826..46b25cc9 100644 --- a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h +++ b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h @@ -21,12 +21,12 @@ #ifndef QCA_H #define QCA_H -#include<qstring.h> -#include<qcstring.h> -#include<qdatetime.h> -#include<qmap.h> -#include<qptrlist.h> -#include<qobject.h> +#include<tqstring.h> +#include<tqcstring.h> +#include<tqdatetime.h> +#include<tqmap.h> +#include<tqptrlist.h> +#include<tqobject.h> #ifdef Q_OS_WIN32 # ifndef QCA_STATIC @@ -91,8 +91,8 @@ namespace QCA QCA_EXPORT void insertProvider(QCAProvider *); QCA_EXPORT void unloadAllPlugins(); - QCA_EXPORT QString arrayToHex(const QByteArray &); - QCA_EXPORT QByteArray hexToArray(const QString &); + QCA_EXPORT TQString arrayToHex(const TQByteArray &); + QCA_EXPORT TQByteArray hexToArray(const TQString &); class QCA_EXPORT Hash { @@ -102,8 +102,8 @@ namespace QCA ~Hash(); void clear(); - void update(const QByteArray &a); - QByteArray final(); + void update(const TQByteArray &a); + TQByteArray final(); protected: Hash(QCA_HashContext *); @@ -119,26 +119,26 @@ namespace QCA public: HashStatic<T>() {} - static QByteArray hash(const QByteArray &a) + static TQByteArray hash(const TQByteArray &a) { T obj; obj.update(a); return obj.final(); } - static QByteArray hash(const QCString &cs) + static TQByteArray hash(const TQCString &cs) { - QByteArray a(cs.length()); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return hash(a); } - static QString hashToString(const QByteArray &a) + static TQString hashToString(const TQByteArray &a) { return arrayToHex(hash(a)); } - static QString hashToString(const QCString &cs) + static TQString hashToString(const TQCString &cs) { return arrayToHex(hash(cs)); } @@ -151,14 +151,14 @@ namespace QCA Cipher & operator=(const Cipher &); ~Cipher(); - QByteArray dyn_generateKey(int size=-1) const; - QByteArray dyn_generateIV() const; - void reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad=true); - bool update(const QByteArray &a); - QByteArray final(bool *ok=0); + TQByteArray dyn_generateKey(int size=-1) const; + TQByteArray dyn_generateIV() const; + void reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad=true); + bool update(const TQByteArray &a); + TQByteArray final(bool *ok=0); protected: - Cipher(QCA_CipherContext *, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad); + Cipher(QCA_CipherContext *, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad); private: class Private; @@ -171,13 +171,13 @@ namespace QCA public: CipherStatic<T>() {} - static QByteArray generateKey(int size=-1) + static TQByteArray generateKey(int size=-1) { T obj; return obj.dyn_generateKey(size); } - static QByteArray generateIV() + static TQByteArray generateIV() { T obj; return obj.dyn_generateIV(); @@ -205,25 +205,25 @@ namespace QCA class QCA_EXPORT BlowFish : public Cipher, public CipherStatic<BlowFish> { public: - BlowFish(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + BlowFish(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class QCA_EXPORT TripleDES : public Cipher, public CipherStatic<TripleDES> { public: - TripleDES(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + TripleDES(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class QCA_EXPORT AES128 : public Cipher, public CipherStatic<AES128> { public: - AES128(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + AES128(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class QCA_EXPORT AES256 : public Cipher, public CipherStatic<AES256> { public: - AES256(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + AES256(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class RSA; @@ -239,11 +239,11 @@ namespace QCA bool havePublic() const; bool havePrivate() const; - QByteArray toDER(bool publicOnly=false) const; - bool fromDER(const QByteArray &a); + TQByteArray toDER(bool publicOnly=false) const; + bool fromDER(const TQByteArray &a); - QString toPEM(bool publicOnly=false) const; - bool fromPEM(const QString &); + TQString toPEM(bool publicOnly=false) const; + bool fromPEM(const TQString &); // only call if you know what you are doing bool fromNative(void *); @@ -254,8 +254,8 @@ namespace QCA friend class RSA; friend class TLS; - bool encrypt(const QByteArray &a, QByteArray *out, bool oaep) const; - bool decrypt(const QByteArray &a, QByteArray *out, bool oaep) const; + bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const; + bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const; bool generate(unsigned int bits); }; @@ -268,8 +268,8 @@ namespace QCA RSAKey key() const; void setKey(const RSAKey &); - bool encrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const; - bool decrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const; + bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const; + bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const; static RSAKey generateKey(unsigned int bits); @@ -277,7 +277,7 @@ namespace QCA RSAKey v_key; }; - typedef QMap<QString, QString> CertProperties; + typedef TQMap<TQString, TQString> CertProperties; class QCA_EXPORT Cert { public: @@ -288,20 +288,20 @@ namespace QCA bool isNull() const; - QString commonName() const; - QString serialNumber() const; - QString subjectString() const; - QString issuerString() const; + TQString commonName() const; + TQString serialNumber() const; + TQString subjectString() const; + TQString issuerString() const; CertProperties subject() const; CertProperties issuer() const; - QDateTime notBefore() const; - QDateTime notAfter() const; + TQDateTime notBefore() const; + TQDateTime notAfter() const; - QByteArray toDER() const; - bool fromDER(const QByteArray &a); + TQByteArray toDER() const; + bool fromDER(const TQByteArray &a); - QString toPEM() const; - bool fromPEM(const QString &); + TQString toPEM() const; + bool fromPEM(const TQString &); private: class Private; @@ -332,26 +332,26 @@ namespace QCA }; enum Error { ErrHandshake, ErrCrypt }; - TLS(QObject *parent=0); + TLS(TQObject *parent=0); ~TLS(); void setCertificate(const Cert &cert, const RSAKey &key); - void setCertificateStore(const QPtrList<Cert> &store); // note: store must persist + void setCertificateStore(const TQPtrList<Cert> &store); // note: store must persist void reset(); - bool startClient(const QString &host=""); + bool startClient(const TQString &host=""); bool startServer(); void close(); bool isHandshaken() const; // plain (application side) - void write(const QByteArray &a); - QByteArray read(); + void write(const TQByteArray &a); + TQByteArray read(); // encoded (socket side) - void writeIncoming(const QByteArray &a); - QByteArray readOutgoing(); - QByteArray readUnprocessed(); + void writeIncoming(const TQByteArray &a); + TQByteArray readOutgoing(); + TQByteArray readUnprocessed(); // cert related const Cert & peerCertificate() const; @@ -390,10 +390,10 @@ namespace QCA NoUser, RemoteUnavail }; - SASL(QObject *parent=0); + SASL(TQObject *parent=0); ~SASL(); - static void setAppName(const QString &name); + static void setAppName(const TQString &name); void reset(); int errorCondition() const; @@ -409,40 +409,40 @@ namespace QCA void setMinimumSSF(int); void setMaximumSSF(int); - void setExternalAuthID(const QString &authid); + void setExternalAuthID(const TQString &authid); void setExternalSSF(int); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); - void setRemoteAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); + void setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port); // initialize - bool startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst=true); - bool startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist); + bool startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst=true); + bool startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist); // authentication - void putStep(const QByteArray &stepData); - void putServerFirstStep(const QString &mech); - void putServerFirstStep(const QString &mech, const QByteArray &clientInit); - void setUsername(const QString &user); - void setAuthzid(const QString &auth); - void setPassword(const QString &pass); - void setRealm(const QString &realm); + void putStep(const TQByteArray &stepData); + void putServerFirstStep(const TQString &mech); + void putServerFirstStep(const TQString &mech, const TQByteArray &clientInit); + void setUsername(const TQString &user); + void setAuthzid(const TQString &auth); + void setPassword(const TQString &pass); + void setRealm(const TQString &realm); void continueAfterParams(); void continueAfterAuthCheck(); // security layer int ssf() const; - void write(const QByteArray &a); - QByteArray read(); - void writeIncoming(const QByteArray &a); - QByteArray readOutgoing(); + void write(const TQByteArray &a); + TQByteArray read(); + void writeIncoming(const TQByteArray &a); + TQByteArray readOutgoing(); signals: // for authentication - void clientFirstStep(const QString &mech, const QByteArray *clientInit); - void nextStep(const QByteArray &stepData); + void clientFirstStep(const TQString &mech, const TQByteArray *clientInit); + void nextStep(const TQByteArray &stepData); void needParams(bool user, bool authzid, bool pass, bool realm); - void authCheck(const QString &user, const QString &authzid); + void authCheck(const TQString &user, const TQString &authzid); void authenticated(); // for security layer diff --git a/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h b/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h index e6172434..6eda17f9 100644 --- a/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h +++ b/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h @@ -21,11 +21,11 @@ #ifndef QCAPROVIDER_H #define QCAPROVIDER_H -#include<qglobal.h> -#include<qstring.h> -#include<qdatetime.h> -#include<qobject.h> -#include<qhostaddress.h> +#include<tqglobal.h> +#include<tqstring.h> +#include<tqdatetime.h> +#include<tqobject.h> +#include<tqhostaddress.h> #include"qca.h" #define QCA_PLUGIN_VERSION 1 @@ -50,7 +50,7 @@ public: virtual QCA_HashContext *clone()=0; virtual void reset()=0; virtual void update(const char *in, unsigned int len)=0; - virtual void final(QByteArray *out)=0; + virtual void final(TQByteArray *out)=0; }; class QCA_CipherContext @@ -66,7 +66,7 @@ public: virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0; virtual bool update(const char *in, unsigned int len)=0; - virtual bool final(QByteArray *out)=0; + virtual bool final(TQByteArray *out)=0; }; class QCA_RSAKeyContext @@ -82,17 +82,17 @@ public: virtual bool createFromPEM(const char *in, unsigned int len)=0; virtual bool createFromNative(void *in)=0; virtual bool generate(unsigned int bits)=0; - virtual bool toDER(QByteArray *out, bool publicOnly)=0; - virtual bool toPEM(QByteArray *out, bool publicOnly)=0; + virtual bool toDER(TQByteArray *out, bool publicOnly)=0; + virtual bool toPEM(TQByteArray *out, bool publicOnly)=0; - virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0; - virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0; + virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0; + virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0; }; struct QCA_CertProperty { - QString var; - QString val; + TQString var; + TQString val; }; class QCA_CertContext @@ -104,17 +104,17 @@ public: virtual bool isNull() const=0; virtual bool createFromDER(const char *in, unsigned int len)=0; virtual bool createFromPEM(const char *in, unsigned int len)=0; - virtual bool toDER(QByteArray *out)=0; - virtual bool toPEM(QByteArray *out)=0; - - virtual QString serialNumber() const=0; - virtual QString subjectString() const=0; - virtual QString issuerString() const=0; - virtual QValueList<QCA_CertProperty> subject() const=0; - virtual QValueList<QCA_CertProperty> issuer() const=0; - virtual QDateTime notBefore() const=0; - virtual QDateTime notAfter() const=0; - virtual bool matchesAddress(const QString &realHost) const=0; + virtual bool toDER(TQByteArray *out)=0; + virtual bool toPEM(TQByteArray *out)=0; + + virtual TQString serialNumber() const=0; + virtual TQString subjectString() const=0; + virtual TQString issuerString() const=0; + virtual TQValueList<QCA_CertProperty> subject() const=0; + virtual TQValueList<QCA_CertProperty> issuer() const=0; + virtual TQDateTime notBefore() const=0; + virtual TQDateTime notAfter() const=0; + virtual bool matchesAddress(const TQString &realHost) const=0; }; class QCA_TLSContext @@ -124,15 +124,15 @@ public: virtual ~QCA_TLSContext() {} virtual void reset()=0; - virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; - virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; + virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; + virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; - virtual int handshake(const QByteArray &in, QByteArray *out)=0; - virtual int shutdown(const QByteArray &in, QByteArray *out)=0; - virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0; - virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0; + virtual int handshake(const TQByteArray &in, TQByteArray *out)=0; + virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0; + virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0; + virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0; virtual bool eof() const=0; - virtual QByteArray unprocessed()=0; + virtual TQByteArray unprocessed()=0; virtual QCA_CertContext *peerCertificate() const=0; virtual int validityResult() const=0; @@ -140,7 +140,7 @@ public: struct QCA_SASLHostPort { - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; @@ -157,35 +157,35 @@ public: // common virtual void reset()=0; - virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0; - virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0; + virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0; + virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0; virtual int security() const=0; virtual int errorCond() const=0; // init / first step - virtual bool clientStart(const QStringList &mechlist)=0; + virtual bool clientStart(const TQStringList &mechlist)=0; virtual int clientFirstStep(bool allowClientSendFirst)=0; - virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0; - virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0; + virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0; + virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0; // get / set params virtual QCA_SASLNeedParams clientParamsNeeded() const=0; - virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0; - virtual QString username() const=0; - virtual QString authzid() const=0; + virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0; + virtual TQString username() const=0; + virtual TQString authzid() const=0; // continue steps - virtual int nextStep(const QByteArray &in)=0; + virtual int nextStep(const TQByteArray &in)=0; virtual int tryAgain()=0; // results - virtual QString mech() const=0; - virtual const QByteArray *clientInit() const=0; - virtual QByteArray result() const=0; + virtual TQString mech() const=0; + virtual const TQByteArray *clientInit() const=0; + virtual TQByteArray result() const=0; // security layer - virtual bool encode(const QByteArray &in, QByteArray *out)=0; - virtual bool decode(const QByteArray &in, QByteArray *out)=0; + virtual bool encode(const TQByteArray &in, TQByteArray *out)=0; + virtual bool decode(const TQByteArray &in, TQByteArray *out)=0; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp index 366f2afa..0cf55684 100644 --- a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp +++ b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qtimer.h> +#include <tqtimer.h> #include "qca.h" @@ -35,11 +35,11 @@ QCATLSHandler::QCATLSHandler(QCA::TLS *parent) { d = new Private; d->tls = parent; - connect(d->tls, SIGNAL(handshaken()), SLOT(tls_handshaken())); - connect(d->tls, SIGNAL(readyRead()), SLOT(tls_readyRead())); - connect(d->tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int))); - connect(d->tls, SIGNAL(closed()), SLOT(tls_closed())); - connect(d->tls, SIGNAL(error(int)), SLOT(tls_error(int))); + connect(d->tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken())); + connect(d->tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead())); + connect(d->tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int))); + connect(d->tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed())); + connect(d->tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int))); d->state = 0; d->err = -1; } @@ -65,20 +65,20 @@ void QCATLSHandler::reset() d->state = 0; } -void QCATLSHandler::startClient(const QString &host) +void QCATLSHandler::startClient(const TQString &host) { d->state = 0; d->err = -1; if(!d->tls->startClient(host)) - QTimer::singleShot(0, this, SIGNAL(fail())); + TQTimer::singleShot(0, this, TQT_SIGNAL(fail())); } -void QCATLSHandler::write(const QByteArray &a) +void QCATLSHandler::write(const TQByteArray &a) { d->tls->write(a); } -void QCATLSHandler::writeIncoming(const QByteArray &a) +void QCATLSHandler::writeIncoming(const TQByteArray &a) { d->tls->writeIncoming(a); } diff --git a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h index a550d54b..e7ac398e 100644 --- a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h +++ b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h @@ -20,7 +20,7 @@ #ifndef GWQCATLSHANDLER_H #define GWQCATLSHANDLER_H -//#include <qtimer.h> +//#include <tqtimer.h> #include "tlshandler.h" class QCA::TLS; @@ -36,9 +36,9 @@ public: int tlsError() const; void reset(); - void startClient(const QString &host); - void write(const QByteArray &a); - void writeIncoming(const QByteArray &a); + void startClient(const TQString &host); + void write(const TQByteArray &a); + void writeIncoming(const TQByteArray &a); signals: void tlsHandshaken(); diff --git a/kopete/protocols/groupwise/libgroupwise/request.cpp b/kopete/protocols/groupwise/libgroupwise/request.cpp index 508bf6a0..5a0782f5 100644 --- a/kopete/protocols/groupwise/libgroupwise/request.cpp +++ b/kopete/protocols/groupwise/libgroupwise/request.cpp @@ -17,7 +17,7 @@ #include "request.h" -Request::Request( const int transactionId, const QString &command ) +Request::Request( const int transactionId, const TQString &command ) : UserTransfer(transactionId), m_command( command ) { } @@ -26,7 +26,7 @@ Request::~Request() { } -QString Request::command() +TQString Request::command() { return m_command; } diff --git a/kopete/protocols/groupwise/libgroupwise/request.h b/kopete/protocols/groupwise/libgroupwise/request.h index 85a55e8a..21ef71f9 100644 --- a/kopete/protocols/groupwise/libgroupwise/request.h +++ b/kopete/protocols/groupwise/libgroupwise/request.h @@ -30,11 +30,11 @@ friend class RequestFactory; public: ~Request( ); - QString command(); + TQString command(); TransferType type() { return Transfer::RequestTransfer; } private: - Request( const int transactionId, const QString &command ); - QString m_command; + Request( const int transactionId, const TQString &command ); + TQString m_command; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp b/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp index 6387370f..2449f3fe 100644 --- a/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp +++ b/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp @@ -29,7 +29,7 @@ RequestFactory::~RequestFactory() { } -Request* RequestFactory::request( const QString &command ) +Request* RequestFactory::request( const TQString &command ) { return new Request( m_nextTransaction++, command ); } diff --git a/kopete/protocols/groupwise/libgroupwise/requestfactory.h b/kopete/protocols/groupwise/libgroupwise/requestfactory.h index e4ec073e..d2de78de 100644 --- a/kopete/protocols/groupwise/libgroupwise/requestfactory.h +++ b/kopete/protocols/groupwise/libgroupwise/requestfactory.h @@ -18,7 +18,7 @@ #ifndef REQUESTFACTORY_H #define REQUESTFACTORY_H -#include <qstring.h> +#include <tqstring.h> class Request; @@ -36,7 +36,7 @@ public: * The consumer is responsible for deleting this * TODO: Allow the user to provide the fields for the request in this call */ - Request * request( const QString &request); + Request * request( const TQString &request); private: int m_nextTransaction; }; diff --git a/kopete/protocols/groupwise/libgroupwise/response.cpp b/kopete/protocols/groupwise/libgroupwise/response.cpp index 837c7810..79d61a1e 100644 --- a/kopete/protocols/groupwise/libgroupwise/response.cpp +++ b/kopete/protocols/groupwise/libgroupwise/response.cpp @@ -14,7 +14,7 @@ * * ************************************************************************* */ -#include <qapplication.h> +#include <tqapplication.h> #include "response.h" diff --git a/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp b/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp index 6784fd15..48ee8b88 100644 --- a/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp +++ b/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp @@ -16,13 +16,13 @@ ************************************************************************* */ -#include <qbuffer.h> +#include <tqbuffer.h> #include "response.h" #include "responseprotocol.h" -ResponseProtocol::ResponseProtocol(QObject* parent, const char* name): InputProtocolBase(parent, name) +ResponseProtocol::ResponseProtocol(TQObject* parent, const char* name): InputProtocolBase(parent, name) { } @@ -31,15 +31,15 @@ ResponseProtocol::~ResponseProtocol() { } -Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) +Transfer * ResponseProtocol::parse( const TQByteArray & wire, uint & bytes ) { m_bytes = 0; m_collatingFields.clear(); - //m_din = new QDataStream( wire, IO_ReadOnly ); - QBuffer inBuf( wire ); + //m_din = new TQDataStream( wire, IO_ReadOnly ); + TQBuffer inBuf( wire ); inBuf.open( IO_ReadOnly); m_din.setDevice( &inBuf ); - m_din.setByteOrder( QDataStream::LittleEndian ); + m_din.setByteOrder( TQDataStream::LittleEndian ); // check that this begins with a HTTP (is a response) Q_UINT32 val; @@ -49,20 +49,20 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) Q_ASSERT( qstrncmp( (const char *)&val, "HTTP", strlen( "HTTP" ) ) == 0 ); // read rest of HTTP header and look for a 301 redirect. - QCString headerFirst; + TQCString headerFirst; if ( !readGroupWiseLine( headerFirst ) ) return 0; // pull out the HTTP return code int firstSpace = headerFirst.find( ' ' ); - QString rtnField = headerFirst.mid( firstSpace, headerFirst.find( ' ', firstSpace + 1 ) ); + TQString rtnField = headerFirst.mid( firstSpace, headerFirst.find( ' ', firstSpace + 1 ) ); bool ok = true; int rtnCode; int packetState = -1; rtnCode = rtnField.toInt( &ok ); debug( "CoreProtocol::readResponse() got HTTP return code " ); // read rest of header - QStringList headerRest; - QCString line; + TQStringList headerRest; + TQCString line; while ( line != "\r\n" ) { if ( !readGroupWiseLine( line ) ) @@ -71,7 +71,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) return 0; } headerRest.append( line ); - debug( QString( "- read header line - (%1) : %2" ).arg( line.length() ).arg( line.data() ) ); + debug( TQString( "- read header line - (%1) : %2" ).arg( line.length() ).arg( line.data() ) ); } debug( "ResponseProtocol::readResponse() header finished" ); // if it's a redirect, set flag @@ -85,14 +85,14 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) // other header processing ( 500! ) if ( ok && rtnCode == 500 ) { - debug( QString( "- server error %1" ).arg( rtnCode ) ); + debug( TQString( "- server error %1" ).arg( rtnCode ) ); packetState = ServerError; m_din.unsetDevice(); return 0; } if ( ok && rtnCode == 404 ) { - debug( QString( "- server error %1" ).arg( rtnCode ) ); + debug( TQString( "- server error %1" ).arg( rtnCode ) ); packetState = ServerError; m_din.unsetDevice(); return 0; @@ -123,7 +123,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) if ( sf ) { tId = sf->value().toInt(); - debug( QString( "ResponseProtocol::readResponse() - transaction ID is %1" ).arg( tId ) ); + debug( TQString( "ResponseProtocol::readResponse() - transaction ID is %1" ).arg( tId ) ); m_collatingFields.remove( it ); delete sf; } @@ -135,7 +135,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) if ( sf ) { resultCode = sf->value().toInt(); - debug( QString( "ResponseProtocol::readResponse() - result code is %1" ).arg( resultCode ) ); + debug( TQString( "ResponseProtocol::readResponse() - result code is %1" ).arg( resultCode ) ); m_collatingFields.remove( it ); delete sf; } @@ -143,7 +143,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) // append to inQueue if ( tId ) { - debug( QString( "ResponseProtocol::readResponse() - setting state Available, got %1 fields in base array" ).arg(m_collatingFields.count() ) ); + debug( TQString( "ResponseProtocol::readResponse() - setting state Available, got %1 fields in base array" ).arg(m_collatingFields.count() ) ); packetState = Available; bytes = m_bytes; m_din.unsetDevice(); @@ -169,7 +169,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) // if we find the beginning of a new nested list, push the current list onto m_collatingFields debug( "ResponseProtocol::readFields()" ); if ( fieldCount > 0 ) - debug( QString( "reading %1 fields" ).arg( fieldCount ) ); + debug( TQString( "reading %1 fields" ).arg( fieldCount ) ); Field::FieldList currentList; while ( fieldCount != 0 ) // prevents bad input data from ruining our day { @@ -177,7 +177,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) // read field Q_UINT8 type, method; Q_UINT32 val; - QCString tag; + TQCString tag; // read uint8 type if ( !okToProceed() ) { @@ -209,7 +209,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) return false; } - debug( QString( "- type: %1, method: %2, tag: %3," ).arg( type ).arg( method ).arg( tag.data() ) ); + debug( TQString( "- type: %1, method: %2, tag: %3," ).arg( type ).arg( method ).arg( tag.data() ) ); // if multivalue or array if ( type == NMFIELD_TYPE_MV || type == NMFIELD_TYPE_ARRAY ) { @@ -223,7 +223,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) m_bytes += sizeof( Q_UINT32 ); // create multifield - debug( QString( " multi field containing: %1" ).arg( val ) ); + debug( TQString( " multi field containing: %1" ).arg( val ) ); Field::MultiField* m = new Field::MultiField( tag, method, 0, type ); currentList.append( m ); if ( !readFields( val, ¤tList) ) @@ -237,7 +237,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) if ( type == NMFIELD_TYPE_UTF8 || type == NMFIELD_TYPE_DN ) { - QCString rawData; + TQCString rawData; if( !safeReadBytes( rawData, val ) ) { currentList.purge(); @@ -249,8 +249,8 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) break; } // convert to unicode - ignore the terminating NUL, because Qt<3.3.2 doesn't sanity check val. - QString fieldValue = QString::fromUtf8( rawData.data(), val - 1 ); - debug( QString( "- utf/dn single field: %1" ).arg( fieldValue ) ); + TQString fieldValue = TQString::fromUtf8( rawData.data(), val - 1 ); + debug( TQString( "- utf/dn single field: %1" ).arg( fieldValue ) ); // create singlefield Field::SingleField* s = new Field::SingleField( tag, method, 0, type, fieldValue ); currentList.append( s ); @@ -266,7 +266,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) } m_din >> val; m_bytes += sizeof( Q_UINT32 ); - debug( QString( "- numeric field: %1" ).arg( val ) ); + debug( TQString( "- numeric field: %1" ).arg( val ) ); Field::SingleField* s = new Field::SingleField( tag, method, 0, type, val ); currentList.append( s ); } @@ -293,9 +293,9 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) return true; } -bool ResponseProtocol::readGroupWiseLine( QCString & line ) +bool ResponseProtocol::readGroupWiseLine( TQCString & line ) { - line = QCString(); + line = TQCString(); while ( true ) { Q_UINT8 c; @@ -304,7 +304,7 @@ bool ResponseProtocol::readGroupWiseLine( QCString & line ) return false; m_din >> c; m_bytes++; - line += QChar(c); + line += TQChar(c); if ( c == '\n' ) break; } diff --git a/kopete/protocols/groupwise/libgroupwise/responseprotocol.h b/kopete/protocols/groupwise/libgroupwise/responseprotocol.h index 5957ad19..f64aee7d 100644 --- a/kopete/protocols/groupwise/libgroupwise/responseprotocol.h +++ b/kopete/protocols/groupwise/libgroupwise/responseprotocol.h @@ -43,7 +43,7 @@ public: */ enum PacketState { FieldsRead, ProtocolError }; - ResponseProtocol(QObject* parent, const char* name); + ResponseProtocol(TQObject* parent, const char* name); ~ResponseProtocol(); /** * Attempt to parse the supplied data into an @ref Response object. @@ -52,12 +52,12 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an Response object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); protected: /** * read a line ending in \r\n, including the \r\n */ - bool readGroupWiseLine( QCString & ); + bool readGroupWiseLine( TQCString & ); /** * Read in a response */ @@ -68,7 +68,7 @@ protected: bool readFields( int fieldCount, Field::FieldList * list = 0 ); private: // fields from a packet being parsed, before it has been completely received - //QValueStack<Field::FieldList> m_collatingFields; + //TQValueStack<Field::FieldList> m_collatingFields; Field::FieldList m_collatingFields; int m_packetState; // represents the state of the parsing of the last incoming data received }; diff --git a/kopete/protocols/groupwise/libgroupwise/rtf.cc b/kopete/protocols/groupwise/libgroupwise/rtf.cc index 14a3005a..9a691ec9 100644 --- a/kopete/protocols/groupwise/libgroupwise/rtf.cc +++ b/kopete/protocols/groupwise/libgroupwise/rtf.cc @@ -1729,25 +1729,25 @@ void ParStyle::clearFormatting() // dir is not a formatting item. } -QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) -{ - QString str = _str; - str.replace(QRegExp("&"), "&"); - str.replace(QRegExp("<"), "<"); - str.replace(QRegExp(">"), ">"); - str.replace(QRegExp("\""), """); - str.replace(QRegExp("\r"), ""); +TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode) +{ + TQString str = _str; + str.replace(TQRegExp("&"), "&"); + str.replace(TQRegExp("<"), "<"); + str.replace(TQRegExp(">"), ">"); + str.replace(TQRegExp("\""), """); + str.replace(TQRegExp("\r"), ""); switch (mode){ case quoteHTML: - str.replace(QRegExp("\n"), "<br>\n"); + str.replace(TQRegExp("\n"), "<br>\n"); break; case quoteXML: - str.replace(QRegExp("\n"), "<br/>\n"); + str.replace(TQRegExp("\n"), "<br/>\n"); break; default: break; } - QRegExp re(" +"); + TQRegExp re(" +"); int len; int pos = 0; @@ -1756,7 +1756,7 @@ QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) if (len == 1) continue; - QString s = " "; + TQString s = " "; for (int i = 1; i < len; i++) s += " "; str.replace(pos, len, s); @@ -1792,7 +1792,7 @@ void RTF2HTML::FlushOutTags() // RTF colors are 1-based; colors[] is a 0-based array. if (t.param > colors.size() || t.param == 0) break; - QColor &c = colors[t.param-1]; + TQColor &c = colors[t.param-1]; PrintUnquoted("<span style=\"color:#%02X%02X%02X\">", c.red(), c.green(), c.blue()); } break; @@ -1811,7 +1811,7 @@ void RTF2HTML::FlushOutTags() case TAG_BG_COLOR:{ if (t.param > colors.size() || t.param == 0) break; - QColor &c = colors[t.param-1]; + TQColor &c = colors[t.param-1]; PrintUnquoted("<span style=\"background-color:#%02X%02X%02X;\">", c.red(), c.green(), c.blue()); break; } @@ -1982,7 +1982,7 @@ void RTF2HTML::PrintUnquoted(const char *str, ...) sParagraph += buff; } -void RTF2HTML::PrintQuoted(const QString &str) +void RTF2HTML::PrintQuoted(const TQString &str) { sParagraph += quoteString(str); } @@ -2214,7 +2214,7 @@ void Level::reset() resetTag(TAG_ALL); if (m_bColors){ if (m_bColorInit){ - QColor c(m_nRed, m_nGreen, m_nBlue); + TQColor c(m_nRed, m_nGreen, m_nBlue); p->colors.push_back(c); resetColors(); } @@ -2285,7 +2285,7 @@ void Level::flush() if (encoding == NULL) encoding = p->encoding; - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); */ //p->PrintQuoted(codec->toUnicode(text.c_str(), text.length())); p->PrintQuoted(text.c_str()); @@ -2349,7 +2349,7 @@ static char h2d(char c) return 0; } -QString RTF2HTML::Parse(const char *rtf, const char *_encoding) +TQString RTF2HTML::Parse(const char *rtf, const char *_encoding) { encoding = _encoding; YY_BUFFER_STATE yy_current_buffer = rtf_scan_string(rtf); @@ -2417,7 +2417,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) break; case UNICODE_CHAR:{ cur_level.flush(); - sParagraph += QChar((unsigned short)(atol(rtftext + 2))); + sParagraph += TQChar((unsigned short)(atol(rtftext + 2))); break; } case HEX:{ @@ -2516,7 +2516,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) } /* -bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) +bool ICQClient::parseRTF(const char *rtf, const char *encoding, TQString &res) { char _RTF[] = "{\\rtf"; if ((strlen(rtf) > strlen(_RTF)) && !memcmp(rtf, _RTF, strlen(_RTF))){ @@ -2524,7 +2524,7 @@ bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) res = p.Parse(rtf, encoding); return true; } - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); res = codec->toUnicode(rtf, strlen(rtf)); return false; } diff --git a/kopete/protocols/groupwise/libgroupwise/rtf2html.h b/kopete/protocols/groupwise/libgroupwise/rtf2html.h index a305b89d..5685e4a1 100644 --- a/kopete/protocols/groupwise/libgroupwise/rtf2html.h +++ b/kopete/protocols/groupwise/libgroupwise/rtf2html.h @@ -18,12 +18,12 @@ #ifndef RTF2HTML_H #define RTF2HTML_H -#include <qstring.h> +#include <tqstring.h> #include <stdio.h> -#include <qtextcodec.h> -#include <qcolor.h> -#include <qregexp.h> +#include <tqtextcodec.h> +#include <tqcolor.h> +#include <tqregexp.h> #include <kdebug.h> #include <vector> @@ -149,15 +149,15 @@ class RTF2HTML public: RTF2HTML(); - QString Parse(const char *rtf, const char *encoding); + TQString Parse(const char *rtf, const char *encoding); // Paragraph-specific functions: - QString quoteString(const QString &_str, quoteMode mode = quoteHTML); + TQString quoteString(const TQString &_str, quoteMode mode = quoteHTML); // Appends a string with formatting into the paragraph buffer. void PrintUnquoted(const char *str, ...); // Quotes and appends a string to the paragraph buffer. - void PrintQuoted(const QString &str); + void PrintQuoted(const TQString &str); // Writes down the tags from oTags into the paragraph buffer. void FlushOutTags(); // Retrieves the top not-yet-written tag. @@ -179,7 +179,7 @@ protected: // True if the paragraph was opened explicitly. bool bExplicitParagraph; // The paragraph's HTML buffer. - QString sParagraph; + TQString sParagraph; // Defines the paragraph's formatting. ParStyle parStyle; // Tags which weren't yet printed out. @@ -188,11 +188,11 @@ protected: // Document members // The document HTML buffer. - QString s; + TQString s; // Fonts table. vector<FontDef> fonts; // Colors table. - vector<QColor> colors; + vector<TQColor> colors; // Stack of tags (across all levels, not just current level) stack<TagEnum> tags; diff --git a/kopete/protocols/groupwise/libgroupwise/safedelete.cpp b/kopete/protocols/groupwise/libgroupwise/safedelete.cpp index 703e8ed3..5dde3725 100644 --- a/kopete/protocols/groupwise/libgroupwise/safedelete.cpp +++ b/kopete/protocols/groupwise/libgroupwise/safedelete.cpp @@ -19,7 +19,7 @@ #include "safedelete.h" -#include <qtimer.h> +#include <tqtimer.h> //---------------------------------------------------------------------------- // SafeDelete @@ -35,7 +35,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -54,16 +54,16 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -116,7 +116,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -125,7 +125,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/groupwise/libgroupwise/safedelete.h b/kopete/protocols/groupwise/libgroupwise/safedelete.h index e8215c06..0d4150d9 100644 --- a/kopete/protocols/groupwise/libgroupwise/safedelete.h +++ b/kopete/protocols/groupwise/libgroupwise/safedelete.h @@ -20,8 +20,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include<qobject.h> -#include<qobjectlist.h> +#include<tqobject.h> +#include<tqobjectlist.h> class SafeDelete; class SafeDeleteLock @@ -43,13 +43,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -62,7 +62,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -71,7 +71,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/groupwise/libgroupwise/securestream.cpp b/kopete/protocols/groupwise/libgroupwise/securestream.cpp index 583be03e..6898c18e 100644 --- a/kopete/protocols/groupwise/libgroupwise/securestream.cpp +++ b/kopete/protocols/groupwise/libgroupwise/securestream.cpp @@ -26,9 +26,9 @@ but future layers might not. */ -#include<qguardedptr.h> -#include<qvaluelist.h> -#include<qtimer.h> +#include<tqguardedptr.h> +#include<tqvaluelist.h> +#include<tqtimer.h> #include"securestream.h" @@ -66,7 +66,7 @@ void LayerTracker::specifyEncoded(int encoded, int plain) int LayerTracker::finished(int encoded) { int plain = 0; - for(QValueList<Item>::Iterator it = list.begin(); it != list.end();) { + for(TQValueList<Item>::Iterator it = list.begin(); it != list.end();) { Item &i = *it; // not enough? @@ -91,11 +91,11 @@ SecureLayer::SecureLayer(QCA::TLS *t) type = TLS; p.tls = t; init(); - connect(p.tls, SIGNAL(handshaken()), SLOT(tls_handshaken())); - connect(p.tls, SIGNAL(readyRead()), SLOT(tls_readyRead())); - connect(p.tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int))); - connect(p.tls, SIGNAL(closed()), SLOT(tls_closed())); - connect(p.tls, SIGNAL(error(int)), SLOT(tls_error(int))); + connect(p.tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken())); + connect(p.tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead())); + connect(p.tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int))); + connect(p.tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed())); + connect(p.tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int))); } SecureLayer::SecureLayer(QCA::SASL *s) @@ -103,9 +103,9 @@ SecureLayer::SecureLayer(QCA::SASL *s) type = SASL; p.sasl = s; init(); - connect(p.sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead())); - connect(p.sasl, SIGNAL(readyReadOutgoing(int)), SLOT(sasl_readyReadOutgoing(int))); - connect(p.sasl, SIGNAL(error(int)), SLOT(sasl_error(int))); + connect(p.sasl, TQT_SIGNAL(readyRead()), TQT_SLOT(sasl_readyRead())); + connect(p.sasl, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(sasl_readyReadOutgoing(int))); + connect(p.sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int))); } #ifdef USE_TLSHANDLER @@ -114,11 +114,11 @@ SecureLayer::SecureLayer(TLSHandler *t) type = TLSH; p.tlsHandler = t; init(); - connect(p.tlsHandler, SIGNAL(success()), SLOT(tlsHandler_success())); - connect(p.tlsHandler, SIGNAL(fail()), SLOT(tlsHandler_fail())); - connect(p.tlsHandler, SIGNAL(closed()), SLOT(tlsHandler_closed())); - connect(p.tlsHandler, SIGNAL(readyRead(const QByteArray &)), SLOT(tlsHandler_readyRead(const QByteArray &))); - connect(p.tlsHandler, SIGNAL(readyReadOutgoing(const QByteArray &, int)), SLOT(tlsHandler_readyReadOutgoing(const QByteArray &, int))); + connect(p.tlsHandler, TQT_SIGNAL(success()), TQT_SLOT(tlsHandler_success())); + connect(p.tlsHandler, TQT_SIGNAL(fail()), TQT_SLOT(tlsHandler_fail())); + connect(p.tlsHandler, TQT_SIGNAL(closed()), TQT_SLOT(tlsHandler_closed())); + connect(p.tlsHandler, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(tlsHandler_readyRead(const TQByteArray &))); + connect(p.tlsHandler, TQT_SIGNAL(readyReadOutgoing(const TQByteArray &, int)), TQT_SLOT(tlsHandler_readyReadOutgoing(const TQByteArray &, int))); } #endif @@ -128,7 +128,7 @@ void SecureLayer::init() prebytes = 0; } -void SecureLayer::write(const QByteArray &a) +void SecureLayer::write(const TQByteArray &a) { layer.addPlain(a.size()); switch(type) { @@ -140,7 +140,7 @@ void SecureLayer::write(const QByteArray &a) } } -void SecureLayer::writeIncoming(const QByteArray &a) +void SecureLayer::writeIncoming(const TQByteArray &a) { switch(type) { case TLS: { p.tls->writeIncoming(a); break; } @@ -184,13 +184,13 @@ void SecureLayer::tls_handshaken() void SecureLayer::tls_readyRead() { - QByteArray a = p.tls->read(); + TQByteArray a = p.tls->read(); readyRead(a); } void SecureLayer::tls_readyReadOutgoing(int plainBytes) { - QByteArray a = p.tls->readOutgoing(); + TQByteArray a = p.tls->readOutgoing(); if(tls_done) layer.specifyEncoded(a.size(), plainBytes); needWrite(a); @@ -198,7 +198,7 @@ void SecureLayer::tls_readyReadOutgoing(int plainBytes) void SecureLayer::tls_closed() { - QByteArray a = p.tls->readUnprocessed(); + TQByteArray a = p.tls->readUnprocessed(); tlsClosed(a); } @@ -209,13 +209,13 @@ void SecureLayer::tls_error(int x) void SecureLayer::sasl_readyRead() { - QByteArray a = p.sasl->read(); + TQByteArray a = p.sasl->read(); readyRead(a); } void SecureLayer::sasl_readyReadOutgoing(int plainBytes) { - QByteArray a = p.sasl->readOutgoing(); + TQByteArray a = p.sasl->readOutgoing(); layer.specifyEncoded(a.size(), plainBytes); needWrite(a); } @@ -239,15 +239,15 @@ void SecureLayer::tlsHandler_fail() void SecureLayer::tlsHandler_closed() { - tlsClosed(QByteArray()); + tlsClosed(TQByteArray()); } -void SecureLayer::tlsHandler_readyRead(const QByteArray &a) +void SecureLayer::tlsHandler_readyRead(const TQByteArray &a) { readyRead(a); } -void SecureLayer::tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes) +void SecureLayer::tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes) { if(tls_done) layer.specifyEncoded(a.size(), plainBytes); @@ -259,7 +259,7 @@ class SecureStream::Private { public: ByteStream *bs; - QPtrList<SecureLayer> layers; + TQPtrList<SecureLayer> layers; int pending; int errorCode; bool active; @@ -267,7 +267,7 @@ public: bool haveTLS() const { - QPtrListIterator<SecureLayer> it(layers); + TQPtrListIterator<SecureLayer> it(layers); for(SecureLayer *s; (s = it.current()); ++it) { if(s->type == SecureLayer::TLS #ifdef USE_TLSHANDLER @@ -282,7 +282,7 @@ public: bool haveSASL() const { - QPtrListIterator<SecureLayer> it(layers); + TQPtrListIterator<SecureLayer> it(layers); for(SecureLayer *s; (s = it.current()); ++it) { if(s->type == SecureLayer::SASL) return true; @@ -297,8 +297,8 @@ SecureStream::SecureStream(ByteStream *s) d = new Private; d->bs = s; - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); d->layers.setAutoDelete(true); d->pending = 0; @@ -311,25 +311,25 @@ SecureStream::~SecureStream() delete d; } -void SecureStream::linkLayer(QObject *s) +void SecureStream::linkLayer(TQObject *s) { - connect(s, SIGNAL(tlsHandshaken()), SLOT(layer_tlsHandshaken())); - connect(s, SIGNAL(tlsClosed(const QByteArray &)), SLOT(layer_tlsClosed(const QByteArray &))); - connect(s, SIGNAL(readyRead(const QByteArray &)), SLOT(layer_readyRead(const QByteArray &))); - connect(s, SIGNAL(needWrite(const QByteArray &)), SLOT(layer_needWrite(const QByteArray &))); - connect(s, SIGNAL(error(int)), SLOT(layer_error(int))); + connect(s, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(layer_tlsHandshaken())); + connect(s, TQT_SIGNAL(tlsClosed(const TQByteArray &)), TQT_SLOT(layer_tlsClosed(const TQByteArray &))); + connect(s, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(layer_readyRead(const TQByteArray &))); + connect(s, TQT_SIGNAL(needWrite(const TQByteArray &)), TQT_SLOT(layer_needWrite(const TQByteArray &))); + connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(layer_error(int))); } int SecureStream::calcPrebytes() const { int x = 0; - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); for(SecureLayer *s; (s = it.current()); ++it) x += s->prebytes; return (d->pending - x); } -void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare) +void SecureStream::startTLSClient(QCA::TLS *t, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveTLS()) return; @@ -343,7 +343,7 @@ void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare) insertData(spare); } -void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare) +void SecureStream::startTLSServer(QCA::TLS *t, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveTLS()) return; @@ -357,7 +357,7 @@ void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare) insertData(spare); } -void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare) +void SecureStream::setLayerSASL(QCA::SASL *sasl, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveSASL()) return; @@ -371,7 +371,7 @@ void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare) } #ifdef USE_TLSHANDLER -void SecureStream::startTLSClient(TLSHandler *t, const QString &server, const QByteArray &spare) +void SecureStream::startTLSClient(TLSHandler *t, const TQString &server, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveTLS()) return; @@ -408,7 +408,7 @@ bool SecureStream::isOpen() const return d->active; } -void SecureStream::write(const QByteArray &a) +void SecureStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -430,7 +430,7 @@ int SecureStream::bytesToWrite() const void SecureStream::bs_readyRead() { - QByteArray a = d->bs->read(); + TQByteArray a = d->bs->read(); // send to the first layer SecureLayer *s = d->layers.getFirst(); @@ -442,7 +442,7 @@ void SecureStream::bs_readyRead() void SecureStream::bs_bytesWritten(int bytes) { - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); for(SecureLayer *s; (s = it.current()); ++it) bytes = s->finished(bytes); @@ -458,17 +458,17 @@ void SecureStream::layer_tlsHandshaken() tlsHandshaken(); } -void SecureStream::layer_tlsClosed(const QByteArray &) +void SecureStream::layer_tlsClosed(const TQByteArray &) { d->active = false; d->layers.clear(); tlsClosed(); } -void SecureStream::layer_readyRead(const QByteArray &a) +void SecureStream::layer_readyRead(const TQByteArray &a) { SecureLayer *s = (SecureLayer *)sender(); - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); while(it.current() != s) ++it; @@ -481,10 +481,10 @@ void SecureStream::layer_readyRead(const QByteArray &a) incomingData(a); } -void SecureStream::layer_needWrite(const QByteArray &a) +void SecureStream::layer_needWrite(const TQByteArray &a) { SecureLayer *s = (SecureLayer *)sender(); - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); while(it.current() != s) ++it; @@ -514,7 +514,7 @@ void SecureStream::layer_error(int x) #endif } -void SecureStream::insertData(const QByteArray &a) +void SecureStream::insertData(const TQByteArray &a) { if(!a.isEmpty()) { SecureLayer *s = d->layers.getLast(); @@ -525,12 +525,12 @@ void SecureStream::insertData(const QByteArray &a) } } -void SecureStream::writeRawData(const QByteArray &a) +void SecureStream::writeRawData(const TQByteArray &a) { d->bs->write(a); } -void SecureStream::incomingData(const QByteArray &a) +void SecureStream::incomingData(const TQByteArray &a) { appendRead(a); //qDebug( "SecureStream::incomingData() got %i bytes ", a.size() ); diff --git a/kopete/protocols/groupwise/libgroupwise/securestream.h b/kopete/protocols/groupwise/libgroupwise/securestream.h index 36999b14..82752cea 100644 --- a/kopete/protocols/groupwise/libgroupwise/securestream.h +++ b/kopete/protocols/groupwise/libgroupwise/securestream.h @@ -39,11 +39,11 @@ public: SecureStream(ByteStream *s); ~SecureStream(); - void startTLSClient(QCA::TLS *t, const QByteArray &spare=QByteArray()); - void startTLSServer(QCA::TLS *t, const QByteArray &spare=QByteArray()); - void setLayerSASL(QCA::SASL *s, const QByteArray &spare=QByteArray()); + void startTLSClient(QCA::TLS *t, const TQByteArray &spare=TQByteArray()); + void startTLSServer(QCA::TLS *t, const TQByteArray &spare=TQByteArray()); + void setLayerSASL(QCA::SASL *s, const TQByteArray &spare=TQByteArray()); #ifdef USE_TLSHANDLER - void startTLSClient(TLSHandler *t, const QString &server, const QByteArray &spare=QByteArray()); + void startTLSClient(TLSHandler *t, const TQString &server, const TQByteArray &spare=TQByteArray()); #endif void closeTLS(); @@ -51,7 +51,7 @@ public: // reimplemented bool isOpen() const; - void write(const QByteArray &); + void write(const TQByteArray &); int bytesToWrite() const; signals: @@ -63,17 +63,17 @@ private slots: void bs_bytesWritten(int); void layer_tlsHandshaken(); - void layer_tlsClosed(const QByteArray &); - void layer_readyRead(const QByteArray &); - void layer_needWrite(const QByteArray &); + void layer_tlsClosed(const TQByteArray &); + void layer_readyRead(const TQByteArray &); + void layer_needWrite(const TQByteArray &); void layer_error(int); private: - void linkLayer(QObject *); + void linkLayer(TQObject *); int calcPrebytes() const; - void insertData(const QByteArray &a); - void writeRawData(const QByteArray &a); - void incomingData(const QByteArray &a); + void insertData(const TQByteArray &a); + void writeRawData(const TQByteArray &a); + void incomingData(const TQByteArray &a); class Private; Private *d; @@ -96,7 +96,7 @@ USE_TLSHANDLER int finished(int encoded); int p; - QValueList<Item> list; + TQValueList<Item> list; }; @@ -110,8 +110,8 @@ public: SecureLayer(TLSHandler *t); #endif void init(); - void write(const QByteArray &a); - void writeIncoming(const QByteArray &a); + void write(const TQByteArray &a); + void writeIncoming(const TQByteArray &a); int finished(int plain); enum { TLS, SASL, TLSH }; @@ -129,9 +129,9 @@ public: signals: void tlsHandshaken(); - void tlsClosed(const QByteArray &); - void readyRead(const QByteArray &); - void needWrite(const QByteArray &); + void tlsClosed(const TQByteArray &); + void readyRead(const TQByteArray &); + void needWrite(const TQByteArray &); void error(int); private slots: @@ -147,8 +147,8 @@ private slots: void tlsHandler_success(); void tlsHandler_fail(); void tlsHandler_closed(); - void tlsHandler_readyRead(const QByteArray &a); - void tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes); + void tlsHandler_readyRead(const TQByteArray &a); + void tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes); #endif }; diff --git a/kopete/protocols/groupwise/libgroupwise/stream.cpp b/kopete/protocols/groupwise/libgroupwise/stream.cpp index 5817f4c3..d3410578 100644 --- a/kopete/protocols/groupwise/libgroupwise/stream.cpp +++ b/kopete/protocols/groupwise/libgroupwise/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/groupwise/libgroupwise/stream.h b/kopete/protocols/groupwise/libgroupwise/stream.h index 37a63652..c06649fd 100644 --- a/kopete/protocols/groupwise/libgroupwise/stream.h +++ b/kopete/protocols/groupwise/libgroupwise/stream.h @@ -17,8 +17,8 @@ ************************************************************************* */ -#include <qdom.h> -#include "qobject.h" +#include <tqdom.h> +#include "tqobject.h" #include "gwerror.h" #include "gwfield.h" @@ -45,13 +45,13 @@ public: SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); virtual void close()=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; - //virtual QDomElement errorAppSpec() const=0; + virtual TQString errorText() const=0; + //virtual TQDomElement errorAppSpec() const=0; /** * Are there any messages waiting to be read @@ -71,15 +71,15 @@ public: // # virtual Stanza read()=0; // # virtual void write(const Stanza &s)=0; -// # virtual QDomDocument & doc() const=0; -// # virtual QString baseNS() const=0; +// # virtual TQDomDocument & doc() const=0; +// # virtual TQString baseNS() const=0; // # virtual bool old() const=0; -// # Stanza createStanza(Stanza::Kind k, const Jid &to="", const QString &type="", const QString &id=""); -// # Stanza createStanza(const QDomElement &e); +// # Stanza createStanza(Stanza::Kind k, const Jid &to="", const TQString &type="", const TQString &id=""); +// # Stanza createStanza(const TQDomElement &e); -// static QString xmlToString(const static XmlProtocol *foo = 0; -//QDomElement &e, bool clip=false); +// static TQString xmlToString(const static XmlProtocol *foo = 0; +//TQDomElement &e, bool clip=false); signals: void connectionClosed(); diff --git a/kopete/protocols/groupwise/libgroupwise/task.cpp b/kopete/protocols/groupwise/libgroupwise/task.cpp index 786bf36b..96259254 100644 --- a/kopete/protocols/groupwise/libgroupwise/task.cpp +++ b/kopete/protocols/groupwise/libgroupwise/task.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qtimer.h> +#include <tqtimer.h> #include "client.h" #include "gwfield.h" @@ -31,10 +31,10 @@ class Task::TaskPrivate public: TaskPrivate() {} - QString id; + TQString id; bool success; int statusCode; - QString statusString; + TQString statusString; Client *client; bool insignificant, deleteme, autoDelete; bool done; @@ -42,22 +42,22 @@ public: }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->transfer = 0; d->client = parent->client(); d->id = client()->genUniqueId(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Client *parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -79,7 +79,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Client *Task::client() const @@ -97,7 +97,7 @@ void Task::setTransfer( Transfer * transfer ) d->transfer = transfer; } -QString Task::id() const +TQString Task::id() const { return d->id; } @@ -112,7 +112,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -126,15 +126,15 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the transfer to our children - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("Task")) continue; @@ -142,7 +142,7 @@ bool Task::take( Transfer * transfer) if(t->take( transfer )) { - client()->debug( QString( "Transfer ACCEPTED by: %1" ).arg( t->className() ) ); + client()->debug( TQString( "Transfer ACCEPTED by: %1" ).arg( t->className() ) ); return true; } } @@ -173,7 +173,7 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } @@ -182,7 +182,7 @@ void Task::send( Request * request ) client()->send( request ); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -192,7 +192,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -232,7 +232,7 @@ void Task::clientDisconnected() // void Task::debug(const char *fmt, ...) // { // char *buf; -// QString str; +// TQString str; // int size = 1024; // int r; // @@ -244,7 +244,7 @@ void Task::clientDisconnected() // va_end(ap); // // if(r != -1) -// str = QString(buf); +// str = TQString(buf); // // delete [] buf; // @@ -254,9 +254,9 @@ void Task::clientDisconnected() // debug(str); // } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { - client()->debug(QString("%1: ").arg(className()) + str); + client()->debug(TQString("%1: ").arg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const diff --git a/kopete/protocols/groupwise/libgroupwise/task.h b/kopete/protocols/groupwise/libgroupwise/task.h index 0a34cafa..b0b623d2 100644 --- a/kopete/protocols/groupwise/libgroupwise/task.h +++ b/kopete/protocols/groupwise/libgroupwise/task.h @@ -20,7 +20,7 @@ #ifndef GW_TASK_H #define GW_TASK_H -#include <qobject.h> +#include <tqobject.h> #include "gwerror.h" #include "gwfield.h" @@ -42,11 +42,11 @@ public: Client *client() const; Transfer *transfer() const; - QString id() const; + TQString id() const; bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go( bool autoDelete=false ); /** @@ -63,13 +63,13 @@ protected: virtual void onGo(); virtual void onDisconnect(); void send( Request * request ); - void setSuccess( int code=0, const QString &str="" ); + void setSuccess( int code=0, const TQString &str="" ); /** * If an empty string is passed, this sets the error string based on the error code using GroupWise::errorCodeToString */ - void setError( int code=0, const QString &str="" ); + void setError( int code=0, const TQString &str="" ); // void debug( const char *, ... ); - void debug( const QString & ); + void debug( const TQString & ); /** * Used in take() to check if the offered transfer is for this Task * @return true if this Task should take the Transfer. Default impl always returns false. @@ -78,7 +78,7 @@ protected: /** * Creates a transfer with the given command and field list */ - void createTransfer( const QString & command, const Field::FieldList fields ); + void createTransfer( const TQString & command, const Field::FieldList fields ); /** * Direct setter for Tasks which don't have any fields */ diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp index 9e9837f7..fb028c44 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include <qmap.h> +#include <tqmap.h> #include <kdebug.h> #include "gwfield.h" @@ -65,7 +65,7 @@ bool ChatCountsTask::take( Transfer * transfer ) { Field::MultiField * mf = static_cast<Field::MultiField *>( *it ); Field::FieldList chat = mf->fields(); - QString roomName; + TQString roomName; int participants; // read the supplied fields, set metadata and status. Field::SingleField * sf; @@ -79,7 +79,7 @@ bool ChatCountsTask::take( Transfer * transfer ) return true; } -QMap< QString, int > ChatCountsTask::results() +TQMap< TQString, int > ChatCountsTask::results() { return m_results; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h index c80a219a..6197352d 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h @@ -19,7 +19,7 @@ #ifndef CHATCOUNTSTASK_H #define CHATCOUNTSTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "gwerror.h" #include "gwfield.h" @@ -41,9 +41,9 @@ class ChatCountsTask : public RequestTask /** * Contains a list of all the chatrooms that have participants on the server. If a chatroom exists but is empty, this task does not return a result, so update the participants count to 0. */ - QMap< QString, int > results(); + TQMap< TQString, int > results(); private: - QMap< QString, int > m_results; + TQMap< TQString, int > m_results; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp index 66b2da42..7f60f3c5 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp @@ -34,7 +34,7 @@ ChatPropertiesTask::~ChatPropertiesTask() { } -void ChatPropertiesTask::setChat( const QString &displayName ) +void ChatPropertiesTask::setChat( const TQString &displayName ) { Field::FieldList lst; m_chat = displayName; @@ -131,7 +131,7 @@ bool ChatPropertiesTask::take( Transfer * transfer ) return true; } -QValueList< ChatContact > ChatPropertiesTask::aclEntries() +TQValueList< ChatContact > ChatPropertiesTask::aclEntries() { return m_aclEntries; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h index c9f890dd..d52661f3 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h @@ -19,8 +19,8 @@ #ifndef CHATPROPERTIESTASK_H #define CHATPROPERTIESTASK_H -#include <qdatetime.h> -#include <qvaluelist.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> #include "gwchatrooms.h" #include "gwerror.h" #include "gwfield.h" @@ -41,24 +41,24 @@ class ChatPropertiesTask : public RequestTask /** * Specify which chatroom to get properties for */ - void setChat( const QString & ); + void setChat( const TQString & ); bool take( Transfer * transfer ); /** * Contains a list of the ACL entries for the specified chatroom */ - QValueList< GroupWise::ChatContact > aclEntries(); - QString m_chat; - QString m_ownerDn; - QString m_description; - QString m_disclaimer; - QString m_query; - QString m_archive; - QString m_maxUsers; - QString m_topic; - QString m_creatorDn; - QDateTime m_creationTime; + TQValueList< GroupWise::ChatContact > aclEntries(); + TQString m_chat; + TQString m_ownerDn; + TQString m_description; + TQString m_disclaimer; + TQString m_query; + TQString m_archive; + TQString m_maxUsers; + TQString m_topic; + TQString m_creatorDn; + TQDateTime m_creationTime; uint m_rights; - QValueList< GroupWise::ChatContact > m_aclEntries; + TQValueList< GroupWise::ChatContact > m_aclEntries; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp index 9773a622..c88e22b4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp @@ -42,8 +42,8 @@ ConferenceTask::ConferenceTask( Task* parent ) registerEvent( GroupWise::ReceivedSystemBroadcast ); // listen to the UserDetailsManager telling us that user details are available - connect( client()->userDetailsManager(), SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ), - SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) ); + connect( client()->userDetailsManager(), TQT_SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ), + TQT_SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) ); } @@ -53,10 +53,10 @@ ConferenceTask::~ConferenceTask() void ConferenceTask::dumpConferenceEvent( ConferenceEvent & evt ) { - client()->debug( QString( "Conference Event - guid: %1 user: %2 timestamp: %3:%4:%5" ).arg + client()->debug( TQString( "Conference Event - guid: %1 user: %2 timestamp: %3:%4:%5" ).arg ( evt.guid ).arg( evt.user.ascii() ).arg( evt.timeStamp.time().hour() ).arg ( evt.timeStamp.time().minute() ).arg( evt.timeStamp.time().second() ) ); - client()->debug( QString( " flags: %1" ).arg( evt.flags, 8 ) ); + client()->debug( TQString( " flags: %1" ).arg( evt.flags, 8 ) ); } bool ConferenceTask::take( Transfer * transfer ) @@ -103,7 +103,7 @@ bool ConferenceTask::take( Transfer * transfer ) Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ReceiveMessage" ); - client()->debug( QString( "message: %1" ).arg( event.message ) ); + client()->debug( TQString( "message: %1" ).arg( event.message ) ); if ( !queueWhileAwaitingData( event ) ) emit message( event ); break; @@ -119,7 +119,7 @@ bool ConferenceTask::take( Transfer * transfer ) Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ConferenceInvite" ); - client()->debug( QString( "message: %1" ).arg( event.message ) ); + client()->debug( TQString( "message: %1" ).arg( event.message ) ); if ( !queueWhileAwaitingData( event ) ) emit invited( event ); break; @@ -139,14 +139,14 @@ bool ConferenceTask::take( Transfer * transfer ) Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ReceiveAutoReply" ); - client()->debug( QString( "message: %1" ).arg( event.message.ascii() ) ); + client()->debug( TQString( "message: %1" ).arg( event.message.ascii() ) ); emit autoReply( event ); break; case GroupWise::ReceivedBroadcast: Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ReceivedBroadCast" ); - client()->debug( QString( "message: %1" ).arg( event.message ) ); + client()->debug( TQString( "message: %1" ).arg( event.message ) ); if ( !queueWhileAwaitingData( event ) ) emit broadcast( event ); break; @@ -154,11 +154,11 @@ bool ConferenceTask::take( Transfer * transfer ) Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ReceivedSystemBroadCast" ); - client()->debug( QString( "message: %1" ).arg( event.message ) ); + client()->debug( TQString( "message: %1" ).arg( event.message ) ); emit systemBroadcast( event ); break; default: - client()->debug( QString( "WARNING: didn't handle registered event %1, on conference %2" ).arg( incomingEvent->eventType() ).arg( event.guid.ascii() ) ); + client()->debug( TQString( "WARNING: didn't handle registered event %1, on conference %2" ).arg( incomingEvent->eventType() ).arg( event.guid.ascii() ) ); } dumpConferenceEvent( event ); @@ -172,16 +172,16 @@ void ConferenceTask::slotReceiveUserDetails( const GroupWise::ContactDetails & d client()->debug( "ConferenceTask::slotReceiveUserDetails()" ); // dequeue any events which are deliverable now we have these details - QValueListIterator< ConferenceEvent > end = m_pendingEvents.end(); - QValueListIterator< ConferenceEvent > it = m_pendingEvents.begin(); + TQValueListIterator< ConferenceEvent > end = m_pendingEvents.end(); + TQValueListIterator< ConferenceEvent > it = m_pendingEvents.begin(); while ( it != end ) { - QValueListIterator< ConferenceEvent > current = it; + TQValueListIterator< ConferenceEvent > current = it; ++it; // if the details relate to event, try again to handle it if ( details.dn == (*current).user ) { - client()->debug( QString( " - got details for event involving %1" ).arg( (*current).user ) ); + client()->debug( TQString( " - got details for event involving %1" ).arg( (*current).user ) ); switch ( (*current).type ) { case GroupWise::ConferenceJoined: @@ -204,7 +204,7 @@ void ConferenceTask::slotReceiveUserDetails( const GroupWise::ContactDetails & d client()->debug( "Queued an event while waiting for more data, but didn't write a handler for the dequeue!" ); } m_pendingEvents.remove( current ); - client()->debug( QString( "Event handled - now %1 pending events" ).arg + client()->debug( TQString( "Event handled - now %1 pending events" ).arg ( (uint)m_pendingEvents.count() ) ); } } @@ -220,7 +220,7 @@ bool ConferenceTask::queueWhileAwaitingData( const ConferenceEvent & event ) } else { - client()->debug( QString( "ConferenceTask::queueWhileAwaitingData() - queueing event involving %1" ).arg( event.user ) ); + client()->debug( TQString( "ConferenceTask::queueWhileAwaitingData() - queueing event involving %1" ).arg( event.user ) ); client()->userDetailsManager()->requestDetails( event.user ); m_pendingEvents.append( event ); return true; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h index 42f4fc2b..7f35d08b 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h @@ -57,8 +57,8 @@ signals: protected slots: void slotReceiveUserDetails( const GroupWise::ContactDetails & ); protected: - Q_UINT32 readFlags( QDataStream & din ); - QString readMessage( QDataStream & din ); + Q_UINT32 readFlags( TQDataStream & din ); + TQString readMessage( TQDataStream & din ); /** * Checks to see if we need more data from the client before we can propagate this event * and queues the event if so @@ -68,7 +68,7 @@ protected: void dumpConferenceEvent( ConferenceEvent & evt ); private: // A list of events which are waiting for more data from the server before they can be exposed to the client - QValueList< ConferenceEvent > m_pendingEvents; + TQValueList< ConferenceEvent > m_pendingEvents; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp index 8be16888..01d2fa05 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp @@ -33,7 +33,7 @@ CreateConferenceTask::~CreateConferenceTask() { } -void CreateConferenceTask::conference( const int confId, const QStringList &participants ) +void CreateConferenceTask::conference( const int confId, const TQStringList &participants ) { m_confId = confId; Field::FieldList lst, tmp; @@ -41,8 +41,8 @@ void CreateConferenceTask::conference( const int confId, const QStringList &part tmp.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, m_guid ) ); lst.append( new Field::MultiField( NM_A_FA_CONVERSATION, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, tmp ) ); // series of participants (may be empty ) - QValueListConstIterator<QString> end = participants.end(); - for ( QValueListConstIterator<QString> it = participants.begin(); it != end; ++it ) + TQValueListConstIterator<TQString> end = participants.end(); + for ( TQValueListConstIterator<TQString> it = participants.begin(); it != end; ++it ) lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, *it ) ); lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, client()->userDN() ) ); createTransfer( "createconf", lst ); diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h index 48d5702e..de66f734 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h @@ -39,7 +39,7 @@ public: * @param confId The client-unique conference Id. * @param participants A list of Novell DNs of the people taking part in the conference. */ - void conference( const int confId, const QStringList &participants ); + void conference( const int confId, const TQStringList &participants ); bool take( Transfer * transfer ); int clientConfId() const; GroupWise::ConferenceGuid conferenceGUID() const; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp index 832b5900..d41db4a9 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp @@ -24,19 +24,19 @@ CreateContactInstanceTask::CreateContactInstanceTask(Task* parent) : NeedFolderTask(parent) { // make the client tell the client app (Kopete) when we receive a contact - connect( this, SIGNAL( gotContactAdded( const ContactItem & ) ), client(), SIGNAL( contactReceived( const ContactItem & ) ) ); + connect( this, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), client(), TQT_SIGNAL( contactReceived( const ContactItem & ) ) ); } CreateContactInstanceTask::~CreateContactInstanceTask() { } -void CreateContactInstanceTask::contactFromUserId( const QString & userId, const QString & displayName, const int parentFolder ) +void CreateContactInstanceTask::contactFromUserId( const TQString & userId, const TQString & displayName, const int parentFolder ) { contact( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, userId ), displayName, parentFolder ); } -void CreateContactInstanceTask::contactFromUserIdAndFolder( const QString & userId, const QString & displayName, const int folderSequence, const QString & folderDisplayName ) +void CreateContactInstanceTask::contactFromUserIdAndFolder( const TQString & userId, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName ) { // record the user details m_userId = userId; @@ -46,12 +46,12 @@ void CreateContactInstanceTask::contactFromUserIdAndFolder( const QString & user m_folderDisplayName = folderDisplayName; } -void CreateContactInstanceTask::contactFromDN( const QString & dn, const QString & displayName, const int parentFolder ) +void CreateContactInstanceTask::contactFromDN( const TQString & dn, const TQString & displayName, const int parentFolder ) { contact( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_UTF8, dn ), displayName, parentFolder ); } -void CreateContactInstanceTask::contactFromDNAndFolder( const QString & dn, const QString & displayName, const int folderSequence, const QString & folderDisplayName ) +void CreateContactInstanceTask::contactFromDNAndFolder( const TQString & dn, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName ) { // record the user details m_dn = dn; @@ -61,10 +61,10 @@ void CreateContactInstanceTask::contactFromDNAndFolder( const QString & dn, cons m_folderDisplayName = folderDisplayName; } -void CreateContactInstanceTask::contact( Field::SingleField * id, const QString & displayName, const int parentFolder ) +void CreateContactInstanceTask::contact( Field::SingleField * id, const TQString & displayName, const int parentFolder ) { Field::FieldList lst; - lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( parentFolder ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( parentFolder ) ) ); // this is either a user Id or a DN lst.append( id ); if ( displayName.isEmpty() ) // fallback so that the contact is created diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h index d6be5933..6c960a4c 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h @@ -37,18 +37,18 @@ public: /** * Sets up the request message. */ - void contactFromUserId( const QString & userId, const QString & displayName, const int parentFolder ); - void contactFromDN( const QString & dn, const QString & displayName, const int parentFolder ); - void contactFromUserIdAndFolder( const QString & userId, const QString & displayName, const int folderSequence, const QString & folderDisplayName ); - void contactFromDNAndFolder( const QString & dn, const QString & displayName, const int folderSequence, const QString & folderDisplayName ); + void contactFromUserId( const TQString & userId, const TQString & displayName, const int parentFolder ); + void contactFromDN( const TQString & dn, const TQString & displayName, const int parentFolder ); + void contactFromUserIdAndFolder( const TQString & userId, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName ); + void contactFromDNAndFolder( const TQString & dn, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName ); void onGo(); protected: - void contact( Field::SingleField * id, const QString & displayName, const int parentFolder ); + void contact( Field::SingleField * id, const TQString & displayName, const int parentFolder ); void onFolderCreated(); private: - QString m_userId; - QString m_dn; - QString m_displayName; + TQString m_userId; + TQString m_dn; + TQString m_displayName; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp index aac16042..0d167236 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp @@ -32,17 +32,17 @@ CreateContactTask::~CreateContactTask() { } -QString CreateContactTask::userId() +TQString CreateContactTask::userId() { return m_userId; } -QString CreateContactTask::dn() +TQString CreateContactTask::dn() { return m_dn; } -QString CreateContactTask::displayName() +TQString CreateContactTask::displayName() { return m_displayName; } @@ -53,7 +53,7 @@ bool CreateContactTask::take( Transfer * transfer ) return false; } -void CreateContactTask::contactFromUserId( const QString & userId, const QString & displayName, const int firstSeqNo, const QValueList< FolderItem > folders, bool topLevel ) +void CreateContactTask::contactFromUserId( const TQString & userId, const TQString & displayName, const int firstSeqNo, const TQValueList< FolderItem > folders, bool topLevel ) { m_userId = userId; m_displayName = displayName; @@ -65,19 +65,19 @@ void CreateContactTask::contactFromUserId( const QString & userId, const QString void CreateContactTask::onGo() { client()->debug( "CreateContactTask::onGo() - Welcome to the Create Contact Task Show!"); - QValueList<FolderItem>::ConstIterator it = m_folders.begin(); - const QValueList<FolderItem>::ConstIterator end = m_folders.end(); + TQValueList<FolderItem>::ConstIterator it = m_folders.begin(); + const TQValueList<FolderItem>::ConstIterator end = m_folders.end(); // create contacts on the server for ( ; it != end; ++it ) { - client()->debug( QString( " - contact is in folder %1 with id %2" ).arg( (*it).name ).arg( (*it).id ) ); + client()->debug( TQString( " - contact is in folder %1 with id %2" ).arg( (*it).name ).arg( (*it).id ) ); CreateContactInstanceTask * ccit = new CreateContactInstanceTask( client()->rootTask() ); // the add contact action may cause other contacts' sequence numbers to change // CreateContactInstanceTask signals these changes, so we propagate the signal via the Client, to the GroupWiseAccount // This updates our local versions of those contacts using the same mechanism by which they are updated at login. - connect( ccit, SIGNAL( gotContactAdded( const ContactItem & ) ), SLOT( slotContactAdded( const ContactItem & ) ) ); - connect( ccit, SIGNAL( finished() ), SLOT( slotCheckContactInstanceCreated() ) ); + connect( ccit, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), TQT_SLOT( slotContactAdded( const ContactItem & ) ) ); + connect( ccit, TQT_SIGNAL( finished() ), TQT_SLOT( slotCheckContactInstanceCreated() ) ); if ( (*it).id == 0 ) // caller asserts that this isn't on the server... { ccit->contactFromDNAndFolder( m_userId, m_displayName, m_firstSequenceNumber++, ( *it ).name ); @@ -92,8 +92,8 @@ void CreateContactTask::onGo() { client()->debug( " - contact is in top level folder " ); CreateContactInstanceTask * ccit = new CreateContactInstanceTask( client()->rootTask() ); - connect( ccit, SIGNAL( gotContactAdded( const ContactItem & ) ), SLOT( slotContactAdded( const ContactItem & ) ) ); - connect( ccit, SIGNAL( finished() ), SLOT( slotCheckContactInstanceCreated() ) ); + connect( ccit, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), TQT_SLOT( slotContactAdded( const ContactItem & ) ) ); + connect( ccit, TQT_SIGNAL( finished() ), TQT_SLOT( slotCheckContactInstanceCreated() ) ); ccit->contactFromDN( m_userId, m_displayName, 0 ); ccit->go( true ); } @@ -112,7 +112,7 @@ void CreateContactTask::slotContactAdded( const ContactItem & addedContact ) client()->debug( " - addedContact is not the one we were trying to add, ignoring it ( Account will update it )" ); return; } - client()->debug( QString( "CreateContactTask::slotContactAdded() - Contact Instance %1 was created on the server, with objectId %2 in folder %3" ).arg + client()->debug( TQString( "CreateContactTask::slotContactAdded() - Contact Instance %1 was created on the server, with objectId %2 in folder %3" ).arg ( addedContact.displayName ).arg( addedContact.id ).arg( addedContact.parentId ) ); if ( m_dn.isEmpty() ) diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h index a9e4ab06..2a46a51c 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h @@ -21,7 +21,7 @@ #ifndef CREATECONTACTTASK_H #define CREATECONTACTTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "gwerror.h" @@ -48,12 +48,12 @@ public: /** * Get the userId of the contact just created */ - QString userId(); + TQString userId(); /** * Get the DN of the contact just created */ - QString dn(); - QString displayName(); + TQString dn(); + TQString displayName(); /** * Sets up the task. @@ -63,8 +63,8 @@ public: * @param folders A list of folders that the contact should belong to - any folders that do not exist on the server should have a objectId of 0, and will be created * @param topLevel is the folder also in the top level folder? */ - void contactFromUserId( const QString & userId, const QString & displayName, const int firstSeqNo, const QValueList< FolderItem > folders, bool topLevel ); - //void contactFromDN( const QString & dn, const QString & displayName, const int parentFolder ); + void contactFromUserId( const TQString & userId, const TQString & displayName, const int firstSeqNo, const TQValueList< FolderItem > folders, bool topLevel ); + //void contactFromDN( const TQString & dn, const TQString & displayName, const int parentFolder ); /** * This task doesn't do any I/O itself, so this take prints an error and returns false; */ @@ -78,10 +78,10 @@ protected slots: void slotCheckContactInstanceCreated(); private: int m_firstSequenceNumber; - QString m_userId; - QString m_dn; - QString m_displayName; - QValueList< FolderItem > m_folders; + TQString m_userId; + TQString m_dn; + TQString m_displayName; + TQValueList< FolderItem > m_folders; bool m_topLevel; }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp index c7e9933b..c6e6a78a 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp @@ -29,12 +29,12 @@ CreateFolderTask::~CreateFolderTask() { } -void CreateFolderTask::folder( const int parentId, const int sequence, const QString & displayName ) +void CreateFolderTask::folder( const int parentId, const int sequence, const TQString & displayName ) { Field::FieldList lst; - lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( parentId ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( parentId ) ) ); lst.append( new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, displayName ) ); - lst.append( new Field::SingleField( NM_A_SZ_SEQUENCE_NUMBER, 0, NMFIELD_TYPE_UTF8, QString::number( sequence ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_SEQUENCE_NUMBER, 0, NMFIELD_TYPE_UTF8, TQString::number( sequence ) ) ); createTransfer( "createfolder", lst ); } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h index f3c6ebb9..cac19900 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h @@ -34,7 +34,7 @@ Q_OBJECT public: CreateFolderTask(Task* parent); ~CreateFolderTask(); - void folder( const int parentId, const int sequence, const QString & displayName ); + void folder( const int parentId, const int sequence, const TQString & displayName ); }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp index 89480d10..04ce1fb4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp @@ -37,9 +37,9 @@ void DeleteItemTask::item( const int parentFolder, const int objectId ) return; } Field::FieldList lst; - lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( parentFolder ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( parentFolder ) ) ); // this is either a user Id or a DN - lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( objectId ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( objectId ) ) ); createTransfer( "deletecontact", lst ); } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h b/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h index 50b84ac5..609728a4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h @@ -21,7 +21,7 @@ #ifndef GW_EVENTTASK_H #define GW_EVENTTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "eventtransfer.h" #include "task.h" @@ -37,7 +37,7 @@ Q_OBJECT bool forMe( Transfer * transfer, EventTransfer *& event ) const; void registerEvent( GroupWise::Event e ); private: - QValueList<int> m_eventCodes; + TQValueList<int> m_eventCodes; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp index fe1d61f9..8104ec24 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp @@ -92,7 +92,7 @@ bool GetChatSearchResultsTask::take( Transfer * transfer ) return true; } -QValueList< GroupWise::ChatroomSearchResult > GetChatSearchResultsTask::results() +TQValueList< GroupWise::ChatroomSearchResult > GetChatSearchResultsTask::results() { return m_results; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h index 31db19ed..e85c1e74 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h @@ -21,7 +21,7 @@ #ifndef CHATSEARCHRESULTSTASK_H #define CHATSEARCHRESULTSTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "gwchatrooms.h" @@ -42,11 +42,11 @@ class GetChatSearchResultsTask : public RequestTask void poll( int queryHandle); bool take( Transfer * transfer ); int queryStatus(); - QValueList< GroupWise::ChatroomSearchResult > results(); + TQValueList< GroupWise::ChatroomSearchResult > results(); private: GroupWise::ChatroomSearchResult extractChatDetails( Field::FieldList & fields ); SearchResultCode m_queryStatus; - QValueList< GroupWise::ChatroomSearchResult > m_results; + TQValueList< GroupWise::ChatroomSearchResult > m_results; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp index 0b37efb4..61753d84 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp @@ -36,10 +36,10 @@ GetDetailsTask::~GetDetailsTask() { } -void GetDetailsTask::userDNs( const QStringList & userDNs ) +void GetDetailsTask::userDNs( const TQStringList & userDNs ) { Field::FieldList lst; - for ( QStringList::ConstIterator it = userDNs.begin(); it != userDNs.end(); ++it ) + for ( TQStringList::ConstIterator it = userDNs.begin(); it != userDNs.end(); ++it ) { lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_UTF8, *it ) ); } @@ -97,7 +97,7 @@ ContactDetails GetDetailsTask::extractUserDetails(Field::MultiField * details ) if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) ) cd.awayMessage = sf->value().toString(); Field::MultiField * mf; - QMap< QString, QString > propMap; + TQMap< TQString, TQString > propMap; if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) ) { Field::FieldList fl = mf->fields(); @@ -106,8 +106,8 @@ ContactDetails GetDetailsTask::extractUserDetails(Field::MultiField * details ) { Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField ) { - QString propName = propField->tag(); - QString propValue = propField->value().toString(); + TQString propName = propField->tag(); + TQString propValue = propField->value().toString(); propMap.insert( propName, propValue ); } else { Field::MultiField * mf2; @@ -118,8 +118,8 @@ ContactDetails GetDetailsTask::extractUserDetails(Field::MultiField * details ) { propField = dynamic_cast<Field::SingleField *>( *it2 ); if ( propField ) { - QString propName = propField->tag(); - QString propValue = propField->value().toString(); + TQString propName = propField->tag(); + TQString propValue = propField->value().toString(); propMap.insert( propName, propValue ); } } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h index d263f50b..747b494f 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h @@ -38,7 +38,7 @@ public: GetDetailsTask( Task * parent ); ~GetDetailsTask(); bool take( Transfer * transfer ); - void userDNs( const QStringList & userDNs ); + void userDNs( const TQStringList & userDNs ); signals: void gotContactUserDetails( const GroupWise::ContactDetails & ); protected: diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp index dde055a6..153746ea 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp @@ -30,7 +30,7 @@ GetStatusTask::~GetStatusTask() { } -void GetStatusTask::userDN( const QString & dn ) +void GetStatusTask::userDN( const TQString & dn ) { m_userDN = dn; // set up Transfer @@ -60,8 +60,8 @@ bool GetStatusTask::take( Transfer * transfer ) // This must be because the sender is not on our contact list but has sent us a message. // TODO: Check that the change to sending DNs above has fixed this problem. status = sf->value().toInt(); - // unfortunately getstatus doesn't give us an away message so we pass QString::null here - emit gotStatus( m_userDN, status, QString::null ); + // unfortunately getstatus doesn't give us an away message so we pass TQString::null here + emit gotStatus( m_userDN, status, TQString::null ); setSuccess(); } else diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h index 59422342..6294f053 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h @@ -33,12 +33,12 @@ Q_OBJECT public: GetStatusTask(Task* parent); ~GetStatusTask(); - void userDN( const QString & dn ); + void userDN( const TQString & dn ); bool take( Transfer * transfer ); signals: - void gotStatus( const QString & contactId, Q_UINT16 status, const QString & statusText ); + void gotStatus( const TQString & contactId, Q_UINT16 status, const TQString & statusText ); private: - QString m_userDN; + TQString m_userDN; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp index 4e9e4f57..a14d6eec 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp @@ -33,7 +33,7 @@ JoinChatTask::~JoinChatTask() { } -void JoinChatTask::join( const QString & displayName ) +void JoinChatTask::join( const TQString & displayName ) { m_displayName = displayName; Field::FieldList lst, tmp; @@ -67,7 +67,7 @@ bool JoinChatTask::take( Transfer * transfer ) if ( contact ) { // HACK: lowercased DN - QString dn = contact->value().toString().lower(); + TQString dn = contact->value().toString().lower(); m_participants.append( dn ); // need to ask for details for these contacts } @@ -91,7 +91,7 @@ bool JoinChatTask::take( Transfer * transfer ) if ( contact ) { // HACK: lowercased DN - QString dn = contact->value().toString().lower(); + TQString dn = contact->value().toString().lower(); m_invitees.append( dn ); // need to ask for details for these contacts if ( !client()->userDetailsManager()->known( dn ) ) @@ -113,17 +113,17 @@ bool JoinChatTask::take( Transfer * transfer ) return false; } -QStringList JoinChatTask::participants() const +TQStringList JoinChatTask::participants() const { return m_participants; } -QStringList JoinChatTask::invitees() const +TQStringList JoinChatTask::invitees() const { return m_invitees; } -QString JoinChatTask::displayName() const +TQString JoinChatTask::displayName() const { return m_displayName; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h index a7cc4119..9d6babe5 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h @@ -37,16 +37,16 @@ class JoinChatTask : public RequestTask public: JoinChatTask(Task* parent); ~JoinChatTask(); - void join( const QString & displayName ); + void join( const TQString & displayName ); bool take( Transfer * transfer ); - QStringList participants() const; - QStringList invitees() const; - QString displayName() const; + TQStringList participants() const; + TQStringList invitees() const; + TQString displayName() const; private: ConferenceGuid m_displayName; - QStringList m_participants; - QStringList m_invitees; - QStringList m_unknowns; + TQStringList m_participants; + TQStringList m_invitees; + TQStringList m_unknowns; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp index c2cf0f02..b7b1f1cc 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp @@ -67,7 +67,7 @@ bool JoinConferenceTask::take( Transfer * transfer ) if ( contact ) { // HACK: lowercased DN - QString dn = contact->value().toString().lower(); + TQString dn = contact->value().toString().lower(); m_participants.append( dn ); // need to ask for details for these contacts if ( !client()->userDetailsManager()->known( dn ) ) @@ -93,7 +93,7 @@ bool JoinConferenceTask::take( Transfer * transfer ) if ( contact ) { // HACK: lowercased DN - QString dn = contact->value().toString().lower(); + TQString dn = contact->value().toString().lower(); m_invitees.append( dn ); // need to ask for details for these contacts if ( !client()->userDetailsManager()->known( dn ) ) @@ -113,8 +113,8 @@ bool JoinConferenceTask::take( Transfer * transfer ) { client()->debug( "JoinConferenceTask::slotReceiveUserDetails(), requesting details" ); connect( client()->userDetailsManager(), - SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ), - SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) ); + TQT_SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ), + TQT_SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) ); client()->userDetailsManager()->requestDetails( m_unknowns ); } } @@ -128,14 +128,14 @@ bool JoinConferenceTask::take( Transfer * transfer ) void JoinConferenceTask::slotReceiveUserDetails( const ContactDetails & details ) { - client()->debug( QString( "JoinConferenceTask::slotReceiveUserDetails() - got %1" ).arg( details.dn ) ); - QStringList::Iterator it = m_unknowns.begin(); - QStringList::Iterator end = m_unknowns.end(); + client()->debug( TQString( "JoinConferenceTask::slotReceiveUserDetails() - got %1" ).arg( details.dn ) ); + TQStringList::Iterator it = m_unknowns.begin(); + TQStringList::Iterator end = m_unknowns.end(); while( it != end ) { - QString current = *it; + TQString current = *it; ++it; - client()->debug( QString( " - can we remove %1?" ).arg(current ) ); + client()->debug( TQString( " - can we remove %1?" ).arg(current ) ); if ( current == details.dn ) { client()->debug( " - it's gone!" ); @@ -143,7 +143,7 @@ void JoinConferenceTask::slotReceiveUserDetails( const ContactDetails & details break; } } - client()->debug( QString( " - now %1 unknowns").arg( m_unknowns.count() ) ); + client()->debug( TQString( " - now %1 unknowns").arg( m_unknowns.count() ) ); if ( m_unknowns.empty() ) { client()->debug( " - finished()" ); @@ -157,12 +157,12 @@ void JoinConferenceTask::slotReceiveUserDetails( const ContactDetails & details // } } -QStringList JoinConferenceTask::participants() const +TQStringList JoinConferenceTask::participants() const { return m_participants; } -QStringList JoinConferenceTask::invitees() const +TQStringList JoinConferenceTask::invitees() const { return m_invitees; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h index 68316147..d95e5084 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h @@ -39,16 +39,16 @@ public: ~JoinConferenceTask(); void join( const ConferenceGuid & guid ); bool take( Transfer * transfer ); - QStringList participants() const; - QStringList invitees() const; + TQStringList participants() const; + TQStringList invitees() const; ConferenceGuid guid() const; public slots: void slotReceiveUserDetails( const GroupWise::ContactDetails & details ); private: ConferenceGuid m_guid; - QStringList m_participants; - QStringList m_invitees; - QStringList m_unknowns; + TQStringList m_participants; + TQStringList m_invitees; + TQStringList m_unknowns; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp index 1f679a6c..6a28124f 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp @@ -36,7 +36,7 @@ LoginTask::~LoginTask() void LoginTask::initialise() { - QString command = QString::fromLatin1("login:%1:%2").arg( client()->host() ).arg( client()->port() ); + TQString command = TQString::fromLatin1("login:%1:%2").arg( client()->host() ).arg( client()->port() ); Field::FieldList lst; lst.append( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, client()->userId() ) ); @@ -123,7 +123,7 @@ void LoginTask::extractFolder( Field::MultiField * folderContainer ) current = fl.findSingleField( NM_A_SZ_PARENT_ID ); folder.parentId = current->value().toInt(); - client()->debug( QString( "Got folder: %1, obj: %2, parent: %3, seq: %3." ).arg( folder.name ).arg( folder.id ).arg( folder.parentId ).arg( folder.sequence ) ); + client()->debug( TQString( "Got folder: %1, obj: %2, parent: %3, seq: %3." ).arg( folder.name ).arg( folder.id ).arg( folder.parentId ).arg( folder.sequence ) ); // tell the world about it emit gotFolder( folder ); } @@ -186,7 +186,7 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields ) if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) ) cd.awayMessage = sf->value().toString(); Field::MultiField * mf; - QMap< QString, QString > propMap; + TQMap< TQString, TQString > propMap; if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) ) { Field::FieldList fl = mf->fields(); @@ -196,8 +196,8 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields ) Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField ) { - QString propName = propField->tag(); - QString propValue = propField->value().toString(); + TQString propName = propField->tag(); + TQString propValue = propField->value().toString(); propMap.insert( propName, propValue ); } else @@ -206,7 +206,7 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields ) if ( propList ) { // Hello A Nagappan. GW gave us a multiple field where we previously got a single field - QString parentName = propList->tag(); + TQString parentName = propList->tag(); Field::FieldList propFields = propList->fields(); const Field::FieldListIterator end = propFields.end(); for ( Field::FieldListIterator it = propFields.begin(); it != end; ++it ) @@ -214,8 +214,8 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields ) propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField /*&& propField->tag() == parentName */) { - QString propValue = propField->value().toString(); - QString contents = propMap[ propField->tag() ]; + TQString propValue = propField->value().toString(); + TQString contents = propMap[ propField->tag() ]; if ( !contents.isEmpty() ) contents.append( ", " ); contents.append( propField->value().toString()); @@ -237,8 +237,8 @@ void LoginTask::extractPrivacy( Field::FieldList & fields ) { bool privacyLocked = false; bool defaultDeny = false; - QStringList allowList; - QStringList denyList; + TQStringList allowList; + TQStringList denyList; // read blocking // may be a single field or may be an array Field::FieldListIterator it = fields.find( NM_A_LOCKED_ATTR_LIST ); @@ -280,9 +280,9 @@ void LoginTask::extractPrivacy( Field::FieldList & fields ) kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "locked is " << privacyLocked << ", default is " << defaultDeny << "\nallow list is: " << allowList << "\ndeny list is: " << denyList << endl; } -QStringList LoginTask::readPrivacyItems( const QCString & tag, Field::FieldList & fields ) +TQStringList LoginTask::readPrivacyItems( const TQCString & tag, Field::FieldList & fields ) { - QStringList items; + TQStringList items; Field::FieldListIterator it = fields.find( tag ); if ( it != fields.end() ) diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h index 0b2acdfd..3d745bf9 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h @@ -48,7 +48,7 @@ protected: void extractContact( Field::MultiField * contactContainer ); ContactDetails extractUserDetails( Field::FieldList & fields ); void extractPrivacy( Field::FieldList & fields ); - QStringList readPrivacyItems( const QCString & tag, Field::FieldList & fields ); + TQStringList readPrivacyItems( const TQCString & tag, Field::FieldList & fields ); void extractCustomStatuses( Field::FieldList & fields ); void extractKeepalivePeriod( Field::FieldList & fields ); signals: @@ -56,7 +56,7 @@ signals: void gotFolder( const FolderItem & ); void gotContact( const ContactItem & ); void gotContactUserDetails( const GroupWise::ContactDetails & ); - void gotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList ); + void gotPrivacySettings( bool locked, bool defaultDeny, const TQStringList & allowList, const TQStringList & denyList ); void gotCustomStatus( const GroupWise::CustomStatus & ); void gotKeepalivePeriod( int ); }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp index 713315ee..4a24f44f 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp @@ -25,7 +25,7 @@ MoveContactTask::MoveContactTask(Task* parent): NeedFolderTask(parent) { // make the client tell the client app (Kopete) when we receive a contact - connect( this, SIGNAL( gotContactAdded( const ContactItem & ) ), client(), SIGNAL( contactReceived( const ContactItem & ) ) ); + connect( this, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), client(), TQT_SIGNAL( contactReceived( const ContactItem & ) ) ); } @@ -52,11 +52,11 @@ void MoveContactTask::moveContact( const ContactItem & contact, const int newPar lst.append( new Field::MultiField( NM_A_FA_CONTACT_LIST, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, contactList ) ); lst.append( new Field::SingleField( NM_A_SZ_SEQUENCE_NUMBER, 0, NMFIELD_TYPE_UTF8, "-1" ) ); - lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( newParent ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( newParent ) ) ); createTransfer( "movecontact", lst ); } -void MoveContactTask::moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const QString & folderDisplayName ) +void MoveContactTask::moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const TQString & folderDisplayName ) { client()->debug("MoveContactTask::moveContactToNewFolder()" ); m_folderSequence = newSequenceNumber; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h index f423981a..ad3bce44 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h @@ -35,14 +35,14 @@ public: MoveContactTask(Task* parent); ~MoveContactTask(); void moveContact( const ContactItem & contact, const int newParent ); - void moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const QString & folderDisplayName ); + void moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const TQString & folderDisplayName ); void onGo(); protected: void onFolderCreated(); private: int m_targetFolder; - QString m_dn; - QString m_displayName; + TQString m_dn; + TQString m_displayName; ContactItem m_contactToMove; }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp index 810326ee..12c7382a 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp @@ -27,9 +27,9 @@ void NeedFolderTask::createFolder() { CreateFolderTask * cct = new CreateFolderTask( client()->rootTask() ); cct->folder( 0, m_folderSequence, m_folderDisplayName ); - connect( cct, SIGNAL( gotFolderAdded( const FolderItem & ) ), client(), SIGNAL( folderReceived( const FolderItem & ) ) ); - connect( cct, SIGNAL( gotFolderAdded( const FolderItem & ) ), SLOT( slotFolderAdded( const FolderItem & ) ) ); - connect( cct, SIGNAL( finished() ), SLOT( slotFolderTaskFinished() ) ); + connect( cct, TQT_SIGNAL( gotFolderAdded( const FolderItem & ) ), client(), TQT_SIGNAL( folderReceived( const FolderItem & ) ) ); + connect( cct, TQT_SIGNAL( gotFolderAdded( const FolderItem & ) ), TQT_SLOT( slotFolderAdded( const FolderItem & ) ) ); + connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( slotFolderTaskFinished() ) ); cct->go( true ); } @@ -38,7 +38,7 @@ void NeedFolderTask::slotFolderAdded( const FolderItem & addedFolder ) // if this is the folder we were trying to create if ( m_folderDisplayName == addedFolder.name ) { - client()->debug( QString( "NeedFolderTask::slotFolderAdded() - Folder %1 was created on the server, now has objectId %2" ).arg( addedFolder.name ).arg( addedFolder.id ) ); + client()->debug( TQString( "NeedFolderTask::slotFolderAdded() - Folder %1 was created on the server, now has objectId %2" ).arg( addedFolder.name ).arg( addedFolder.id ) ); m_folderId = addedFolder.id; } } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h index 8d6278df..d1ad1a1e 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h @@ -33,7 +33,7 @@ protected slots: protected: int m_folderSequence; int m_folderId; - QString m_folderDisplayName; + TQString m_folderDisplayName; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp index 772a0888..d65a5a20 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp @@ -36,7 +36,7 @@ PollSearchResultsTask::~PollSearchResultsTask() { } -void PollSearchResultsTask::poll( const QString & queryHandle ) +void PollSearchResultsTask::poll( const TQString & queryHandle ) { Field::FieldList lst; lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, queryHandle ) ); @@ -97,7 +97,7 @@ bool PollSearchResultsTask::take( Transfer * transfer ) return true; } -QValueList< GroupWise::ContactDetails > PollSearchResultsTask::results() +TQValueList< GroupWise::ContactDetails > PollSearchResultsTask::results() { return m_results; } @@ -133,7 +133,7 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) ) cd.awayMessage = sf->value().toString(); Field::MultiField * mf; - QMap< QString, QString > propMap; + TQMap< TQString, TQString > propMap; if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) ) { Field::FieldList fl = mf->fields(); @@ -146,8 +146,8 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField ) { - QString propName = propField->tag(); - QString propValue = propField->value().toString(); + TQString propName = propField->tag(); + TQString propValue = propField->value().toString(); propMap.insert( propName, propValue ); } else @@ -155,7 +155,7 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel Field::MultiField * propList = dynamic_cast<Field::MultiField*>( *it ); if ( propList ) { - QString parentName = propList->tag(); + TQString parentName = propList->tag(); Field::FieldList propFields = propList->fields(); const Field::FieldListIterator end = propFields.end(); for ( Field::FieldListIterator it = propFields.begin(); it != end; ++it ) @@ -163,8 +163,8 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField ) { - QString propValue = propField->value().toString(); - QString contents = propMap[ propField->tag() ]; + TQString propValue = propField->value().toString(); + TQString contents = propMap[ propField->tag() ]; if ( !contents.isEmpty() ) contents.append( ", " ); contents.append( propField->value().toString()); diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h index 11f810c0..c03f75bb 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h @@ -21,7 +21,7 @@ #ifndef POLLSEARCHRESULTSTASK_H #define POLLSEARCHRESULTSTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "gwerror.h" @@ -39,14 +39,14 @@ public: enum SearchResultCode { Pending=0, InProgess=1, Completed=2, TimeOut=3, Cancelled=4, Error=5 }; PollSearchResultsTask(Task* parent); ~PollSearchResultsTask(); - void poll( const QString & queryHandle); + void poll( const TQString & queryHandle); bool take( Transfer * transfer ); int queryStatus(); - QValueList< GroupWise::ContactDetails > results(); + TQValueList< GroupWise::ContactDetails > results(); GroupWise::ContactDetails extractUserDetails( Field::FieldList & fields ); private: int m_queryStatus; - QValueList< GroupWise::ContactDetails > m_results; + TQValueList< GroupWise::ContactDetails > m_results; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp index 003a6d60..508b3306 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp @@ -28,7 +28,7 @@ PrivacyItemTask::~PrivacyItemTask() { } -QString PrivacyItemTask::dn() const +TQString PrivacyItemTask::dn() const { return m_dn; } @@ -38,7 +38,7 @@ bool PrivacyItemTask::defaultDeny() const return m_default; } -void PrivacyItemTask::allow( const QString & dn ) +void PrivacyItemTask::allow( const TQString & dn ) { m_dn = dn; Field::FieldList lst; @@ -46,7 +46,7 @@ void PrivacyItemTask::allow( const QString & dn ) createTransfer( "createblock", lst ); } -void PrivacyItemTask::deny( const QString & dn ) +void PrivacyItemTask::deny( const TQString & dn ) { m_dn = dn; Field::FieldList lst; @@ -54,7 +54,7 @@ void PrivacyItemTask::deny( const QString & dn ) createTransfer( "createblock", lst ); } -void PrivacyItemTask::removeAllow( const QString & dn ) +void PrivacyItemTask::removeAllow( const TQString & dn ) { m_dn = dn; Field::FieldList lst; @@ -63,7 +63,7 @@ void PrivacyItemTask::removeAllow( const QString & dn ) } -void PrivacyItemTask::removeDeny( const QString & dn ) +void PrivacyItemTask::removeDeny( const TQString & dn ) { m_dn = dn; Field::FieldList lst; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h index 809cb7a4..401dc765 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h @@ -34,17 +34,17 @@ Q_OBJECT public: PrivacyItemTask( Task* parent); ~PrivacyItemTask(); - void allow( const QString & dn ); - void deny( const QString & dn ); - void removeAllow( const QString & dn ); - void removeDeny( const QString & dn ); + void allow( const TQString & dn ); + void deny( const TQString & dn ); + void removeAllow( const TQString & dn ); + void removeDeny( const TQString & dn ); void defaultPolicy( bool defaultDeny ); - QString dn() const; + TQString dn() const; bool defaultDeny() const; - // void contacts( const QStringList & contacts ); + // void contacts( const TQStringList & contacts ); private: bool m_default; - QString m_dn; + TQString m_dn; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp index 3788bb6e..44f54124 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp @@ -38,7 +38,7 @@ bool RequestTask::forMe( Transfer * transfer ) const return (theResponse && theResponse->transactionId() == m_transactionId ); } -void RequestTask::createTransfer( const QString & command, const Field::FieldList & fields ) +void RequestTask::createTransfer( const TQString & command, const Field::FieldList & fields ) { Request * request = client()->requestFactory()->request( command ); m_transactionId = request->transactionId(); @@ -50,7 +50,7 @@ void RequestTask::onGo() { if ( transfer() ) { - client()->debug( QString( "%1::onGo() - sending %2 fields" ).arg( className() ).arg( static_cast<Request *>( transfer() )->command() ) ); + client()->debug( TQString( "%1::onGo() - sending %2 fields" ).arg( className() ).arg( static_cast<Request *>( transfer() )->command() ) ); send( static_cast<Request *>( transfer() ) ); } else diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h index 30ee57ed..71101fab 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h @@ -34,7 +34,7 @@ Q_OBJECT virtual void onGo(); protected: bool forMe( Transfer * transfer ) const; - void createTransfer( const QString & command, const Field::FieldList & fields ); + void createTransfer( const TQString & command, const Field::FieldList & fields ); private: int m_transactionId; }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp index 4ee35549..87694eb4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp @@ -18,8 +18,8 @@ ************************************************************************* */ -#include <qdatetime.h> -#include <qtimer.h> +#include <tqdatetime.h> +#include <tqtimer.h> #include "client.h" #include "gwerror.h" @@ -75,7 +75,7 @@ bool SearchChatTask::take( Transfer * transfer ) m_objectId = sf->value().toInt(); // now start the results poll timer - QTimer::singleShot( GW_POLL_INITIAL_DELAY, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( GW_POLL_INITIAL_DELAY, this, TQT_SLOT( slotPollForResults() ) ); return true; } @@ -84,7 +84,7 @@ void SearchChatTask::slotPollForResults() //create a PollSearchResultsTask GetChatSearchResultsTask * gcsrt = new GetChatSearchResultsTask( client()->rootTask() ); gcsrt->poll( m_objectId ); - connect( gcsrt, SIGNAL( finished() ), SLOT( slotGotPollResults() ) ); + connect( gcsrt, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotPollResults() ) ); gcsrt->go( true ); } @@ -97,14 +97,14 @@ void SearchChatTask::slotGotPollResults() { case GetChatSearchResultsTask::GettingData: if ( m_polls < GW_POLL_MAXIMUM ) // restart timer - QTimer::singleShot( GW_POLL_FREQUENCY_MS, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( GW_POLL_FREQUENCY_MS, this, TQT_SLOT( slotPollForResults() ) ); else setSuccess( gcsrt->statusCode() ); break; case GetChatSearchResultsTask::DataRetrieved: // got some results, there may be more. m_results += gcsrt->results(); - QTimer::singleShot( 0, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotPollForResults() ) ); break; case GetChatSearchResultsTask::Completed: m_results += gcsrt->results(); @@ -119,7 +119,7 @@ void SearchChatTask::slotGotPollResults() } } -QValueList< GroupWise::ChatroomSearchResult > SearchChatTask::results() +TQValueList< GroupWise::ChatroomSearchResult > SearchChatTask::results() { return m_results; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h index 2f24e075..fe8df7f4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h @@ -52,13 +52,13 @@ class SearchChatTask : public RequestTask /** * Access the results of the search */ - QValueList< GroupWise::ChatroomSearchResult > results(); + TQValueList< GroupWise::ChatroomSearchResult > results(); protected slots: void slotPollForResults(); void slotGotPollResults(); private: - QTimer * m_resultsPollTimer; - QValueList< GroupWise::ChatroomSearchResult > m_results; + TQTimer * m_resultsPollTimer; + TQValueList< GroupWise::ChatroomSearchResult > m_results; int m_polls; int m_objectId; // used to identify our query to the server, so we can poll for its results }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp index cd199ad8..1b64c47d 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp @@ -18,8 +18,8 @@ ************************************************************************* */ -#include <qdatetime.h> -#include <qtimer.h> +#include <tqdatetime.h> +#include <tqtimer.h> #include "client.h" #include "gwerror.h" @@ -48,9 +48,9 @@ SearchUserTask::~SearchUserTask() { } -void SearchUserTask::search( const QValueList<UserSearchQueryTerm> & query ) +void SearchUserTask::search( const TQValueList<UserSearchQueryTerm> & query ) { - m_queryHandle = QString::number( QDateTime::currentDateTime().toTime_t () ); + m_queryHandle = TQString::number( TQDateTime::currentDateTime().toTime_t () ); Field::FieldList lst; if ( query.isEmpty() ) { @@ -59,8 +59,8 @@ void SearchUserTask::search( const QValueList<UserSearchQueryTerm> & query ) } // object Id identifies the search for later reference lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, m_queryHandle ) ); - QValueList<UserSearchQueryTerm>::ConstIterator it = query.begin(); - const QValueList<UserSearchQueryTerm>::ConstIterator end = query.end(); + TQValueList<UserSearchQueryTerm>::ConstIterator it = query.begin(); + const TQValueList<UserSearchQueryTerm>::ConstIterator end = query.end(); for ( ; it != end; ++it ) { Field::SingleField * fld = new Field::SingleField( (*it).field.ascii(), (*it).operation, 0, NMFIELD_TYPE_UTF8, (*it).argument ); @@ -86,7 +86,7 @@ bool SearchUserTask::take( Transfer * transfer ) return true; } // now start the results poll timer - QTimer::singleShot( GW_POLL_INITIAL_DELAY, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( GW_POLL_INITIAL_DELAY, this, TQT_SLOT( slotPollForResults() ) ); return true; } @@ -95,7 +95,7 @@ void SearchUserTask::slotPollForResults() //create a PollSearchResultsTask PollSearchResultsTask * psrt = new PollSearchResultsTask( client()->rootTask() ); psrt->poll( m_queryHandle ); - connect( psrt, SIGNAL( finished() ), SLOT( slotGotPollResults() ) ); + connect( psrt, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotPollResults() ) ); psrt->go( true ); } @@ -109,7 +109,7 @@ void SearchUserTask::slotGotPollResults() case PollSearchResultsTask::Pending: case PollSearchResultsTask::InProgess: if ( m_polls < GW_POLL_MAXIMUM ) // restart timer - QTimer::singleShot( GW_POLL_FREQUENCY_MS, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( GW_POLL_FREQUENCY_MS, this, TQT_SLOT( slotPollForResults() ) ); else setSuccess( psrt->statusCode() ); break; @@ -129,7 +129,7 @@ void SearchUserTask::slotGotPollResults() } } -QValueList< GroupWise::ContactDetails > SearchUserTask::results() +TQValueList< GroupWise::ContactDetails > SearchUserTask::results() { return m_results; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h index 28c09b02..e99a1236 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h @@ -41,7 +41,7 @@ public: * Create the search query * @param query a list of search terms */ - void search( const QValueList<GroupWise::UserSearchQueryTerm> & query); + void search( const TQValueList<GroupWise::UserSearchQueryTerm> & query); /** * If the query was accepted, start a timer to poll for results using PollSearchResultsTask */ @@ -49,14 +49,14 @@ public: /** * Access the results of the search */ - QValueList< GroupWise::ContactDetails > results(); + TQValueList< GroupWise::ContactDetails > results(); protected slots: void slotPollForResults(); void slotGotPollResults(); private: - QString m_queryHandle; // used to identify our query to the server, so we can poll for its results - QTimer * m_resultsPollTimer; - QValueList< GroupWise::ContactDetails > m_results; + TQString m_queryHandle; // used to identify our query to the server, so we can poll for its results + TQTimer * m_resultsPollTimer; + TQValueList< GroupWise::ContactDetails > m_results; int m_polls; }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp index b3a9614f..9fa7d65e 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp @@ -28,13 +28,13 @@ SendInviteTask::~SendInviteTask() { } -void SendInviteTask::invite( const GroupWise::ConferenceGuid & guid, const QStringList & invitees, const GroupWise::OutgoingMessage & msg) +void SendInviteTask::invite( const GroupWise::ConferenceGuid & guid, const TQStringList & invitees, const GroupWise::OutgoingMessage & msg) { Field::FieldList lst, tmp; tmp.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, guid ) ); lst.append( new Field::MultiField( NM_A_FA_CONVERSATION, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, tmp ) ); - QValueListConstIterator<QString> end = invitees.end(); - for ( QValueListConstIterator<QString> it = invitees.begin(); it != end; ++it ) + TQValueListConstIterator<TQString> end = invitees.end(); + for ( TQValueListConstIterator<TQString> it = invitees.begin(); it != end; ++it ) lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, *it ) ); if ( !msg.message.isEmpty() ) lst.append( new Field::SingleField( NM_A_SZ_MESSAGE_BODY, 0, NMFIELD_TYPE_UTF8, msg.message ) ); diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h index c8cf1d9b..b08c7259 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h @@ -35,9 +35,9 @@ class SendInviteTask : public RequestTask public: SendInviteTask(Task* parent); ~SendInviteTask(); - void invite( const GroupWise::ConferenceGuid & guid, const QStringList & invitees, const GroupWise::OutgoingMessage & msg ); + void invite( const GroupWise::ConferenceGuid & guid, const TQStringList & invitees, const GroupWise::OutgoingMessage & msg ); private: - QString m_confId; + TQString m_confId; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp index 290b9d9b..fdf1173f 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp @@ -29,7 +29,7 @@ SendMessageTask::~SendMessageTask() { } -void SendMessageTask::message( const QStringList & recipientDNList, const OutgoingMessage & msg ) +void SendMessageTask::message( const TQStringList & recipientDNList, const OutgoingMessage & msg ) { // Assumes the conference is instantiated, unlike Gaim's nm_send_message Field::FieldList lst, tmp, msgBodies; @@ -44,8 +44,8 @@ void SendMessageTask::message( const QStringList & recipientDNList, const Outgoi // list containing message bodies lst.append( new Field::MultiField( NM_A_FA_MESSAGE, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, msgBodies ) ); // series of participants (may be empty ) - QValueListConstIterator<QString> end = recipientDNList.end(); - for ( QValueListConstIterator<QString> it = recipientDNList.begin(); it != end; ++it ) + TQValueListConstIterator<TQString> end = recipientDNList.end(); + for ( TQValueListConstIterator<TQString> it = recipientDNList.begin(); it != end; ++it ) lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, *it ) ); createTransfer( "sendmessage", lst ); } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h index f45e491f..44559e15 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h @@ -35,7 +35,7 @@ public: SendMessageTask(Task* parent); ~SendMessageTask(); - void message( const QStringList & recipientDNList, const OutgoingMessage & msg ); + void message( const TQStringList & recipientDNList, const OutgoingMessage & msg ); }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp index 0744ff8a..bf463407 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp @@ -30,7 +30,7 @@ SetStatusTask::~SetStatusTask() { } -void SetStatusTask::status( Status newStatus, const QString &awayMessage, const QString &autoReply ) +void SetStatusTask::status( Status newStatus, const TQString &awayMessage, const TQString &autoReply ) { if ( newStatus > GroupWise::Invalid ) { @@ -43,7 +43,7 @@ void SetStatusTask::status( Status newStatus, const QString &awayMessage, const m_autoReply = autoReply; Field::FieldList lst; - lst.append( new Field::SingleField( NM_A_SZ_STATUS, 0, NMFIELD_TYPE_UTF8, QString::number( newStatus ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_STATUS, 0, NMFIELD_TYPE_UTF8, TQString::number( newStatus ) ) ); if ( !awayMessage.isNull() ) lst.append( new Field::SingleField( NM_A_SZ_STATUS_TEXT, 0, NMFIELD_TYPE_UTF8, awayMessage ) ); if ( !autoReply.isNull() ) @@ -56,12 +56,12 @@ Status SetStatusTask::requestedStatus() const return m_status; } -QString SetStatusTask::awayMessage() const +TQString SetStatusTask::awayMessage() const { return m_awayMessage; } -QString SetStatusTask::autoReply() const +TQString SetStatusTask::autoReply() const { return m_autoReply; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h index 2d3c53d7..4e41e681 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h @@ -33,14 +33,14 @@ Q_OBJECT public: SetStatusTask(Task* parent); ~SetStatusTask(); - void status( GroupWise::Status newStatus, const QString &awayMessage, const QString &autoReply ); + void status( GroupWise::Status newStatus, const TQString &awayMessage, const TQString &autoReply ); GroupWise::Status requestedStatus() const; - QString awayMessage() const; - QString autoReply() const; + TQString awayMessage() const; + TQString autoReply() const; private: GroupWise::Status m_status; - QString m_awayMessage; - QString m_autoReply; + TQString m_awayMessage; + TQString m_autoReply; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp index 8f8eccd4..e7272402 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp @@ -37,7 +37,7 @@ bool StatusTask::take( Transfer * transfer ) if ( forMe( transfer, event ) ) { client()->debug( "Got a status change!" ); - client()->debug( QString( "%1 changed status to %2, message: %3" ).arg( event->source() ).arg( event->status() ).arg( event->statusText() ) ); + client()->debug( TQString( "%1 changed status to %2, message: %3" ).arg( event->source() ).arg( event->status() ).arg( event->statusText() ) ); emit gotStatus( event->source().lower(), event->status(), event->statusText() ); return true; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h index 8e4994ff..2a57cd04 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h @@ -34,7 +34,7 @@ public: ~StatusTask(); bool take( Transfer * transfer ); signals: - void gotStatus( const QString & contactId, Q_UINT16 status, const QString & statusText ); + void gotStatus( const TQString & contactId, Q_UINT16 status, const TQString & statusText ); }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp index b835c525..2a421752 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp @@ -36,7 +36,7 @@ void TypingTask::typing( const GroupWise::ConferenceGuid & conferenceGuid, const Field::FieldList typingNotification, outgoingList; typingNotification.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, conferenceGuid ) ); typingNotification.append( new Field::SingleField( NM_A_SZ_TYPE, 0, NMFIELD_TYPE_UTF8, - QString::number( typing ? GroupWise::UserTyping : GroupWise::UserNotTyping ) ) ); + TQString::number( typing ? GroupWise::UserTyping : GroupWise::UserNotTyping ) ) ); outgoingList.append( new Field::MultiField( NM_A_FA_CONVERSATION, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, typingNotification ) ); createTransfer( "sendtyping", outgoingList ); } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp index d8c1a68a..aa75441d 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp @@ -33,18 +33,18 @@ UpdateContactTask::~UpdateContactTask() { } -QString UpdateContactTask::displayName() +TQString UpdateContactTask::displayName() { return m_name; } -void UpdateContactTask::renameContact( const QString & newName, const QValueList<ContactItem> & contactInstances ) +void UpdateContactTask::renameContact( const TQString & newName, const TQValueList<ContactItem> & contactInstances ) { m_name = newName; // build a list of delete, add fields that removes each instance on the server and then readds it with the new name Field::FieldList lst; - const QValueList<ContactItem>::ConstIterator end = contactInstances.end(); - for( QValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it ) + const TQValueList<ContactItem>::ConstIterator end = contactInstances.end(); + for( TQValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it ) { Field::FieldList contactFields; contactFields.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, (*it).id ) ); @@ -57,7 +57,7 @@ void UpdateContactTask::renameContact( const QString & newName, const QValueList lst.append( new Field::MultiField( NM_A_FA_CONTACT, NMFIELD_METHOD_DELETE, 0, NMFIELD_TYPE_ARRAY, contactFields ) ); } - for( QValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it ) + for( TQValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it ) { Field::FieldList contactFields; contactFields.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, (*it).id ) ); diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h index 7e6ac899..4126658e 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h @@ -35,10 +35,10 @@ Q_OBJECT public: UpdateContactTask(Task* parent); ~UpdateContactTask(); - void renameContact( const QString& newName, const QValueList<GroupWise::ContactItem> & contactInstances ); - QString displayName(); + void renameContact( const TQString& newName, const TQValueList<GroupWise::ContactItem> & contactInstances ); + TQString displayName(); private: - QString m_name; + TQString m_name; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp index fef5d2fe..3f8ff7bf 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp @@ -29,7 +29,7 @@ UpdateFolderTask::~UpdateFolderTask() { } -void UpdateFolderTask::renameFolder( const QString & newName, const GroupWise::FolderItem & existing ) +void UpdateFolderTask::renameFolder( const TQString & newName, const GroupWise::FolderItem & existing ) { Field::FieldList lst; // add the old version of the folder, marked delete diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h index 230bd563..479a6bdd 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h @@ -34,7 +34,7 @@ Q_OBJECT public: UpdateFolderTask(Task* parent); ~UpdateFolderTask(); - void renameFolder( const QString & newName, const GroupWise::FolderItem & existing ); + void renameFolder( const TQString & newName, const GroupWise::FolderItem & existing ); protected: Field::FieldList folderToFields( const GroupWise::FolderItem & folder ); }; diff --git a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp index bbd10ee8..4272d956 100644 --- a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp @@ -1,6 +1,6 @@ #include "clientstream_test.h" -ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, argv ) +ClientStreamTest::ClientStreamTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -12,15 +12,15 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, myTLSHandler = new QCATLSHandler( myTLS ); myTestObject = new ClientStream( myConnector, myTLSHandler, 0); // notify when the transport layer is connected - connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); // it's necessary to catch this signal and tell the TLS handler to proceed, even if we don't check cert validity - connect( myTLSHandler, SIGNAL(tlsHandshaken()), SLOT(slotTLSHandshaken()) ); + connect( myTLSHandler, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(slotTLSHandshaken()) ); // notify and start sending - connect( myTestObject, SIGNAL( securityLayerActivated(int) ), SLOT( slotSend(int) ) ); - connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) ); + connect( myTestObject, TQT_SIGNAL( securityLayerActivated(int) ), TQT_SLOT( slotSend(int) ) ); + connect( myTestObject, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotWarning(int) ) ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); } ClientStreamTest::~ClientStreamTest() @@ -58,7 +58,7 @@ void ClientStreamTest::slotsend(int layer) // we're not connecting... qDebug( "sending request" ); // send a request - QCString command("login"); + TQCString command("login"); Request * firstRequest = testFactory.request( command ); Field::FieldList lst; lst.append( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, "maeuschen" ) ); diff --git a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h index 2c77f4e1..fcd540fc 100644 --- a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h +++ b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h @@ -13,9 +13,9 @@ #ifndef clientstream_test_h #define clientstream_test_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "gwclientstream.h" #include "gwconnector.h" diff --git a/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp b/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp index d1de6084..cb8b292e 100644 --- a/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp @@ -20,7 +20,7 @@ int main() { CoreProtocol testObject; RequestFactory testFactory; - QCString command("login"); + TQCString command("login"); Request * firstRequest = testFactory.request( command ); Field::FieldList lst; lst.append( new Field::SingleField( NM_A_SZ_USERID, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_UTF8, "blah@fasel.org" ) ); diff --git a/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp b/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp index eec3f1f2..2dace60b 100644 --- a/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp @@ -62,15 +62,15 @@ void buildList() // sf - contactlist (empty field array) // sf - message body - Field::SingleField* sf = new Field::SingleField( NM_A_FA_MESSAGE, 0, NMFIELD_TYPE_UTF8, QString::fromLatin1( "Da steh ich nun, ich armer Tor! Und bin so klug als wie zuvor..." ) ); + Field::SingleField* sf = new Field::SingleField( NM_A_FA_MESSAGE, 0, NMFIELD_TYPE_UTF8, TQString::fromLatin1( "Da steh ich nun, ich armer Tor! Und bin so klug als wie zuvor..." ) ); fl.append( sf ); - sf = new Field::SingleField( NM_A_SZ_TRANSACTION_ID, 0, NMFIELD_TYPE_UTF8, QString::fromLatin1( "maeuschen" ) ); + sf = new Field::SingleField( NM_A_SZ_TRANSACTION_ID, 0, NMFIELD_TYPE_UTF8, TQString::fromLatin1( "maeuschen" ) ); fl.append( sf ); // nested list Field::FieldList nl; sf = new Field::SingleField( NM_A_SZ_STATUS, 0, NMFIELD_TYPE_UDWORD, 123 ); nl.append( sf ); - sf = new Field::SingleField( NM_A_SZ_MESSAGE_BODY, 0, NMFIELD_TYPE_UTF8, QString::fromLatin1( "bla bla" ) ); + sf = new Field::SingleField( NM_A_SZ_MESSAGE_BODY, 0, NMFIELD_TYPE_UTF8, TQString::fromLatin1( "bla bla" ) ); nl.append( sf ); Field::MultiField* mf = new Field::MultiField( NM_A_FA_PARTICIPANTS, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY ); mf->setFields( nl ); @@ -91,7 +91,7 @@ void buildFakeContactList() for ( int i = 0; i < 6; i ++ ) { FieldList contact; - Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( i ) ); + Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( i ) ); contact.append( sf ); sf = new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, names[i] ); contact.append( sf ); @@ -102,7 +102,7 @@ void buildFakeContactList() // add a folder { FieldList folder; - Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( 1 ) ); + Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( 1 ) ); folder.append( sf ); sf = new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, "buddies" ); folder.append( sf ); @@ -115,7 +115,7 @@ void buildFakeContactList() for ( int i = 0; i < 3; i ++ ) { FieldList contact; - Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( i ) ); + Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( i ) ); contact.append( sf ); sf = new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, names[i] ); contact.append( sf ); diff --git a/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp b/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp index 290dba36..16527bba 100644 --- a/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp @@ -19,8 +19,8 @@ #include "tlshandler.h" -TLSHandler::TLSHandler(QObject *parent) -:QObject(parent) +TLSHandler::TLSHandler(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/groupwise/libgroupwise/tlshandler.h b/kopete/protocols/groupwise/libgroupwise/tlshandler.h index 61c8fe7d..ede9d4e3 100644 --- a/kopete/protocols/groupwise/libgroupwise/tlshandler.h +++ b/kopete/protocols/groupwise/libgroupwise/tlshandler.h @@ -20,32 +20,32 @@ #ifndef GWTLSHANDLER_H #define GWTLSHANDLER_H -#include <qobject.h> -//#include<qstring.h> -//#include<qhostaddress.h> -//#include<qstring.h> -//#include<qcstring.h> -//#include<qxml.h> -//#include<qdom.h> +#include <tqobject.h> +//#include<tqstring.h> +//#include<tqhostaddress.h> +//#include<tqstring.h> +//#include<tqcstring.h> +//#include<tqxml.h> +//#include<tqdom.h> class TLSHandler : public QObject { Q_OBJECT public: - TLSHandler(QObject *parent=0); + TLSHandler(TQObject *parent=0); virtual ~TLSHandler(); virtual void reset()=0; - virtual void startClient(const QString &host)=0; - virtual void write(const QByteArray &a)=0; - virtual void writeIncoming(const QByteArray &a)=0; + virtual void startClient(const TQString &host)=0; + virtual void write(const TQByteArray &a)=0; + virtual void writeIncoming(const TQByteArray &a)=0; signals: void success(); void fail(); void closed(); - void readyRead(const QByteArray &a); - void readyReadOutgoing(const QByteArray &a, int plainBytes); + void readyRead(const TQByteArray &a); + void readyReadOutgoing(const TQByteArray &a, int plainBytes); }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/transfer.cpp b/kopete/protocols/groupwise/libgroupwise/transfer.cpp index 366deed0..68eb97b3 100644 --- a/kopete/protocols/groupwise/libgroupwise/transfer.cpp +++ b/kopete/protocols/groupwise/libgroupwise/transfer.cpp @@ -14,7 +14,7 @@ * * ************************************************************************* */ -#include <qapplication.h> +#include <tqapplication.h> #include "transfer.h" diff --git a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp index 2527968e..ceb29632 100644 --- a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp +++ b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp @@ -21,7 +21,7 @@ #include "userdetailsmanager.h" UserDetailsManager::UserDetailsManager( Client * parent, const char *name) - : QObject(parent, name), m_client( parent ) + : TQObject(parent, name), m_client( parent ) { } @@ -29,30 +29,30 @@ UserDetailsManager::~UserDetailsManager() { } -void UserDetailsManager::dump( const QStringList & list ) +void UserDetailsManager::dump( const TQStringList & list ) { - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { - m_client->debug( QString( " - %1" ).arg (*it) ); + m_client->debug( TQString( " - %1" ).arg (*it) ); } } -bool UserDetailsManager::known( const QString & dn ) +bool UserDetailsManager::known( const TQString & dn ) { if ( dn == m_client->userDN() ) return true; // TODO: replace with m_detailsMap.contains( dn ); - QStringList::Iterator found = m_detailsMap.keys().find( dn ); + TQStringList::Iterator found = m_detailsMap.keys().find( dn ); // we always know the local user's details, so don't look them up return ( found !=m_detailsMap.keys().end() ); } -ContactDetails UserDetailsManager::details( const QString & dn ) +ContactDetails UserDetailsManager::details( const TQString & dn ) { return m_detailsMap[ dn ]; } -QStringList UserDetailsManager::knownDNs() +TQStringList UserDetailsManager::knownDNs() { return m_detailsMap.keys(); } @@ -61,23 +61,23 @@ void UserDetailsManager::addDetails( const ContactDetails & details ) { //qDebug( "UserDetailsManager::addContact, got %s, we now know: ", details.dn.ascii() ); m_detailsMap.insert( details.dn, details ); -/* QStringList keys = m_detailsMap.keys(); +/* TQStringList keys = m_detailsMap.keys(); dump( keys ); qDebug( "UserDetailsManager::addContact, pending: " ); dump( m_pendingDNs );*/ } -void UserDetailsManager::removeContact( const QString & dn ) +void UserDetailsManager::removeContact( const TQString & dn ) { m_detailsMap.remove( dn ); } -void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUnknown ) +void UserDetailsManager::requestDetails( const TQStringList & dnList, bool onlyUnknown ) { // build a list of DNs that are not already subject to a pending request - QStringList requestList; - QValueListConstIterator<QString> end = dnList.end(); - for ( QValueListConstIterator<QString> it = dnList.begin(); it != end; ++it ) + TQStringList requestList; + TQValueListConstIterator<TQString> end = dnList.end(); + for ( TQValueListConstIterator<TQString> it = dnList.begin(); it != end; ++it ) { // don't request our own details if ( *it == m_client->userDN() ) @@ -85,10 +85,10 @@ void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUn // don't request details we already have unless the caller specified this if ( onlyUnknown && known( *it ) ) break; - QStringList::Iterator found = m_pendingDNs.find( *it ); + TQStringList::Iterator found = m_pendingDNs.find( *it ); if ( found == m_pendingDNs.end() ) { - m_client->debug( QString( "UserDetailsManager::requestDetails - including %1" ).arg( (*it) ) ); + m_client->debug( TQString( "UserDetailsManager::requestDetails - including %1" ).arg( (*it) ) ); requestList.append( *it ); m_pendingDNs.append( *it ); } @@ -97,8 +97,8 @@ void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUn { GetDetailsTask * gdt = new GetDetailsTask( m_client->rootTask() ); gdt->userDNs( requestList ); - connect( gdt, SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), - SLOT( slotReceiveContactDetails( const GroupWise::ContactDetails & ) ) ); + connect( gdt, TQT_SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), + TQT_SLOT( slotReceiveContactDetails( const GroupWise::ContactDetails & ) ) ); // TODO: connect to gdt's finished() signal, check for failures, expand gdt to maintain a list of not found DNs? gdt->go( true ); } @@ -108,10 +108,10 @@ void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUn } } -void UserDetailsManager::requestDetails( const QString & dn, bool onlyUnknown ) +void UserDetailsManager::requestDetails( const TQString & dn, bool onlyUnknown ) { - m_client->debug( QString( "UserDetailsManager::requestDetails for %1" ).arg( dn ) ); - QStringList list; + m_client->debug( TQString( "UserDetailsManager::requestDetails for %1" ).arg( dn ) ); + TQStringList list; list.append( dn ); requestDetails( list, onlyUnknown ); } diff --git a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h index 4e9b6022..f5a5ff6c 100644 --- a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h +++ b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h @@ -18,9 +18,9 @@ #ifndef USERDETAILSMANAGER_H #define USERDETAILSMANAGER_H -#include <qmap.h> -#include <qobject.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqstringlist.h> #include "gwerror.h" class Client; @@ -40,15 +40,15 @@ public: /** * List of DNs that we have already received details for */ - QStringList knownDNs(); + TQStringList knownDNs(); /** * Check if we have details for a single DN */ - bool known( const QString &dn ); + bool known( const TQString &dn ); /** * Get details for a given DN */ - ContactDetails details( const QString &dn ); + ContactDetails details( const TQString &dn ); /** * Add a ContactDetails object to our cache. * This SHOULD be called when receiving details in contactlist receive and manipulation, to prevent unnecessary additional requests. @@ -58,27 +58,27 @@ public: * Remove a contact from the list of known DNs. This MUST be performed when a client removes a DN from its local contact list, * otherwise new events from this DN will not receive user details. */ - void removeContact( const QString & dn ); + void removeContact( const TQString & dn ); /** * Explicitly request details for a set of contacts from the server. * Will signal @ref gotContactUserDetails for each one when they are available. */ - void requestDetails( const QStringList & dnList, bool onlyUnknown = true ); + void requestDetails( const TQStringList & dnList, bool onlyUnknown = true ); /** * Explicitly request a contact's details from the server. Will signal @ref gotContactUserDetails when they are available. */ - void requestDetails( const QString & dn, bool onlyUnknown = true ); + void requestDetails( const TQString & dn, bool onlyUnknown = true ); signals: void gotContactDetails( const GroupWise::ContactDetails & ); protected slots: void slotReceiveContactDetails( const GroupWise::ContactDetails & ); protected: - void dump( const QStringList & list ); + void dump( const TQStringList & list ); private: - QStringList m_pendingDNs; // a list of DNs that have pending requests + TQStringList m_pendingDNs; // a list of DNs that have pending requests Client * m_client; - QMap< QString, GroupWise::ContactDetails > m_detailsMap; + TQMap< TQString, GroupWise::ContactDetails > m_detailsMap; }; #endif diff --git a/kopete/protocols/groupwise/ui/gwaddcontactpage.cpp b/kopete/protocols/groupwise/ui/gwaddcontactpage.cpp index 93616f95..5ece3882 100644 --- a/kopete/protocols/groupwise/ui/gwaddcontactpage.cpp +++ b/kopete/protocols/groupwise/ui/gwaddcontactpage.cpp @@ -21,15 +21,15 @@ #include "gwaddcontactpage.h" -//#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qtabwidget.h> -#include <qvaluelist.h> +//#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqtabwidget.h> +#include <tqvaluelist.h> #include <kdebug.h> #include <klocale.h> @@ -45,23 +45,23 @@ #include "gwaddui.h" #include "userdetailsmanager.h" -GroupWiseAddContactPage::GroupWiseAddContactPage( Kopete::Account * owner, QWidget* parent, const char* name ) +GroupWiseAddContactPage::GroupWiseAddContactPage( Kopete::Account * owner, TQWidget* parent, const char* name ) : AddContactPage(parent, name) { m_account = static_cast<GroupWiseAccount *>( owner ); kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); if (owner->isConnected ()) { - m_searchUI = new GroupWiseContactSearch( m_account, QListView::Single, false, + m_searchUI = new GroupWiseContactSearch( m_account, TQListView::Single, false, this, "acwsearchwidget" ); show(); m_canadd = true; } else { - m_noaddMsg1 = new QLabel (i18n ("You need to be connected to be able to add contacts."), this); - m_noaddMsg2 = new QLabel (i18n ("Connect to GroupWise Messenger and try again."), this); + m_noaddMsg1 = new TQLabel (i18n ("You need to be connected to be able to add contacts."), this); + m_noaddMsg2 = new TQLabel (i18n ("Connect to GroupWise Messenger and try again."), this); m_canadd = false; } } @@ -77,10 +77,10 @@ bool GroupWiseAddContactPage::apply( Kopete::Account* account, Kopete::MetaConta { if ( validateData() ) { - QString contactId; - QString displayName; + TQString contactId; + TQString displayName; - QValueList< ContactDetails > selected = m_searchUI->selectedResults(); + TQValueList< ContactDetails > selected = m_searchUI->selectedResults(); if ( selected.count() == 1 ) { ContactDetails dt = selected.first(); diff --git a/kopete/protocols/groupwise/ui/gwaddcontactpage.h b/kopete/protocols/groupwise/ui/gwaddcontactpage.h index aa195edd..0b34d5c8 100644 --- a/kopete/protocols/groupwise/ui/gwaddcontactpage.h +++ b/kopete/protocols/groupwise/ui/gwaddcontactpage.h @@ -42,7 +42,7 @@ class GroupWiseAddContactPage : public AddContactPage { Q_OBJECT public: - GroupWiseAddContactPage( Kopete::Account * owner, QWidget* parent = 0, const char* name = 0 ); + GroupWiseAddContactPage( Kopete::Account * owner, TQWidget* parent = 0, const char* name = 0 ); ~GroupWiseAddContactPage(); /** @@ -54,14 +54,14 @@ public: */ virtual bool validateData(); protected: - QValueList< GroupWise::ContactDetails > m_searchResults; + TQValueList< GroupWise::ContactDetails > m_searchResults; unsigned char searchOperation( int comboIndex ); GroupWiseAccount * m_account; GroupWiseAddUI * m_gwAddUI; //TODO: make wrapper GroupWiseContactSearch * m_searchUI; - QLabel *m_noaddMsg1; - QLabel *m_noaddMsg2; + TQLabel *m_noaddMsg1; + TQLabel *m_noaddMsg2; bool m_canadd; }; diff --git a/kopete/protocols/groupwise/ui/gwchatpropsdialog.cpp b/kopete/protocols/groupwise/ui/gwchatpropsdialog.cpp index eabb75ab..1cfee7ee 100644 --- a/kopete/protocols/groupwise/ui/gwchatpropsdialog.cpp +++ b/kopete/protocols/groupwise/ui/gwchatpropsdialog.cpp @@ -16,10 +16,10 @@ ************************************************************************* */ -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qlistview.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqlistview.h> #include <kdebug.h> #include <kpushbutton.h> @@ -29,7 +29,7 @@ #include "gwchatpropsdialog.h" -GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( QWidget * parent, const char * name ) +GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( TQWidget * parent, const char * name ) : KDialogBase( parent, name, false, i18n( "Chatroom properties" ), KDialogBase::Ok|KDialogBase::Cancel, Ok, true ), m_dirty( false ) { @@ -37,7 +37,7 @@ GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( QWidget * parent, const char } GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( const GroupWise::Chatroom & room, bool readOnly, - QWidget * parent, const char * name ) + TQWidget * parent, const char * name ) : KDialogBase( parent, name, false, i18n( "Chatroom properties" ), KDialogBase::Ok|KDialogBase::Cancel, Ok, true ), m_dirty( false ) { @@ -49,7 +49,7 @@ GroupWiseChatPropsDialog::GroupWiseChatPropsDialog( const GroupWise::Chatroom & m_widget->m_query->setText( room.query ); m_widget->m_topic->setText( room.topic ); m_widget->m_archive->setChecked( room.archive ); - m_widget->m_maxUsers->setText( QString::number( room.maxUsers ) ); + m_widget->m_maxUsers->setText( TQString::number( room.maxUsers ) ); m_widget->m_createdOn->setText( room.createdOn.toString() ); m_widget->m_creator->setText( room.creatorDN ); @@ -82,18 +82,18 @@ void GroupWiseChatPropsDialog::initialise() { kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl; m_widget = new GroupWiseChatPropsWidget( this ); - connect( m_widget->m_topic, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_owner, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_createdOn, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_creator, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_description, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_disclaimer, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_query, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_archive, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_maxUsers, SIGNAL( textChanged( const QString & ) ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_btnAddAcl, SIGNAL( clicked() ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_btnEditAcl, SIGNAL( clicked() ), SLOT( slotWidgetChanged() ) ); - connect( m_widget->m_btnDeleteAcl, SIGNAL( clicked() ), SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_topic, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_owner, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_createdOn, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_creator, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_description, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_disclaimer, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_query, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_archive, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_maxUsers, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_btnAddAcl, TQT_SIGNAL( clicked() ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_btnEditAcl, TQT_SIGNAL( clicked() ), TQT_SLOT( slotWidgetChanged() ) ); + connect( m_widget->m_btnDeleteAcl, TQT_SIGNAL( clicked() ), TQT_SLOT( slotWidgetChanged() ) ); setMainWidget( m_widget ); show(); } diff --git a/kopete/protocols/groupwise/ui/gwchatpropsdialog.h b/kopete/protocols/groupwise/ui/gwchatpropsdialog.h index 058d6b20..7228bb57 100644 --- a/kopete/protocols/groupwise/ui/gwchatpropsdialog.h +++ b/kopete/protocols/groupwise/ui/gwchatpropsdialog.h @@ -45,12 +45,12 @@ class GroupWiseChatPropsDialog : public KDialogBase /** * Construct an empty dialog */ - GroupWiseChatPropsDialog( QWidget * parent, const char * name ); + GroupWiseChatPropsDialog( TQWidget * parent, const char * name ); /** * Construct a populated dialog */ GroupWiseChatPropsDialog( const GroupWise::Chatroom & room, bool readOnly, - QWidget * parent, const char * name ); + TQWidget * parent, const char * name ); ~GroupWiseChatPropsDialog() {} diff --git a/kopete/protocols/groupwise/ui/gwchatsearchdialog.cpp b/kopete/protocols/groupwise/ui/gwchatsearchdialog.cpp index fb67a03e..b9021b1f 100644 --- a/kopete/protocols/groupwise/ui/gwchatsearchdialog.cpp +++ b/kopete/protocols/groupwise/ui/gwchatsearchdialog.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include <qmap.h> +#include <tqmap.h> #include <klistview.h> #include <klistviewsearchline.h> @@ -34,7 +34,7 @@ #include "gwchatsearchdialog.h" -GroupWiseChatSearchDialog::GroupWiseChatSearchDialog( GroupWiseAccount * account, QWidget *parent, const char *name ) +GroupWiseChatSearchDialog::GroupWiseChatSearchDialog( GroupWiseAccount * account, TQWidget *parent, const char *name ) : KDialogBase( parent, name, false, i18n( "Search Chatrooms" ), KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, Ok, true ), m_account( account ) { @@ -44,12 +44,12 @@ GroupWiseChatSearchDialog::GroupWiseChatSearchDialog( GroupWiseAccount * account m_manager = m_account->client()->chatroomManager(); - connect ( m_manager, SIGNAL( updated() ), SLOT( slotManagerUpdated() ) ); - connect ( m_manager, SIGNAL( gotProperties( const GroupWise::Chatroom & ) ), - SLOT( slotGotProperties( const GroupWise::Chatroom & ) ) ); + connect ( m_manager, TQT_SIGNAL( updated() ), TQT_SLOT( slotManagerUpdated() ) ); + connect ( m_manager, TQT_SIGNAL( gotProperties( const GroupWise::Chatroom & ) ), + TQT_SLOT( slotGotProperties( const GroupWise::Chatroom & ) ) ); - connect( m_widget->m_btnRefresh, SIGNAL( clicked() ), SLOT( slotUpdateClicked() ) ); - connect( m_widget->m_btnProperties, SIGNAL( clicked() ), SLOT( slotPropertiesClicked() ) ); + connect( m_widget->m_btnRefresh, TQT_SIGNAL( clicked() ), TQT_SLOT( slotUpdateClicked() ) ); + connect( m_widget->m_btnProperties, TQT_SIGNAL( clicked() ), TQT_SLOT( slotPropertiesClicked() ) ); m_manager->updateRooms(); show(); @@ -63,12 +63,12 @@ void GroupWiseChatSearchDialog::slotUpdateClicked() { kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << "updating chatroom list " << endl; m_widget->m_chatrooms->clear(); - QListViewItem * first = m_widget->m_chatrooms->firstChild(); - QString updateMessage = i18n("Updating chatroom list..." ); + TQListViewItem * first = m_widget->m_chatrooms->firstChild(); + TQString updateMessage = i18n("Updating chatroom list..." ); /* if ( first ) - new QListViewItem( first, updateMessage ); + new TQListViewItem( first, updateMessage ); else*/ - new QListViewItem( m_widget->m_chatrooms, updateMessage ); + new TQListViewItem( m_widget->m_chatrooms, updateMessage ); m_manager->updateRooms(); } @@ -80,17 +80,17 @@ void GroupWiseChatSearchDialog::slotManagerUpdated() const ChatroomMap::iterator end = rooms.end(); while ( it != end ) { - new QListViewItem( m_widget->m_chatrooms, + new TQListViewItem( m_widget->m_chatrooms, it.data().displayName, m_account->protocol()->dnToDotted( it.data().ownerDN ), - QString::number( it.data().participantsCount ) ); + TQString::number( it.data().participantsCount ) ); ++it; } } void GroupWiseChatSearchDialog::slotPropertiesClicked() { - QListViewItem * selected = m_widget->m_chatrooms->selectedItem(); + TQListViewItem * selected = m_widget->m_chatrooms->selectedItem(); if ( selected ) { m_manager->requestProperties( selected->text( 0 ) ); diff --git a/kopete/protocols/groupwise/ui/gwchatsearchdialog.h b/kopete/protocols/groupwise/ui/gwchatsearchdialog.h index 667e6394..c65cfa43 100644 --- a/kopete/protocols/groupwise/ui/gwchatsearchdialog.h +++ b/kopete/protocols/groupwise/ui/gwchatsearchdialog.h @@ -30,7 +30,7 @@ class GroupWiseChatSearchDialog : public KDialogBase { Q_OBJECT public: - GroupWiseChatSearchDialog( GroupWiseAccount * account, QWidget * parent, const char * name ); + GroupWiseChatSearchDialog( GroupWiseAccount * account, TQWidget * parent, const char * name ); ~GroupWiseChatSearchDialog(); protected: void populateWidget(); diff --git a/kopete/protocols/groupwise/ui/gwcontactproperties.cpp b/kopete/protocols/groupwise/ui/gwcontactproperties.cpp index 120296ce..92f4da11 100644 --- a/kopete/protocols/groupwise/ui/gwcontactproperties.cpp +++ b/kopete/protocols/groupwise/ui/gwcontactproperties.cpp @@ -16,13 +16,13 @@ ************************************************************************* */ -#include <qclipboard.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlineedit.h> +#include <tqclipboard.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlineedit.h> #include <klistview.h> -#include <qmap.h> -#include <qpopupmenu.h> +#include <tqmap.h> +#include <tqpopupmenu.h> #include <kapplication.h> #include <kdebug.h> @@ -41,8 +41,8 @@ #include "gwcontactproperties.h" -GroupWiseContactProperties::GroupWiseContactProperties( GroupWiseContact * contact, QWidget *parent, const char *name) - : QObject(parent, name) +GroupWiseContactProperties::GroupWiseContactProperties( GroupWiseContact * contact, TQWidget *parent, const char *name) + : TQObject(parent, name) { init(); // set up the contents of the props widget @@ -56,8 +56,8 @@ GroupWiseContactProperties::GroupWiseContactProperties( GroupWiseContact * conta m_dialog->show(); } -GroupWiseContactProperties::GroupWiseContactProperties( GroupWise::ContactDetails cd, QWidget *parent, const char *name ) - : QObject(parent, name) +GroupWiseContactProperties::GroupWiseContactProperties( GroupWise::ContactDetails cd, TQWidget *parent, const char *name ) + : TQObject(parent, name) { init(); // set up the contents of the props widget @@ -78,28 +78,28 @@ GroupWiseContactProperties::~GroupWiseContactProperties() void GroupWiseContactProperties::init() { - m_dialog = new KDialogBase( ::qt_cast<QWidget*>( parent() ), "gwcontactpropsdialog", false, i18n( "Contact Properties" ), KDialogBase::Ok ); + m_dialog = new KDialogBase( ::qt_cast<TQWidget*>( parent() ), "gwcontactpropsdialog", false, i18n( "Contact Properties" ), KDialogBase::Ok ); m_propsWidget = new GroupWiseContactPropsWidget( m_dialog ); // set up the context menu and copy action - m_copyAction = KStdAction::copy( this, SLOT( slotCopy() ), 0 ); + m_copyAction = KStdAction::copy( this, TQT_SLOT( slotCopy() ), 0 ); connect( m_propsWidget->m_propsView, - SIGNAL( contextMenuRequested( QListViewItem *, const QPoint & , int) ), - SLOT( slotShowContextMenu( QListViewItem *, const QPoint & ) ) ); + TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint & , int) ), + TQT_SLOT( slotShowContextMenu( TQListViewItem *, const TQPoint & ) ) ); // insert the props widget into the dialog m_dialog->setMainWidget( m_propsWidget ); } -void GroupWiseContactProperties::setupProperties( QMap< QString, QString > serverProps ) +void GroupWiseContactProperties::setupProperties( TQMap< TQString, TQString > serverProps ) { m_propsWidget->m_propsView->header()->hide(); - QMap< QString, QString >::Iterator it; - QMap< QString, QString >::Iterator end = serverProps.end(); + TQMap< TQString, TQString >::Iterator it; + TQMap< TQString, TQString >::Iterator end = serverProps.end(); for ( it = serverProps.begin(); it != end; ++it ) { kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " adding property: " << it.key() << ", " << it.data() << endl; - QString key = it.key(); - QString localised; + TQString key = it.key(); + TQString localised; if ( key == "telephoneNumber" ) localised = i18n( "Telephone Number" ); else if ( key == "OU" ) @@ -121,13 +121,13 @@ void GroupWiseContactProperties::setupProperties( QMap< QString, QString > serve } } -void GroupWiseContactProperties::slotShowContextMenu( QListViewItem * item, const QPoint & pos ) +void GroupWiseContactProperties::slotShowContextMenu( TQListViewItem * item, const TQPoint & pos ) { if ( item ) kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "for item " << item->text(0) << ", " << item->text(1) << endl; else kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "no selected item" << endl; - QPopupMenu * popupMenu = new QPopupMenu( m_propsWidget->m_propsView ); + TQPopupMenu * popupMenu = new TQPopupMenu( m_propsWidget->m_propsView ); m_copyAction->plug( popupMenu ); popupMenu->exec( pos ); } diff --git a/kopete/protocols/groupwise/ui/gwcontactproperties.h b/kopete/protocols/groupwise/ui/gwcontactproperties.h index 5684cf2a..4538644e 100644 --- a/kopete/protocols/groupwise/ui/gwcontactproperties.h +++ b/kopete/protocols/groupwise/ui/gwcontactproperties.h @@ -20,7 +20,7 @@ #define GROUPWISECONTACTPROPERTIES_H -#include <qobject.h> +#include <tqobject.h> class GroupWiseContactPropsWidget; class KDialogBase; @@ -39,17 +39,17 @@ public: /** * Display properties given a GroupWiseContact */ - GroupWiseContactProperties( GroupWiseContact * contact, QWidget *parent, const char *name ); + GroupWiseContactProperties( GroupWiseContact * contact, TQWidget *parent, const char *name ); /** * Display properties given a GroupWise::ContactDetails */ - GroupWiseContactProperties( GroupWise::ContactDetails contactDetails, QWidget *parent = 0, const char *name = 0 ); + GroupWiseContactProperties( GroupWise::ContactDetails contactDetails, TQWidget *parent = 0, const char *name = 0 ); ~GroupWiseContactProperties(); protected: - void setupProperties( QMap< QString, QString > serverProps ); + void setupProperties( TQMap< TQString, TQString > serverProps ); void init(); protected slots: - void slotShowContextMenu( QListViewItem *, const QPoint & ); + void slotShowContextMenu( TQListViewItem *, const TQPoint & ); void slotCopy(); private: GroupWiseContactPropsWidget * m_propsWidget; diff --git a/kopete/protocols/groupwise/ui/gweditaccountwidget.cpp b/kopete/protocols/groupwise/ui/gweditaccountwidget.cpp index 87468ccf..7f049d7c 100644 --- a/kopete/protocols/groupwise/ui/gweditaccountwidget.cpp +++ b/kopete/protocols/groupwise/ui/gweditaccountwidget.cpp @@ -19,10 +19,10 @@ ************************************************************************* */ -#include <qcheckbox.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qspinbox.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqspinbox.h> #include <kapplication.h> #include <kdebug.h> @@ -40,16 +40,16 @@ #include "gweditaccountwidget.h" -GroupWiseEditAccountWidget::GroupWiseEditAccountWidget( QWidget* parent, Kopete::Account* theAccount) -: QWidget( parent ), KopeteEditAccountWidget( theAccount ) +GroupWiseEditAccountWidget::GroupWiseEditAccountWidget( TQWidget* parent, Kopete::Account* theAccount) +: TQWidget( parent ), KopeteEditAccountWidget( theAccount ) { kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl; - m_layout = new QVBoxLayout( this ); + m_layout = new TQVBoxLayout( this ); m_preferencesDialog = new GroupWiseAccountPreferences( this ); m_layout->addWidget( m_preferencesDialog ); - connect( m_preferencesDialog->m_password, SIGNAL( changed() ), this, SLOT( configChanged() ) ); - connect( m_preferencesDialog->m_server, SIGNAL( textChanged( const QString & ) ), this, SLOT( configChanged() ) ); - connect( m_preferencesDialog->m_port, SIGNAL( valueChanged( int ) ), this, SLOT( configChanged() ) ); + connect( m_preferencesDialog->m_password, TQT_SIGNAL( changed() ), this, TQT_SLOT( configChanged() ) ); + connect( m_preferencesDialog->m_server, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( configChanged() ) ); + connect( m_preferencesDialog->m_port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( configChanged() ) ); if ( account() ) reOpen(); else @@ -60,9 +60,9 @@ GroupWiseEditAccountWidget::GroupWiseEditAccountWidget( QWidget* parent, Kopete: m_preferencesDialog->m_server->setText( config->readEntry( "DefaultServer" ) ); m_preferencesDialog->m_port->setValue( config->readNumEntry( "DefaultPort", 8300 ) ); } - QWidget::setTabOrder( m_preferencesDialog->m_userId, m_preferencesDialog->m_password->mRemembered ); - QWidget::setTabOrder( m_preferencesDialog->m_password->mRemembered, m_preferencesDialog->m_password->mPassword ); - QWidget::setTabOrder( m_preferencesDialog->m_password->mPassword, m_preferencesDialog->m_autoConnect ); + TQWidget::setTabOrder( m_preferencesDialog->m_userId, m_preferencesDialog->m_password->mRemembered ); + TQWidget::setTabOrder( m_preferencesDialog->m_password->mRemembered, m_preferencesDialog->m_password->mPassword ); + TQWidget::setTabOrder( m_preferencesDialog->m_password->mPassword, m_preferencesDialog->m_autoConnect ); } @@ -119,7 +119,7 @@ void GroupWiseEditAccountWidget::writeConfig() { kdDebug(GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << endl; account()->configGroup()->writeEntry( "Server", m_preferencesDialog->m_server->text() ); - account()->configGroup()->writeEntry( "Port", QString::number( m_preferencesDialog->m_port->value() ) ); + account()->configGroup()->writeEntry( "Port", TQString::number( m_preferencesDialog->m_port->value() ) ); account()->configGroup()->writeEntry( "AlwaysAcceptInvitations", m_preferencesDialog->m_alwaysAccept->isChecked() ? "true" : "false" ); diff --git a/kopete/protocols/groupwise/ui/gweditaccountwidget.h b/kopete/protocols/groupwise/ui/gweditaccountwidget.h index 27c54ee2..038adb40 100644 --- a/kopete/protocols/groupwise/ui/gweditaccountwidget.h +++ b/kopete/protocols/groupwise/ui/gweditaccountwidget.h @@ -22,7 +22,7 @@ #ifndef TESTBEDEDITACCOUNTWIDGET_H #define TESTBEDEDITACCOUNTWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <editaccountwidget.h> class QVBoxLayout; @@ -33,11 +33,11 @@ class GroupWiseAccountPreferences; * A widget for editing this protocol's accounts * @author Will Stephenson */ -class GroupWiseEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class GroupWiseEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: - GroupWiseEditAccountWidget( QWidget* parent, Kopete::Account* account); + GroupWiseEditAccountWidget( TQWidget* parent, Kopete::Account* account); ~GroupWiseEditAccountWidget(); @@ -57,7 +57,7 @@ protected: void reOpen(); void writeConfig(); Kopete::Account *m_account; - QVBoxLayout *m_layout; + TQVBoxLayout *m_layout; GroupWiseAccountPreferences *m_preferencesDialog; }; diff --git a/kopete/protocols/groupwise/ui/gwprivacydialog.cpp b/kopete/protocols/groupwise/ui/gwprivacydialog.cpp index d46daf4a..f18d6737 100644 --- a/kopete/protocols/groupwise/ui/gwprivacydialog.cpp +++ b/kopete/protocols/groupwise/ui/gwprivacydialog.cpp @@ -16,11 +16,11 @@ ************************************************************************* */ -#include <qlabel.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qstringlist.h> -#include <qlistview.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqstringlist.h> +#include <tqlistview.h> #include <kdebug.h> #include <kiconloader.h> @@ -39,16 +39,16 @@ class PrivacyLBI : public QListBoxPixmap { public: - PrivacyLBI( QListBox * listBox, const QPixmap & pixmap, const QString & text, const QString & dn ) - : QListBoxPixmap( listBox, pixmap, text ), m_dn( dn ) + PrivacyLBI( TQListBox * listBox, const TQPixmap & pixmap, const TQString & text, const TQString & dn ) + : TQListBoxPixmap( listBox, pixmap, text ), m_dn( dn ) { } - QString dn() { return m_dn; } + TQString dn() { return m_dn; } private: - QString m_dn; + TQString m_dn; }; -GroupWisePrivacyDialog::GroupWisePrivacyDialog( GroupWiseAccount * account, QWidget *parent, const char *name ) +GroupWisePrivacyDialog::GroupWisePrivacyDialog( GroupWiseAccount * account, TQWidget *parent, const char *name ) : KDialogBase( parent, name, false, i18n( "Account specific privacy settings", "Manage Privacy for %1" ).arg( account->accountId() ), KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, Ok, true ), m_account( account ), m_dirty( false ), m_searchDlg(0) { @@ -65,16 +65,16 @@ GroupWisePrivacyDialog::GroupWisePrivacyDialog( GroupWiseAccount * account, QWid populateWidgets(); - m_privacy->m_allowList->setSelectionMode( QListBox::Extended ); - m_privacy->m_denyList->setSelectionMode( QListBox::Extended ); + m_privacy->m_allowList->setSelectionMode( TQListBox::Extended ); + m_privacy->m_denyList->setSelectionMode( TQListBox::Extended ); - connect( m_privacy->m_btnAllow, SIGNAL( clicked() ), SLOT( slotAllowClicked() ) ); - connect( m_privacy->m_btnBlock, SIGNAL( clicked() ), SLOT( slotBlockClicked() ) ); - connect( m_privacy->m_btnAdd, SIGNAL( clicked() ), SLOT( slotAddClicked() ) ); - connect( m_privacy->m_btnRemove, SIGNAL( clicked() ), SLOT( slotRemoveClicked() ) ); - connect( m_privacy->m_allowList, SIGNAL( selectionChanged() ), SLOT( slotAllowListClicked() ) ); - connect( m_privacy->m_denyList, SIGNAL( selectionChanged() ), SLOT( slotDenyListClicked() ) ); - connect( mgr, SIGNAL( privacyChanged( const QString &, bool ) ), SLOT( slotPrivacyChanged() ) ); + connect( m_privacy->m_btnAllow, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAllowClicked() ) ); + connect( m_privacy->m_btnBlock, TQT_SIGNAL( clicked() ), TQT_SLOT( slotBlockClicked() ) ); + connect( m_privacy->m_btnAdd, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddClicked() ) ); + connect( m_privacy->m_btnRemove, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemoveClicked() ) ); + connect( m_privacy->m_allowList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotAllowListClicked() ) ); + connect( m_privacy->m_denyList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotDenyListClicked() ) ); + connect( mgr, TQT_SIGNAL( privacyChanged( const TQString &, bool ) ), TQT_SLOT( slotPrivacyChanged() ) ); m_privacy->m_btnAdd->setEnabled( true ); m_privacy->m_btnAllow->setEnabled( false ); m_privacy->m_btnBlock->setEnabled( false ); @@ -97,18 +97,18 @@ void GroupWisePrivacyDialog::populateWidgets() PrivacyManager * mgr = m_account->client()->privacyManager(); // default policy - QString defaultPolicyText = i18n( "<Everyone Else>" ); + TQString defaultPolicyText = i18n( "<Everyone Else>" ); if ( mgr->defaultAllow() ) - m_defaultPolicy = new QListBoxText( m_privacy->m_allowList, defaultPolicyText ); + m_defaultPolicy = new TQListBoxText( m_privacy->m_allowList, defaultPolicyText ); else - m_defaultPolicy = new QListBoxText( m_privacy->m_denyList, defaultPolicyText ); + m_defaultPolicy = new TQListBoxText( m_privacy->m_denyList, defaultPolicyText ); - QPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account ); + TQPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account ); // allow list - QStringList allowList = mgr->allowList(); - QStringList::Iterator end = allowList.end(); - for ( QStringList::Iterator it = allowList.begin(); it != end; ++it ) + TQStringList allowList = mgr->allowList(); + TQStringList::Iterator end = allowList.end(); + for ( TQStringList::Iterator it = allowList.begin(); it != end; ++it ) { GroupWise::ContactDetails cd = m_account->client()->userDetailsManager()->details( *it ); if ( cd.fullName.isEmpty() ) @@ -116,9 +116,9 @@ void GroupWisePrivacyDialog::populateWidgets() new PrivacyLBI( m_privacy->m_allowList, icon, cd.fullName, *it ); } // deny list - QStringList denyList = mgr->denyList(); + TQStringList denyList = mgr->denyList(); end = denyList.end(); - for ( QStringList::Iterator it = denyList.begin(); it != end; ++it ) + for ( TQStringList::Iterator it = denyList.begin(); it != end; ++it ) { GroupWise::ContactDetails cd = m_account->client()->userDetailsManager()->details( *it ); if ( cd.fullName.isEmpty() ) @@ -148,7 +148,7 @@ void GroupWisePrivacyDialog::slotBlockClicked() if ( m_privacy->m_allowList->isSelected( i ) ) { m_dirty = true; - QListBoxItem * lbi = m_privacy->m_allowList->item( i ); + TQListBoxItem * lbi = m_privacy->m_allowList->item( i ); m_privacy->m_allowList->takeItem( lbi ); m_privacy->m_denyList->insertItem( lbi ); } @@ -164,7 +164,7 @@ void GroupWisePrivacyDialog::slotAllowClicked() if ( m_privacy->m_denyList->isSelected( i ) ) { m_dirty = true; - QListBoxItem * lbi = m_privacy->m_denyList->item( i ); + TQListBoxItem * lbi = m_privacy->m_denyList->item( i ); m_privacy->m_denyList->takeItem( lbi ); m_privacy->m_allowList->insertItem( lbi ); } @@ -179,10 +179,10 @@ void GroupWisePrivacyDialog::slotAddClicked() m_searchDlg = new KDialogBase( this, "privacysearchdialog", false, i18n( "Search for Contact to Block" ), KDialogBase::Ok|KDialogBase::Cancel ); - m_search = new GroupWiseContactSearch( m_account, QListView::Multi, false, m_searchDlg, "privacysearchwidget" ); + m_search = new GroupWiseContactSearch( m_account, TQListView::Multi, false, m_searchDlg, "privacysearchwidget" ); m_searchDlg->setMainWidget( m_search ); - connect( m_searchDlg, SIGNAL( okClicked() ), SLOT( slotSearchedForUsers() ) ); - connect( m_search, SIGNAL( selectionValidates( bool ) ), m_searchDlg, SLOT( enableButtonOK( bool ) ) ); + connect( m_searchDlg, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotSearchedForUsers() ) ); + connect( m_search, TQT_SIGNAL( selectionValidates( bool ) ), m_searchDlg, TQT_SLOT( enableButtonOK( bool ) ) ); m_searchDlg->enableButtonOK( false ); } m_searchDlg->show(); @@ -191,10 +191,10 @@ void GroupWisePrivacyDialog::slotAddClicked() void GroupWisePrivacyDialog::slotSearchedForUsers() { // create an item for each result, in the block list - QValueList< ContactDetails > selected = m_search->selectedResults(); - QValueList< ContactDetails >::Iterator it = selected.begin(); - const QValueList< ContactDetails >::Iterator end = selected.end(); - QPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account ); + TQValueList< ContactDetails > selected = m_search->selectedResults(); + TQValueList< ContactDetails >::Iterator it = selected.begin(); + const TQValueList< ContactDetails >::Iterator end = selected.end(); + TQPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account ); for ( ; it != end; ++it ) { m_dirty = true; @@ -213,7 +213,7 @@ void GroupWisePrivacyDialog::slotRemoveClicked() if ( m_privacy->m_denyList->isSelected( i ) ) { m_dirty = true; - QListBoxItem * lbi = m_privacy->m_denyList->item( i ); + TQListBoxItem * lbi = m_privacy->m_denyList->item( i ); // can't remove the default policy if ( lbi == m_defaultPolicy ) continue; @@ -225,7 +225,7 @@ void GroupWisePrivacyDialog::slotRemoveClicked() if ( m_privacy->m_allowList->isSelected( i ) ) { m_dirty = true; - QListBoxItem * lbi = m_privacy->m_allowList->item( i ); + TQListBoxItem * lbi = m_privacy->m_allowList->item( i ); // can't remove the default policy if ( lbi == m_defaultPolicy ) continue; @@ -238,9 +238,9 @@ void GroupWisePrivacyDialog::slotRemoveClicked() void GroupWisePrivacyDialog::slotAllowListClicked() { // don't get into feedback - disconnect( m_privacy->m_denyList, SIGNAL( selectionChanged() ), this, SLOT( slotDenyListClicked() ) ); + disconnect( m_privacy->m_denyList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotDenyListClicked() ) ); m_privacy->m_denyList->clearSelection(); - connect( m_privacy->m_denyList, SIGNAL( selectionChanged() ), SLOT( slotDenyListClicked() ) ); + connect( m_privacy->m_denyList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotDenyListClicked() ) ); bool selected = false; for( int i = m_privacy->m_allowList->count() - 1; i >= 0 ; --i ) { @@ -258,9 +258,9 @@ void GroupWisePrivacyDialog::slotAllowListClicked() void GroupWisePrivacyDialog::slotDenyListClicked() { // don't get into feedback - disconnect( m_privacy->m_allowList, SIGNAL( selectionChanged() ), this, SLOT( slotAllowListClicked() ) ); + disconnect( m_privacy->m_allowList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotAllowListClicked() ) ); m_privacy->m_allowList->clearSelection(); - connect( m_privacy->m_allowList, SIGNAL( selectionChanged() ), SLOT( slotAllowListClicked() ) ); + connect( m_privacy->m_allowList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotAllowListClicked() ) ); bool selected = false; for( int i = m_privacy->m_denyList->count() - 1; i >= 0 ; --i ) { @@ -310,8 +310,8 @@ void GroupWisePrivacyDialog::commitChanges() if ( m_account->isConnected() ) { bool defaultDeny = false; - QStringList denyList; - QStringList allowList; + TQStringList denyList; + TQStringList allowList; // pass on our current allow, deny and default policy to the PrivacyManager for( int i = 0; i < (int)m_privacy->m_denyList->count(); ++i ) { diff --git a/kopete/protocols/groupwise/ui/gwprivacydialog.h b/kopete/protocols/groupwise/ui/gwprivacydialog.h index a5467e47..e296e5b2 100644 --- a/kopete/protocols/groupwise/ui/gwprivacydialog.h +++ b/kopete/protocols/groupwise/ui/gwprivacydialog.h @@ -35,7 +35,7 @@ class GroupWisePrivacyDialog : public KDialogBase { Q_OBJECT public: - GroupWisePrivacyDialog( GroupWiseAccount * account, QWidget * parent, const char * name ); + GroupWisePrivacyDialog( GroupWiseAccount * account, TQWidget * parent, const char * name ); ~GroupWisePrivacyDialog(); protected: void commitChanges(); @@ -59,7 +59,7 @@ private: GroupWiseAccount * m_account; GroupWisePrivacyWidget * m_privacy; GroupWiseContactSearch * m_search; - QListBoxItem * m_defaultPolicy; + TQListBoxItem * m_defaultPolicy; bool m_dirty; KDialogBase * m_searchDlg; }; diff --git a/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.cpp b/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.cpp index 5b0b4014..6005f61a 100644 --- a/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.cpp +++ b/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.cpp @@ -16,8 +16,8 @@ ************************************************************************* */ -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <kconfig.h> #include <klocale.h> @@ -33,13 +33,13 @@ #include "gwreceiveinvitationdialog.h" -ReceiveInvitationDialog::ReceiveInvitationDialog( GroupWiseAccount * account, const ConferenceEvent & event, QWidget *parent, const char *name) +ReceiveInvitationDialog::ReceiveInvitationDialog( GroupWiseAccount * account, const ConferenceEvent & event, TQWidget *parent, const char *name) : KDialogBase( i18n("Invitation to Conversation"), KDialogBase::Yes|KDialogBase::No, KDialogBase::Yes, KDialogBase::No, parent, name, false ) { m_account = account; m_guid = event.guid; - connect( this, SIGNAL( yesClicked() ), SLOT( slotYesClicked() ) ); - connect( this, SIGNAL( noClicked() ), SLOT( slotNoClicked() ) ); + connect( this, TQT_SIGNAL( yesClicked() ), TQT_SLOT( slotYesClicked() ) ); + connect( this, TQT_SIGNAL( noClicked() ), TQT_SLOT( slotNoClicked() ) ); GroupWiseContact * c = account->contactForDN( event.user ); @@ -50,7 +50,7 @@ ReceiveInvitationDialog::ReceiveInvitationDialog( GroupWiseAccount * account, co m_wid->m_contactName->setText( event.user ); m_wid->m_dateTime->setText( KGlobal::locale()->formatDateTime( event.timeStamp ) ); - m_wid->m_message->setText( QString("<b>%1</b>").arg( event.message ) ); + m_wid->m_message->setText( TQString("<b>%1</b>").arg( event.message ) ); setMainWidget( m_wid ); } @@ -63,7 +63,7 @@ void ReceiveInvitationDialog::slotYesClicked() { m_account->client()->joinConference( m_guid ); // save the state of always accept invitations - QString alwaysAccept = m_wid->cb_dontShowAgain->isChecked() ? "true" : "false"; + TQString alwaysAccept = m_wid->cb_dontShowAgain->isChecked() ? "true" : "false"; m_account->configGroup()->writeEntry( "AlwaysAcceptInvitations", alwaysAccept ); deleteLater(); } diff --git a/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.h b/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.h index 0486c964..529ceaa3 100644 --- a/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.h +++ b/kopete/protocols/groupwise/ui/gwreceiveinvitationdialog.h @@ -32,7 +32,7 @@ class ReceiveInvitationDialog : public KDialogBase { Q_OBJECT public: - ReceiveInvitationDialog( GroupWiseAccount * account, const ConferenceEvent & event, QWidget *parent, const char *name ); + ReceiveInvitationDialog( GroupWiseAccount * account, const ConferenceEvent & event, TQWidget *parent, const char *name ); ~ReceiveInvitationDialog(); signals: void invitationAccepted( bool, const GroupWise::ConferenceGuid & guid ); diff --git a/kopete/protocols/groupwise/ui/gwsearch.cpp b/kopete/protocols/groupwise/ui/gwsearch.cpp index 1c80e3eb..885b6192 100644 --- a/kopete/protocols/groupwise/ui/gwsearch.cpp +++ b/kopete/protocols/groupwise/ui/gwsearch.cpp @@ -16,12 +16,12 @@ ************************************************************************* */ -#include <qcombobox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qpushbutton.h> -//#include <qvaluelist.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +//#include <tqvaluelist.h> #include <kdebug.h> #include <klocale.h> @@ -40,31 +40,31 @@ class GWSearchResultsLVI : public QListViewItem { public: - GWSearchResultsLVI( QListView * parent, GroupWise::ContactDetails details, int status, const QPixmap & statusPM/*, const QString & userId */) - : QListViewItem( parent, QString::null, details.givenName, details.surname, GroupWiseProtocol::protocol()->dnToDotted( details.dn ) ), m_details( details ), m_status( status ) + GWSearchResultsLVI( TQListView * parent, GroupWise::ContactDetails details, int status, const TQPixmap & statusPM/*, const TQString & userId */) + : TQListViewItem( parent, TQString::null, details.givenName, details.surname, GroupWiseProtocol::protocol()->dnToDotted( details.dn ) ), m_details( details ), m_status( status ) { setPixmap( 0, statusPM ); } - QString key( int column, bool ascending ) const + TQString key( int column, bool ascending ) const { if ( column == 0 ) - return QString::number( 99 - m_status ); + return TQString::number( 99 - m_status ); else - return QListViewItem::key( column, ascending ); + return TQListViewItem::key( column, ascending ); } GroupWise::ContactDetails m_details; int m_status; }; -GroupWiseContactSearch::GroupWiseContactSearch( GroupWiseAccount * account, QListView::SelectionMode mode, bool onlineOnly, QWidget *parent, const char *name) +GroupWiseContactSearch::GroupWiseContactSearch( GroupWiseAccount * account, TQListView::SelectionMode mode, bool onlineOnly, TQWidget *parent, const char *name) : GroupWiseContactSearchWidget(parent, name), m_account( account ), m_onlineOnly( onlineOnly ) { m_results->setSelectionMode( mode ); m_results->setAllColumnsShowFocus( true ); - connect( m_details, SIGNAL( clicked() ), SLOT( slotShowDetails() ) ); - connect( m_results, SIGNAL( selectionChanged() ), SLOT( slotValidateSelection() ) ); - connect( m_search, SIGNAL( clicked() ), SLOT( slotDoSearch() ) ); - connect( m_clear, SIGNAL( clicked() ), SLOT( slotClear() ) ); + connect( m_details, TQT_SIGNAL( clicked() ), TQT_SLOT( slotShowDetails() ) ); + connect( m_results, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotValidateSelection() ) ); + connect( m_search, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDoSearch() ) ); + connect( m_clear, TQT_SIGNAL( clicked() ), TQT_SLOT( slotClear() ) ); } @@ -84,7 +84,7 @@ void GroupWiseContactSearch::slotClear() void GroupWiseContactSearch::slotDoSearch() { // build a query - QValueList< GroupWise::UserSearchQueryTerm > searchTerms; + TQValueList< GroupWise::UserSearchQueryTerm > searchTerms; if ( !m_firstName->text().isEmpty() ) { GroupWise::UserSearchQueryTerm arg; @@ -130,7 +130,7 @@ void GroupWiseContactSearch::slotDoSearch() // start a search task SearchUserTask * st = new SearchUserTask( m_account->client()->rootTask() ); st->search( searchTerms ); - connect( st, SIGNAL( finished() ), SLOT( slotGotSearchResults() ) ); + connect( st, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotSearchResults() ) ); st->go( true ); m_matchCount->setText( i18n( "Searching" ) ); } @@ -145,7 +145,7 @@ void GroupWiseContactSearch::slotShowDetails() { kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl; // get the first selected result - QValueList< ContactDetails > selected = selectedResults(); + TQValueList< ContactDetails > selected = selectedResults(); if ( selected.count() ) { // if they are already in our contact list, show that version @@ -167,8 +167,8 @@ void GroupWiseContactSearch::slotGotSearchResults() m_matchCount->setText( i18n( "1 matching user found", "%n matching users found", m_searchResults.count() ) ); m_results->clear(); - QValueList< GroupWise::ContactDetails >::Iterator it = m_searchResults.begin(); - QValueList< GroupWise::ContactDetails >::Iterator end = m_searchResults.end(); + TQValueList< GroupWise::ContactDetails >::Iterator it = m_searchResults.begin(); + TQValueList< GroupWise::ContactDetails >::Iterator end = m_searchResults.end(); for ( ; it != end; ++it ) { // it's necessary to change the status used for the LVIs, @@ -210,10 +210,10 @@ void GroupWiseContactSearch::slotGotSearchResults() slotValidateSelection(); } -QValueList< GroupWise::ContactDetails > GroupWiseContactSearch::selectedResults() +TQValueList< GroupWise::ContactDetails > GroupWiseContactSearch::selectedResults() { - QValueList< GroupWise::ContactDetails > lst; - QListViewItemIterator it( m_results ); + TQValueList< GroupWise::ContactDetails > lst; + TQListViewItemIterator it( m_results ); while ( it.current() ) { if ( it.current()->isSelected() ) lst.append( static_cast< GWSearchResultsLVI * >( it.current() )->m_details ); @@ -248,7 +248,7 @@ void GroupWiseContactSearch::slotValidateSelection() if ( m_onlineOnly ) { // check that one of the selected items is online - QListViewItemIterator it( m_results ); + TQListViewItemIterator it( m_results ); while ( it.current() ) { if ( it.current()->isSelected() && @@ -263,7 +263,7 @@ void GroupWiseContactSearch::slotValidateSelection() else { // check that at least one item is selected - QListViewItemIterator it( m_results ); + TQListViewItemIterator it( m_results ); while ( it.current() ) { if ( it.current()->isSelected() ) diff --git a/kopete/protocols/groupwise/ui/gwsearch.h b/kopete/protocols/groupwise/ui/gwsearch.h index 83ee205e..ec57cfb1 100644 --- a/kopete/protocols/groupwise/ui/gwsearch.h +++ b/kopete/protocols/groupwise/ui/gwsearch.h @@ -18,7 +18,7 @@ #ifndef GWSEARCH_H #define GWSEARCH_H -#include <qlistview.h> +#include <tqlistview.h> #include "gwcontactsearch.h" class GroupWiseAccount; @@ -34,10 +34,10 @@ class GroupWiseContactSearch : public GroupWiseContactSearchWidget { Q_OBJECT public: - GroupWiseContactSearch( GroupWiseAccount * account, QListView::SelectionMode mode, bool onlineOnly, - QWidget *parent = 0, const char *name = 0); + GroupWiseContactSearch( GroupWiseAccount * account, TQListView::SelectionMode mode, bool onlineOnly, + TQWidget *parent = 0, const char *name = 0); ~GroupWiseContactSearch(); - QValueList< GroupWise::ContactDetails > selectedResults(); + TQValueList< GroupWise::ContactDetails > selectedResults(); signals: void selectionValidates( bool ); protected: @@ -50,7 +50,7 @@ protected slots: void slotShowDetails(); void slotValidateSelection(); private: - QValueList< GroupWise::ContactDetails > m_searchResults; + TQValueList< GroupWise::ContactDetails > m_searchResults; GroupWiseAccount * m_account; bool m_onlineOnly; }; diff --git a/kopete/protocols/irc/ircaccount.cpp b/kopete/protocols/irc/ircaccount.cpp index 1a1bf75f..09d0db3c 100644 --- a/kopete/protocols/irc/ircaccount.cpp +++ b/kopete/protocols/irc/ircaccount.cpp @@ -54,16 +54,16 @@ #include <knotifyclient.h> #include <kpopupmenu.h> -#include <qlayout.h> -#include <qtimer.h> +#include <tqlayout.h> +#include <tqtimer.h> -const QString IRCAccount::CONFIG_CODECMIB = QString::fromLatin1("Codec"); -const QString IRCAccount::CONFIG_NETWORKNAME = QString::fromLatin1("NetworkName"); -const QString IRCAccount::CONFIG_NICKNAME = QString::fromLatin1("NickName"); -const QString IRCAccount::CONFIG_USERNAME = QString::fromLatin1("UserName"); -const QString IRCAccount::CONFIG_REALNAME = QString::fromLatin1("RealName"); +const TQString IRCAccount::CONFIG_CODECMIB = TQString::fromLatin1("Codec"); +const TQString IRCAccount::CONFIG_NETWORKNAME = TQString::fromLatin1("NetworkName"); +const TQString IRCAccount::CONFIG_NICKNAME = TQString::fromLatin1("NickName"); +const TQString IRCAccount::CONFIG_USERNAME = TQString::fromLatin1("UserName"); +const TQString IRCAccount::CONFIG_REALNAME = TQString::fromLatin1("RealName"); -IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QString &autoChan, const QString& netName, const QString &nickName) +IRCAccount::IRCAccount(IRCProtocol *protocol, const TQString &accountId, const TQString &autoChan, const TQString& netName, const TQString &nickName) : Kopete::PasswordedAccount(protocol, accountId, 0, true), autoConnect( autoChan ), commandSource(0) { m_manager = 0L; @@ -75,49 +75,49 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS m_contactManager = 0; m_engine = new KIRC::Engine(this); - QMap< QString, QString> replies = customCtcpReplies(); - for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it ) + TQMap< TQString, TQString> replies = customCtcpReplies(); + for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it ) m_engine->addCustomCtcp( it.key(), it.data() ); - QString version=i18n("Kopete IRC Plugin %1 [http://kopete.kde.org]").arg(kapp->aboutData()->version()); + TQString version=i18n("Kopete IRC Plugin %1 [http://kopete.kde.org]").arg(kapp->aboutData()->version()); m_engine->setVersionString( version ); - QObject::connect(m_engine, SIGNAL(successfullyChangedNick(const QString &, const QString &)), - this, SLOT(successfullyChangedNick(const QString &, const QString &))); + TQObject::connect(m_engine, TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)), + this, TQT_SLOT(successfullyChangedNick(const TQString &, const TQString &))); - QObject::connect(m_engine, SIGNAL(incomingFailedServerPassword()), - this, SLOT(slotFailedServerPassword())); + TQObject::connect(m_engine, TQT_SIGNAL(incomingFailedServerPassword()), + this, TQT_SLOT(slotFailedServerPassword())); - QObject::connect(m_engine, SIGNAL(incomingNickInUse(const QString &)), - this, SLOT(slotNickInUseAlert( const QString &)) ); + TQObject::connect(m_engine, TQT_SIGNAL(incomingNickInUse(const TQString &)), + this, TQT_SLOT(slotNickInUseAlert( const TQString &)) ); - QObject::connect(m_engine, SIGNAL(incomingFailedNickOnLogin(const QString &)), - this, SLOT(slotNickInUse( const QString &)) ); + TQObject::connect(m_engine, TQT_SIGNAL(incomingFailedNickOnLogin(const TQString &)), + this, TQT_SLOT(slotNickInUse( const TQString &)) ); - QObject::connect(m_engine, SIGNAL(incomingJoinedChannel(const QString &, const QString &)), - this, SLOT(slotJoinedUnknownChannel(const QString &, const QString &))); + TQObject::connect(m_engine, TQT_SIGNAL(incomingJoinedChannel(const TQString &, const TQString &)), + this, TQT_SLOT(slotJoinedUnknownChannel(const TQString &, const TQString &))); - QObject::connect(m_engine, SIGNAL(incomingCtcpReply(const QString &, const QString &, const QString &)), - this, SLOT( slotNewCtcpReply(const QString&, const QString &, const QString &))); + TQObject::connect(m_engine, TQT_SIGNAL(incomingCtcpReply(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT( slotNewCtcpReply(const TQString&, const TQString &, const TQString &))); - QObject::connect(m_engine, SIGNAL(statusChanged(KIRC::Engine::Status)), - this, SLOT(engineStatusChanged(KIRC::Engine::Status))); + TQObject::connect(m_engine, TQT_SIGNAL(statusChanged(KIRC::Engine::Status)), + this, TQT_SLOT(engineStatusChanged(KIRC::Engine::Status))); - QObject::connect(m_engine, SIGNAL(incomingServerLoadTooHigh()), - this, SLOT(slotServerBusy())); + TQObject::connect(m_engine, TQT_SIGNAL(incomingServerLoadTooHigh()), + this, TQT_SLOT(slotServerBusy())); - QObject::connect(m_engine, SIGNAL(incomingNoSuchNickname(const QString &)), - this, SLOT(slotNoSuchNickname(const QString &))); + TQObject::connect(m_engine, TQT_SIGNAL(incomingNoSuchNickname(const TQString &)), + this, TQT_SLOT(slotNoSuchNickname(const TQString &))); mAwayAction = new Kopete::AwayAction ( i18n("Set Away"), m_protocol->m_UserStatusAway.iconFor( this ), 0, this, - SLOT(slotGoAway( const QString & )), this ); + TQT_SLOT(slotGoAway( const TQString & )), this ); currentHost = 0; KConfigGroup *config = configGroup(); - QString networkName = netName; + TQString networkName = netName; if (networkName.isNull()) networkName = config->readEntry(CONFIG_NETWORKNAME); @@ -126,7 +126,7 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS else mNickName = config->readEntry(CONFIG_NICKNAME); - QString codecMib = config->readEntry(CONFIG_CODECMIB); + TQString codecMib = config->readEntry(CONFIG_CODECMIB); // int codecMib = config->readNumEntry(CONFIG_CODECMIB, UTF-8); m_serverNotices = (MessageDestination)config->readNumEntry( "ServerNotices", ServerWindow ); @@ -137,25 +137,25 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS if( !codecMib.isEmpty() ) { - mCodec = QTextCodec::codecForMib( codecMib.toInt() ); + mCodec = TQTextCodec::codecForMib( codecMib.toInt() ); m_engine->setDefaultCodec( mCodec ); } else mCodec = 0; - QString m_accountId = this->accountId(); - if( networkName.isEmpty() && QRegExp( "[^#+&\\s]+@[\\w-\\.]+:\\d+" ).exactMatch( m_accountId ) ) + TQString m_accountId = this->accountId(); + if( networkName.isEmpty() && TQRegExp( "[^#+&\\s]+@[\\w-\\.]+:\\d+" ).exactMatch( m_accountId ) ) { kdDebug(14120) << "Creating account from " << m_accountId << endl; mNickName = m_accountId.section('@',0,0); - QString serverInfo = m_accountId.section('@',1); - QString hostName = serverInfo.section(':',0,0); + TQString serverInfo = m_accountId.section('@',1); + TQString hostName = serverInfo.section(':',0,0); - for( QDictIterator<IRCNetwork> it( m_protocol->networks() ); it.current(); ++it ) + for( TQDictIterator<IRCNetwork> it( m_protocol->networks() ); it.current(); ++it ) { IRCNetwork *net = it.current(); - for( QValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 ) + for( TQValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 ) { if( (*it2)->host == hostName ) { @@ -204,13 +204,13 @@ IRCAccount::IRCAccount(IRCProtocol *protocol, const QString &accountId, const QS m_contactManager = new IRCContactManager(mNickName, this); setMyself( m_contactManager->mySelf() ); - setAccountLabel( QString::fromLatin1("%1@%2").arg(mNickName,networkName) ); + setAccountLabel( TQString::fromLatin1("%1@%2").arg(mNickName,networkName) ); m_myServer = m_contactManager->myServer(); - m_joinChannelAction = new KAction ( i18n("Join Channel..."), QString::null, 0, this, - SLOT(slotJoinChannel()), this); - m_searchChannelAction = new KAction ( i18n("Search Channels..."), QString::null, 0, this, - SLOT(slotSearchChannels()), this); + m_joinChannelAction = new KAction ( i18n("Join Channel..."), TQString::null, 0, this, + TQT_SLOT(slotJoinChannel()), this); + m_searchChannelAction = new KAction ( i18n("Search Channels..."), TQString::null, 0, this, + TQT_SLOT(slotSearchChannels()), this); } IRCAccount::~IRCAccount() @@ -219,12 +219,12 @@ IRCAccount::~IRCAccount() m_engine->quit(i18n("Plugin Unloaded"), true); } -void IRCAccount::slotNickInUse( const QString &nick ) +void IRCAccount::slotNickInUse( const TQString &nick ) { - QString altNickName = altNick(); + TQString altNickName = altNick(); if( triedAltNick || altNickName.isEmpty() ) { - QString newNick = KInputDialog::getText( + TQString newNick = KInputDialog::getText( i18n("IRC Plugin"), i18n("The nickname %1 is already in use. Please enter an alternate nickname:").arg(nick), nick); @@ -241,28 +241,28 @@ void IRCAccount::slotNickInUse( const QString &nick ) } } -void IRCAccount::slotNickInUseAlert( const QString &nick ) +void IRCAccount::slotNickInUseAlert( const TQString &nick ) { KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("The nickname %1 is already in use").arg(nick), i18n("IRC Plugin")); } -void IRCAccount::setAltNick( const QString &altNick ) +void IRCAccount::setAltNick( const TQString &altNick ) { - configGroup()->writeEntry(QString::fromLatin1( "altNick" ), altNick); + configGroup()->writeEntry(TQString::fromLatin1( "altNick" ), altNick); } -const QString IRCAccount::altNick() const +const TQString IRCAccount::altNick() const { - return configGroup()->readEntry(QString::fromLatin1("altNick")); + return configGroup()->readEntry(TQString::fromLatin1("altNick")); } void IRCAccount::setAutoShowServerWindow( bool show ) { autoShowServerWindow = show; - configGroup()->writeEntry(QString::fromLatin1( "AutoShowServerWindow" ), autoShowServerWindow); + configGroup()->writeEntry(TQString::fromLatin1( "AutoShowServerWindow" ), autoShowServerWindow); } -const QString IRCAccount::networkName() const +const TQString IRCAccount::networkName() const { if( m_network ) return m_network->name; @@ -270,29 +270,29 @@ const QString IRCAccount::networkName() const return i18n("Unknown"); } -void IRCAccount::setUserName( const QString &userName ) +void IRCAccount::setUserName( const TQString &userName ) { m_engine->setUserName(userName); configGroup()->writeEntry(CONFIG_USERNAME, userName); } -const QString IRCAccount::userName() const +const TQString IRCAccount::userName() const { return configGroup()->readEntry(CONFIG_USERNAME); } -void IRCAccount::setRealName( const QString &userName ) +void IRCAccount::setRealName( const TQString &userName ) { m_engine->setRealName(userName); configGroup()->writeEntry(CONFIG_REALNAME, userName); } -const QString IRCAccount::realName() const +const TQString IRCAccount::realName() const { return configGroup()->readEntry(CONFIG_REALNAME); } -void IRCAccount::setNetwork( const QString &network ) +void IRCAccount::setNetwork( const TQString &network ) { IRCNetwork *net = m_protocol->networks()[ network ]; if( net ) @@ -311,7 +311,7 @@ void IRCAccount::setNetwork( const QString &network ) } } -void IRCAccount::setNickName( const QString &nick ) +void IRCAccount::setNickName( const TQString &nick ) { mNickName = nick; configGroup()->writeEntry(CONFIG_NICKNAME, mNickName); @@ -321,7 +321,7 @@ void IRCAccount::setNickName( const QString &nick ) } // FIXME: Possible null pointer usage here -void IRCAccount::setCodec( QTextCodec *codec ) +void IRCAccount::setCodec( TQTextCodec *codec ) { mCodec = codec; configGroup()->writeEntry(CONFIG_CODECMIB, codec->mibEnum()); @@ -330,71 +330,71 @@ void IRCAccount::setCodec( QTextCodec *codec ) m_engine->setDefaultCodec( mCodec ); } -QTextCodec *IRCAccount::codec() const +TQTextCodec *IRCAccount::codec() const { return mCodec; } // FIXME: Move this to a dictionnary -void IRCAccount::setDefaultPart( const QString &defaultPart ) +void IRCAccount::setDefaultPart( const TQString &defaultPart ) { - configGroup()->writeEntry( QString::fromLatin1( "defaultPart" ), defaultPart ); + configGroup()->writeEntry( TQString::fromLatin1( "defaultPart" ), defaultPart ); } // FIXME: Move this to a dictionnary -void IRCAccount::setDefaultQuit( const QString &defaultQuit ) +void IRCAccount::setDefaultQuit( const TQString &defaultQuit ) { - configGroup()->writeEntry( QString::fromLatin1( "defaultQuit" ), defaultQuit ); + configGroup()->writeEntry( TQString::fromLatin1( "defaultQuit" ), defaultQuit ); } // FIXME: Move this to a dictionnary -const QString IRCAccount::defaultPart() const +const TQString IRCAccount::defaultPart() const { - QString partMsg = configGroup()->readEntry(QString::fromLatin1("defaultPart")); + TQString partMsg = configGroup()->readEntry(TQString::fromLatin1("defaultPart")); if( partMsg.isEmpty() ) - return QString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg( kapp->aboutData()->version() ); + return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg( kapp->aboutData()->version() ); return partMsg; } -const QString IRCAccount::defaultQuit() const +const TQString IRCAccount::defaultQuit() const { - QString quitMsg = configGroup()->readEntry(QString::fromLatin1("defaultQuit")); + TQString quitMsg = configGroup()->readEntry(TQString::fromLatin1("defaultQuit")); if( quitMsg.isEmpty() ) - return QString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg(kapp->aboutData()->version()); + return TQString::fromLatin1("Kopete %1 : http://kopete.kde.org").arg(kapp->aboutData()->version()); return quitMsg; } -void IRCAccount::setCustomCtcpReplies( const QMap< QString, QString > &replies ) const +void IRCAccount::setCustomCtcpReplies( const TQMap< TQString, TQString > &replies ) const { - QStringList val; - for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it ) + TQStringList val; + for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it ) { m_engine->addCustomCtcp( it.key(), it.data() ); - val.append( QString::fromLatin1("%1=%2").arg( it.key() ).arg( it.data() ) ); + val.append( TQString::fromLatin1("%1=%2").arg( it.key() ).arg( it.data() ) ); } configGroup()->writeEntry( "CustomCtcp", val ); } -const QMap< QString, QString > IRCAccount::customCtcpReplies() const +const TQMap< TQString, TQString > IRCAccount::customCtcpReplies() const { - QMap< QString, QString > replies; - QStringList replyList; + TQMap< TQString, TQString > replies; + TQStringList replyList; replyList = configGroup()->readListEntry( "CustomCtcp" ); - for( QStringList::Iterator it = replyList.begin(); it != replyList.end(); ++it ) + for( TQStringList::Iterator it = replyList.begin(); it != replyList.end(); ++it ) replies[ (*it).section('=', 0, 0 ) ] = (*it).section('=', 1 ); return replies; } -void IRCAccount::setConnectCommands( const QStringList &commands ) const +void IRCAccount::setConnectCommands( const TQStringList &commands ) const { configGroup()->writeEntry( "ConnectCommands", commands ); } -const QStringList IRCAccount::connectCommands() const +const TQStringList IRCAccount::connectCommands() const { return configGroup()->readListEntry( "ConnectCommands" ); } @@ -416,7 +416,7 @@ void IRCAccount::setMessageDestinations( int serverNotices, int serverMessages, KActionMenu *IRCAccount::actionMenu() { - QString menuTitle = QString::fromLatin1( " %1 <%2> " ).arg( accountId() ).arg( myself()->onlineStatus().description() ); + TQString menuTitle = TQString::fromLatin1( " %1 <%2> " ).arg( accountId() ).arg( myself()->onlineStatus().description() ); KActionMenu *mActionMenu = Kopete::Account::actionMenu(); @@ -426,18 +426,18 @@ KActionMenu *IRCAccount::actionMenu() mActionMenu->popupMenu()->insertSeparator(); mActionMenu->insert(m_joinChannelAction); mActionMenu->insert(m_searchChannelAction); - mActionMenu->insert( new KAction ( i18n("Show Server Window"), QString::null, 0, this, SLOT(slotShowServerWindow()), mActionMenu ) ); + mActionMenu->insert( new KAction ( i18n("Show Server Window"), TQString::null, 0, this, TQT_SLOT(slotShowServerWindow()), mActionMenu ) ); if( m_engine->isConnected() && m_engine->useSSL() ) { mActionMenu->insert( new KAction ( i18n("Show Security Information"), "", 0, m_engine, - SLOT(showInfoDialog()), mActionMenu ) ); + TQT_SLOT(showInfoDialog()), mActionMenu ) ); } return mActionMenu; } -void IRCAccount::connectWithPassword(const QString &password) +void IRCAccount::connectWithPassword(const TQString &password) { //TODO: honor the initial status @@ -450,7 +450,7 @@ void IRCAccount::connectWithPassword(const QString &password) { if( m_network ) { - QValueList<IRCHost*> &hosts = m_network->hosts; + TQValueList<IRCHost*> &hosts = m_network->hosts; if( hosts.count() == 0 ) { KMessageBox::queuedMessageBox( @@ -472,7 +472,7 @@ void IRCAccount::connectWithPassword(const QString &password) // if prefer SSL is set, sort by SSL first if (configGroup()->readBoolEntry("PreferSSL")) { - typedef QValueList<IRCHost*> IRCHostList; + typedef TQValueList<IRCHost*> IRCHostList; IRCHostList sslFirst; IRCHostList::iterator it; for ( it = hosts.begin(); it != hosts.end(); ++it ) @@ -534,7 +534,7 @@ void IRCAccount::engineStatusChanged(KIRC::Engine::Status newStatus) // after the 001 is sent, you need to wait until all the init junk is done. // Unfortunatly, there is no way for us to know when it is done (it could be // spewing out any number of replies), so just try delaying it - QTimer::singleShot( 250, this, SLOT( slotPerformOnConnectCommands() ) ); + TQTimer::singleShot( 250, this, TQT_SLOT( slotPerformOnConnectCommands() ) ); } break; case KIRC::Engine::Closing: @@ -563,14 +563,14 @@ void IRCAccount::slotPerformOnConnectCommands() return; if (!autoConnect.isEmpty()) - Kopete::CommandHandler::commandHandler()->processMessage( QString::fromLatin1("/join %1").arg(autoConnect), manager); + Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/join %1").arg(autoConnect), manager); - QStringList commands(connectCommands()); - for (QStringList::Iterator it=commands.begin(); it != commands.end(); ++it) + TQStringList commands(connectCommands()); + for (TQStringList::Iterator it=commands.begin(); it != commands.end(); ++it) Kopete::CommandHandler::commandHandler()->processMessage(*it, manager); } -void IRCAccount::slotJoinedUnknownChannel(const QString &channel, const QString &nick) +void IRCAccount::slotJoinedUnknownChannel(const TQString &channel, const TQString &nick) { if ( nick.lower() == m_contactManager->mySelf()->nickName().lower() ) { @@ -598,7 +598,7 @@ void IRCAccount::slotSearchChannels() { m_channelList = new ChannelListDialog( m_engine, i18n("Channel List for %1").arg( m_engine->currentHost() ), this, - SLOT( slotJoinNamedChannel( const QString & ) ) ); + TQT_SLOT( slotJoinNamedChannel( const TQString & ) ) ); } else m_channelList->clear(); @@ -612,7 +612,7 @@ void IRCAccount::listChannels() m_channelList->search(); } -void IRCAccount::quit( const QString &quitMessage ) +void IRCAccount::quit( const TQString &quitMessage ) { kdDebug(14120) << "Quitting IRC: " << quitMessage << endl; @@ -622,7 +622,7 @@ void IRCAccount::quit( const QString &quitMessage ) m_engine->quit( quitMessage ); } -void IRCAccount::setAway(bool isAway, const QString &awayMessage) +void IRCAccount::setAway(bool isAway, const TQString &awayMessage) { kdDebug(14120) << k_funcinfo << isAway << " " << awayMessage << endl; if(m_engine->isConnected()) @@ -641,7 +641,7 @@ void IRCAccount::slotFailedServerPassword() password().setWrong(); connect(); } -void IRCAccount::slotGoAway( const QString &reason ) +void IRCAccount::slotGoAway( const TQString &reason ) { setAway( true, reason ); } @@ -657,7 +657,7 @@ bool IRCAccount::isConnected() return m_engine->isConnected(); } -void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason ) +void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason ) { if ( status.status() == Kopete::OnlineStatus::Online && myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline ) @@ -672,7 +672,7 @@ void IRCAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QSt } -void IRCAccount::successfullyChangedNick(const QString &oldnick, const QString &newnick) +void IRCAccount::successfullyChangedNick(const TQString &oldnick, const TQString &newnick) { kdDebug(14120) << k_funcinfo << "Changing nick to " << newnick << endl; mNickName = newnick; @@ -681,7 +681,7 @@ void IRCAccount::successfullyChangedNick(const QString &oldnick, const QString & m_contactManager->addToNotifyList( newnick ); } -bool IRCAccount::createContact( const QString &contactId, Kopete::MetaContact *m ) +bool IRCAccount::createContact( const TQString &contactId, Kopete::MetaContact *m ) { kdDebug(14120) << k_funcinfo << contactManager() << endl; IRCContact *c; @@ -700,7 +700,7 @@ bool IRCAccount::createContact( const QString &contactId, Kopete::MetaContact *m return false; } - else if (contactId.startsWith(QString::fromLatin1("#"))) + else if (contactId.startsWith(TQString::fromLatin1("#"))) { c = static_cast<IRCContact*>(contactManager()->findChannel(contactId, m)); } @@ -724,7 +724,7 @@ bool IRCAccount::createContact( const QString &contactId, Kopete::MetaContact *m return true; } -void IRCAccount::slotJoinNamedChannel(const QString &chan) +void IRCAccount::slotJoinNamedChannel(const TQString &chan) { contactManager()->findChannel(chan)->startChat(); } @@ -744,12 +744,12 @@ void IRCAccount::slotJoinChannel() if (!isConnected()) return; - QStringList chans = configGroup()->readListEntry( "Recent Channel list" ); + TQStringList chans = configGroup()->readListEntry( "Recent Channel list" ); //kdDebug(14120) << "Recent channel list from config: " << chans << endl; KLineEditDlg dlg( i18n("Please enter name of the channel you want to join:"), - QString::null, + TQString::null, Kopete::UI::Global::mainWidget() ); @@ -761,10 +761,10 @@ void IRCAccount::slotJoinChannel() while( true ) { - if( dlg.exec() != QDialog::Accepted ) + if( dlg.exec() != TQDialog::Accepted ) break; - QString chan = dlg.text(); + TQString chan = dlg.text(); if( chan.isNull() ) break; @@ -787,12 +787,12 @@ void IRCAccount::slotJoinChannel() } } -void IRCAccount::slotNewCtcpReply(const QString &type, const QString &/*target*/, const QString &messageReceived) +void IRCAccount::slotNewCtcpReply(const TQString &type, const TQString &/*target*/, const TQString &messageReceived) { appendMessage( i18n("CTCP %1 REPLY: %2").arg(type).arg(messageReceived), InfoReply ); } -void IRCAccount::slotNoSuchNickname( const QString &nick ) +void IRCAccount::slotNoSuchNickname( const TQString &nick ) { if( KIRC::Entity::isChannel(nick) ) appendMessage( i18n("The channel \"%1\" does not exist").arg(nick), UnknownReply ); @@ -800,7 +800,7 @@ void IRCAccount::slotNoSuchNickname( const QString &nick ) appendMessage( i18n("The nickname \"%1\" does not exist").arg(nick), UnknownReply ); } -void IRCAccount::appendMessage( const QString &message, MessageType type ) +void IRCAccount::appendMessage( const TQString &message, MessageType type ) { // TODO: Impliment a UI where people can pick multiple destinations // for a message type, and make codethis handle it @@ -852,7 +852,7 @@ void IRCAccount::appendMessage( const QString &message, MessageType type ) if( destination == KNotify ) { KNotifyClient::event( - Kopete::UI::Global::mainWidget()->winId(), QString::fromLatin1("irc_event"), message + Kopete::UI::Global::mainWidget()->winId(), TQString::fromLatin1("irc_event"), message ); } } @@ -867,7 +867,7 @@ IRCServerContact *IRCAccount::myServer() const return m_myServer; } -IRCContact *IRCAccount::getContact(const QString &name, Kopete::MetaContact *metac) +IRCContact *IRCAccount::getContact(const TQString &name, Kopete::MetaContact *metac) { return getContact(m_engine->getEntity(name), metac); } @@ -889,7 +889,7 @@ IRCContact *IRCAccount::getContact(KIRC::EntityPtr entity, Kopete::MetaContact * m_contacts.append(contact); } - QObject::connect(contact, SIGNAL(destroyed(IRCContact *)), SLOT(destroyed(IRCContact *))); + TQObject::connect(contact, TQT_SIGNAL(destroyed(IRCContact *)), TQT_SLOT(destroyed(IRCContact *))); return contact; } diff --git a/kopete/protocols/irc/ircaccount.h b/kopete/protocols/irc/ircaccount.h index e5917360..1aa4072e 100644 --- a/kopete/protocols/irc/ircaccount.h +++ b/kopete/protocols/irc/ircaccount.h @@ -27,8 +27,8 @@ #include <kdialogbase.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> class ChannelListDialog; @@ -53,17 +53,17 @@ class KActionMenu; struct IRCHost { - QString host; + TQString host; uint port; - QString password; + TQString password; bool ssl; }; struct IRCNetwork { - QString name; - QString description; - QValueList<IRCHost*> hosts; + TQString name; + TQString description; + TQValueList<IRCHost*> hosts; }; class IRCAccount @@ -75,11 +75,11 @@ class IRCAccount Q_OBJECT public: - static const QString CONFIG_CODECMIB; - static const QString CONFIG_NETWORKNAME; - static const QString CONFIG_NICKNAME; - static const QString CONFIG_USERNAME; - static const QString CONFIG_REALNAME; + static const TQString CONFIG_CODECMIB; + static const TQString CONFIG_NETWORKNAME; + static const TQString CONFIG_NICKNAME; + static const TQString CONFIG_USERNAME; + static const TQString CONFIG_REALNAME; enum MessageType { @@ -100,69 +100,69 @@ public: Ignore = 5 }; - IRCAccount(IRCProtocol *p, const QString &accountid, const QString &autoConnect = QString::null, - const QString& networkName = QString::null, const QString &nickName = QString::null); + IRCAccount(IRCProtocol *p, const TQString &accountid, const TQString &autoConnect = TQString::null, + const TQString& networkName = TQString::null, const TQString &nickName = TQString::null); virtual ~IRCAccount(); - void setNickName( const QString & ); + void setNickName( const TQString & ); void setAutoShowServerWindow( bool show ); - void setAltNick( const QString & ); - const QString altNick() const; + void setAltNick( const TQString & ); + const TQString altNick() const; - void setUserName( const QString & ); - const QString userName() const; + void setUserName( const TQString & ); + const TQString userName() const; - void setRealName( const QString & ); - const QString realName() const; + void setRealName( const TQString & ); + const TQString realName() const; - const QStringList connectCommands() const; + const TQStringList connectCommands() const; - void setConnectCommands( const QStringList & ) const; + void setConnectCommands( const TQStringList & ) const; - void setDefaultPart( const QString & ); + void setDefaultPart( const TQString & ); - void setNetwork( const QString & ); + void setNetwork( const TQString & ); - void setDefaultQuit( const QString & ); + void setDefaultQuit( const TQString & ); - void setCodec( QTextCodec *codec ); + void setCodec( TQTextCodec *codec ); void setMessageDestinations( int serverNotices, int serverMessages, int informationReplies, int errorMessages ); - QTextCodec *codec() const; + TQTextCodec *codec() const; - const QString defaultPart() const; + const TQString defaultPart() const; - const QString defaultQuit() const; + const TQString defaultQuit() const; - const QString networkName() const; + const TQString networkName() const; - QMap< QString, QString > customCtcp() const; + TQMap< TQString, TQString > customCtcp() const; - void setCustomCtcpReplies( const QMap< QString, QString > &replys ) const; + void setCustomCtcpReplies( const TQMap< TQString, TQString > &replys ) const; - const QMap<QString, QString> customCtcpReplies() const; + const TQMap<TQString, TQString> customCtcpReplies() const; void setCurrentCommandSource( Kopete::ChatSession *session ); Kopete::ChatSession *currentCommandSource(); - IRCContact *getContact(const QString &name, Kopete::MetaContact *metac=0); + IRCContact *getContact(const TQString &name, Kopete::MetaContact *metac=0); IRCContact *getContact(KIRC::EntityPtr entity, Kopete::MetaContact *metac=0); public slots: virtual KActionMenu *actionMenu(); - virtual void setAway( bool isAway, const QString &awayMessage = QString::null ); + virtual void setAway( bool isAway, const TQString &awayMessage = TQString::null ); virtual bool isConnected(); /** Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); // Returns the KIRC engine instance KIRC::Engine *engine() const { return m_engine; } @@ -178,19 +178,19 @@ public slots: // Returns the Kopete::Contact of the server of the user IRCServerContact *myServer() const; - void successfullyChangedNick(const QString &, const QString &); + void successfullyChangedNick(const TQString &, const TQString &); - virtual void connectWithPassword( const QString & ); + virtual void connectWithPassword( const TQString & ); virtual void disconnect(); - void quit( const QString &quitMessage = QString::null ); + void quit( const TQString &quitMessage = TQString::null ); void listChannels(); - void appendMessage( const QString &message, MessageType type = Default ); + void appendMessage( const TQString &message, MessageType type = Default ); protected: - virtual bool createContact( const QString &contactId, Kopete::MetaContact *parentContact ) ; + virtual bool createContact( const TQString &contactId, Kopete::MetaContact *parentContact ) ; private slots: void engineStatusChanged(KIRC::Engine::Status newStatus); @@ -198,31 +198,31 @@ private slots: void destroyed(IRCContact *contact); void slotFailedServerPassword(); - void slotGoAway( const QString &reason ); - void slotJoinNamedChannel( const QString &channel ); + void slotGoAway( const TQString &reason ); + void slotJoinNamedChannel( const TQString &channel ); void slotJoinChannel(); void slotShowServerWindow(); - void slotNickInUse( const QString &nick ); - void slotNickInUseAlert( const QString &nick ); + void slotNickInUse( const TQString &nick ); + void slotNickInUseAlert( const TQString &nick ); void slotServerBusy(); - void slotNoSuchNickname( const QString &nick ); + void slotNoSuchNickname( const TQString &nick ); void slotSearchChannels(); - void slotNewCtcpReply(const QString &type, const QString &target, const QString &messageReceived); - void slotJoinedUnknownChannel( const QString &channel, const QString &nick ); + void slotNewCtcpReply(const TQString &type, const TQString &target, const TQString &messageReceived); + void slotJoinedUnknownChannel( const TQString &channel, const TQString &nick ); void slotPerformOnConnectCommands(); private: Kopete::ChatSession *m_manager; - QString mNickName; + TQString mNickName; Kopete::AwayAction *mAwayAction; bool triedAltNick; bool autoShowServerWindow; - QString autoConnect; + TQString autoConnect; KIRC::Engine *m_engine; IRCNetwork *m_network; uint currentHost; - QTextCodec *mCodec; + TQTextCodec *mCodec; MessageDestination m_serverNotices; MessageDestination m_serverMessages; @@ -231,11 +231,11 @@ private: ChannelListDialog *m_channelList; - QValueList<IRCContact *> m_contacts; + TQValueList<IRCContact *> m_contacts; IRCContactManager *m_contactManager; IRCServerContact *m_myServer; - QMap< QString, QString > m_customCtcp; + TQMap< TQString, TQString > m_customCtcp; Kopete::ChatSession *commandSource; KAction *m_joinChannelAction; diff --git a/kopete/protocols/irc/ircaddcontactpage.cpp b/kopete/protocols/irc/ircaddcontactpage.cpp index db4ca3b2..6b19721c 100644 --- a/kopete/protocols/irc/ircaddcontactpage.cpp +++ b/kopete/protocols/irc/ircaddcontactpage.cpp @@ -23,38 +23,38 @@ #include "ircaccount.h" -#include <qlayout.h> -#include <qlineedit.h> -#include <qframe.h> -#include <qtabwidget.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqframe.h> +#include <tqtabwidget.h> #include <kdebug.h> #include <klocale.h> #include <kmessagebox.h> -IRCAddContactPage::IRCAddContactPage( QWidget *parent, IRCAccount *a ) : AddContactPage(parent, 0) +IRCAddContactPage::IRCAddContactPage( TQWidget *parent, IRCAccount *a ) : AddContactPage(parent, 0) { - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); ircdata = new ircAddUI(this); - mSearch = new ChannelList( (QWidget*)ircdata->hbox, a->engine() ); + mSearch = new ChannelList( (TQWidget*)ircdata->hbox, a->engine() ); mAccount = a; - connect( mSearch, SIGNAL( channelSelected( const QString & ) ), - this, SLOT( slotChannelSelected( const QString & ) ) ); + connect( mSearch, TQT_SIGNAL( channelSelected( const TQString & ) ), + this, TQT_SLOT( slotChannelSelected( const TQString & ) ) ); - connect( mSearch, SIGNAL( channelDoubleClicked( const QString & ) ), - this, SLOT( slotChannelDoubleClicked( const QString & ) ) ); + connect( mSearch, TQT_SIGNAL( channelDoubleClicked( const TQString & ) ), + this, TQT_SLOT( slotChannelDoubleClicked( const TQString & ) ) ); } IRCAddContactPage::~IRCAddContactPage() { } -void IRCAddContactPage::slotChannelSelected( const QString &channel ) +void IRCAddContactPage::slotChannelSelected( const TQString &channel ) { ircdata->addID->setText( channel ); } -void IRCAddContactPage::slotChannelDoubleClicked( const QString &channel ) +void IRCAddContactPage::slotChannelDoubleClicked( const TQString &channel ) { ircdata->addID->setText( channel ); ircdata->tabWidget3->setCurrentPage(0); @@ -62,13 +62,13 @@ void IRCAddContactPage::slotChannelDoubleClicked( const QString &channel ) bool IRCAddContactPage::apply(Kopete::Account *account , Kopete::MetaContact *m) { - QString name = ircdata->addID->text(); + TQString name = ircdata->addID->text(); return account->addContact(name, m, Kopete::Account::ChangeKABC ); } bool IRCAddContactPage::validateData() { - QString name = ircdata->addID->text(); + TQString name = ircdata->addID->text(); if (name.isEmpty() == true) { KMessageBox::sorry(this, i18n("<qt>You need to specify a channel to join, or query to open.</qt>"), i18n("You Must Specify a Channel")); diff --git a/kopete/protocols/irc/ircaddcontactpage.h b/kopete/protocols/irc/ircaddcontactpage.h index c6b897ff..8f5a0bec 100644 --- a/kopete/protocols/irc/ircaddcontactpage.h +++ b/kopete/protocols/irc/ircaddcontactpage.h @@ -33,7 +33,7 @@ class IRCAddContactPage : public AddContactPage { Q_OBJECT public: - IRCAddContactPage(QWidget *parent=0, IRCAccount* account = 0); + IRCAddContactPage(TQWidget *parent=0, IRCAccount* account = 0); ~IRCAddContactPage(); ircAddUI *ircdata; @@ -42,8 +42,8 @@ public slots: private slots: virtual bool validateData(); - void slotChannelSelected( const QString &channel ); - void slotChannelDoubleClicked( const QString &channel ); + void slotChannelSelected( const TQString &channel ); + void slotChannelDoubleClicked( const TQString &channel ); private: IRCAccount *mAccount; ChannelList *mSearch; diff --git a/kopete/protocols/irc/ircchannelcontact.cpp b/kopete/protocols/irc/ircchannelcontact.cpp index cc99acf3..cab2748b 100644 --- a/kopete/protocols/irc/ircchannelcontact.cpp +++ b/kopete/protocols/irc/ircchannelcontact.cpp @@ -37,33 +37,33 @@ #include <kglobal.h> #include <kmessagebox.h> -#include <qtimer.h> +#include <tqtimer.h> //This is the number of nicknames we will process concurrently when joining a channel //Lower numbers ensure less GUI blocking, but take marginally longer to complete. //Higher numbers are absolute fastest, but block GUI until all members are added #define NICK_BATCH_LENGTH 1 -IRCChannelContact::IRCChannelContact(IRCContactManager *contactManager, const QString &channel, Kopete::MetaContact *metac) +IRCChannelContact::IRCChannelContact(IRCContactManager *contactManager, const TQString &channel, Kopete::MetaContact *metac) : IRCContact(contactManager, channel, metac, "irc_channel") { KIRC::Engine *engine = kircEngine(); - mInfoTimer = new QTimer( this ); - QObject::connect(mInfoTimer, SIGNAL(timeout()), this, SLOT( slotUpdateInfo() ) ); + mInfoTimer = new TQTimer( this ); + TQObject::connect(mInfoTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( slotUpdateInfo() ) ); - QObject::connect(engine, SIGNAL(incomingUserIsAway(const QString &, const QString &)), - this, SLOT(slotIncomingUserIsAway(const QString &, const QString &))); + TQObject::connect(engine, TQT_SIGNAL(incomingUserIsAway(const TQString &, const TQString &)), + this, TQT_SLOT(slotIncomingUserIsAway(const TQString &, const TQString &))); - QObject::connect(engine, SIGNAL(incomingListedChan(const QString &, uint, const QString &)), - this, SLOT(slotChannelListed(const QString &, uint, const QString &))); + TQObject::connect(engine, TQT_SIGNAL(incomingListedChan(const TQString &, uint, const TQString &)), + this, TQT_SLOT(slotChannelListed(const TQString &, uint, const TQString &))); actionJoin = 0L; - actionModeT = new KToggleAction(i18n("Only Operators Can Change &Topic"), 0, this, SLOT(slotModeChanged()), this ); - actionModeN = new KToggleAction(i18n("&No Outside Messages"), 0, this, SLOT(slotModeChanged()), this ); - actionModeS = new KToggleAction(i18n("&Secret"), 0, this, SLOT(slotModeChanged()), this ); - actionModeM = new KToggleAction(i18n("&Moderated"), 0, this, SLOT(slotModeChanged()), this ); - actionModeI = new KToggleAction(i18n("&Invite Only"), 0, this, SLOT(slotModeChanged()), this ); + actionModeT = new KToggleAction(i18n("Only Operators Can Change &Topic"), 0, this, TQT_SLOT(slotModeChanged()), this ); + actionModeN = new KToggleAction(i18n("&No Outside Messages"), 0, this, TQT_SLOT(slotModeChanged()), this ); + actionModeS = new KToggleAction(i18n("&Secret"), 0, this, TQT_SLOT(slotModeChanged()), this ); + actionModeM = new KToggleAction(i18n("&Moderated"), 0, this, TQT_SLOT(slotModeChanged()), this ); + actionModeI = new KToggleAction(i18n("&Invite Only"), 0, this, TQT_SLOT(slotModeChanged()), this ); actionHomePage = 0L; updateStatus(); @@ -78,9 +78,9 @@ void IRCChannelContact::slotUpdateInfo() /** This woudl be nice, but it generates server errors too often if( !manager(Kopete::Contact::CannotCreate) && onlineStatus() == m_protocol->m_ChannelStatusOnline ) - kircEngine()->writeMessage( QString::fromLatin1("LIST %1").arg(m_nickName) ); + kircEngine()->writeMessage( TQString::fromLatin1("LIST %1").arg(m_nickName) ); else - setProperty( QString::fromLatin1("channelMembers"), i18n("Members"), manager()->members().count() ); + setProperty( TQString::fromLatin1("channelMembers"), i18n("Members"), manager()->members().count() ); */ KIRC::Engine *engine = kircEngine(); @@ -88,7 +88,7 @@ void IRCChannelContact::slotUpdateInfo() if (manager(Kopete::Contact::CannotCreate)) { setProperty(m_protocol->propChannelMembers, manager()->members().count()); - engine->writeMessage(QString::fromLatin1("WHO %1").arg(m_nickName)); + engine->writeMessage(TQString::fromLatin1("WHO %1").arg(m_nickName)); } else { @@ -99,7 +99,7 @@ void IRCChannelContact::slotUpdateInfo() mInfoTimer->start( 45000, true ); } -void IRCChannelContact::slotChannelListed( const QString &channel, uint members, const QString &topic ) +void IRCChannelContact::slotChannelListed( const TQString &channel, uint members, const TQString &topic ) { if (!manager(Kopete::Contact::CannotCreate) && onlineStatus() == m_protocol->m_ChannelStatusOnline && @@ -191,7 +191,7 @@ void IRCChannelContact::slotConnectedToServer() kircEngine()->join(m_nickName, password()); } -void IRCChannelContact::namesList(const QStringList &nicknames) +void IRCChannelContact::namesList(const TQStringList &nicknames) { mInfoTimer->stop(); mJoinedNicks += nicknames; @@ -200,7 +200,7 @@ void IRCChannelContact::namesList(const QStringList &nicknames) void IRCChannelContact::endOfNames() { - setMode(QString::null); + setMode(TQString::null); slotUpdateInfo(); } @@ -217,8 +217,8 @@ void IRCChannelContact::slotAddNicknames() { // Pick a nick from the front of the list. - QString nickToAdd = mJoinedNicks.front(); - QChar firstChar = nickToAdd[0]; + TQString nickToAdd = mJoinedNicks.front(); + TQChar firstChar = nickToAdd[0]; if( firstChar == '@' || firstChar == '%' || firstChar == '+' ) nickToAdd = nickToAdd.remove(0, 1); @@ -261,10 +261,10 @@ void IRCChannelContact::slotAddNicknames() mJoinedNicks.pop_front(); } - QTimer::singleShot( 0, this, SLOT( slotAddNicknames() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotAddNicknames() ) ); } -void IRCChannelContact::channelTopic(const QString &topic) +void IRCChannelContact::channelTopic(const TQString &topic) { mTopic = topic; setProperty( m_protocol->propChannelTopic, mTopic ); @@ -283,7 +283,7 @@ void IRCChannelContact::channelTopic(const QString &topic) } } -void IRCChannelContact::channelHomePage(const QString &url) +void IRCChannelContact::channelHomePage(const TQString &url) { kdDebug(14120) << k_funcinfo << endl; setProperty( m_protocol->propHomepage, url ); @@ -303,9 +303,9 @@ void IRCChannelContact::join() if (manager()) { connect(manager(), - SIGNAL(onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, + TQT_SIGNAL(onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &)), - SLOT(slotOnlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, + TQT_SLOT(slotOnlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &))); } } @@ -322,7 +322,7 @@ void IRCChannelContact::part() kircEngine()->part(m_nickName, ircAccount()->defaultPart()); } -void IRCChannelContact::slotIncomingUserIsAway( const QString &nick, const QString & ) +void IRCChannelContact::slotIncomingUserIsAway( const TQString &nick, const TQString & ) { IRCAccount *account = ircAccount(); @@ -348,7 +348,7 @@ void IRCChannelContact::slotIncomingUserIsAway( const QString &nick, const QStri } } -void IRCChannelContact::userJoinedChannel(const QString &nickname) +void IRCChannelContact::userJoinedChannel(const TQString &nickname) { IRCAccount *account = ircAccount(); @@ -385,7 +385,7 @@ void IRCChannelContact::userJoinedChannel(const QString &nickname) } } -void IRCChannelContact::userPartedChannel(const QString &nickname,const QString &reason) +void IRCChannelContact::userPartedChannel(const TQString &nickname,const TQString &reason) { IRCAccount *account = ircAccount(); @@ -401,7 +401,7 @@ void IRCChannelContact::userPartedChannel(const QString &nickname,const QString } } -void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicked, const QString &reason) +void IRCChannelContact::userKicked(const TQString &nick, const TQString &nickKicked, const TQString &reason) { IRCAccount *account = ircAccount(); @@ -410,7 +410,7 @@ void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicke Kopete::Contact *c = locateUser( nickKicked ); if (c) { - QString r; + TQString r; if ((reason != nick) && (reason != nickKicked)) { r = i18n( "%1 was kicked by %2. Reason: %3" ).arg(nickKicked, nick, reason); @@ -431,7 +431,7 @@ void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicke } else { - QString r; + TQString r; if ((reason != nick) && (reason != nickKicked)) { r = i18n( "You were kicked from %1 by %2. Reason: %3" ).arg(m_nickName, nickKicked, reason); @@ -444,7 +444,7 @@ void IRCChannelContact::userKicked(const QString &nick, const QString &nickKicke } } -void IRCChannelContact::setTopic(const QString &topic) +void IRCChannelContact::setTopic(const TQString &topic) { IRCAccount *account = ircAccount(); @@ -454,7 +454,7 @@ void IRCChannelContact::setTopic(const QString &topic) m_protocol->m_UserStatusOp || !modeEnabled('t') ) { bool okPressed = true; - QString newTopic = topic; + TQString newTopic = topic; if( newTopic.isNull() ) newTopic = KInputDialog::getText( i18n("New Topic"), i18n("Enter the new topic:"), Kopete::Message::unescape(mTopic), &okPressed, 0L ); @@ -475,7 +475,7 @@ void IRCChannelContact::setTopic(const QString &topic) } } -void IRCChannelContact::topicChanged(const QString &nick, const QString &newtopic) +void IRCChannelContact::topicChanged(const TQString &nick, const TQString &newtopic) { IRCAccount *account = ircAccount(); @@ -489,7 +489,7 @@ void IRCChannelContact::topicChanged(const QString &nick, const QString &newtopi appendMessage(msg); } -void IRCChannelContact::topicUser(const QString &nick, const QDateTime &time) +void IRCChannelContact::topicUser(const TQString &nick, const TQDateTime &time) { IRCAccount *account = ircAccount(); @@ -501,7 +501,7 @@ void IRCChannelContact::topicUser(const QString &nick, const QDateTime &time) appendMessage(msg); } -void IRCChannelContact::incomingModeChange( const QString &nick, const QString &mode ) +void IRCChannelContact::incomingModeChange( const TQString &nick, const TQString &mode ) { Kopete::Message msg(this, mMyself, i18n("%1 sets mode %2 on %3").arg(nick).arg(mode).arg(m_nickName), Kopete::Message::Internal, Kopete::Message::PlainText, CHAT_VIEW); msg.setImportance( Kopete::Message::Low); //set the importance manualy to low @@ -509,7 +509,7 @@ void IRCChannelContact::incomingModeChange( const QString &nick, const QString & bool inParams = false; bool modeEnabled = false; - QString params = QString::null; + TQString params = TQString::null; for( uint i=0; i < mode.length(); i++ ) { switch( mode[i] ) @@ -535,8 +535,8 @@ void IRCChannelContact::incomingModeChange( const QString &nick, const QString & } } -void IRCChannelContact::incomingChannelMode( const QString &mode, - const QString &/*params*/ ) +void IRCChannelContact::incomingChannelMode( const TQString &mode, + const TQString &/*params*/ ) { for( uint i=1; i < mode.length(); i++ ) { @@ -545,7 +545,7 @@ void IRCChannelContact::incomingChannelMode( const QString &mode, } } -void IRCChannelContact::setMode(const QString &mode) +void IRCChannelContact::setMode(const TQString &mode) { if (manager(Kopete::Contact::CannotCreate)) kircEngine()->mode(m_nickName, mode); @@ -586,9 +586,9 @@ void IRCChannelContact::failedChanFull() void IRCChannelContact::failedChankey() { bool ok; - QString diaPassword = KInputDialog::getText( i18n( "IRC Plugin" ), + TQString diaPassword = KInputDialog::getText( i18n( "IRC Plugin" ), i18n( "Please enter key for channel %1: ").arg(m_nickName), - QString::null, + TQString::null, &ok ); if ( !ok ) @@ -600,7 +600,7 @@ void IRCChannelContact::failedChankey() } } -void IRCChannelContact::toggleMode( QChar mode, bool enabled, bool update ) +void IRCChannelContact::toggleMode( TQChar mode, bool enabled, bool update ) { if( manager(Kopete::Contact::CannotCreate) ) { @@ -636,16 +636,16 @@ void IRCChannelContact::toggleMode( QChar mode, bool enabled, bool update ) if( modeMap[mode] != enabled ) { if( enabled ) - setMode( QString::fromLatin1("+") + mode ); + setMode( TQString::fromLatin1("+") + mode ); else - setMode( QString::fromLatin1("-") + mode ); + setMode( TQString::fromLatin1("-") + mode ); } } modeMap[mode] = enabled; } -bool IRCChannelContact::modeEnabled( QChar mode, QString *value ) +bool IRCChannelContact::modeEnabled( TQChar mode, TQString *value ) { if( !value ) return modeMap[mode]; @@ -653,20 +653,20 @@ bool IRCChannelContact::modeEnabled( QChar mode, QString *value ) return false; } -QPtrList<KAction> *IRCChannelContact::customContextMenuActions() +TQPtrList<KAction> *IRCChannelContact::customContextMenuActions() { - QPtrList<KAction> *mCustomActions = new QPtrList<KAction>(); + TQPtrList<KAction> *mCustomActions = new TQPtrList<KAction>(); if( !actionJoin ) { - actionJoin = new KAction(i18n("&Join"), 0, this, SLOT(join()), this, "actionJoin"); - actionPart = new KAction(i18n("&Part"), 0, this, SLOT(partAction()), this, "actionPart"); - actionTopic = new KAction(i18n("Change &Topic..."), 0, this, SLOT(setTopic()), this, "actionTopic"); + actionJoin = new KAction(i18n("&Join"), 0, this, TQT_SLOT(join()), this, "actionJoin"); + actionPart = new KAction(i18n("&Part"), 0, this, TQT_SLOT(partAction()), this, "actionPart"); + actionTopic = new KAction(i18n("Change &Topic..."), 0, this, TQT_SLOT(setTopic()), this, "actionTopic"); actionModeMenu = new KActionMenu(i18n("Channel Modes"), 0, this, "actionModeMenu"); if( !property(m_protocol->propHomepage).value().isNull() ) { actionHomePage = new KAction( i18n("Visit &Homepage"), 0, this, - SLOT(slotHomepage()), this, "actionHomepage"); + TQT_SLOT(slotHomepage()), this, "actionHomepage"); } else if( actionHomePage ) { @@ -681,8 +681,8 @@ QPtrList<KAction> *IRCChannelContact::customContextMenuActions() actionModeMenu->setEnabled( true ); codecAction = new KCodecAction( i18n("&Encoding"), 0, this, "selectcharset" ); - connect( codecAction, SIGNAL( activated( const QTextCodec * ) ), - this, SLOT( setCodec( const QTextCodec *) ) ); + connect( codecAction, TQT_SIGNAL( activated( const TQTextCodec * ) ), + this, TQT_SLOT( setCodec( const TQTextCodec *) ) ); codecAction->setCodec( codec() ); } @@ -708,23 +708,23 @@ QPtrList<KAction> *IRCChannelContact::customContextMenuActions() void IRCChannelContact::slotHomepage() { - QString homePage = property(m_protocol->propHomepage).value().toString(); + TQString homePage = property(m_protocol->propHomepage).value().toString(); if( !homePage.isEmpty() ) { new KRun( KURL( homePage ), 0, false); } } -const QString IRCChannelContact::caption() const +const TQString IRCChannelContact::caption() const { - QString cap = QString::fromLatin1("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost()); + TQString cap = TQString::fromLatin1("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost()); if(!mTopic.isEmpty()) - cap.append( QString::fromLatin1(" - %1").arg(Kopete::Message::unescape(mTopic)) ); + cap.append( TQString::fromLatin1(" - %1").arg(Kopete::Message::unescape(mTopic)) ); return cap; } -void IRCChannelContact::privateMessage(IRCContact *from, IRCContact *to, const QString &message) +void IRCChannelContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message) { if(to == this) { @@ -734,7 +734,7 @@ void IRCChannelContact::privateMessage(IRCContact *from, IRCContact *to, const Q } } -void IRCChannelContact::newAction(const QString &from, const QString &action) +void IRCChannelContact::newAction(const TQString &from, const TQString &action) { IRCAccount *account = ircAccount(); diff --git a/kopete/protocols/irc/ircchannelcontact.h b/kopete/protocols/irc/ircchannelcontact.h index 15a72e17..0febd30b 100644 --- a/kopete/protocols/irc/ircchannelcontact.h +++ b/kopete/protocols/irc/ircchannelcontact.h @@ -49,50 +49,50 @@ class IRCChannelContact Q_OBJECT public: - IRCChannelContact(IRCContactManager *, const QString &channel, Kopete::MetaContact *metac); + IRCChannelContact(IRCContactManager *, const TQString &channel, Kopete::MetaContact *metac); ~IRCChannelContact(); /** * Returns the current topic for this channel. */ - const QString &topic() const { return mTopic; }; + const TQString &topic() const { return mTopic; }; /* Set password for a channel */ - void setPassword(const QString &password) { mPassword = password; } + void setPassword(const TQString &password) { mPassword = password; } /* Get password for a channel */ - const QString &password() const { return mPassword; } + const TQString &password() const { return mPassword; } /** * Returns if a mode is enabled for this channel. * @param mode The mode you want to check ( 't', 'n', etc. ) - * @param value This is a pointer to a QString which is set to + * @param value This is a pointer to a TQString which is set to * the value of the mode if it has one. Example, the mode 'l' or * the mode 'k'. If the mode has no such value then the pointer * is always returned null. */ - bool modeEnabled( QChar mode, QString *value = 0 ); + bool modeEnabled( TQChar mode, TQString *value = 0 ); // Kopete::Contact stuff - virtual QPtrList<KAction> *customContextMenuActions(); - virtual const QString caption() const; + virtual TQPtrList<KAction> *customContextMenuActions(); + virtual const TQString caption() const; //Methods handled by the signal mapper - void userJoinedChannel(const QString &user); - void userPartedChannel(const QString &user, const QString &reason); - void userKicked(const QString &nick, const QString &nickKicked, const QString &reason); - void channelTopic(const QString &topic); - void channelHomePage(const QString &url); - void topicChanged(const QString &nick, const QString &newtopic); - void topicUser(const QString &nick, const QDateTime &time); - void namesList(const QStringList &nicknames); + void userJoinedChannel(const TQString &user); + void userPartedChannel(const TQString &user, const TQString &reason); + void userKicked(const TQString &nick, const TQString &nickKicked, const TQString &reason); + void channelTopic(const TQString &topic); + void channelHomePage(const TQString &url); + void topicChanged(const TQString &nick, const TQString &newtopic); + void topicUser(const TQString &nick, const TQDateTime &time); + void namesList(const TQStringList &nicknames); void endOfNames(); - void incomingModeChange(const QString &nick, const QString &mode); - void incomingChannelMode(const QString &mode, const QString ¶ms ); + void incomingModeChange(const TQString &nick, const TQString &mode); + void incomingChannelMode(const TQString &mode, const TQString ¶ms ); void failedChankey(); void failedChanBanned(); void failedChanInvite(); void failedChanFull(); - void newAction(const QString &from, const QString &action); + void newAction(const TQString &from, const TQString &action); public slots: void updateStatus(); @@ -101,13 +101,13 @@ public slots: * Sets the topic of this channel * @param topic The topic you want set */ - void setTopic( const QString &topic = QString::null ); + void setTopic( const TQString &topic = TQString::null ); /** * Sets or unsets a mode on this channel * @param mode The full text of the mode change you want performed */ - void setMode( const QString &mode = QString::null ); + void setMode( const TQString &mode = TQString::null ); void part(); void partAction(); @@ -116,17 +116,17 @@ public slots: protected slots: void chatSessionDestroyed(); - virtual void privateMessage(IRCContact *from, IRCContact *to, const QString &message); + virtual void privateMessage(IRCContact *from, IRCContact *to, const TQString &message); virtual void initConversation(); private slots: - void slotIncomingUserIsAway( const QString &nick, const QString &reason ); + void slotIncomingUserIsAway( const TQString &nick, const TQString &reason ); void slotModeChanged(); void slotAddNicknames(); void slotConnectedToServer(); void slotUpdateInfo(); void slotHomepage(); - void slotChannelListed(const QString &channel, uint members, const QString &topic); + void slotChannelListed(const TQString &channel, uint members, const TQString &topic); void slotOnlineStatusChanged(Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus); private: @@ -143,13 +143,13 @@ private: KToggleAction *actionModeI; // Invite Only KToggleAction *actionModeM; // Moderated - QString mTopic; - QString mPassword; - QStringList mJoinedNicks; - QMap<QString, bool> modeMap; - QTimer *mInfoTimer; + TQString mTopic; + TQString mPassword; + TQStringList mJoinedNicks; + TQMap<TQString, bool> modeMap; + TQTimer *mInfoTimer; - void toggleMode( QChar mode, bool enabled, bool update ); + void toggleMode( TQChar mode, bool enabled, bool update ); void toggleOperatorActions( bool enabled ); }; diff --git a/kopete/protocols/irc/irccontact.cpp b/kopete/protocols/irc/irccontact.cpp index 64f89322..349fba60 100644 --- a/kopete/protocols/irc/irccontact.cpp +++ b/kopete/protocols/irc/irccontact.cpp @@ -19,10 +19,10 @@ #include <kdebug.h> #include <klocale.h> -#include <qregexp.h> +#include <tqregexp.h> -#include <qtimer.h> -#include <qtextcodec.h> +#include <tqtimer.h> +#include <tqtextcodec.h> #include "ircaccount.h" #include "kopeteglobal.h" @@ -36,13 +36,13 @@ #include "irccontactmanager.h" #include "ksparser.h" -IRCContact::IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const QString& icon) +IRCContact::IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const TQString& icon) : Kopete::Contact(account, entity->name(), metac, icon), m_chatSession(0) { } -IRCContact::IRCContact(IRCContactManager *contactManager, const QString &nick, Kopete::MetaContact *metac, const QString& icon) +IRCContact::IRCContact(IRCContactManager *contactManager, const TQString &nick, Kopete::MetaContact *metac, const TQString& icon) : Kopete::Contact(contactManager->account(), nick, metac, icon), m_nickName(nick), m_chatSession(0) @@ -53,22 +53,22 @@ IRCContact::IRCContact(IRCContactManager *contactManager, const QString &nick, K setProperty( Kopete::Global::Properties::self()->nickName(), m_nickName ); // IRCContactManager stuff - QObject::connect(contactManager, SIGNAL(privateMessage(IRCContact *, IRCContact *, const QString &)), - this, SLOT(privateMessage(IRCContact *, IRCContact *, const QString &))); + TQObject::connect(contactManager, TQT_SIGNAL(privateMessage(IRCContact *, IRCContact *, const TQString &)), + this, TQT_SLOT(privateMessage(IRCContact *, IRCContact *, const TQString &))); // Kopete::ChatSessionManager stuff mMyself.append( static_cast<Kopete::Contact*>( this ) ); // KIRC stuff - QObject::connect(engine, SIGNAL(incomingNickChange(const QString &, const QString &)), - this, SLOT( slotNewNickChange(const QString&, const QString&))); - QObject::connect(engine, SIGNAL(successfullyChangedNick(const QString &, const QString &)), - this, SLOT(slotNewNickChange(const QString &, const QString &))); - QObject::connect(engine, SIGNAL(incomingQuitIRC(const QString &, const QString &)), - this, SLOT( slotUserDisconnected(const QString&, const QString&))); + TQObject::connect(engine, TQT_SIGNAL(incomingNickChange(const TQString &, const TQString &)), + this, TQT_SLOT( slotNewNickChange(const TQString&, const TQString&))); + TQObject::connect(engine, TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)), + this, TQT_SLOT(slotNewNickChange(const TQString &, const TQString &))); + TQObject::connect(engine, TQT_SIGNAL(incomingQuitIRC(const TQString &, const TQString &)), + this, TQT_SLOT( slotUserDisconnected(const TQString&, const TQString&))); - QObject::connect(engine, SIGNAL(statusChanged(KIRC::Engine::Status)), - this, SLOT(updateStatus())); + TQObject::connect(engine, TQT_SIGNAL(statusChanged(KIRC::Engine::Status)), + this, TQT_SLOT(updateStatus())); engine->setCodec( m_nickName, codec() ); } @@ -101,43 +101,43 @@ bool IRCContact::isReachable() return false; } -const QString IRCContact::caption() const +const TQString IRCContact::caption() const { - return QString::null; + return TQString::null; } /* -const QString IRCContact::formatedName() const +const TQString IRCContact::formatedName() const { - return QString::null; + return TQString::null; } */ void IRCContact::updateStatus() { } -void IRCContact::privateMessage(IRCContact *, IRCContact *, const QString &) +void IRCContact::privateMessage(IRCContact *, IRCContact *, const TQString &) { } -void IRCContact::setCodec(const QTextCodec *codec) +void IRCContact::setCodec(const TQTextCodec *codec) { kircEngine()->setCodec(m_nickName, codec); - metaContact()->setPluginData(m_protocol, QString::fromLatin1("Codec"), QString::number(codec->mibEnum())); + metaContact()->setPluginData(m_protocol, TQString::fromLatin1("Codec"), TQString::number(codec->mibEnum())); } -const QTextCodec *IRCContact::codec() +const TQTextCodec *IRCContact::codec() { - QString codecId = metaContact()->pluginData(m_protocol, QString::fromLatin1("Codec")); - QTextCodec *codec = ircAccount()->codec(); + TQString codecId = metaContact()->pluginData(m_protocol, TQString::fromLatin1("Codec")); + TQTextCodec *codec = ircAccount()->codec(); if( !codecId.isEmpty() ) { bool test = true; uint mib = codecId.toInt(&test); if (test) - codec = QTextCodec::codecForMib(mib); + codec = TQTextCodec::codecForMib(mib); else - codec = QTextCodec::codecForName(codecId.latin1()); + codec = TQTextCodec::codecForName(codecId.latin1()); } if( !codec ) @@ -159,10 +159,10 @@ Kopete::ChatSession *IRCContact::manager(Kopete::Contact::CanCreateFlags canCrea m_chatSession = Kopete::ChatSessionManager::self()->create(account->myself(), mMyself, account->protocol()); m_chatSession->setDisplayName(caption()); - QObject::connect(m_chatSession, SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession *)), - this, SLOT(slotSendMsg(Kopete::Message&, Kopete::ChatSession *))); - QObject::connect(m_chatSession, SIGNAL(closing(Kopete::ChatSession *)), - this, SLOT(chatSessionDestroyed())); + TQObject::connect(m_chatSession, TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession *)), + this, TQT_SLOT(slotSendMsg(Kopete::Message&, Kopete::ChatSession *))); + TQObject::connect(m_chatSession, TQT_SIGNAL(closing(Kopete::ChatSession *)), + this, TQT_SLOT(chatSessionDestroyed())); initConversation(); } @@ -178,11 +178,11 @@ void IRCContact::chatSessionDestroyed() deleteLater(); } -void IRCContact::slotUserDisconnected(const QString &user, const QString &reason) +void IRCContact::slotUserDisconnected(const TQString &user, const TQString &reason) { if (m_chatSession) { - QString nickname = user.section('!', 0, 0); + TQString nickname = user.section('!', 0, 0); Kopete::Contact *c = locateUser( nickname ); if ( c ) { @@ -192,14 +192,14 @@ void IRCContact::slotUserDisconnected(const QString &user, const QString &reason } } -void IRCContact::setNickName( const QString &nickname ) +void IRCContact::setNickName( const TQString &nickname ) { kdDebug(14120) << k_funcinfo << m_nickName << " changed to " << nickname << endl; m_nickName = nickname; Kopete::Contact::setNickName( nickname ); } -void IRCContact::slotNewNickChange(const QString &oldnickname, const QString &newnickname) +void IRCContact::slotNewNickChange(const TQString &oldnickname, const TQString &newnickname) { IRCAccount *account = ircAccount(); @@ -219,7 +219,7 @@ void IRCContact::slotNewNickChange(const QString &oldnickname, const QString &ne void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *) { - QString htmlString = message.escapedBody(); + TQString htmlString = message.escapedBody(); // Messages we get with RichText enabled: // @@ -229,9 +229,9 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *) // Two-liner in color: // <span style="color:#403897">Hello<br />World</span> - if (htmlString.find(QString::fromLatin1("</span")) > -1) + if (htmlString.find(TQString::fromLatin1("</span")) > -1) { - QRegExp findTags( QString::fromLatin1("<span style=\"(.*)\">(.*)</span>") ); + TQRegExp findTags( TQString::fromLatin1("<span style=\"(.*)\">(.*)</span>") ); findTags.setMinimal( true ); int pos = 0; @@ -240,29 +240,29 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *) pos = findTags.search(htmlString); if (pos > -1) { - QString styleHTML = findTags.cap(1); - QString replacement = findTags.cap(2); - QStringList styleAttrs = QStringList::split(';', styleHTML); + TQString styleHTML = findTags.cap(1); + TQString replacement = findTags.cap(2); + TQStringList styleAttrs = TQStringList::split(';', styleHTML); - for (QStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair) + for (TQStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair) { - QString attribute = (*attrPair).section(':',0,0); - QString value = (*attrPair).section(':',1); + TQString attribute = (*attrPair).section(':',0,0); + TQString value = (*attrPair).section(':',1); - if( attribute == QString::fromLatin1("color") ) + if( attribute == TQString::fromLatin1("color") ) { int ircColor = KSParser::colorForHTML( value ); if( ircColor > -1 ) - replacement.prepend( QString( QChar(0x03) ).append( QString::number(ircColor) ) ).append( QChar( 0x03 ) ); + replacement.prepend( TQString( TQChar(0x03) ).append( TQString::number(ircColor) ) ).append( TQChar( 0x03 ) ); } - else if( attribute == QString::fromLatin1("font-weight") && - value == QString::fromLatin1("600") ) { + else if( attribute == TQString::fromLatin1("font-weight") && + value == TQString::fromLatin1("600") ) { // Bolding - replacement.prepend( QChar(0x02) ).append( QChar(0x02) ); + replacement.prepend( TQChar(0x02) ).append( TQChar(0x02) ); } - else if( attribute == QString::fromLatin1("text-decoration") && - value == QString::fromLatin1("underline") ) { - replacement.prepend( QChar(31) ).append( QChar(31) ); + else if( attribute == TQString::fromLatin1("text-decoration") && + value == TQString::fromLatin1("underline") ) { + replacement.prepend( TQChar(31) ).append( TQChar(31) ); } } @@ -273,9 +273,9 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *) htmlString = Kopete::Message::unescape(htmlString); - QStringList messages = QStringList::split( '\n', htmlString ); + TQStringList messages = TQStringList::split( '\n', htmlString ); - for( QStringList::Iterator it = messages.begin(); it != messages.end(); ++it ) + for( TQStringList::Iterator it = messages.begin(); it != messages.end(); ++it ) { // Dont use the resulting string(s). The problem is that we'd have to parse them // back to format that would be suitable for appendMessage(). @@ -290,25 +290,25 @@ void IRCContact::slotSendMsg(Kopete::Message &message, Kopete::ChatSession *) Kopete::Message msg(message.from(), message.to(), message.escapedBody(), message.direction(), Kopete::Message::RichText, CHAT_VIEW, message.type()); - msg.setBg(QColor()); - msg.setFg(QColor()); + msg.setBg(TQColor()); + msg.setFg(TQColor()); appendMessage(msg); } else { // Lets not modify the given message object. Kopete::Message msg = message; - msg.setBg(QColor()); + msg.setBg(TQColor()); appendMessage(msg); } manager(Kopete::Contact::CanCreate)->messageSucceeded(); } -QStringList IRCContact::sendMessage( const QString &msg ) +TQStringList IRCContact::sendMessage( const TQString &msg ) { - QStringList messages; + TQStringList messages; - QString newMessage = msg; + TQString newMessage = msg; // IRC limits the message size to 512 characters. So split the given // message into pieces. @@ -324,14 +324,14 @@ QStringList IRCContact::sendMessage( const QString &msg ) newMessage.remove(0, l); } while (!newMessage.isEmpty()); - for (QStringList::const_iterator it = messages.begin(); + for (TQStringList::const_iterator it = messages.begin(); it != messages.end(); ++it) kircEngine()->privmsg(m_nickName, *it); return messages; } -Kopete::Contact *IRCContact::locateUser(const QString &nick) +Kopete::Contact *IRCContact::locateUser(const TQString &nick) { IRCAccount *account = ircAccount(); @@ -359,8 +359,8 @@ bool IRCContact::isChatting(const Kopete::ChatSession *avoid) const if (!account) return false; - QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueList<Kopete::ChatSession*>::Iterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueList<Kopete::ChatSession*>::Iterator it= sessions.begin(); it!=sessions.end() ; ++it) { if( (*it) != avoid && (*it)->account() == account && (*it)->members().contains(this) ) @@ -402,16 +402,16 @@ KopeteView *IRCContact::view() return m_chatSession->view(false); return 0L; } -void IRCContact::serialize(QMap<QString, QString> & /*serializedData*/, QMap<QString, QString> &addressBookData) +void IRCContact::serialize(TQMap<TQString, TQString> & /*serializedData*/, TQMap<TQString, TQString> &addressBookData) { // write the - addressBookData[ protocol()->addressBookIndexField() ] = ( contactId() + QChar(0xE120) + account()->accountId() ); + addressBookData[ protocol()->addressBookIndexField() ] = ( contactId() + TQChar(0xE120) + account()->accountId() ); } void IRCContact::receivedMessage( KIRC::Engine::ServerMessageType type, const KIRC::EntityPtr &from, const KIRC::EntityPtrList &to, - const QString &msg) + const TQString &msg) { if (to.contains(m_entity)) { diff --git a/kopete/protocols/irc/irccontact.h b/kopete/protocols/irc/irccontact.h index 058315fb..9005f015 100644 --- a/kopete/protocols/irc/irccontact.h +++ b/kopete/protocols/irc/irccontact.h @@ -27,8 +27,8 @@ #include "kopetecontact.h" #include "kopetemessage.h" -#include <qptrlist.h> -#include <qmap.h> +#include <tqptrlist.h> +#include <tqmap.h> class IRCProtocol; class IRCAccount; @@ -63,8 +63,8 @@ class IRCContact Q_OBJECT public: - IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const QString& icon = QString::null); - IRCContact(IRCContactManager *contactManager, const QString &nick, Kopete::MetaContact *metac, const QString& icon = QString::null); + IRCContact(IRCAccount *account, KIRC::EntityPtr entity, Kopete::MetaContact *metac, const TQString& icon = TQString::null); + IRCContact(IRCContactManager *contactManager, const TQString &nick, Kopete::MetaContact *metac, const TQString& icon = TQString::null); virtual ~IRCContact(); IRCAccount *ircAccount() const; @@ -74,12 +74,12 @@ public: * Sets the nickname of this contact. The nickname is distinct from the displayName * in case trackNameChanges is disabled. */ - void setNickName(const QString &nickname); + void setNickName(const TQString &nickname); /** * Returns the nickname / channel name */ - const QString &nickName() const { return m_nickName; } + const TQString &nickName() const { return m_nickName; } /** * This function attempts to find the nickname specified within the current chat @@ -87,7 +87,7 @@ public: * exist in this session. More useful for channels. Calling IRCChannelContact::locateUser() * for example tells you if a user is in a certain channel. */ - Kopete::Contact *locateUser( const QString &nickName ); + Kopete::Contact *locateUser( const TQString &nickName ); virtual bool isReachable(); @@ -97,14 +97,14 @@ public: */ bool isChatting( const Kopete::ChatSession *avoid = 0L ) const; - virtual const QString caption() const; -// virtual const QString formatedName() const; + virtual const TQString caption() const; +// virtual const TQString formatedName() const; virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate); virtual void appendMessage( Kopete::Message & ); - const QTextCodec *codec(); + const TQTextCodec *codec(); KopeteView *view(); @@ -113,40 +113,40 @@ public: * so that other IRC programs reading this from KAddressBook have a chance of figuring * which server the contact relates to */ - virtual void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData ); + virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData ); signals: void destroyed(IRCContact *self); public slots: - void setCodec( const QTextCodec *codec ); + void setCodec( const TQTextCodec *codec ); virtual void updateStatus(); protected slots: virtual void slotSendMsg(Kopete::Message &message, Kopete::ChatSession *); - QStringList sendMessage( const QString &msg ); + TQStringList sendMessage( const TQString &msg ); virtual void chatSessionDestroyed(); - void slotNewNickChange( const QString &oldnickname, const QString &newnickname); - void slotUserDisconnected( const QString &nickname, const QString &reason); + void slotNewNickChange( const TQString &oldnickname, const TQString &newnickname); + void slotUserDisconnected( const TQString &nickname, const TQString &reason); virtual void deleteContact(); - virtual void privateMessage(IRCContact *from, IRCContact *to, const QString &message); + virtual void privateMessage(IRCContact *from, IRCContact *to, const TQString &message); virtual void initConversation() {}; void receivedMessage( KIRC::Engine::ServerMessageType type, const KIRC::EntityPtr &from, const KIRC::EntityPtrList &to, - const QString &msg); + const TQString &msg); protected: KIRC::EntityPtr m_entity; - QString m_nickName; + TQString m_nickName; Kopete::ChatSession *m_chatSession; - QPtrList<Kopete::Contact> mMyself; + TQPtrList<Kopete::Contact> mMyself; Kopete::Message::MessageDirection execDir; }; diff --git a/kopete/protocols/irc/irccontactmanager.cpp b/kopete/protocols/irc/irccontactmanager.cpp index 7808668b..fb49e08e 100644 --- a/kopete/protocols/irc/irccontactmanager.cpp +++ b/kopete/protocols/irc/irccontactmanager.cpp @@ -34,12 +34,12 @@ #include <kconfig.h> #include <kstandarddirs.h> -#include <qtimer.h> +#include <tqtimer.h> -IRCContactManager::IRCContactManager(const QString &nickName, IRCAccount *account, const char *name) - : QObject(account, name), - m_channels( QDict<IRCChannelContact>( 17, false ) ), - m_users( QDict<IRCUserContact>( 577, false ) ), +IRCContactManager::IRCContactManager(const TQString &nickName, IRCAccount *account, const char *name) + : TQObject(account, name), + m_channels( TQDict<IRCChannelContact>( 17, false ) ), + m_users( TQDict<IRCUserContact>( 577, false ) ), m_account( account ) { m_mySelf = findUser(nickName); @@ -48,41 +48,41 @@ IRCContactManager::IRCContactManager(const QString &nickName, IRCAccount *accoun // m->setTemporary( true ); m_myServer = new IRCServerContact(this, account->networkName(), m); - QObject::connect(account->engine(), SIGNAL(incomingMessage(const QString &, const QString &, const QString &)), - this, SLOT(slotNewMessage(const QString &, const QString &, const QString &))); + TQObject::connect(account->engine(), TQT_SIGNAL(incomingMessage(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotNewMessage(const TQString &, const TQString &, const TQString &))); - QObject::connect(account->engine(), SIGNAL(incomingPrivMessage(const QString &, const QString &, const QString &)), - this, SLOT(slotNewPrivMessage(const QString &, const QString &, const QString &))); + TQObject::connect(account->engine(), TQT_SIGNAL(incomingPrivMessage(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotNewPrivMessage(const TQString &, const TQString &, const TQString &))); - QObject::connect(account->engine(), SIGNAL(incomingNickChange(const QString &, const QString &)), - this, SLOT( slotNewNickChange(const QString&, const QString&))); + TQObject::connect(account->engine(), TQT_SIGNAL(incomingNickChange(const TQString &, const TQString &)), + this, TQT_SLOT( slotNewNickChange(const TQString&, const TQString&))); - QObject::connect(account->engine(), SIGNAL(successfullyChangedNick(const QString &, const QString &)), - this, SLOT( slotNewNickChange(const QString &, const QString &))); + TQObject::connect(account->engine(), TQT_SIGNAL(successfullyChangedNick(const TQString &, const TQString &)), + this, TQT_SLOT( slotNewNickChange(const TQString &, const TQString &))); - QObject::connect(account->engine(), SIGNAL(incomingUserOnline(const QString &)), - this, SLOT( slotIsonRecieved())); + TQObject::connect(account->engine(), TQT_SIGNAL(incomingUserOnline(const TQString &)), + this, TQT_SLOT( slotIsonRecieved())); - QObject::connect(Kopete::ContactList::self(), SIGNAL(metaContactAdded( Kopete::MetaContact * )), - this, SLOT( slotContactAdded( Kopete::MetaContact* ))); + TQObject::connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactAdded( Kopete::MetaContact * )), + this, TQT_SLOT( slotContactAdded( Kopete::MetaContact* ))); socketTimeout = 15000; - QString timeoutPath = locate( "config", "kioslaverc" ); + TQString timeoutPath = locate( "config", "kioslaverc" ); if( !timeoutPath.isEmpty() ) { KConfig config( timeoutPath ); socketTimeout = config.readNumEntry( "ReadTimeout", 15 ) * 1000; } - m_NotifyTimer = new QTimer(this); - QObject::connect(m_NotifyTimer, SIGNAL(timeout()), - this, SLOT(checkOnlineNotifyList())); + m_NotifyTimer = new TQTimer(this); + TQObject::connect(m_NotifyTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(checkOnlineNotifyList())); m_NotifyTimer->start(30000); // check online every 30sec new IRCSignalHandler(this); } -void IRCContactManager::slotNewNickChange(const QString &oldnick, const QString &newnick) +void IRCContactManager::slotNewNickChange(const TQString &oldnick, const TQString &newnick) { IRCUserContact *c = m_users[ oldnick ]; if( c ) @@ -92,14 +92,14 @@ void IRCContactManager::slotNewNickChange(const QString &oldnick, const QString } } -void IRCContactManager::slotNewMessage(const QString &originating, const QString &channel, const QString &message) +void IRCContactManager::slotNewMessage(const TQString &originating, const TQString &channel, const TQString &message) { IRCContact *from = findUser(originating); IRCChannelContact *to = findChannel(channel); emit privateMessage(from, to, message); } -void IRCContactManager::slotNewPrivMessage(const QString &originating, const QString &user, const QString &message) +void IRCContactManager::slotNewPrivMessage(const TQString &originating, const TQString &user, const TQString &message) { IRCContact *from = findUser(originating); IRCUserContact *to = findUser(user); @@ -112,10 +112,10 @@ void IRCContactManager::unregister(Kopete::Contact *contact) unregisterUser(contact, true); } -QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserContact *contact ) +TQValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserContact *contact ) { - QValueList<IRCChannelContact*> retVal; - for( QDictIterator<IRCChannelContact> it(m_channels); it.current(); ++it ) + TQValueList<IRCChannelContact*> retVal; + for( TQDictIterator<IRCChannelContact> it(m_channels); it.current(); ++it ) { if( it.current()->manager(Kopete::Contact::CannotCreate) ) { @@ -126,7 +126,7 @@ QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserC bool c = true; Kopete::ContactPtrList members = it.current()->manager()->members(); - for( QPtrListIterator<Kopete::Contact> it2( members ); c && it2.current(); ++it2 ) + for( TQPtrListIterator<Kopete::Contact> it2( members ); c && it2.current(); ++it2 ) { if( it2.current() == contact ) { @@ -141,7 +141,7 @@ QValueList<IRCChannelContact*> IRCContactManager::findChannelsByMember( IRCUserC return retVal; } -IRCChannelContact *IRCContactManager::findChannel(const QString &name, Kopete::MetaContact *m) +IRCChannelContact *IRCContactManager::findChannel(const TQString &name, Kopete::MetaContact *m) { IRCChannelContact *channel = m_channels[ name ]; @@ -155,14 +155,14 @@ IRCChannelContact *IRCContactManager::findChannel(const QString &name, Kopete::M channel = new IRCChannelContact(this, name, m); m_channels.insert( name, channel ); - QObject::connect(channel, SIGNAL(contactDestroyed(Kopete::Contact *)), - this, SLOT(unregister(Kopete::Contact *))); + TQObject::connect(channel, TQT_SIGNAL(contactDestroyed(Kopete::Contact *)), + this, TQT_SLOT(unregister(Kopete::Contact *))); } return channel; } -IRCChannelContact *IRCContactManager::existChannel( const QString &channel ) const +IRCChannelContact *IRCContactManager::existChannel( const TQString &channel ) const { return m_channels[ channel ]; } @@ -179,7 +179,7 @@ void IRCContactManager::unregisterChannel(Kopete::Contact *contact, bool force ) } } -IRCUserContact *IRCContactManager::findUser(const QString &name, Kopete::MetaContact *m) +IRCUserContact *IRCContactManager::findUser(const TQString &name, Kopete::MetaContact *m) { IRCUserContact *user = m_users[name.section('!', 0, 0)]; @@ -193,19 +193,19 @@ IRCUserContact *IRCContactManager::findUser(const QString &name, Kopete::MetaCon user = new IRCUserContact(this, name, m); m_users.insert( name, user ); - QObject::connect(user, SIGNAL(contactDestroyed(Kopete::Contact *)), - this, SLOT(unregister(Kopete::Contact *))); + TQObject::connect(user, TQT_SIGNAL(contactDestroyed(Kopete::Contact *)), + this, TQT_SLOT(unregister(Kopete::Contact *))); } return user; } -IRCUserContact *IRCContactManager::existUser( const QString &user ) const +IRCUserContact *IRCContactManager::existUser( const TQString &user ) const { return m_users[user]; } -IRCContact *IRCContactManager::findContact( const QString &id, Kopete::MetaContact *m ) +IRCContact *IRCContactManager::findContact( const TQString &id, Kopete::MetaContact *m ) { if( KIRC::Entity::isChannel(id) ) return findChannel( id, m ); @@ -213,10 +213,10 @@ IRCContact *IRCContactManager::findContact( const QString &id, Kopete::MetaConta return findUser( id, m ); } -IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const QString &id ) +IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const TQString &id ) { - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( IRCProtocol::protocol() ); - QDictIterator<Kopete::Account> it(accounts); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( IRCProtocol::protocol() ); + TQDictIterator<Kopete::Account> it(accounts); for( ; it.current(); ++it ) { IRCAccount *account = (IRCAccount *)it.current(); @@ -226,7 +226,7 @@ IRCContact *IRCContactManager::existContact( const KIRC::Engine *engine, const Q return 0L; } -IRCContact *IRCContactManager::existContact( const QString &id ) const +IRCContact *IRCContactManager::existContact( const TQString &id ) const { if( KIRC::Entity::isChannel(id) ) return existChannel( id ); @@ -249,7 +249,7 @@ void IRCContactManager::unregisterUser(Kopete::Contact *contact, bool force ) void IRCContactManager::slotContactAdded( Kopete::MetaContact *contact ) { - for( QPtrListIterator<Kopete::Contact> it( contact->contacts() ); it.current(); ++it ) + for( TQPtrListIterator<Kopete::Contact> it( contact->contacts() ); it.current(); ++it ) { if( it.current()->account() == m_account ) { @@ -258,7 +258,7 @@ void IRCContactManager::slotContactAdded( Kopete::MetaContact *contact ) } } -void IRCContactManager::addToNotifyList(const QString &nick) +void IRCContactManager::addToNotifyList(const TQString &nick) { if (!m_NotifyList.contains(nick.lower())) { @@ -267,7 +267,7 @@ void IRCContactManager::addToNotifyList(const QString &nick) } } -void IRCContactManager::removeFromNotifyList(const QString &nick) +void IRCContactManager::removeFromNotifyList(const TQString &nick) { if (m_NotifyList.contains(nick.lower())) m_NotifyList.remove(nick.lower()); @@ -279,7 +279,7 @@ void IRCContactManager::checkOnlineNotifyList() { isonRecieved = false; m_account->engine()->ison( m_NotifyList ); - //QTimer::singleShot( socketTimeout, this, SLOT( slotIsonTimeout() ) ); + //TQTimer::singleShot( socketTimeout, this, TQT_SLOT( slotIsonTimeout() ) ); } } diff --git a/kopete/protocols/irc/irccontactmanager.h b/kopete/protocols/irc/irccontactmanager.h index 4a8ae05f..18a30111 100644 --- a/kopete/protocols/irc/irccontactmanager.h +++ b/kopete/protocols/irc/irccontactmanager.h @@ -18,10 +18,10 @@ #ifndef IRCCONTACTMANAGER_H #define IRCCONTACTMANAGER_H -#include <qdict.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdict.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> class IRCContact; class IRCAccount; @@ -57,60 +57,60 @@ class IRCContactManager Q_OBJECT public: - IRCContactManager(const QString &nickName, IRCAccount *account, const char *name=0); + IRCContactManager(const TQString &nickName, IRCAccount *account, const char *name=0); IRCAccount *account() const { return m_account; } IRCServerContact *myServer() const { return m_myServer; } IRCUserContact *mySelf() const { return m_mySelf; } - IRCChannelContact *findChannel(const QString &channel, Kopete::MetaContact *m=0); - IRCChannelContact *existChannel(const QString &channel) const; + IRCChannelContact *findChannel(const TQString &channel, Kopete::MetaContact *m=0); + IRCChannelContact *existChannel(const TQString &channel) const; - IRCUserContact *findUser(const QString &nick, Kopete::MetaContact *m=0); - IRCUserContact *existUser(const QString &nick) const; + IRCUserContact *findUser(const TQString &nick, Kopete::MetaContact *m=0); + IRCUserContact *existUser(const TQString &nick) const; - IRCContact *findContact(const QString &nick, Kopete::MetaContact *m=0); - IRCContact *existContact( const QString &id ) const; + IRCContact *findContact(const TQString &nick, Kopete::MetaContact *m=0); + IRCContact *existContact( const TQString &id ) const; - QValueList<IRCChannelContact*> findChannelsByMember( IRCUserContact *contact ); + TQValueList<IRCChannelContact*> findChannelsByMember( IRCUserContact *contact ); - static IRCContact *existContact(const KIRC::Engine *engine, const QString &nick); + static IRCContact *existContact(const KIRC::Engine *engine, const TQString &nick); public slots: void unregister(Kopete::Contact *contact); void unregisterUser(Kopete::Contact *contact, bool force = false ); void unregisterChannel(Kopete::Contact *contact, bool force = false ); - void addToNotifyList(const QString &nick); - void removeFromNotifyList(const QString &nick); + void addToNotifyList(const TQString &nick); + void removeFromNotifyList(const TQString &nick); void checkOnlineNotifyList(); signals: - void privateMessage(IRCContact *from, IRCContact *to, const QString &message); + void privateMessage(IRCContact *from, IRCContact *to, const TQString &message); private slots: - void slotNewMessage(const QString &originating, const QString &channel, const QString &message); - void slotNewPrivMessage(const QString &originating, const QString &, const QString &message); + void slotNewMessage(const TQString &originating, const TQString &channel, const TQString &message); + void slotNewPrivMessage(const TQString &originating, const TQString &, const TQString &message); void slotIsonRecieved(); void slotIsonTimeout(); - void slotNewNickChange(const QString &oldnick, const QString &newnick); + void slotNewNickChange(const TQString &oldnick, const TQString &newnick); void slotContactAdded( Kopete::MetaContact *contact ); private: - QDict<IRCChannelContact> m_channels; - QDict<IRCUserContact> m_users; + TQDict<IRCChannelContact> m_channels; + TQDict<IRCUserContact> m_users; IRCAccount *m_account; IRCServerContact *m_myServer; IRCUserContact *m_mySelf; - QStringList m_NotifyList; - QTimer *m_NotifyTimer; + TQStringList m_NotifyList; + TQTimer *m_NotifyTimer; bool isonRecieved; int socketTimeout; - static const QRegExp isChannel; + static const TQRegExp isChannel; }; #endif diff --git a/kopete/protocols/irc/ircguiclient.cpp b/kopete/protocols/irc/ircguiclient.cpp index b4c36973..d9d5f8e2 100644 --- a/kopete/protocols/irc/ircguiclient.cpp +++ b/kopete/protocols/irc/ircguiclient.cpp @@ -30,9 +30,9 @@ // ------------------------------------------------------------ #endif -#include <qptrlist.h> +#include <tqptrlist.h> #include <kdebug.h> -#include <qdom.h> +#include <tqdom.h> #include "kopetechatsession.h" #include "kcodecaction.h" @@ -40,7 +40,7 @@ #include "ircaccount.h" #include "irccontact.h" -IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : QObject(parent) , KXMLGUIClient(parent) +IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : TQObject(parent) , KXMLGUIClient(parent) { Kopete::ContactPtrList members = parent->members(); if( members.count() > 0 ) @@ -53,22 +53,22 @@ IRCGUIClient::IRCGUIClient( Kopete::ChatSession *parent ) : QObject(parent) , KX setXMLFile("ircchatui.rc"); unplugActionList( "irccontactactionlist" ); - QPtrList<KAction> *actions = m_user->customContextMenuActions( parent ); + TQPtrList<KAction> *actions = m_user->customContextMenuActions( parent ); plugActionList( "irccontactactionlist", *actions ); delete actions; */ setXMLFile("ircchatui.rc"); - QDomDocument doc = domDocument(); - QDomNode menu = doc.documentElement().firstChild().firstChild(); - QPtrList<KAction> *actions = m_user->customContextMenuActions( parent ); + TQDomDocument doc = domDocument(); + TQDomNode menu = doc.documentElement().firstChild().firstChild(); + TQPtrList<KAction> *actions = m_user->customContextMenuActions( parent ); if( actions ) { for( KAction *a = actions->first(); a; a = actions->next() ) { actionCollection()->insert( a ); - QDomElement newNode = doc.createElement( "Action" ); + TQDomElement newNode = doc.createElement( "Action" ); newNode.setAttribute( "name", a->name() ); menu.appendChild( newNode ); } @@ -92,7 +92,7 @@ IRCGUIClient::~IRCGUIClient() { } -void IRCGUIClient::slotSelectCodec( const QTextCodec *codec ) +void IRCGUIClient::slotSelectCodec( const TQTextCodec *codec ) { m_user->setCodec( codec ); } diff --git a/kopete/protocols/irc/ircguiclient.h b/kopete/protocols/irc/ircguiclient.h index b81aa632..fed65dd4 100644 --- a/kopete/protocols/irc/ircguiclient.h +++ b/kopete/protocols/irc/ircguiclient.h @@ -16,7 +16,7 @@ #ifndef IRCGUICLIENT_H #define IRCGUICLIENT_H -#include <qobject.h> +#include <tqobject.h> #include <kxmlguiclient.h> namespace Kopete { class ChatSession; } @@ -25,7 +25,7 @@ class IRCContact; /** *@author Jason Keirstead */ -class IRCGUIClient : public QObject , public KXMLGUIClient +class IRCGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT public: @@ -33,7 +33,7 @@ class IRCGUIClient : public QObject , public KXMLGUIClient ~IRCGUIClient(); private slots: - void slotSelectCodec( const QTextCodec *codec ); + void slotSelectCodec( const TQTextCodec *codec ); private: IRCContact *m_user; diff --git a/kopete/protocols/irc/ircprotocol.cpp b/kopete/protocols/irc/ircprotocol.cpp index 176c74d7..6112429b 100644 --- a/kopete/protocols/irc/ircprotocol.cpp +++ b/kopete/protocols/irc/ircprotocol.cpp @@ -53,14 +53,14 @@ #include <kstandarddirs.h> #include <kuser.h> -#include <qcheckbox.h> -#include <qdom.h> -#include <qfile.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qspinbox.h> -#include <qvalidator.h> +#include <tqcheckbox.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqspinbox.h> +#include <tqvalidator.h> #include <dom/html_element.h> #include <unistd.h> @@ -72,7 +72,7 @@ IRCProtocol *IRCProtocol::s_protocol = 0L; IRCProtocolHandler::IRCProtocolHandler() : Kopete::MimeTypeHandler( false ) { - registerAsProtocolHandler( QString::fromLatin1("irc") ); + registerAsProtocolHandler( TQString::fromLatin1("irc") ); } void IRCProtocolHandler::handleURL( const KURL &url ) const @@ -85,15 +85,15 @@ void IRCProtocolHandler::handleURL( const KURL &url ) const if( port == 0 ) port = 6667; - QString chan = url.url().section('/',3); + TQString chan = url.url().section('/',3); if( chan.isEmpty() ) return; KUser user( getuid() ); - QString accountId = QString::fromLatin1("%1@%2:%3").arg( + TQString accountId = TQString::fromLatin1("%1@%2:%3").arg( user.loginName(), url.host(), - QString::number(port) + TQString::number(port) ); kdDebug(14120) << accountId << endl; @@ -104,39 +104,39 @@ void IRCProtocolHandler::handleURL( const KURL &url ) const newAccount->connect(); } -IRCProtocol::IRCProtocol( QObject *parent, const char *name, const QStringList & /* args */ ) +IRCProtocol::IRCProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Protocol( IRCProtocolFactory::instance(), parent, name ), m_ServerStatusOnline(Kopete::OnlineStatus::Online, - 100, this, OnlineServer, QString::null, i18n("Online")), + 100, this, OnlineServer, TQString::null, i18n("Online")), m_ServerStatusOffline(Kopete::OnlineStatus::Offline, - 90, this, OfflineServer, QString::null, i18n("Offline")), + 90, this, OfflineServer, TQString::null, i18n("Offline")), m_ChannelStatusOnline(Kopete::OnlineStatus::Online, - 80, this, OnlineChannel, QString::null, i18n("Online")), + 80, this, OnlineChannel, TQString::null, i18n("Online")), m_ChannelStatusOffline(Kopete::OnlineStatus::Offline, - 70, this, OfflineChannel, QString::null, i18n("Offline")), + 70, this, OfflineChannel, TQString::null, i18n("Offline")), m_UserStatusOpVoice(Kopete::OnlineStatus::Online, - 60, this, Online | Operator | Voiced, QStringList::split(' ',"irc_voice irc_op"), i18n("Op")), + 60, this, Online | Operator | Voiced, TQStringList::split(' ',"irc_voice irc_op"), i18n("Op")), m_UserStatusOpVoiceAway(Kopete::OnlineStatus::Away, 55, this, Online | Operator | Voiced | Away, - QStringList::split(' ',"irc_voice irc_op contact_away_overlay"), i18n("Away")), + TQStringList::split(' ',"irc_voice irc_op contact_away_overlay"), i18n("Away")), m_UserStatusOp(Kopete::OnlineStatus::Online, 50, this, Online | Operator, "irc_op", i18n("Op")), m_UserStatusOpAway(Kopete::OnlineStatus::Away, 45, this, Online | Operator | Away, - QStringList::split(' ',"irc_op contact_away_overlay"), i18n("Away")), + TQStringList::split(' ',"irc_op contact_away_overlay"), i18n("Away")), m_UserStatusVoice(Kopete::OnlineStatus::Online, 40, this, Online | Voiced, "irc_voice", i18n("Voice")), m_UserStatusVoiceAway(Kopete::OnlineStatus::Away, 35, this, Online | Voiced | Away, - QStringList::split(' ',"irc_voice contact_away_overlay"), i18n("Away")), + TQStringList::split(' ',"irc_voice contact_away_overlay"), i18n("Away")), m_UserStatusOnline(Kopete::OnlineStatus::Online, - 25, this, Online, QString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online), + 25, this, Online, TQString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online), m_UserStatusAway(Kopete::OnlineStatus::Away, 2, this, Online | Away, "contact_away_overlay", @@ -144,21 +144,21 @@ IRCProtocol::IRCProtocol( QObject *parent, const char *name, const QStringList & m_UserStatusConnecting(Kopete::OnlineStatus::Connecting, 1, this, Connecting, "irc_connecting", i18n("Connecting")), m_UserStatusOffline(Kopete::OnlineStatus::Offline, - 0, this, Offline, QString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline), + 0, this, Offline, TQString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline), m_StatusUnknown(Kopete::OnlineStatus::Unknown, 999, this, 999, "status_unknown", i18n("Status not available")), - propChannelTopic(QString::fromLatin1("channelTopic"), i18n("Topic"), QString::null, false, true ), - propChannelMembers(QString::fromLatin1("channelMembers"), i18n("Members")), - propHomepage(QString::fromLatin1("homePage"), i18n("Home Page")), + propChannelTopic(TQString::fromLatin1("channelTopic"), i18n("Topic"), TQString::null, false, true ), + propChannelMembers(TQString::fromLatin1("channelMembers"), i18n("Members")), + propHomepage(TQString::fromLatin1("homePage"), i18n("Home Page")), propLastSeen(Kopete::Global::Properties::self()->lastSeen()), - propUserInfo(QString::fromLatin1("userInfo"), i18n("IRC User")), - propServer(QString::fromLatin1("ircServer"), i18n("IRC Server")), - propChannels( QString::fromLatin1("ircChannels"), i18n("IRC Channels")), - propHops(QString::fromLatin1("ircHops"), i18n("IRC Hops")), - propFullName(QString::fromLatin1("FormattedName"), i18n("Full Name")), - propIsIdentified(QString::fromLatin1("identifiedUser"), i18n("User Is Authenticated")) + propUserInfo(TQString::fromLatin1("userInfo"), i18n("IRC User")), + propServer(TQString::fromLatin1("ircServer"), i18n("IRC Server")), + propChannels( TQString::fromLatin1("ircChannels"), i18n("IRC Channels")), + propHops(TQString::fromLatin1("ircHops"), i18n("IRC Hops")), + propFullName(TQString::fromLatin1("FormattedName"), i18n("Full Name")), + propIsIdentified(TQString::fromLatin1("identifiedUser"), i18n("User Is Authenticated")) { // kdDebug(14120) << k_funcinfo << endl; @@ -168,129 +168,129 @@ IRCProtocol::IRCProtocol( QObject *parent, const char *name, const QStringList & addAddressBookField("messaging/irc", Kopete::Plugin::MakeIndexField); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("raw"), - SLOT( slotRawCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("raw"), + TQT_SLOT( slotRawCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /raw <text> - Sends the text in raw form to the server."), 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("quote"), - SLOT( slotQuoteCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("quote"), + TQT_SLOT( slotQuoteCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /quote <text> - Sends the text in quoted form to the server."), 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("ctcp"), - SLOT( slotCtcpCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ctcp"), + TQT_SLOT( slotCtcpCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /ctcp <nick> <message> - Send the CTCP message to nick<action>."), 2 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("ping"), - SLOT( slotPingCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ping"), + TQT_SLOT( slotPingCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /ping <nickname> - Alias for /CTCP <nickname> PING."), 1, 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("motd"), - SLOT( slotMotdCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("motd"), + TQT_SLOT( slotMotdCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /motd [<server>] - Shows the message of the day for the current or the given server.") ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("list"), - SLOT( slotListCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("list"), + TQT_SLOT( slotListCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /list - List the public channels on the server.") ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("join"), - SLOT( slotJoinCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("join"), + TQT_SLOT( slotJoinCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /join <#channel 1> [<password>] - Joins the specified channel."), 1, 2 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("topic"), - SLOT( slotTopicCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("topic"), + TQT_SLOT( slotTopicCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /topic [<topic>] - Sets and/or displays the topic for the active channel.") ); //FIXME: Update help text - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("whois"), - SLOT( slotWhoisCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("whois"), + TQT_SLOT( slotWhoisCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /whois <nickname> - Display whois info on this user."), 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("whowas"), - SLOT( slotWhoWasCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("whowas"), + TQT_SLOT( slotWhoWasCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /whowas <nickname> - Display whowas info on this user."), 1, 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("who"), - SLOT( slotWhoCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("who"), + TQT_SLOT( slotWhoCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /who <nickname|channel> - Display who info on this user/channel."), 1, 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("query"), - SLOT( slotQueryCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("query"), + TQT_SLOT( slotQueryCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /query <nickname> [<message>] - Open a private chat with this user."), 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("mode"), - SLOT( slotModeCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("mode"), + TQT_SLOT( slotModeCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /mode <channel> <modes> - Set modes on the given channel."), 2 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("nick"), - SLOT( slotNickCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("nick"), + TQT_SLOT( slotNickCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /nick <nickname> - Change your nickname to the given one."), 1, 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("me"), - SLOT( slotMeCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("me"), + TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /me <action> - Do something."), 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("ame"), - SLOT( slotAllMeCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ame"), + TQT_SLOT( slotAllMeCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /ame <action> - Do something in every open chat."), 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("kick"), - SLOT( slotKickCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("kick"), + TQT_SLOT( slotKickCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /kick <nickname> [<reason>] - Kick someone from the channel (requires operator status).") , 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("ban"), - SLOT( slotBanCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("ban"), + TQT_SLOT( slotBanCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /ban <mask> - Add someone to this channel's ban list. (requires operator status)."), 1, 1 ); - Kopete::CommandHandler::commandHandler()->registerAlias( this, QString::fromLatin1("bannick"), - QString::fromLatin1("ban %1!*@*"), + Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("bannick"), + TQString::fromLatin1("ban %1!*@*"), i18n("USAGE: /bannick <nickname> - Add someone to this channel's ban list. Uses the hostmask nickname!*@* (requires operator status)."), Kopete::CommandHandler::SystemAlias, 1, 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("op"), - SLOT( slotOpCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("op"), + TQT_SLOT( slotOpCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /op <nickname 1> [<nickname 2> <...>] - Give channel operator status to someone (requires operator status)."), 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("deop"), - SLOT( slotDeopCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("deop"), + TQT_SLOT( slotDeopCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /deop <nickname> [<nickname 2> <...>]- Remove channel operator status from someone (requires operator status)."), 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("voice"), - SLOT( slotVoiceCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("voice"), + TQT_SLOT( slotVoiceCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /voice <nickname> [<nickname 2> <...>]- Give channel voice status to someone (requires operator status)."), 1); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("devoice"), - SLOT( slotDevoiceCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("devoice"), + TQT_SLOT( slotDevoiceCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /devoice <nickname> [<nickname 2> <...>]- Remove channel voice status from someone (requires operator status)."), 1 ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("quit"), - SLOT( slotQuitCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("quit"), + TQT_SLOT( slotQuitCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /quit [<reason>] - Disconnect from IRC, optionally leaving a message.") ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("part"), - SLOT( slotPartCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("part"), + TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /part [<reason>] - Part from a channel, optionally leaving a message.") ); - Kopete::CommandHandler::commandHandler()->registerCommand( this, QString::fromLatin1("invite"), - SLOT( slotInviteCommand( const QString &, Kopete::ChatSession*) ), + Kopete::CommandHandler::commandHandler()->registerCommand( this, TQString::fromLatin1("invite"), + TQT_SLOT( slotInviteCommand( const TQString &, Kopete::ChatSession*) ), i18n("USAGE: /invite <nickname> [<channel>] - Invite a user to join a channel."), 1 ); - Kopete::CommandHandler::commandHandler()->registerAlias( this, QString::fromLatin1("j"), - QString::fromLatin1("join %1"), + Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("j"), + TQString::fromLatin1("join %1"), i18n("USAGE: /j <#channel 1> [<password>] - Alias for JOIN."), Kopete::CommandHandler::SystemAlias, 1, 2 ); - Kopete::CommandHandler::commandHandler()->registerAlias( this, QString::fromLatin1("msg"), - QString::fromLatin1("query %s"), + Kopete::CommandHandler::commandHandler()->registerAlias( this, TQString::fromLatin1("msg"), + TQString::fromLatin1("query %s"), i18n("USAGE: /msg <nickname> [<message>] - Alias for QUERY <nickname> <message>."), Kopete::CommandHandler::SystemAlias, 1 ); - QObject::connect( Kopete::ChatSessionManager::self(), SIGNAL(aboutToDisplay(Kopete::Message &)), - this, SLOT(slotMessageFilter(Kopete::Message &)) ); + TQObject::connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL(aboutToDisplay(Kopete::Message &)), + this, TQT_SLOT(slotMessageFilter(Kopete::Message &)) ); - QObject::connect( Kopete::ChatSessionManager::self(), SIGNAL( viewCreated( KopeteView* ) ), - this, SLOT( slotViewCreated( KopeteView* ) ) ); + TQObject::connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( viewCreated( KopeteView* ) ), + this, TQT_SLOT( slotViewCreated( KopeteView* ) ) ); setCapabilities( Kopete::Protocol::RichBFormatting | Kopete::Protocol::RichUFormatting | Kopete::Protocol::RichColor ); @@ -373,16 +373,16 @@ void IRCProtocol::slotMessageFilter( Kopete::Message &msg ) { if( msg.from()->protocol() == this ) { - QString messageText = msg.escapedBody(); + TQString messageText = msg.escapedBody(); //Add right click for channels, only replace text not in HTML tags - messageText.replace( QRegExp( QString::fromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), QString::fromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") ); + messageText.replace( TQRegExp( TQString::fromLatin1("(?![^<]+>)(#[^#\\s]+)(?![^<]+>)") ), TQString::fromLatin1("<span class=\"KopeteLink\" type=\"IRCChannel\">\\1</span>") ); msg.setBody( messageText, Kopete::Message::RichText ); } } -QPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Message &m, DOM::Node &n ) +TQPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Message &m, DOM::Node &n ) { DOM::HTMLElement e = n; @@ -391,7 +391,7 @@ QPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Mess { activeNode = n; activeAccount = static_cast<IRCAccount*>( m.from()->account() ); - if( e.getAttribute( QString::fromLatin1("type") ) == QString::fromLatin1("IRCChannel") ) + if( e.getAttribute( TQString::fromLatin1("type") ) == TQString::fromLatin1("IRCChannel") ) return activeAccount->contactManager()->findChannel( e.innerText().string() )->customContextMenuActions(); } @@ -399,33 +399,33 @@ QPtrList<KAction> *IRCProtocol::customChatWindowPopupActions( const Kopete::Mess return 0L; } -AddContactPage *IRCProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account) +AddContactPage *IRCProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account) { return new IRCAddContactPage(parent,static_cast<IRCAccount*>(account)); } -KopeteEditAccountWidget *IRCProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *IRCProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new IRCEditAccountWidget(this, static_cast<IRCAccount*>(account),parent); } -Kopete::Account *IRCProtocol::createNewAccount(const QString &accountId) +Kopete::Account *IRCProtocol::createNewAccount(const TQString &accountId) { return new IRCAccount( this, accountId ); } -Kopete::Contact *IRCProtocol::deserializeContact( Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData, - const QMap<QString, QString> & /* addressBookData */ ) +Kopete::Contact *IRCProtocol::deserializeContact( Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> & /* addressBookData */ ) { kdDebug(14120) << k_funcinfo << endl; - QString contactId = serializedData[ "contactId" ]; - QString displayName = serializedData[ "displayName" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString displayName = serializedData[ "displayName" ]; if( displayName.isEmpty() ) displayName = contactId; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); if( !accounts.isEmpty() ) { Kopete::Account *a = accounts[ serializedData[ "accountId" ] ]; @@ -444,7 +444,7 @@ Kopete::Contact *IRCProtocol::deserializeContact( Kopete::MetaContact *metaConta return 0; } -void IRCProtocol::slotRawCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotRawCommand( const TQString &args, Kopete::ChatSession *manager ) { IRCAccount *account = static_cast<IRCAccount*>( manager->account() ); @@ -459,7 +459,7 @@ void IRCProtocol::slotRawCommand( const QString &args, Kopete::ChatSession *mana } } -void IRCProtocol::slotQuoteCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotQuoteCommand( const TQString &args, Kopete::ChatSession *manager ) { IRCAccount *account = static_cast<IRCAccount*>( manager->account() ); @@ -474,34 +474,34 @@ void IRCProtocol::slotQuoteCommand( const QString &args, Kopete::ChatSession *ma } } -void IRCProtocol::slotCtcpCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotCtcpCommand( const TQString &args, Kopete::ChatSession *manager ) { if( !args.isEmpty() ) { - QString user = args.section( ' ', 0, 0 ); - QString message = args.section( ' ', 1 ); - static_cast<IRCAccount*>( manager->account() )->engine()->writeCtcpQueryMessage( user, QString::null, message ); + TQString user = args.section( ' ', 0, 0 ); + TQString message = args.section( ' ', 1 ); + static_cast<IRCAccount*>( manager->account() )->engine()->writeCtcpQueryMessage( user, TQString::null, message ); } } -void IRCProtocol::slotMotdCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotMotdCommand( const TQString &args, Kopete::ChatSession *manager ) { - QStringList argsList = Kopete::CommandHandler::parseArguments( args ); + TQStringList argsList = Kopete::CommandHandler::parseArguments( args ); static_cast<IRCAccount*>( manager->account() )->engine()->motd(argsList.front()); } -void IRCProtocol::slotPingCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotPingCommand( const TQString &args, Kopete::ChatSession *manager ) { - QStringList argsList = Kopete::CommandHandler::parseArguments(args); + TQStringList argsList = Kopete::CommandHandler::parseArguments(args); static_cast<IRCAccount*>( manager->account() )->engine()->CtcpRequest_ping(argsList.front()); } -void IRCProtocol::slotListCommand( const QString &/*args*/, Kopete::ChatSession *manager ) +void IRCProtocol::slotListCommand( const TQString &/*args*/, Kopete::ChatSession *manager ) { static_cast<IRCAccount*>( manager->account() )->listChannels(); } -void IRCProtocol::slotTopicCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotTopicCommand( const TQString &args, Kopete::ChatSession *manager ) { Kopete::ContactPtrList members = manager->members(); IRCChannelContact *chan = dynamic_cast<IRCChannelContact*>( members.first() ); @@ -512,7 +512,7 @@ void IRCProtocol::slotTopicCommand( const QString &args, Kopete::ChatSession *ma else { static_cast<IRCAccount*>(manager->account())->engine()-> - writeRawMessage(QString::fromLatin1("TOPIC %1").arg(chan->nickName())); + writeRawMessage(TQString::fromLatin1("TOPIC %1").arg(chan->nickName())); } } else @@ -522,9 +522,9 @@ void IRCProtocol::slotTopicCommand( const QString &args, Kopete::ChatSession *ma } } -void IRCProtocol::slotJoinCommand( const QString &arg, Kopete::ChatSession *manager ) +void IRCProtocol::slotJoinCommand( const TQString &arg, Kopete::ChatSession *manager ) { - QStringList args = Kopete::CommandHandler::parseArguments( arg ); + TQStringList args = Kopete::CommandHandler::parseArguments( arg ); if( KIRC::Entity::isChannel(args[0]) ) { IRCChannelContact *chan = static_cast<IRCAccount*>( manager->account() )->contactManager()->findChannel( args[0] ); @@ -540,10 +540,10 @@ void IRCProtocol::slotJoinCommand( const QString &arg, Kopete::ChatSession *mana } } -void IRCProtocol::slotInviteCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotInviteCommand( const TQString &args, Kopete::ChatSession *manager ) { IRCChannelContact *c = 0L; - QStringList argsList = Kopete::CommandHandler::parseArguments( args ); + TQStringList argsList = Kopete::CommandHandler::parseArguments( args ); if( argsList.count() > 1 ) { @@ -568,7 +568,7 @@ void IRCProtocol::slotInviteCommand( const QString &args, Kopete::ChatSession *m if( c && c->manager()->contactOnlineStatus( manager->myself() ) == m_UserStatusOp ) { static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage( - QString::fromLatin1("INVITE %1 %2").arg( argsList[0] ). + TQString::fromLatin1("INVITE %1 %2").arg( argsList[0] ). arg( c->nickName() ) ); } @@ -579,10 +579,10 @@ void IRCProtocol::slotInviteCommand( const QString &args, Kopete::ChatSession *m } } -void IRCProtocol::slotQueryCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotQueryCommand( const TQString &args, Kopete::ChatSession *manager ) { - QString user = args.section( ' ', 0, 0 ); - QString rest = args.section( ' ', 1 ); + TQString user = args.section( ' ', 0, 0 ); + TQString rest = args.section( ' ', 1 ); if( !KIRC::Entity::isChannel(user) ) { @@ -604,47 +604,47 @@ void IRCProtocol::slotQueryCommand( const QString &args, Kopete::ChatSession *ma } } -void IRCProtocol::slotWhoisCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotWhoisCommand( const TQString &args, Kopete::ChatSession *manager ) { static_cast<IRCAccount*>( manager->account() )->engine()->whois( args ); static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager ); } -void IRCProtocol::slotWhoCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotWhoCommand( const TQString &args, Kopete::ChatSession *manager ) { - QStringList argsList = Kopete::CommandHandler::parseArguments( args ); + TQStringList argsList = Kopete::CommandHandler::parseArguments( args ); static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage( - QString::fromLatin1("WHO %1").arg( argsList.first() ) ); + TQString::fromLatin1("WHO %1").arg( argsList.first() ) ); static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager ); } -void IRCProtocol::slotWhoWasCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotWhoWasCommand( const TQString &args, Kopete::ChatSession *manager ) { - QStringList argsList = Kopete::CommandHandler::parseArguments( args ); + TQStringList argsList = Kopete::CommandHandler::parseArguments( args ); static_cast<IRCAccount*>( manager->account() )->engine()->writeMessage( - QString::fromLatin1("WHOWAS %1").arg( argsList.first() ) ); + TQString::fromLatin1("WHOWAS %1").arg( argsList.first() ) ); static_cast<IRCAccount*>( manager->account() )->setCurrentCommandSource( manager ); } -void IRCProtocol::slotQuitCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotQuitCommand( const TQString &args, Kopete::ChatSession *manager ) { static_cast<IRCAccount*>( manager->account() )->quit( args ); } -void IRCProtocol::slotNickCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotNickCommand( const TQString &args, Kopete::ChatSession *manager ) { - QStringList argsList = Kopete::CommandHandler::parseArguments( args ); + TQStringList argsList = Kopete::CommandHandler::parseArguments( args ); static_cast<IRCAccount*>( manager->account() )->engine()->nick( argsList.front() ); } -void IRCProtocol::slotModeCommand(const QString &args, Kopete::ChatSession *manager) +void IRCProtocol::slotModeCommand(const TQString &args, Kopete::ChatSession *manager) { - QStringList argsList = Kopete::CommandHandler::parseArguments( args ); + TQStringList argsList = Kopete::CommandHandler::parseArguments( args ); static_cast<IRCAccount*>( manager->account() )->engine()->mode( argsList.front(), - args.section( QRegExp(QString::fromLatin1("\\s+")), 1 ) ); + args.section( TQRegExp(TQString::fromLatin1("\\s+")), 1 ) ); } -void IRCProtocol::slotMeCommand(const QString &args, Kopete::ChatSession *manager) +void IRCProtocol::slotMeCommand(const TQString &args, Kopete::ChatSession *manager) { Kopete::ContactPtrList members = manager->members(); static_cast<IRCAccount*>( manager->account() )->engine()->CtcpRequest_action( @@ -652,11 +652,11 @@ void IRCProtocol::slotMeCommand(const QString &args, Kopete::ChatSession *manage ); } -void IRCProtocol::slotAllMeCommand(const QString &args, Kopete::ChatSession *) +void IRCProtocol::slotAllMeCommand(const TQString &args, Kopete::ChatSession *) { - QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); - for( QValueList<Kopete::ChatSession*>::iterator it = sessions.begin(); it != sessions.end(); ++it ) + for( TQValueList<Kopete::ChatSession*>::iterator it = sessions.begin(); it != sessions.end(); ++it ) { Kopete::ChatSession *session = *it; if( session->protocol() == this ) @@ -664,15 +664,15 @@ void IRCProtocol::slotAllMeCommand(const QString &args, Kopete::ChatSession *) } } -void IRCProtocol::slotKickCommand(const QString &args, Kopete::ChatSession *manager) +void IRCProtocol::slotKickCommand(const TQString &args, Kopete::ChatSession *manager) { if (manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp) { - QRegExp spaces(QString::fromLatin1("\\s+")); - QString nick = args.section( spaces, 0, 0); - QString reason = args.section( spaces, 1); + TQRegExp spaces(TQString::fromLatin1("\\s+")); + TQString nick = args.section( spaces, 0, 0); + TQString reason = args.section( spaces, 1); Kopete::ContactPtrList members = manager->members(); - QString channel = static_cast<IRCContact*>( members.first() )->nickName(); + TQString channel = static_cast<IRCContact*>( members.first() )->nickName(); if (KIRC::Entity::isChannel(channel)) static_cast<IRCAccount*>(manager->account())->engine()->kick(nick, channel, reason); } @@ -683,15 +683,15 @@ void IRCProtocol::slotKickCommand(const QString &args, Kopete::ChatSession *mana } } -void IRCProtocol::slotBanCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotBanCommand( const TQString &args, Kopete::ChatSession *manager ) { if( manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp ) { - QStringList argsList = Kopete::CommandHandler::parseArguments( args ); + TQStringList argsList = Kopete::CommandHandler::parseArguments( args ); Kopete::ContactPtrList members = manager->members(); IRCChannelContact *chan = static_cast<IRCChannelContact*>( members.first() ); if( chan && chan->locateUser( argsList.front() ) ) - chan->setMode( QString::fromLatin1("+b %1").arg( argsList.front() ) ); + chan->setMode( TQString::fromLatin1("+b %1").arg( argsList.front() ) ); } else { @@ -700,9 +700,9 @@ void IRCProtocol::slotBanCommand( const QString &args, Kopete::ChatSession *mana } } -void IRCProtocol::slotPartCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotPartCommand( const TQString &args, Kopete::ChatSession *manager ) { - QStringList argsList = Kopete::CommandHandler::parseArguments(args); + TQStringList argsList = Kopete::CommandHandler::parseArguments(args); Kopete::ContactPtrList members = manager->members(); IRCChannelContact *chan = static_cast<IRCChannelContact*>(members.first()); @@ -722,39 +722,39 @@ void IRCProtocol::slotPartCommand( const QString &args, Kopete::ChatSession *man } } -void IRCProtocol::slotOpCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotOpCommand( const TQString &args, Kopete::ChatSession *manager ) { - simpleModeChange( args, manager, QString::fromLatin1("+o") ); + simpleModeChange( args, manager, TQString::fromLatin1("+o") ); } -void IRCProtocol::slotDeopCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotDeopCommand( const TQString &args, Kopete::ChatSession *manager ) { - simpleModeChange( args, manager, QString::fromLatin1("-o") ); + simpleModeChange( args, manager, TQString::fromLatin1("-o") ); } -void IRCProtocol::slotVoiceCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotVoiceCommand( const TQString &args, Kopete::ChatSession *manager ) { - simpleModeChange( args, manager, QString::fromLatin1("+v") ); + simpleModeChange( args, manager, TQString::fromLatin1("+v") ); } -void IRCProtocol::slotDevoiceCommand( const QString &args, Kopete::ChatSession *manager ) +void IRCProtocol::slotDevoiceCommand( const TQString &args, Kopete::ChatSession *manager ) { - simpleModeChange( args, manager, QString::fromLatin1("-v") ); + simpleModeChange( args, manager, TQString::fromLatin1("-v") ); } -void IRCProtocol::simpleModeChange( const QString &args, Kopete::ChatSession *manager, const QString &mode ) +void IRCProtocol::simpleModeChange( const TQString &args, Kopete::ChatSession *manager, const TQString &mode ) { if( manager->contactOnlineStatus( manager->myself() ) == m_UserStatusOp ) { - QStringList argsList = Kopete::CommandHandler::parseArguments( args ); + TQStringList argsList = Kopete::CommandHandler::parseArguments( args ); Kopete::ContactPtrList members = manager->members(); IRCChannelContact *chan = static_cast<IRCChannelContact*>( members.first() ); if( chan ) { - for( QStringList::iterator it = argsList.begin(); it != argsList.end(); ++it ) + for( TQStringList::iterator it = argsList.begin(); it != argsList.end(); ++it ) { if( chan->locateUser( *it ) ) - chan->setMode( QString::fromLatin1("%1 %2").arg( mode ).arg( *it ) ); + chan->setMode( TQString::fromLatin1("%1 %2").arg( mode ).arg( *it ) ); } } } @@ -765,37 +765,37 @@ void IRCProtocol::simpleModeChange( const QString &args, Kopete::ChatSession *ma } } -void IRCProtocol::editNetworks( const QString &networkName ) +void IRCProtocol::editNetworks( const TQString &networkName ) { if( !netConf ) { netConf = new NetworkConfig( Kopete::UI::Global::mainWidget(), "network_config", true ); - netConf->host->setValidator( new QRegExpValidator( QString::fromLatin1("^[\\w-\\.]*$"), netConf ) ); + netConf->host->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[\\w-\\.]*$"), netConf ) ); netConf->upButton->setIconSet( SmallIconSet( "up" ) ); netConf->downButton->setIconSet( SmallIconSet( "down" ) ); - connect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) ); - connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); - connect( netConf, SIGNAL( accepted() ), this, SLOT( slotSaveNetworkConfig() ) ); - connect( netConf, SIGNAL( rejected() ), this, SLOT( slotReadNetworks() ) ); - connect( netConf->upButton, SIGNAL( clicked() ), this, SLOT( slotMoveServerUp() ) ); - connect( netConf->downButton, SIGNAL( clicked() ), this, SLOT( slotMoveServerDown() ) ); - connect( netConf->removeNetwork, SIGNAL( clicked() ), this, SLOT( slotDeleteNetwork() ) ); - connect( netConf->removeHost, SIGNAL( clicked() ), this, SLOT( slotDeleteHost() ) ); - connect( netConf->newHost, SIGNAL( clicked() ), this, SLOT( slotNewHost() ) ); - connect( netConf->newNetwork, SIGNAL( clicked() ), this, SLOT( slotNewNetwork() ) ); - connect( netConf->renameNetwork, SIGNAL( clicked() ), this, SLOT( slotRenameNetwork() ) ); - connect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) ); - connect( netConf->networkList, SIGNAL( doubleClicked ( QListBoxItem * )), SLOT(slotRenameNetwork())); + connect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) ); + connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); + connect( netConf, TQT_SIGNAL( accepted() ), this, TQT_SLOT( slotSaveNetworkConfig() ) ); + connect( netConf, TQT_SIGNAL( rejected() ), this, TQT_SLOT( slotReadNetworks() ) ); + connect( netConf->upButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveServerUp() ) ); + connect( netConf->downButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveServerDown() ) ); + connect( netConf->removeNetwork, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDeleteNetwork() ) ); + connect( netConf->removeHost, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDeleteHost() ) ); + connect( netConf->newHost, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNewHost() ) ); + connect( netConf->newNetwork, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNewNetwork() ) ); + connect( netConf->renameNetwork, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRenameNetwork() ) ); + connect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) ); + connect( netConf->networkList, TQT_SIGNAL( doubleClicked ( TQListBoxItem * )), TQT_SLOT(slotRenameNetwork())); } - disconnect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) ); - disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); + disconnect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) ); + disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); netConf->networkList->clear(); - for( QDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it ) + for( TQDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it ) { IRCNetwork *net = it.current(); netConf->networkList->insertItem( net->name ); @@ -803,8 +803,8 @@ void IRCProtocol::editNetworks( const QString &networkName ) netConf->networkList->sort(); - connect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) ); - connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); + connect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) ); + connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); if( !networkName.isEmpty() ) netConf->networkList->setSelected( netConf->networkList->findItem( networkName ), true ); @@ -826,14 +826,14 @@ void IRCProtocol::slotUpdateNetworkConfig() netConf->description->setText( net->description ); netConf->hostList->clear(); - for( QValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it ) - netConf->hostList->insertItem( (*it)->host + QString::fromLatin1(":") + QString::number((*it)->port) ); + for( TQValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it ) + netConf->hostList->insertItem( (*it)->host + TQString::fromLatin1(":") + TQString::number((*it)->port) ); // prevent nested event loop crash - disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); + disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); netConf->hostList->setSelected( 0, true ); slotUpdateNetworkHostConfig(); - connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); + connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); } // record the current selection @@ -871,11 +871,11 @@ void IRCProtocol::storeCurrentHost() void IRCProtocol::slotHostPortChanged( int value ) { - QString entryText = m_uiCurrentHostSelection + QString::fromLatin1(":") + QString::number( value ); + TQString entryText = m_uiCurrentHostSelection + TQString::fromLatin1(":") + TQString::number( value ); // changeItem causes a take() and insert, and we don't want a selectionChanged() signal that sets all this off again. - disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); + disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); netConf->hostList->changeItem( entryText, netConf->hostList->currentItem() ); - connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); + connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); } void IRCProtocol::slotUpdateNetworkHostConfig() @@ -891,9 +891,9 @@ void IRCProtocol::slotUpdateNetworkHostConfig() { netConf->host->setText( host->host ); netConf->password->setText( host->password ); - disconnect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) ); + disconnect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) ); netConf->port->setValue( host->port ); - connect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) ); + connect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) ); netConf->useSSL->setChecked( host->ssl ); netConf->upButton->setEnabled( netConf->hostList->currentItem() > 0 ); @@ -902,29 +902,29 @@ void IRCProtocol::slotUpdateNetworkHostConfig() } else { - m_uiCurrentHostSelection = QString(); - disconnect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) ); + m_uiCurrentHostSelection = TQString(); + disconnect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) ); netConf->host->clear(); netConf->password->clear(); netConf->port->setValue( 6667 ); netConf->useSSL->setChecked( false ); - connect( netConf->port, SIGNAL( valueChanged( int ) ), this, SLOT( slotHostPortChanged( int ) ) ); + connect( netConf->port, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHostPortChanged( int ) ) ); } } void IRCProtocol::slotDeleteNetwork() { - QString network = netConf->networkList->currentText(); + TQString network = netConf->networkList->currentText(); if( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n("<qt>Are you sure you want to delete the network <b>%1</b>?<br>" "Any accounts which use this network will have to be modified.</qt>") .arg(network), i18n("Deleting Network"), - KGuiItem(i18n("&Delete Network"),"editdelete"), QString::fromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue ) + KGuiItem(i18n("&Delete Network"),"editdelete"), TQString::fromLatin1("AskIRCDeleteNetwork") ) == KMessageBox::Continue ) { - disconnect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) ); - disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); + disconnect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) ); + disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); IRCNetwork *net = m_networks[ network ]; - for( QValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it ) + for( TQValueList<IRCHost*>::iterator it = net->hosts.begin(); it != net->hosts.end(); ++it ) { m_hosts.remove( (*it)->host ); delete (*it); @@ -932,8 +932,8 @@ void IRCProtocol::slotDeleteNetwork() m_networks.remove( network ); delete net; netConf->networkList->removeItem( netConf->networkList->currentItem() ); - connect( netConf->networkList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkConfig() ) ); - connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); + connect( netConf->networkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkConfig() ) ); + connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); slotUpdateNetworkHostConfig(); } @@ -941,20 +941,20 @@ void IRCProtocol::slotDeleteNetwork() void IRCProtocol::slotDeleteHost() { - QString hostName = netConf->host->text(); + TQString hostName = netConf->host->text(); if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n("<qt>Are you sure you want to delete the host <b>%1</b>?</qt>") .arg(hostName), i18n("Deleting Host"), - KGuiItem(i18n("&Delete Host"),"editdelete"), QString::fromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue ) + KGuiItem(i18n("&Delete Host"),"editdelete"), TQString::fromLatin1("AskIRCDeleteHost")) == KMessageBox::Continue ) { IRCHost *host = m_hosts[ hostName ]; if ( host ) { - disconnect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); - QString entryText = host->host + QString::fromLatin1(":") + QString::number(host->port); - QListBoxItem * justAdded = netConf->hostList->findItem( entryText ); + disconnect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); + TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port); + TQListBoxItem * justAdded = netConf->hostList->findItem( entryText ); netConf->hostList->removeItem( netConf->hostList->index( justAdded ) ); - connect( netConf->hostList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateNetworkHostConfig() ) ); + connect( netConf->hostList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateNetworkHostConfig() ) ); // remove from network as well IRCNetwork *net = m_networks[ m_uiCurrentNetworkSelection ]; @@ -971,12 +971,12 @@ void IRCProtocol::slotNewNetwork() // create a new network struct IRCNetwork *net = new IRCNetwork; // give it the name of 'New Network' (incrementing number if needed) - QString netName = QString::fromLatin1( "New Network" ); + TQString netName = TQString::fromLatin1( "New Network" ); if ( m_networks.find( netName ) ) { int newIdx = 1; do { - netName = QString::fromLatin1( "New Network #%1" ).arg( newIdx++ ); + netName = TQString::fromLatin1( "New Network #%1" ).arg( newIdx++ ); } while ( m_networks.find( netName ) && newIdx < 100 ); if ( newIdx == 100 ) // pathological case @@ -986,7 +986,7 @@ void IRCProtocol::slotNewNetwork() // and add it to the networks dict and list m_networks.insert( net->name, net ); netConf->networkList->insertItem( net->name ); - QListBoxItem * justAdded = netConf->networkList->findItem( net->name ); + TQListBoxItem * justAdded = netConf->networkList->findItem( net->name ); netConf->networkList->setSelected( justAdded, true ); netConf->networkList->setBottomItem( netConf->networkList->index( justAdded ) ); } @@ -997,10 +997,10 @@ void IRCProtocol::slotNewHost() IRCHost *host = new IRCHost; // prompt for a name bool ok; - QString name = KInputDialog::getText( + TQString name = KInputDialog::getText( i18n("New Host"), i18n("Enter the hostname of the new server:"), - QString::null, &ok, Kopete::UI::Global::mainWidget() ); + TQString::null, &ok, Kopete::UI::Global::mainWidget() ); if ( ok ) { // dupe check @@ -1019,10 +1019,10 @@ void IRCProtocol::slotNewHost() IRCNetwork *net = m_networks[ netConf->networkList->currentText() ]; net->hosts.append( host ); // add it to the gui - QString entryText = host->host + QString::fromLatin1(":") + QString::number(host->port); + TQString entryText = host->host + TQString::fromLatin1(":") + TQString::number(host->port); netConf->hostList->insertItem( entryText ); // select it in the gui - QListBoxItem * justAdded = netConf->hostList->findItem( entryText ); + TQListBoxItem * justAdded = netConf->hostList->findItem( entryText ); netConf->hostList->setSelected( justAdded, true ); //netConf->hostList->setBottomItem( netConf->hostList->index( justAdded ) ); } @@ -1035,7 +1035,7 @@ void IRCProtocol::slotRenameNetwork() { bool ok; // popup up a dialog containing the current name - QString name = KInputDialog::getText( + TQString name = KInputDialog::getText( i18n("Rename Network"), i18n("Enter the new name for this network:"), m_uiCurrentNetworkSelection, &ok, @@ -1078,43 +1078,43 @@ void IRCProtocol::slotSaveNetworkConfig() kdDebug( 14120 ) << k_funcinfo << m_uiCurrentHostSelection << endl; storeCurrentHost(); - QDomDocument doc("irc-networks"); - QDomNode root = doc.appendChild( doc.createElement("networks") ); + TQDomDocument doc("irc-networks"); + TQDomNode root = doc.appendChild( doc.createElement("networks") ); - for( QDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it ) + for( TQDictIterator<IRCNetwork> it( m_networks ); it.current(); ++it ) { IRCNetwork *net = it.current(); - QDomNode networkNode = root.appendChild( doc.createElement("network") ); - QDomNode nameNode = networkNode.appendChild( doc.createElement("name") ); + TQDomNode networkNode = root.appendChild( doc.createElement("network") ); + TQDomNode nameNode = networkNode.appendChild( doc.createElement("name") ); nameNode.appendChild( doc.createTextNode( net->name ) ); - QDomNode descNode = networkNode.appendChild( doc.createElement("description") ); + TQDomNode descNode = networkNode.appendChild( doc.createElement("description") ); descNode.appendChild( doc.createTextNode( net->description ) ); - QDomNode serversNode = networkNode.appendChild( doc.createElement("servers") ); + TQDomNode serversNode = networkNode.appendChild( doc.createElement("servers") ); - for( QValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 ) + for( TQValueList<IRCHost*>::iterator it2 = net->hosts.begin(); it2 != net->hosts.end(); ++it2 ) { - QDomNode serverNode = serversNode.appendChild( doc.createElement("server") ); + TQDomNode serverNode = serversNode.appendChild( doc.createElement("server") ); - QDomNode hostNode = serverNode.appendChild( doc.createElement("host") ); + TQDomNode hostNode = serverNode.appendChild( doc.createElement("host") ); hostNode.appendChild( doc.createTextNode( (*it2)->host ) ); - QDomNode portNode = serverNode.appendChild( doc.createElement("port" ) ); - portNode.appendChild( doc.createTextNode( QString::number( (*it2)->port ) ) ); + TQDomNode portNode = serverNode.appendChild( doc.createElement("port" ) ); + portNode.appendChild( doc.createTextNode( TQString::number( (*it2)->port ) ) ); - QDomNode sslNode = serverNode.appendChild( doc.createElement("useSSL") ); + TQDomNode sslNode = serverNode.appendChild( doc.createElement("useSSL") ); sslNode.appendChild( doc.createTextNode( (*it2)->ssl ? "true" : "false" ) ); } } // kdDebug(14121) << k_funcinfo << doc.toString(4) << endl; - QFile xmlFile( locateLocal( "appdata", "ircnetworks.xml" ) ); + TQFile xmlFile( locateLocal( "appdata", "ircnetworks.xml" ) ); if (xmlFile.open(IO_WriteOnly)) { - QTextStream stream(&xmlFile); + TQTextStream stream(&xmlFile); stream << doc.toString(4); xmlFile.close(); } @@ -1130,17 +1130,17 @@ void IRCProtocol::slotReadNetworks() m_networks.clear(); m_hosts.clear(); - QFile xmlFile( locate( "appdata", "ircnetworks.xml" ) ); + TQFile xmlFile( locate( "appdata", "ircnetworks.xml" ) ); xmlFile.open( IO_ReadOnly ); - QDomDocument doc; + TQDomDocument doc; doc.setContent( &xmlFile ); - QDomElement networkNode = doc.documentElement().firstChild().toElement(); + TQDomElement networkNode = doc.documentElement().firstChild().toElement(); while( !networkNode.isNull () ) { IRCNetwork *net = new IRCNetwork; - QDomElement networkChild = networkNode.firstChild().toElement(); + TQDomElement networkChild = networkNode.firstChild().toElement(); while( !networkChild.isNull() ) { if( networkChild.tagName() == "name" ) @@ -1149,12 +1149,12 @@ void IRCProtocol::slotReadNetworks() net->description = networkChild.text(); else if( networkChild.tagName() == "servers" ) { - QDomElement server = networkChild.firstChild().toElement(); + TQDomElement server = networkChild.firstChild().toElement(); while( !server.isNull() ) { IRCHost *host = new IRCHost; - QDomElement serverChild = server.firstChild().toElement(); + TQDomElement serverChild = server.firstChild().toElement(); while( !serverChild.isNull() ) { if( serverChild.tagName() == "host" ) @@ -1190,10 +1190,10 @@ void IRCProtocol::slotMoveServerUp() if( !selectedNetwork || !selectedHost ) return; - QValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost ); + TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost ); if( pos != selectedNetwork->hosts.begin() ) { - QValueList<IRCHost*>::iterator lastPos = pos; + TQValueList<IRCHost*>::iterator lastPos = pos; lastPos--; selectedNetwork->hosts.insert( lastPos, selectedHost ); selectedNetwork->hosts.remove( pos ); @@ -1203,7 +1203,7 @@ void IRCProtocol::slotMoveServerUp() if( currentPos > 0 ) { netConf->hostList->removeItem( currentPos ); - QString entryText = selectedHost->host + QString::fromLatin1(":") + QString::number( selectedHost->port ); + TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port ); netConf->hostList->insertItem( entryText, --currentPos ); netConf->hostList->setSelected( currentPos, true ); } @@ -1217,10 +1217,10 @@ void IRCProtocol::slotMoveServerDown() if( !selectedNetwork || !selectedHost ) return; - QValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost ); + TQValueList<IRCHost*>::iterator pos = selectedNetwork->hosts.find( selectedHost ); if( *pos != selectedNetwork->hosts.back() ) { - QValueList<IRCHost*>::iterator nextPos = selectedNetwork->hosts.remove( pos ); + TQValueList<IRCHost*>::iterator nextPos = selectedNetwork->hosts.remove( pos ); selectedNetwork->hosts.insert( ++nextPos, selectedHost ); } @@ -1228,7 +1228,7 @@ void IRCProtocol::slotMoveServerDown() if( currentPos < ( netConf->hostList->count() - 1 ) ) { netConf->hostList->removeItem( currentPos ); - QString entryText = selectedHost->host + QString::fromLatin1(":") + QString::number( selectedHost->port ); + TQString entryText = selectedHost->host + TQString::fromLatin1(":") + TQString::number( selectedHost->port ); netConf->hostList->insertItem( entryText, ++currentPos ); netConf->hostList->setSelected( currentPos, true ); } diff --git a/kopete/protocols/irc/ircprotocol.h b/kopete/protocols/irc/ircprotocol.h index 2a1700e5..0028e60b 100644 --- a/kopete/protocols/irc/ircprotocol.h +++ b/kopete/protocols/irc/ircprotocol.h @@ -24,7 +24,7 @@ #include "kopetemimetypehandler.h" #include <dom/dom_node.h> -#include <qdict.h> +#include <tqdict.h> #define m_protocol (IRCProtocol::protocol()) @@ -56,7 +56,7 @@ class IRCProtocolHandler : public Kopete::MimeTypeHandler void handleURL( const KURL &url ) const; }; -static const QString CHAT_VIEW( QString::fromLatin1("kopete_chatwindow") ); +static const TQString CHAT_VIEW( TQString::fromLatin1("kopete_chatwindow") ); /** * @author Nick Betcher <nbetcher@kde.org> @@ -81,23 +81,23 @@ public: OnlineServer = 32768 //! This server is online. }; - IRCProtocol( QObject *parent, const char *name, const QStringList &args ); + IRCProtocol( TQObject *parent, const char *name, const TQStringList &args ); ~IRCProtocol(); /** Kopete::Protocol reimplementation */ - virtual AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account); + virtual AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *account); /** * Deserialize contact data */ virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, const QMap<QString, QString> &addressBookData ); + const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> &addressBookData ); - virtual KopeteEditAccountWidget* createEditAccountWidget(Kopete::Account *account, QWidget *parent); + virtual KopeteEditAccountWidget* createEditAccountWidget(Kopete::Account *account, TQWidget *parent); - virtual Kopete::Account* createNewAccount(const QString &accountId); + virtual Kopete::Account* createNewAccount(const TQString &accountId); - virtual QPtrList<KAction> *customChatWindowPopupActions( const Kopete::Message &, DOM::Node & ); + virtual TQPtrList<KAction> *customChatWindowPopupActions( const Kopete::Message &, DOM::Node & ); static IRCProtocol *protocol(); @@ -142,13 +142,13 @@ public: bool commandInProgress(){ return m_commandInProgress; } void setCommandInProgress( bool ip ) { m_commandInProgress = ip; } - QDict<IRCNetwork> &networks(){ return m_networks; } + TQDict<IRCNetwork> &networks(){ return m_networks; } void addNetwork( IRCNetwork *network ); - void editNetworks( const QString &networkName = QString::null ); + void editNetworks( const TQString &networkName = TQString::null ); signals: - void networkConfigUpdated( const QString &selectedNetwork ); + void networkConfigUpdated( const TQString &selectedNetwork ); private slots: // FIXME: All the code for managing the networks list should be in another class - Will @@ -168,48 +168,48 @@ private slots: void slotMessageFilter( Kopete::Message &msg ); - void slotRawCommand( const QString &args, Kopete::ChatSession *manager ); - void slotQuoteCommand( const QString &args, Kopete::ChatSession *manager ); - void slotCtcpCommand( const QString &args, Kopete::ChatSession *manager ); - void slotPingCommand( const QString &args, Kopete::ChatSession *manager ); - - void slotMotdCommand( const QString &args, Kopete::ChatSession *manager); - void slotListCommand( const QString &args, Kopete::ChatSession *manager); - void slotTopicCommand( const QString &args, Kopete::ChatSession *manager); - void slotJoinCommand( const QString &args, Kopete::ChatSession *manager); - void slotNickCommand( const QString &args, Kopete::ChatSession *manager); - void slotWhoisCommand( const QString &args, Kopete::ChatSession *manager); - void slotWhoWasCommand( const QString &args, Kopete::ChatSession *manager); - void slotWhoCommand( const QString &args, Kopete::ChatSession *manager); - void slotMeCommand( const QString &args, Kopete::ChatSession *manager); - void slotAllMeCommand( const QString &args, Kopete::ChatSession *manager); - void slotModeCommand( const QString &args, Kopete::ChatSession *manager); - void slotQueryCommand( const QString &args, Kopete::ChatSession *manager); - - void slotKickCommand( const QString &args, Kopete::ChatSession *manager); - void slotBanCommand( const QString &args, Kopete::ChatSession *manager); - void slotOpCommand( const QString &args, Kopete::ChatSession *manager); - void slotDeopCommand( const QString &args, Kopete::ChatSession *manager); - void slotVoiceCommand( const QString &args, Kopete::ChatSession *manager); - void slotDevoiceCommand( const QString &args, Kopete::ChatSession *manager); - void slotQuitCommand( const QString &args, Kopete::ChatSession *manager); - void slotPartCommand( const QString &args, Kopete::ChatSession *manager); - void slotInviteCommand( const QString &args, Kopete::ChatSession *manager); + void slotRawCommand( const TQString &args, Kopete::ChatSession *manager ); + void slotQuoteCommand( const TQString &args, Kopete::ChatSession *manager ); + void slotCtcpCommand( const TQString &args, Kopete::ChatSession *manager ); + void slotPingCommand( const TQString &args, Kopete::ChatSession *manager ); + + void slotMotdCommand( const TQString &args, Kopete::ChatSession *manager); + void slotListCommand( const TQString &args, Kopete::ChatSession *manager); + void slotTopicCommand( const TQString &args, Kopete::ChatSession *manager); + void slotJoinCommand( const TQString &args, Kopete::ChatSession *manager); + void slotNickCommand( const TQString &args, Kopete::ChatSession *manager); + void slotWhoisCommand( const TQString &args, Kopete::ChatSession *manager); + void slotWhoWasCommand( const TQString &args, Kopete::ChatSession *manager); + void slotWhoCommand( const TQString &args, Kopete::ChatSession *manager); + void slotMeCommand( const TQString &args, Kopete::ChatSession *manager); + void slotAllMeCommand( const TQString &args, Kopete::ChatSession *manager); + void slotModeCommand( const TQString &args, Kopete::ChatSession *manager); + void slotQueryCommand( const TQString &args, Kopete::ChatSession *manager); + + void slotKickCommand( const TQString &args, Kopete::ChatSession *manager); + void slotBanCommand( const TQString &args, Kopete::ChatSession *manager); + void slotOpCommand( const TQString &args, Kopete::ChatSession *manager); + void slotDeopCommand( const TQString &args, Kopete::ChatSession *manager); + void slotVoiceCommand( const TQString &args, Kopete::ChatSession *manager); + void slotDevoiceCommand( const TQString &args, Kopete::ChatSession *manager); + void slotQuitCommand( const TQString &args, Kopete::ChatSession *manager); + void slotPartCommand( const TQString &args, Kopete::ChatSession *manager); + void slotInviteCommand( const TQString &args, Kopete::ChatSession *manager); void slotViewCreated( KopeteView * ); private: static IRCProtocol *s_protocol; - void simpleModeChange( const QString &, Kopete::ChatSession *, const QString &mode ); + void simpleModeChange( const TQString &, Kopete::ChatSession *, const TQString &mode ); // FIXME: All the code for managing the networks list should be in another class - Will void storeCurrentNetwork(); void storeCurrentHost(); NetworkConfig *netConf; - QString m_uiCurrentNetworkSelection; - QString m_uiCurrentHostSelection; + TQString m_uiCurrentNetworkSelection; + TQString m_uiCurrentHostSelection; // end of network list specific code DOM::Node activeNode; @@ -217,8 +217,8 @@ private: bool m_commandInProgress; - QDict<IRCNetwork> m_networks; - QDict<IRCHost> m_hosts; + TQDict<IRCNetwork> m_networks; + TQDict<IRCHost> m_hosts; IRCProtocolHandler *m_protocolHandler; }; diff --git a/kopete/protocols/irc/ircservercontact.cpp b/kopete/protocols/irc/ircservercontact.cpp index 3ca21643..5be40dff 100644 --- a/kopete/protocols/irc/ircservercontact.cpp +++ b/kopete/protocols/irc/ircservercontact.cpp @@ -28,40 +28,40 @@ #include <kdebug.h> #include <klocale.h> -#include <qtimer.h> +#include <tqtimer.h> -IRCServerContact::IRCServerContact(IRCContactManager *contactManager, const QString &servername, Kopete::MetaContact *m) +IRCServerContact::IRCServerContact(IRCContactManager *contactManager, const TQString &servername, Kopete::MetaContact *m) : IRCContact(contactManager, servername, m, "irc_server") { KIRC::Engine *engine = kircEngine(); - QObject::connect(engine, SIGNAL(internalError(KIRC::Engine::Error, KIRC::Message &)), - this, SLOT(engineInternalError(KIRC::Engine::Error, KIRC::Message &))); + TQObject::connect(engine, TQT_SIGNAL(internalError(KIRC::Engine::Error, KIRC::Message &)), + this, TQT_SLOT(engineInternalError(KIRC::Engine::Error, KIRC::Message &))); /* //FIXME: Have some kind of a debug option for raw input/ouput display?? - QObject::connect(engine, SIGNAL(sentMessage(KIRC::Message &)), - this, SLOT(engineSentMessage(KIRC::Message &))); - QObject::connect(engine, SIGNAL(receivedMessage(KIRC::Message &)), - this, SLOT(engineReceivedMessage(KIRC::Message &))); + TQObject::connect(engine, TQT_SIGNAL(sentMessage(KIRC::Message &)), + this, TQT_SLOT(engineSentMessage(KIRC::Message &))); + TQObject::connect(engine, TQT_SIGNAL(receivedMessage(KIRC::Message &)), + this, TQT_SLOT(engineReceivedMessage(KIRC::Message &))); */ - QObject::connect(engine, SIGNAL(incomingNotice(const QString &, const QString &)), - this, SLOT(slotIncomingNotice(const QString &, const QString &))); + TQObject::connect(engine, TQT_SIGNAL(incomingNotice(const TQString &, const TQString &)), + this, TQT_SLOT(slotIncomingNotice(const TQString &, const TQString &))); - QObject::connect(engine, SIGNAL(incomingCannotSendToChannel(const QString &, const QString &)), - this, SLOT(slotCannotSendToChannel(const QString &, const QString &))); + TQObject::connect(engine, TQT_SIGNAL(incomingCannotSendToChannel(const TQString &, const TQString &)), + this, TQT_SLOT(slotCannotSendToChannel(const TQString &, const TQString &))); - QObject::connect(engine, SIGNAL(incomingUnknown(const QString &)), - this, SLOT(slotIncomingUnknown(const QString &))); + TQObject::connect(engine, TQT_SIGNAL(incomingUnknown(const TQString &)), + this, TQT_SLOT(slotIncomingUnknown(const TQString &))); - QObject::connect(engine, SIGNAL(incomingConnectString(const QString &)), - this, SLOT(slotIncomingConnect(const QString &))); + TQObject::connect(engine, TQT_SIGNAL(incomingConnectString(const TQString &)), + this, TQT_SLOT(slotIncomingConnect(const TQString &))); - QObject::connect(engine, SIGNAL(incomingMotd(const QString &)), - this, SLOT(slotIncomingMotd(const QString &))); + TQObject::connect(engine, TQT_SIGNAL(incomingMotd(const TQString &)), + this, TQT_SLOT(slotIncomingMotd(const TQString &))); - QObject::connect(Kopete::ChatSessionManager::self(), SIGNAL(viewCreated(KopeteView*)), - this, SLOT(slotViewCreated(KopeteView*)) ); + TQObject::connect(Kopete::ChatSessionManager::self(), TQT_SIGNAL(viewCreated(KopeteView*)), + this, TQT_SLOT(slotViewCreated(KopeteView*)) ); updateStatus(); } @@ -90,7 +90,7 @@ void IRCServerContact::updateStatus() } } -const QString IRCServerContact::caption() const +const TQString IRCServerContact::caption() const { return i18n("%1 @ %2").arg(ircAccount()->mySelf()->nickName() ).arg( kircEngine()->currentHost().isEmpty() ? ircAccount()->networkName() : kircEngine()->currentHost() @@ -99,7 +99,7 @@ const QString IRCServerContact::caption() const void IRCServerContact::engineInternalError(KIRC::Engine::Error engineError, KIRC::Message &ircmsg) { - QString error; + TQString error; switch (engineError) { case KIRC::Engine::ParsingFailed: @@ -121,7 +121,7 @@ void IRCServerContact::engineInternalError(KIRC::Engine::Error engineError, KIRC error = i18n("KIRC Error - Unknown error: "); } - ircAccount()->appendMessage(error + QString(ircmsg.raw()), IRCAccount::ErrorReply); + ircAccount()->appendMessage(error + TQString(ircmsg.raw()), IRCAccount::ErrorReply); } void IRCServerContact::slotSendMsg(Kopete::Message &, Kopete::ChatSession *manager) @@ -132,7 +132,7 @@ void IRCServerContact::slotSendMsg(Kopete::Message &, Kopete::ChatSession *manag manager->appendMessage(msg); } -void IRCServerContact::appendMessage( const QString &message ) +void IRCServerContact::appendMessage( const TQString &message ) { Kopete::ContactPtrList members; members.append( this ); @@ -141,7 +141,7 @@ void IRCServerContact::appendMessage( const QString &message ) appendMessage(msg); } -void IRCServerContact::slotIncomingNotice( const QString &orig, const QString ¬ice ) +void IRCServerContact::slotIncomingNotice( const TQString &orig, const TQString ¬ice ) { if (orig.isEmpty()) { // Prefix missing. @@ -167,24 +167,24 @@ void IRCServerContact::slotIncomingNotice( const QString &orig, const QString &n } } -void IRCServerContact::slotIncomingUnknown(const QString &message) +void IRCServerContact::slotIncomingUnknown(const TQString &message) { ircAccount()->appendMessage(message, IRCAccount::UnknownReply); } -void IRCServerContact::slotIncomingConnect(const QString &message) +void IRCServerContact::slotIncomingConnect(const TQString &message) { ircAccount()->appendMessage(message, IRCAccount::ConnectReply); } -void IRCServerContact::slotIncomingMotd(const QString &message) +void IRCServerContact::slotIncomingMotd(const TQString &message) { ircAccount()->appendMessage(message, IRCAccount::InfoReply); } -void IRCServerContact::slotCannotSendToChannel(const QString &channel, const QString &message) +void IRCServerContact::slotCannotSendToChannel(const TQString &channel, const TQString &message) { - ircAccount()->appendMessage(QString::fromLatin1("%1: %2").arg(channel).arg(message), IRCAccount::ErrorReply); + ircAccount()->appendMessage(TQString::fromLatin1("%1: %2").arg(channel).arg(message), IRCAccount::ErrorReply); } void IRCServerContact::appendMessage(Kopete::Message &msg) @@ -206,7 +206,7 @@ void IRCServerContact::slotDumpMessages() { manager()->appendMessage( mMsgBuffer.front() ); mMsgBuffer.pop_front(); - QTimer::singleShot( 0, this, SLOT( slotDumpMessages() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDumpMessages() ) ); } } @@ -214,7 +214,7 @@ void IRCServerContact::slotViewCreated( KopeteView *v ) { kdDebug(14121) << k_funcinfo << "Created: " << v << ", mgr: " << v->msgManager() << ", Mine: " << m_chatSession << endl; if (m_chatSession && v->msgManager() == m_chatSession) - QTimer::singleShot(500, this, SLOT(slotDumpMessages())); + TQTimer::singleShot(500, this, TQT_SLOT(slotDumpMessages())); } #include "ircservercontact.moc" diff --git a/kopete/protocols/irc/ircservercontact.h b/kopete/protocols/irc/ircservercontact.h index 1ca1475b..4d9e378d 100644 --- a/kopete/protocols/irc/ircservercontact.h +++ b/kopete/protocols/irc/ircservercontact.h @@ -24,8 +24,8 @@ #include "kopetechatsessionmanager.h" -#include <qvaluelist.h> -#include <qstringlist.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> class KActionCollection; class KAction; @@ -48,12 +48,12 @@ class IRCServerContact public: // This class provides a Kopete::Contact for each server of a given IRC connection. - IRCServerContact(IRCContactManager *, const QString &servername, Kopete::MetaContact *mc); + IRCServerContact(IRCContactManager *, const TQString &servername, Kopete::MetaContact *mc); - virtual const QString caption() const; + virtual const TQString caption() const; virtual void appendMessage(Kopete::Message &); - void appendMessage( const QString &message ); + void appendMessage( const TQString &message ); protected slots: void engineInternalError(KIRC::Engine::Error error, KIRC::Message &ircmsg); @@ -64,14 +64,14 @@ class IRCServerContact void slotViewCreated( KopeteView* ); void slotDumpMessages(); - void slotIncomingUnknown( const QString &message ); - void slotIncomingConnect( const QString &message ); - void slotIncomingMotd( const QString &motd ); - void slotIncomingNotice( const QString &orig, const QString ¬ice ); - void slotCannotSendToChannel( const QString &channel, const QString &msg ); + void slotIncomingUnknown( const TQString &message ); + void slotIncomingConnect( const TQString &message ); + void slotIncomingMotd( const TQString &motd ); + void slotIncomingNotice( const TQString &orig, const TQString ¬ice ); + void slotCannotSendToChannel( const TQString &channel, const TQString &msg ); private: - QValueList<Kopete::Message> mMsgBuffer; + TQValueList<Kopete::Message> mMsgBuffer; }; #endif diff --git a/kopete/protocols/irc/ircsignalhandler.cpp b/kopete/protocols/irc/ircsignalhandler.cpp index 5bfab0cc..db0acec2 100644 --- a/kopete/protocols/irc/ircsignalhandler.cpp +++ b/kopete/protocols/irc/ircsignalhandler.cpp @@ -23,147 +23,147 @@ #include "kircengine.h" IRCSignalHandler::IRCSignalHandler(IRCContactManager *m) - : QObject(m), + : TQObject(m), manager(m) { KIRC::Engine *m_engine = static_cast<IRCAccount*>( manager->mySelf()->account() )->engine(); //Channel Connections to ourself - QObject::connect(m_engine, SIGNAL(incomingNamesList(const QString &, const QStringList &)), - this, SLOT(slotNamesList(const QString &, const QStringList &))); + TQObject::connect(m_engine, TQT_SIGNAL(incomingNamesList(const TQString &, const TQStringList &)), + this, TQT_SLOT(slotNamesList(const TQString &, const TQStringList &))); - QObject::connect(m_engine, SIGNAL(incomingEndOfNames(const QString &)), - this, SLOT(slotEndOfNames(const QString &))); + TQObject::connect(m_engine, TQT_SIGNAL(incomingEndOfNames(const TQString &)), + this, TQT_SLOT(slotEndOfNames(const TQString &))); - QObject::connect(m_engine, SIGNAL(incomingTopicUser(const QString &, const QString &, const QDateTime &)), - this, SLOT(slotTopicUser(const QString&,const QString&,const QDateTime&))); + TQObject::connect(m_engine, TQT_SIGNAL(incomingTopicUser(const TQString &, const TQString &, const TQDateTime &)), + this, TQT_SLOT(slotTopicUser(const TQString&,const TQString&,const TQDateTime&))); //Channel String mappings - map<IRCChannelContact>( m, SIGNAL(incomingFailedChankey(const QString &)), + map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChankey(const TQString &)), &IRCChannelContact::failedChankey ); - map<IRCChannelContact>( m, SIGNAL(incomingFailedChanFull(const QString &)), + map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChanFull(const TQString &)), &IRCChannelContact::failedChanInvite ); - map<IRCChannelContact>( m, SIGNAL(incomingFailedChanInvite(const QString &)), + map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChanInvite(const TQString &)), &IRCChannelContact::failedChanInvite ); - map<IRCChannelContact>( m, SIGNAL(incomingFailedChanBanned(const QString &)), + map<IRCChannelContact>( m, TQT_SIGNAL(incomingFailedChanBanned(const TQString &)), &IRCChannelContact::failedChanBanned ); - mapSingle<IRCChannelContact>( m, SIGNAL(incomingJoinedChannel(const QString &, const QString &)), + mapSingle<IRCChannelContact>( m, TQT_SIGNAL(incomingJoinedChannel(const TQString &, const TQString &)), &IRCChannelContact::userJoinedChannel ); - mapSingle<IRCChannelContact>( m, SIGNAL(incomingExistingTopic(const QString &, const QString &)), + mapSingle<IRCChannelContact>( m, TQT_SIGNAL(incomingExistingTopic(const TQString &, const TQString &)), &IRCChannelContact::channelTopic ); - mapSingle<IRCChannelContact>( m, SIGNAL(incomingChannelHomePage(const QString &, const QString &)), + mapSingle<IRCChannelContact>( m, TQT_SIGNAL(incomingChannelHomePage(const TQString &, const TQString &)), &IRCChannelContact::channelHomePage ); mapDouble<IRCChannelContact>( m, - SIGNAL(incomingPartedChannel(const QString &, const QString &,const QString &)), + TQT_SIGNAL(incomingPartedChannel(const TQString &, const TQString &,const TQString &)), &IRCChannelContact::userPartedChannel ); mapDouble<IRCChannelContact>( m, - SIGNAL(incomingTopicChange(const QString &, const QString &,const QString &)), + TQT_SIGNAL(incomingTopicChange(const TQString &, const TQString &,const TQString &)), &IRCChannelContact::topicChanged ); mapDouble<IRCChannelContact>( m, - SIGNAL(incomingChannelModeChange(const QString &, const QString &,const QString &)), + TQT_SIGNAL(incomingChannelModeChange(const TQString &, const TQString &,const TQString &)), &IRCChannelContact::incomingModeChange ); mapDouble<IRCChannelContact>( m, - SIGNAL(incomingChannelMode(const QString &, const QString &,const QString &)), + TQT_SIGNAL(incomingChannelMode(const TQString &, const TQString &,const TQString &)), &IRCChannelContact::incomingChannelMode ); mapTriple<IRCChannelContact>( m, - SIGNAL(incomingKick(const QString &, const QString &,const QString &,const QString &)), + TQT_SIGNAL(incomingKick(const TQString &, const TQString &,const TQString &,const TQString &)), &IRCChannelContact::userKicked ); //User connections to ourself - QObject::connect(m_engine, SIGNAL(incomingWhoIsIdle(const QString &, unsigned long )), - this, SLOT(slotNewWhoIsIdle(const QString &, unsigned long ))); + TQObject::connect(m_engine, TQT_SIGNAL(incomingWhoIsIdle(const TQString &, unsigned long )), + this, TQT_SLOT(slotNewWhoIsIdle(const TQString &, unsigned long ))); - QObject::connect(m_engine, SIGNAL(incomingWhoReply(const QString &, const QString &, const QString &, - const QString &, const QString &, bool, const QString &, uint, const QString & )), - this, SLOT( slotNewWhoReply(const QString &, const QString &, const QString &, const QString &, - const QString &, bool, const QString &, uint, const QString &))); + TQObject::connect(m_engine, TQT_SIGNAL(incomingWhoReply(const TQString &, const TQString &, const TQString &, + const TQString &, const TQString &, bool, const TQString &, uint, const TQString & )), + this, TQT_SLOT( slotNewWhoReply(const TQString &, const TQString &, const TQString &, const TQString &, + const TQString &, bool, const TQString &, uint, const TQString &))); //User signal mappings - map<IRCUserContact>( m, SIGNAL(incomingUserOnline( const QString & )), &IRCUserContact::userOnline ); + map<IRCUserContact>( m, TQT_SIGNAL(incomingUserOnline( const TQString & )), &IRCUserContact::userOnline ); - map<IRCUserContact>( m, SIGNAL(incomingWhoIsOperator( const QString & )), &IRCUserContact::newWhoIsOperator ); + map<IRCUserContact>( m, TQT_SIGNAL(incomingWhoIsOperator( const TQString & )), &IRCUserContact::newWhoIsOperator ); - map<IRCUserContact>( m, SIGNAL(incomingWhoIsIdentified( const QString & )), &IRCUserContact::newWhoIsIdentified ); + map<IRCUserContact>( m, TQT_SIGNAL(incomingWhoIsIdentified( const TQString & )), &IRCUserContact::newWhoIsIdentified ); - map<IRCUserContact>( m, SIGNAL(incomingEndOfWhois( const QString & )), &IRCUserContact::whoIsComplete ); + map<IRCUserContact>( m, TQT_SIGNAL(incomingEndOfWhois( const TQString & )), &IRCUserContact::whoIsComplete ); - map<IRCUserContact>( m, SIGNAL(incomingEndOfWhoWas( const QString & )), &IRCUserContact::whoWasComplete ); + map<IRCUserContact>( m, TQT_SIGNAL(incomingEndOfWhoWas( const TQString & )), &IRCUserContact::whoWasComplete ); - mapSingle<IRCUserContact>( m, SIGNAL(incomingUserIsAway( const QString &, const QString & )), + mapSingle<IRCUserContact>( m, TQT_SIGNAL(incomingUserIsAway( const TQString &, const TQString & )), &IRCUserContact::incomingUserIsAway ); - mapSingle<IRCUserContact>( m, SIGNAL(incomingWhoIsChannels( const QString &, const QString & )), + mapSingle<IRCUserContact>( m, TQT_SIGNAL(incomingWhoIsChannels( const TQString &, const TQString & )), &IRCUserContact::newWhoIsChannels ); mapDouble<IRCUserContact>( m, - SIGNAL(incomingWhoIsServer(const QString &, const QString &, const QString &)), + TQT_SIGNAL(incomingWhoIsServer(const TQString &, const TQString &, const TQString &)), &IRCUserContact::newWhoIsServer ); mapDouble<IRCUserContact>( m, - SIGNAL(incomingPrivAction(const QString &, const QString &, const QString &)), + TQT_SIGNAL(incomingPrivAction(const TQString &, const TQString &, const TQString &)), &IRCUserContact::newAction ); mapDouble<IRCChannelContact>( m, - SIGNAL(incomingAction(const QString &, const QString &, const QString &)), + TQT_SIGNAL(incomingAction(const TQString &, const TQString &, const TQString &)), &IRCChannelContact::newAction ); mapTriple<IRCUserContact>( m, - SIGNAL(incomingWhoIsUser(const QString &, const QString &, const QString &, const QString &)), + TQT_SIGNAL(incomingWhoIsUser(const TQString &, const TQString &, const TQString &, const TQString &)), &IRCUserContact::newWhoIsUser ); mapTriple<IRCUserContact>( m, - SIGNAL(incomingWhoWasUser(const QString &, const QString &, const QString &, const QString &)), + TQT_SIGNAL(incomingWhoWasUser(const TQString &, const TQString &, const TQString &, const TQString &)), &IRCUserContact::newWhoIsUser ); } IRCSignalHandler::~IRCSignalHandler() { //Delete our mapping pointers - for( QValueList<IRCSignalMappingBase*>::iterator it = mappings.begin(); it != mappings.end(); ++it ) + for( TQValueList<IRCSignalMappingBase*>::iterator it = mappings.begin(); it != mappings.end(); ++it ) delete *it; } -void IRCSignalHandler::slotNamesList( const QString &chan, const QStringList &list ) +void IRCSignalHandler::slotNamesList( const TQString &chan, const TQStringList &list ) { IRCChannelContact *c = manager->existChannel( chan ); if( c ) c->namesList( list ); } -void IRCSignalHandler::slotEndOfNames( const QString &chan ) +void IRCSignalHandler::slotEndOfNames( const TQString &chan ) { IRCChannelContact *c = manager->existChannel( chan ); if ( c ) c->endOfNames(); } -void IRCSignalHandler::slotTopicUser(const QString &chan, const QString &user,const QDateTime &time) +void IRCSignalHandler::slotTopicUser(const TQString &chan, const TQString &user,const TQDateTime &time) { IRCChannelContact *c = manager->existChannel( chan ); if( c ) c->topicUser( user, time ); } -void IRCSignalHandler::slotNewWhoIsIdle(const QString &nick, unsigned long val ) +void IRCSignalHandler::slotNewWhoIsIdle(const TQString &nick, unsigned long val ) { IRCUserContact *c = manager->findUser( nick ); if( c ) c->newWhoIsIdle( val ); } -void IRCSignalHandler::slotNewWhoReply(const QString &nick, const QString &arg1, const QString &arg2, - const QString &arg3, const QString &arg4, bool arg5, const QString &arg6, uint arg7, const QString &arg8 ) +void IRCSignalHandler::slotNewWhoReply(const TQString &nick, const TQString &arg1, const TQString &arg2, + const TQString &arg3, const TQString &arg4, bool arg5, const TQString &arg6, uint arg7, const TQString &arg8 ) { IRCUserContact *c = manager->findUser( nick ); if( c ) diff --git a/kopete/protocols/irc/ircsignalhandler.h b/kopete/protocols/irc/ircsignalhandler.h index a87f814c..57732e07 100644 --- a/kopete/protocols/irc/ircsignalhandler.h +++ b/kopete/protocols/irc/ircsignalhandler.h @@ -19,9 +19,9 @@ #ifndef _IRC_SIGNAL_HANDLER_H #define _IRC_SIGNAL_HANDLER_H -#include <qobject.h> -#include <qstringlist.h> -#include <qdatetime.h> +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqdatetime.h> #include <kdebug.h> @@ -54,30 +54,30 @@ struct IRCSignalMappingBase{}; struct IRCSignalMappingT : IRCSignalMappingBase { - virtual void exec( const QString & ) = 0; + virtual void exec( const TQString & ) = 0; virtual ~IRCSignalMappingT() {}; }; struct IRCSignalMappingSingleT : IRCSignalMappingBase { - virtual void exec( const QString &, const QString & ) = 0; + virtual void exec( const TQString &, const TQString & ) = 0; virtual ~IRCSignalMappingSingleT() {}; }; struct IRCSignalMappingDoubleT : IRCSignalMappingBase { - virtual void exec( const QString &, const QString &, const QString & ) = 0; + virtual void exec( const TQString &, const TQString &, const TQString & ) = 0; virtual ~IRCSignalMappingDoubleT() {}; }; struct IRCSignalMappingTripleT : IRCSignalMappingBase { - virtual void exec( const QString &, const QString &, const QString &, const QString & ) = 0; + virtual void exec( const TQString &, const TQString &, const TQString &, const TQString & ) = 0; virtual ~IRCSignalMappingTripleT() {}; }; /*** -QObject members, these connect to the KIRC signals and call +TQObject members, these connect to the KIRC signals and call the Mapping functions when they emit. **/ @@ -86,10 +86,10 @@ class QMember : public QObject Q_OBJECT public: - QMember( IRCSignalMappingT *m, QObject *p ) : QObject( p ), mapping( m ){}; + QMember( IRCSignalMappingT *m, TQObject *p ) : TQObject( p ), mapping( m ){}; public slots: - void slotEmit( const QString &id ) + void slotEmit( const TQString &id ) { //kdDebug(14120) << k_funcinfo << id << endl; mapping->exec(id); @@ -104,10 +104,10 @@ class QMemberSingle : public QObject Q_OBJECT public: - QMemberSingle( IRCSignalMappingSingleT *m, QObject *p ) : QObject( p ), mapping( m ){} + QMemberSingle( IRCSignalMappingSingleT *m, TQObject *p ) : TQObject( p ), mapping( m ){} public slots: - void slotEmit( const QString &id, const QString &arg ) + void slotEmit( const TQString &id, const TQString &arg ) { //kdDebug(14120) << k_funcinfo << id << " : " << arg << endl; mapping->exec(id,arg); @@ -122,10 +122,10 @@ class QMemberDouble : public QObject Q_OBJECT public: - QMemberDouble( IRCSignalMappingDoubleT *m, QObject *p ) : QObject( p ), mapping( m ){} + QMemberDouble( IRCSignalMappingDoubleT *m, TQObject *p ) : TQObject( p ), mapping( m ){} public slots: - void slotEmit( const QString &id, const QString &arg, const QString &arg2 ) + void slotEmit( const TQString &id, const TQString &arg, const TQString &arg2 ) { //kdDebug(14120) << k_funcinfo << id << " : " << arg << " : " << arg2 << endl; mapping->exec(id,arg,arg2); @@ -140,10 +140,10 @@ class QMemberTriple : public QObject Q_OBJECT public: - QMemberTriple( IRCSignalMappingTripleT *m, QObject *p ) : QObject( p ), mapping( m ){} + QMemberTriple( IRCSignalMappingTripleT *m, TQObject *p ) : TQObject( p ), mapping( m ){} public slots: - void slotEmit( const QString &id, const QString &arg, const QString &arg2, const QString &arg3 ) + void slotEmit( const TQString &id, const TQString &arg, const TQString &arg2, const TQString &arg3 ) { //kdDebug(14120) << k_funcinfo << id << " : " << arg << " : " << arg2 << " : " << arg3 << endl; mapping->exec(id,arg,arg2,arg3); @@ -166,7 +166,7 @@ class IRCSignalMapping : public IRCSignalMappingT IRCSignalMapping( IRCContactManager *mgr, const char * /*signal*/, void (TClass::*m)() ) : manager(mgr), method(m){} - void exec( const QString &id ) + void exec( const TQString &id ) { TClass *c = (TClass*)manager->findContact( id ); if( c ) @@ -186,21 +186,21 @@ class IRCSignalMappingSingle : public IRCSignalMappingSingleT { public: IRCSignalMappingSingle<TClass>( IRCContactManager *mgr, const char * /*signal*/, - void (TClass::*m)(const QString&) ) : manager(mgr), method(m){} + void (TClass::*m)(const TQString&) ) : manager(mgr), method(m){} - void exec( const QString &id, const QString &arg ) + void exec( const TQString &id, const TQString &arg ) { TClass *c = (TClass*)manager->findContact( id ); if( c ) { - void (TClass::*tmp)(const QString&) = (void (TClass::*)(const QString&))method; + void (TClass::*tmp)(const TQString&) = (void (TClass::*)(const TQString&))method; (*c.*tmp)( arg ); } } private: IRCContactManager *manager; - void (TClass::*method)(const QString &); + void (TClass::*method)(const TQString &); }; template <class TClass> @@ -208,22 +208,22 @@ class IRCSignalMappingDouble : public IRCSignalMappingDoubleT { public: IRCSignalMappingDouble<TClass>( IRCContactManager *mgr, const char * /*signal*/, - void (TClass::*m)(const QString&,const QString&) ) : manager(mgr), method(m){} + void (TClass::*m)(const TQString&,const TQString&) ) : manager(mgr), method(m){} - void exec( const QString &id,const QString &arg, const QString &arg2 ) + void exec( const TQString &id,const TQString &arg, const TQString &arg2 ) { TClass *c = (TClass*)manager->findContact( id ); if( c ) { - void (TClass::*tmp)(const QString&,const QString&) = - (void (TClass::*)(const QString&,const QString&))method; + void (TClass::*tmp)(const TQString&,const TQString&) = + (void (TClass::*)(const TQString&,const TQString&))method; (*c.*tmp)(arg,arg2); } } private: IRCContactManager *manager; - void (TClass::*method)(const QString &,const QString &); + void (TClass::*method)(const TQString &,const TQString &); }; template <class TClass> @@ -231,23 +231,23 @@ class IRCSignalMappingTriple : public IRCSignalMappingTripleT { public: IRCSignalMappingTriple<TClass>( IRCContactManager *mgr, const char * /*signal*/, - void (TClass::*m)(const QString&,const QString&,const QString&) ) + void (TClass::*m)(const TQString&,const TQString&,const TQString&) ) : manager(mgr), method(m){} - void exec( const QString &id,const QString&arg, const QString &arg2, const QString &arg3 ) + void exec( const TQString &id,const TQString&arg, const TQString &arg2, const TQString &arg3 ) { TClass *c = (TClass*)manager->findContact( id ); if( c ) { - void (TClass::*tmp)(const QString&,const QString&,const QString&) = - (void (TClass::*)(const QString&,const QString&,const QString&))method; + void (TClass::*tmp)(const TQString&,const TQString&,const TQString&) = + (void (TClass::*)(const TQString&,const TQString&,const TQString&))method; (*c.*tmp)(arg,arg2,arg3); } } private: IRCContactManager *manager; - void (TClass::*method)(const QString &,const QString &,const QString &); + void (TClass::*method)(const TQString &,const TQString &,const TQString &); }; class IRCSignalHandler : public QObject @@ -261,22 +261,22 @@ class IRCSignalHandler : public QObject private slots: /**** - Slots for signals with non-QString types + Slots for signals with non-TQString types */ //Channel contact slots - void slotNamesList( const QString &, const QStringList & ); - void slotEndOfNames( const QString & ); - void slotTopicUser( const QString &, const QString&, const QDateTime &); + void slotNamesList( const TQString &, const TQStringList & ); + void slotEndOfNames( const TQString & ); + void slotTopicUser( const TQString &, const TQString&, const TQDateTime &); //User contact slots - void slotNewWhoIsIdle(const QString &, unsigned long ); - void slotNewWhoReply(const QString &, const QString &, const QString &, const QString &, - const QString &, bool , const QString &, uint , const QString & ); + void slotNewWhoIsIdle(const TQString &, unsigned long ); + void slotNewWhoReply(const TQString &, const TQString &, const TQString &, const TQString &, + const TQString &, bool , const TQString &, uint , const TQString & ); private: IRCContactManager *manager; - QValueList<IRCSignalMappingBase*> mappings; + TQValueList<IRCSignalMappingBase*> mappings; /**** Signal mapping functions @@ -287,46 +287,46 @@ class IRCSignalHandler : public QObject { IRCSignalMappingT *mapping = new IRCSignalMapping<TClass>( m, signal, method ); mappings.append(mapping); - QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal, + TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal, new QMember( mapping, this), - SLOT( slotEmit( const QString &) ) + TQT_SLOT( slotEmit( const TQString &) ) ); } template <class TClass> inline void mapSingle( IRCContactManager *m, - const char* signal, void (TClass::*method)(const QString&) ) + const char* signal, void (TClass::*method)(const TQString&) ) { IRCSignalMappingSingleT *mapping = new IRCSignalMappingSingle<TClass>( m, signal, method ); mappings.append(mapping); - QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal, + TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal, new QMemberSingle( mapping, this), - SLOT( slotEmit( const QString &, const QString &) ) + TQT_SLOT( slotEmit( const TQString &, const TQString &) ) ); } template <class TClass> inline void mapDouble( IRCContactManager *m, - const char* signal, void (TClass::*method)(const QString&,const QString&) ) + const char* signal, void (TClass::*method)(const TQString&,const TQString&) ) { IRCSignalMappingDoubleT *mapping = new IRCSignalMappingDouble<TClass>( m, signal, method ); mappings.append(mapping); - QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal, + TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal, new QMemberDouble( mapping, this), - SLOT( slotEmit( const QString &, const QString &,const QString &) ) + TQT_SLOT( slotEmit( const TQString &, const TQString &,const TQString &) ) ); } template <class TClass> inline void mapTriple( IRCContactManager *m, const char* signal, - void (TClass::*method)(const QString&,const QString &, const QString &) ) + void (TClass::*method)(const TQString&,const TQString &, const TQString &) ) { IRCSignalMappingTripleT *mapping = new IRCSignalMappingTriple<TClass>( m, signal, method ); mappings.append(mapping); - QObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal, + TQObject::connect( static_cast<IRCAccount*>( m->mySelf()->account() )->engine(), signal, new QMemberTriple( mapping, this), - SLOT( slotEmit( const QString &, const QString &,const QString &,const QString &) ) + TQT_SLOT( slotEmit( const TQString &, const TQString &,const TQString &,const TQString &) ) ); } }; diff --git a/kopete/protocols/irc/irctransferhandler.cpp b/kopete/protocols/irc/irctransferhandler.cpp index 4715679e..e579e94a 100644 --- a/kopete/protocols/irc/irctransferhandler.cpp +++ b/kopete/protocols/irc/irctransferhandler.cpp @@ -41,13 +41,13 @@ KIRC::TransferHandler *IRCTransferHandler::handler() IRCTransferHandler::IRCTransferHandler() { - connect(handler(), SIGNAL(transferCreated(KIRC::Transfer *)), - this, SLOT(transferCreated(KIRC::Transfer *))); + connect(handler(), TQT_SIGNAL(transferCreated(KIRC::Transfer *)), + this, TQT_SLOT(transferCreated(KIRC::Transfer *))); - connect(Kopete::TransferManager::transferManager(), SIGNAL(accepted(Kopete::Transfer *, const QString &)), - this, SLOT(transferAccepted(Kopete::Transfer *, const QString&))); - connect( Kopete::TransferManager::transferManager(), SIGNAL(refused(const Kopete::FileTransferInfo &)), - this, SLOT(transferRefused(const Kopete::FileTransferInfo &))); + connect(Kopete::TransferManager::transferManager(), TQT_SIGNAL(accepted(Kopete::Transfer *, const TQString &)), + this, TQT_SLOT(transferAccepted(Kopete::Transfer *, const TQString&))); + connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL(refused(const Kopete::FileTransferInfo &)), + this, TQT_SLOT(transferRefused(const Kopete::FileTransferInfo &))); } void IRCTransferHandler::transferCreated(KIRC::Transfer *t) @@ -55,7 +55,7 @@ void IRCTransferHandler::transferCreated(KIRC::Transfer *t) kdDebug(14120) << k_funcinfo << endl; IRCContact *contact = IRCContactManager::existContact(t->engine(), t->nick()); - QString fileName = t->fileName(); + TQString fileName = t->fileName(); unsigned long fileSize = t->fileSize(); if(!contact) @@ -88,7 +88,7 @@ void IRCTransferHandler::transferCreated(KIRC::Transfer *t) } } -void IRCTransferHandler::transferAccepted(Kopete::Transfer *kt, const QString &file) +void IRCTransferHandler::transferAccepted(Kopete::Transfer *kt, const TQString &file) { kdDebug(14120) << k_funcinfo << endl; @@ -121,8 +121,8 @@ void IRCTransferHandler::connectKopeteTransfer(Kopete::Transfer *kt, KIRC::Trans // case KIRC::Transfer::Chat: case KIRC::Transfer::FileOutgoing: case KIRC::Transfer::FileIncoming: - connect(t , SIGNAL(fileSizeAcknowledge(unsigned int)), - kt, SLOT(slotProcessed(unsigned int))); + connect(t , TQT_SIGNAL(fileSizeAcknowledge(unsigned int)), + kt, TQT_SLOT(slotProcessed(unsigned int))); break; default: kdDebug(14120) << k_funcinfo << "Unknown transfer connections for type" << endl; @@ -130,16 +130,16 @@ void IRCTransferHandler::connectKopeteTransfer(Kopete::Transfer *kt, KIRC::Trans return; } - connect(t , SIGNAL(complete()), - kt, SLOT(slotComplete())); + connect(t , TQT_SIGNAL(complete()), + kt, TQT_SLOT(slotComplete())); -// connect(kt , SIGNAL(transferCanceled()), -// t, SLOT(abort())); -// connect(kt, SIGNAL(destroyed()), -// t, SLOT(slotKopeteTransferDestroyed())); +// connect(kt , TQT_SIGNAL(transferCanceled()), +// t, TQT_SLOT(abort())); +// connect(kt, TQT_SIGNAL(destroyed()), +// t, TQT_SLOT(slotKopeteTransferDestroyed())); - connect(kt, SIGNAL(result(KIO::Job *)), - this , SLOT(kioresult(KIO::Job *))); + connect(kt, TQT_SIGNAL(result(KIO::Job *)), + this , TQT_SLOT(kioresult(KIO::Job *))); t->initiate(); } diff --git a/kopete/protocols/irc/irctransferhandler.h b/kopete/protocols/irc/irctransferhandler.h index 17c419ae..7847464c 100644 --- a/kopete/protocols/irc/irctransferhandler.h +++ b/kopete/protocols/irc/irctransferhandler.h @@ -18,7 +18,7 @@ #ifndef IRCTRANSFERHANDLER_H #define IRCTRANSFERHANDLER_H -#include <qintdict.h> +#include <tqintdict.h> #include <kopetetransfermanager.h> @@ -43,7 +43,7 @@ public: private slots: void transferCreated(KIRC::Transfer *); - void transferAccepted(Kopete::Transfer *kt, const QString&file); + void transferAccepted(Kopete::Transfer *kt, const TQString&file); void transferRefused(const Kopete::FileTransferInfo &info); void kioresult(KIO::Job *job); @@ -59,7 +59,7 @@ private: KIRC::TransferHandler *handler(); - QIntDict<KIRC::Transfer> m_idMap; + TQIntDict<KIRC::Transfer> m_idMap; }; #endif diff --git a/kopete/protocols/irc/ircusercontact.cpp b/kopete/protocols/irc/ircusercontact.cpp index dc9dcbf2..24e46c57 100644 --- a/kopete/protocols/irc/ircusercontact.cpp +++ b/kopete/protocols/irc/ircusercontact.cpp @@ -31,20 +31,20 @@ #include <kfiledialog.h> #include <klocale.h> -#include <qtimer.h> +#include <tqtimer.h> -IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const QString &nickname, Kopete::MetaContact *m ) +IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const TQString &nickname, Kopete::MetaContact *m ) : IRCContact(contactManager, nickname, m ), actionCtcpMenu(0L) { setFileCapable(true); - mOnlineTimer = new QTimer( this ); + mOnlineTimer = new TQTimer( this ); - QObject::connect(mOnlineTimer, SIGNAL(timeout()), this, SLOT( slotUserOffline() ) ); + TQObject::connect(mOnlineTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( slotUserOffline() ) ); - QObject::connect(kircEngine(), SIGNAL(incomingChannelModeChange(const QString&, const QString&, const QString&)), - this, SLOT(slotIncomingModeChange(const QString&,const QString&, const QString&))); + TQObject::connect(kircEngine(), TQT_SIGNAL(incomingChannelModeChange(const TQString&, const TQString&, const TQString&)), + this, TQT_SLOT(slotIncomingModeChange(const TQString&,const TQString&, const TQString&))); mInfo.isOperator = false; mInfo.isIdentified = false; @@ -100,9 +100,9 @@ void IRCUserContact::updateStatus() // This may not be created yet ( for myself() on startup ) if( ircAccount()->contactManager() ) { - QValueList<IRCChannelContact*> channels = ircAccount()->contactManager()->findChannelsByMember(this); + TQValueList<IRCChannelContact*> channels = ircAccount()->contactManager()->findChannelsByMember(this); - for( QValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it ) + for( TQValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it ) { IRCChannelContact *channel = *it; Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this); @@ -141,13 +141,13 @@ void IRCUserContact::updateStatus() } } -void IRCUserContact::sendFile(const KURL &sourceURL, const QString&, unsigned int) +void IRCUserContact::sendFile(const KURL &sourceURL, const TQString&, unsigned int) { - QString filePath; + TQString filePath; //If the file location is null, then get it from a file open dialog if( !sourceURL.isValid() ) - filePath = KFileDialog::getOpenFileName(QString::null, "*", 0l , i18n("Kopete File Transfer")); + filePath = KFileDialog::getOpenFileName(TQString::null, "*", 0l , i18n("Kopete File Transfer")); else filePath = sourceURL.path(-1); @@ -165,7 +165,7 @@ void IRCUserContact::slotUserOffline() updateStatus(); if( !metaContact()->isTemporary() ) - kircEngine()->writeMessage( QString::fromLatin1("WHOWAS %1").arg(m_nickName) ); + kircEngine()->writeMessage( TQString::fromLatin1("WHOWAS %1").arg(m_nickName) ); removeProperty( m_protocol->propUserInfo ); removeProperty( m_protocol->propServer ); @@ -180,7 +180,7 @@ void IRCUserContact::setAway(bool isAway) updateStatus(); } -void IRCUserContact::incomingUserIsAway(const QString &reason) +void IRCUserContact::incomingUserIsAway(const TQString &reason) { if( manager( Kopete::Contact::CannotCreate ) ) { @@ -214,29 +214,29 @@ void IRCUserContact::slotUserInfo() } } -const QString IRCUserContact::caption() const +const TQString IRCUserContact::caption() const { return i18n("%1 @ %2").arg(m_nickName).arg(kircEngine()->currentHost()); } void IRCUserContact::slotOp() { - contactMode( QString::fromLatin1("+o") ); + contactMode( TQString::fromLatin1("+o") ); } void IRCUserContact::slotDeop() { - contactMode( QString::fromLatin1("-o") ); + contactMode( TQString::fromLatin1("-o") ); } void IRCUserContact::slotVoice() { - contactMode( QString::fromLatin1("+v") ); + contactMode( TQString::fromLatin1("+v") ); } void IRCUserContact::slotDevoice() { - contactMode( QString::fromLatin1("-v") ); + contactMode( TQString::fromLatin1("-v") ); } void IRCUserContact::slotBanHost() @@ -246,7 +246,7 @@ void IRCUserContact::slotBanHost() if (mInfo.hostName.isEmpty()) { if (kircEngine()->isConnected()) { kircEngine()->whois(m_nickName); - QTimer::singleShot( 750, this, SLOT( slotBanHostOnce() ) ); + TQTimer::singleShot( 750, this, TQT_SLOT( slotBanHostOnce() ) ); } } else { slotBanHostOnce(); @@ -258,9 +258,9 @@ void IRCUserContact::slotBanHostOnce() return; Kopete::ContactPtrList members = mActiveManager->members(); - QString channelName = static_cast<IRCContact*>(members.first())->nickName(); + TQString channelName = static_cast<IRCContact*>(members.first())->nickName(); - kircEngine()->mode(channelName, QString::fromLatin1("+b *!*@%1").arg(mInfo.hostName)); + kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@%1").arg(mInfo.hostName)); } void IRCUserContact::slotBanUserHost() @@ -270,7 +270,7 @@ void IRCUserContact::slotBanUserHost() if (mInfo.hostName.isEmpty()) { if (kircEngine()->isConnected()) { kircEngine()->whois(m_nickName); - QTimer::singleShot( 750, this, SLOT( slotBanUserHostOnce() ) ); + TQTimer::singleShot( 750, this, TQT_SLOT( slotBanUserHostOnce() ) ); } } else { slotBanUserHostOnce(); @@ -282,9 +282,9 @@ void IRCUserContact::slotBanUserHostOnce() return; Kopete::ContactPtrList members = mActiveManager->members(); - QString channelName = static_cast<IRCContact*>(members.first())->nickName(); + TQString channelName = static_cast<IRCContact*>(members.first())->nickName(); - kircEngine()->mode(channelName, QString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName)); + kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@%2").arg(mInfo.userName, mInfo.hostName)); } void IRCUserContact::slotBanDomain() @@ -294,7 +294,7 @@ void IRCUserContact::slotBanDomain() if (mInfo.hostName.isEmpty()) { if (kircEngine()->isConnected()) { kircEngine()->whois(m_nickName); - QTimer::singleShot( 750, this, SLOT( slotBanDomainOnce() ) ); + TQTimer::singleShot( 750, this, TQT_SLOT( slotBanDomainOnce() ) ); } } else { slotBanDomainOnce(); @@ -306,11 +306,11 @@ void IRCUserContact::slotBanDomainOnce() return; Kopete::ContactPtrList members = mActiveManager->members(); - QString channelName = static_cast<IRCContact*>(members.first())->nickName(); + TQString channelName = static_cast<IRCContact*>(members.first())->nickName(); - QString domain = mInfo.hostName.section('.', 1); + TQString domain = mInfo.hostName.section('.', 1); - kircEngine()->mode(channelName, QString::fromLatin1("+b *!*@*.%1").arg(domain)); + kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@*.%1").arg(domain)); } void IRCUserContact::slotBanUserDomain() @@ -320,7 +320,7 @@ void IRCUserContact::slotBanUserDomain() if (mInfo.hostName.isEmpty()) { if (kircEngine()->isConnected()) { kircEngine()->whois(m_nickName); - QTimer::singleShot( 750, this, SLOT( slotBanUserDomainOnce() ) ); + TQTimer::singleShot( 750, this, TQT_SLOT( slotBanUserDomainOnce() ) ); } } else { slotBanUserDomainOnce(); @@ -332,25 +332,25 @@ void IRCUserContact::slotBanUserDomainOnce() return; Kopete::ContactPtrList members = mActiveManager->members(); - QString channelName = static_cast<IRCContact*>(members.first())->nickName(); + TQString channelName = static_cast<IRCContact*>(members.first())->nickName(); - QString domain = mInfo.hostName.section('.', 1); + TQString domain = mInfo.hostName.section('.', 1); - kircEngine()->mode(channelName, QString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain)); + kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@*.%2").arg(mInfo.userName, domain)); } void IRCUserContact::slotKick() { Kopete::ContactPtrList members = mActiveManager->members(); - QString channelName = static_cast<IRCContact*>(members.first())->nickName(); - kircEngine()->kick(m_nickName, channelName, QString::null); + TQString channelName = static_cast<IRCContact*>(members.first())->nickName(); + kircEngine()->kick(m_nickName, channelName, TQString::null); } -void IRCUserContact::contactMode(const QString &mode) +void IRCUserContact::contactMode(const TQString &mode) { Kopete::ContactPtrList members = mActiveManager->members(); - QString channelName = static_cast<IRCContact*>(members.first())->nickName(); - kircEngine()->mode(channelName, QString::fromLatin1("%1 %2").arg(mode).arg(m_nickName)); + TQString channelName = static_cast<IRCContact*>(members.first())->nickName(); + kircEngine()->mode(channelName, TQString::fromLatin1("%1 %2").arg(mode).arg(m_nickName)); } void IRCUserContact::slotCtcpPing() @@ -363,7 +363,7 @@ void IRCUserContact::slotCtcpVersion() kircEngine()->CtcpRequest_version(m_nickName); } -void IRCUserContact::newWhoIsUser(const QString &username, const QString &hostname, const QString &realname) +void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &hostname, const TQString &realname) { mInfo.channels.clear(); mInfo.userName = username; @@ -372,14 +372,14 @@ void IRCUserContact::newWhoIsUser(const QString &username, const QString &hostna if( onlineStatus().status() == Kopete::OnlineStatus::Offline ) { - setProperty( m_protocol->propUserInfo, QString::fromLatin1("%1@%2") + setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2") .arg(mInfo.userName).arg(mInfo.hostName) ); setProperty( m_protocol->propServer, mInfo.serverName ); setProperty( m_protocol->propFullName, mInfo.realName ); } } -void IRCUserContact::newWhoIsServer(const QString &servername, const QString &serverinfo) +void IRCUserContact::newWhoIsServer(const TQString &servername, const TQString &serverinfo) { mInfo.serverName = servername; if( metaContact()->isTemporary() || onlineStatus().status() == Kopete::OnlineStatus::Online @@ -395,7 +395,7 @@ void IRCUserContact::newWhoIsServer(const QString &servername, const QString &se // 312 mynick othernick localhost.localdomain :FooNet Server // 312 mynick othernick localhost.localdomain :Thu Jun 16 21:00:36 2005 - QDateTime lastSeen = QDateTime::fromString( serverinfo ); + TQDateTime lastSeen = TQDateTime::fromString( serverinfo ); if( lastSeen.isValid() ) setProperty( m_protocol->propLastSeen, lastSeen ); } @@ -417,7 +417,7 @@ void IRCUserContact::newWhoIsIdentified() setProperty( m_protocol->propIsIdentified, i18n("True") ); } -void IRCUserContact::newWhoIsChannels(const QString &channel) +void IRCUserContact::newWhoIsChannels(const TQString &channel) { mInfo.channels.append( channel ); } @@ -432,7 +432,7 @@ void IRCUserContact::whoIsComplete() commandSource == manager(Kopete::Contact::CannotCreate) ) { //User info - QString msg = i18n("%1 is (%2@%3): %4<br/>") + TQString msg = i18n("%1 is (%2@%3): %4<br/>") .arg(m_nickName) .arg(mInfo.userName) .arg(mInfo.hostName) @@ -451,8 +451,8 @@ void IRCUserContact::whoIsComplete() msg += i18n("on IRC via server %1 ( %2 )<br/>").arg(mInfo.serverName).arg(mInfo.serverInfo); //Idle - QString idleTime = formattedIdleTime(); - msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? QString::number(0) : idleTime ); + TQString idleTime = formattedIdleTime(); + msg += i18n("idle: %2<br/>").arg( idleTime.isEmpty() ? TQString::number(0) : idleTime ); //End ircAccount()->appendMessage(msg, IRCAccount::InfoReply ); @@ -465,7 +465,7 @@ void IRCUserContact::whoWasComplete() if( isChatting() && ircAccount()->currentCommandSource() == manager() ) { //User info - QString msg = i18n("%1 was (%2@%3): %4\n") + TQString msg = i18n("%1 was (%2@%3): %4\n") .arg(m_nickName) .arg(mInfo.userName) .arg(mInfo.hostName) @@ -482,27 +482,27 @@ void IRCUserContact::whoWasComplete() } } -QString IRCUserContact::formattedName() const +TQString IRCUserContact::formattedName() const { return mInfo.realName; } void IRCUserContact::updateInfo() { - setProperty( m_protocol->propUserInfo, QString::fromLatin1("%1@%2") + setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2") .arg(mInfo.userName).arg(mInfo.hostName) ); setProperty( m_protocol->propServer, mInfo.serverName ); setProperty( m_protocol->propChannels, mInfo.channels.join(" ") ); - setProperty( m_protocol->propHops, QString::number(mInfo.hops) ); + setProperty( m_protocol->propHops, TQString::number(mInfo.hops) ); setProperty( m_protocol->propFullName, mInfo.realName ); setIdleTime( mInfo.idle ); - mInfo.lastUpdate = QTime::currentTime(); + mInfo.lastUpdate = TQTime::currentTime(); } -void IRCUserContact::newWhoReply( const QString &channel, const QString &user, const QString &host, - const QString &server, bool away, const QString &flags, uint hops, const QString &realName ) +void IRCUserContact::newWhoReply( const TQString &channel, const TQString &user, const TQString &host, + const TQString &server, bool away, const TQString &flags, uint hops, const TQString &realName ) { if( !mInfo.channels.contains( channel ) ) mInfo.channels.append( channel ); @@ -524,11 +524,11 @@ void IRCUserContact::newWhoReply( const QString &channel, const QString &user, c } } -QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession *manager ) +TQPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession *manager ) { if( manager ) { - QPtrList<KAction> *mCustomActions = new QPtrList<KAction> (); + TQPtrList<KAction> *mCustomActions = new TQPtrList<KAction> (); mActiveManager = manager; Kopete::ContactPtrList members = mActiveManager->members(); IRCChannelContact *isChannel = dynamic_cast<IRCChannelContact*>( members.first() ); @@ -537,38 +537,38 @@ QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession { actionCtcpMenu = new KActionMenu(i18n("C&TCP"), 0, this ); actionCtcpMenu->insert( new KAction(i18n("&Version"), 0, this, - SLOT(slotCtcpVersion()), actionCtcpMenu) ); + TQT_SLOT(slotCtcpVersion()), actionCtcpMenu) ); actionCtcpMenu->insert( new KAction(i18n("&Ping"), 0, this, - SLOT(slotCtcpPing()), actionCtcpMenu) ); + TQT_SLOT(slotCtcpPing()), actionCtcpMenu) ); actionModeMenu = new KActionMenu(i18n("&Modes"), 0, this, "actionModeMenu"); actionModeMenu->insert( new KAction(i18n("&Op"), 0, this, - SLOT(slotOp()), actionModeMenu, "actionOp") ); + TQT_SLOT(slotOp()), actionModeMenu, "actionOp") ); actionModeMenu->insert( new KAction(i18n("&Deop"), 0, this, - SLOT(slotDeop()), actionModeMenu, "actionDeop") ); + TQT_SLOT(slotDeop()), actionModeMenu, "actionDeop") ); actionModeMenu->insert( new KAction(i18n("&Voice"), 0, this, - SLOT(slotVoice()), actionModeMenu, "actionVoice") ); + TQT_SLOT(slotVoice()), actionModeMenu, "actionVoice") ); actionModeMenu->insert( new KAction(i18n("Devoice"), 0, this, - SLOT(slotDevoice()), actionModeMenu, "actionDevoice") ); + TQT_SLOT(slotDevoice()), actionModeMenu, "actionDevoice") ); actionModeMenu->setEnabled( false ); - actionKick = new KAction(i18n("&Kick"), 0, this, SLOT(slotKick()), this); + actionKick = new KAction(i18n("&Kick"), 0, this, TQT_SLOT(slotKick()), this); actionKick->setEnabled( false ); actionBanMenu = new KActionMenu(i18n("&Ban"), 0, this, "actionBanMenu"); actionBanMenu->insert( new KAction(i18n("Host (*!*@host.domain.net)"), 0, this, - SLOT(slotBanHost()), actionBanMenu ) ); + TQT_SLOT(slotBanHost()), actionBanMenu ) ); actionBanMenu->insert( new KAction(i18n("Domain (*!*@*.domain.net)"), 0, this, - SLOT(slotBanDomain()), actionBanMenu ) ); + TQT_SLOT(slotBanDomain()), actionBanMenu ) ); actionBanMenu->insert( new KAction(i18n("User@Host (*!*user@host.domain.net)"), 0, this, - SLOT(slotBanUserHost()), actionBanMenu ) ); + TQT_SLOT(slotBanUserHost()), actionBanMenu ) ); actionBanMenu->insert( new KAction(i18n("User@Domain (*!*user@*.domain.net)"), 0, this, - SLOT(slotBanUserDomain()), actionBanMenu ) ); + TQT_SLOT(slotBanUserDomain()), actionBanMenu ) ); actionBanMenu->setEnabled( false ); codecAction = new KCodecAction( i18n("&Encoding"), 0, this, "selectcharset" ); - connect( codecAction, SIGNAL( activated( const QTextCodec * ) ), - this, SLOT( setCodec( const QTextCodec *) ) ); + connect( codecAction, TQT_SIGNAL( activated( const TQTextCodec * ) ), + this, TQT_SLOT( setCodec( const TQTextCodec *) ) ); codecAction->setCodec( codec() ); } @@ -594,7 +594,7 @@ QPtrList<KAction> *IRCUserContact::customContextMenuActions( Kopete::ChatSession return 0L; } -void IRCUserContact::slotIncomingModeChange( const QString &channel, const QString &, const QString &mode_ ) +void IRCUserContact::slotIncomingModeChange( const TQString &channel, const TQString &, const TQString &mode_ ) { kdDebug(14120) << k_funcinfo << "channel: " << channel << " mode: " << mode_ << endl; @@ -610,13 +610,13 @@ void IRCUserContact::slotIncomingModeChange( const QString &channel, const QStri // // irssi manual example: /MODE #channel +nto-o+v nick1 nick2 nick3 - QStringList users = QStringList::split(' ', mode_); + TQStringList users = TQStringList::split(' ', mode_); users.pop_front(); - const QString mode = mode_.section(' ', 0, 0); + const TQString mode = mode_.section(' ', 0, 0); bitAdjustment adjMode = RemoveBits; - QStringList::iterator user = users.begin(); + TQStringList::iterator user = users.begin(); //kdDebug(14120) << "me: " << m_nickName << " users: " << users << " mode: " << mode << endl; @@ -695,7 +695,7 @@ void IRCUserContact::adjustInternalOnlineStatusBits(IRCChannelContact *channel, channel->manager()->setContactOnlineStatus(this, newStatus); } -void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const QString &message) +void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message) { if (to == this) { @@ -713,7 +713,7 @@ void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const QStr } } -void IRCUserContact::newAction(const QString &to, const QString &action) +void IRCUserContact::newAction(const TQString &to, const TQString &action) { IRCAccount *account = ircAccount(); diff --git a/kopete/protocols/irc/ircusercontact.h b/kopete/protocols/irc/ircusercontact.h index 3373fa9c..b1cafa11 100644 --- a/kopete/protocols/irc/ircusercontact.h +++ b/kopete/protocols/irc/ircusercontact.h @@ -35,21 +35,21 @@ class IRCChannelContact; struct IRCUserInfo { - QString userName; - QString hostName; - QString realName; - QString serverName; - QString serverInfo; - QString flags; - QStringList channels; + TQString userName; + TQString hostName; + TQString realName; + TQString serverName; + TQString serverInfo; + TQString flags; + TQStringList channels; unsigned long idle; bool isOperator; bool isIdentified; bool away; bool online; uint hops; - QDateTime lastOnline; - QTime lastUpdate; + TQDateTime lastOnline; + TQTime lastUpdate; }; /** @@ -64,41 +64,41 @@ class IRCUserContact : public IRCContact public: // This class provides a Kopete::Contact for each user on the channel. - IRCUserContact(IRCContactManager *, const QString &nickname, Kopete::MetaContact *mc); + IRCUserContact(IRCContactManager *, const TQString &nickname, Kopete::MetaContact *mc); // Kopete::Contact stuff - virtual QPtrList<KAction> *customContextMenuActions( Kopete::ChatSession *manager ); - virtual const QString caption() const; + virtual TQPtrList<KAction> *customContextMenuActions( Kopete::ChatSession *manager ); + virtual const TQString caption() const; void setAway(bool isAway); - QString formattedName() const; + TQString formattedName() const; //Methods handled by the signal mapper - void incomingUserIsAway(const QString &message ); + void incomingUserIsAway(const TQString &message ); void userOnline(); - void newAction( const QString &from, const QString &action ); - void newWhoIsUser(const QString &username, const QString &hostname, const QString &realname); - void newWhoIsServer(const QString &server, const QString &serverInfo); + void newAction( const TQString &from, const TQString &action ); + void newWhoIsUser(const TQString &username, const TQString &hostname, const TQString &realname); + void newWhoIsServer(const TQString &server, const TQString &serverInfo); void newWhoIsOperator(); void newWhoIsIdentified(); void newWhoIsIdle(unsigned long seconds); - void newWhoIsChannels(const QString &channel); + void newWhoIsChannels(const TQString &channel); void whoIsComplete(); void whoWasComplete(); - void newWhoReply( const QString &channel, const QString &user, const QString &host, - const QString &server, bool away, const QString &flags, uint hops, - const QString &realName ); + void newWhoReply( const TQString &channel, const TQString &user, const TQString &host, + const TQString &server, bool away, const TQString &flags, uint hops, + const TQString &realName ); public slots: /** \brief Updates online status for channels based on current internal status. */ virtual void updateStatus(); - virtual void sendFile(const KURL &sourceURL, const QString&, unsigned int); + virtual void sendFile(const KURL &sourceURL, const TQString&, unsigned int); protected slots: - virtual void privateMessage(IRCContact *from, IRCContact *to, const QString &message); + virtual void privateMessage(IRCContact *from, IRCContact *to, const TQString &message); private slots: void slotOp(); @@ -122,13 +122,13 @@ private slots: virtual void slotUserInfo(); //This can't be handled by the contact manager since - void slotIncomingModeChange(const QString &nick, const QString &channel, const QString &mode); + void slotIncomingModeChange(const TQString &nick, const TQString &channel, const TQString &mode); private: enum bitAdjustment { RemoveBits, AddBits }; void adjustInternalOnlineStatusBits(IRCChannelContact *channel, unsigned statusAdjustment, bitAdjustment adj); - void contactMode(const QString &mode); + void contactMode(const TQString &mode); void updateInfo(); KActionMenu *actionModeMenu; @@ -137,7 +137,7 @@ private: KActionMenu *actionBanMenu; KCodecAction *codecAction; Kopete::ChatSession *mActiveManager; - QTimer *mOnlineTimer; + TQTimer *mOnlineTimer; IRCUserInfo mInfo; }; diff --git a/kopete/protocols/irc/kcodecaction.cpp b/kopete/protocols/irc/kcodecaction.cpp index e32a1787..f7e4ee24 100644 --- a/kopete/protocols/irc/kcodecaction.cpp +++ b/kopete/protocols/irc/kcodecaction.cpp @@ -14,37 +14,37 @@ * * ************************************************************************* */ -#include <qstringlist.h> -#include <qtextcodec.h> +#include <tqstringlist.h> +#include <tqtextcodec.h> #include <kcharsets.h> #include "kcodecaction.h" -KCodecAction::KCodecAction( const QString &text, const KShortcut &cut, - QObject *parent, const char *name ) : KSelectAction( text, "", cut, parent, name ) +KCodecAction::KCodecAction( const TQString &text, const KShortcut &cut, + TQObject *parent, const char *name ) : KSelectAction( text, "", cut, parent, name ) { - QObject::connect( this, SIGNAL( activated( const QString & ) ), - this, SLOT( slotActivated( const QString & ) ) ); + TQObject::connect( this, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SLOT( slotActivated( const TQString & ) ) ); setItems( KCodecAction::supportedEncodings() ); } -void KCodecAction::slotActivated( const QString & text ) +void KCodecAction::slotActivated( const TQString & text ) { /* text is something like "Western European ( iso-8859-1 )", but we must give * codecForName() only the "iso-8859-1" part. */ - QString encoding = KGlobal::charsets()->encodingForName(text); + TQString encoding = KGlobal::charsets()->encodingForName(text); emit activated( KGlobal::charsets()->codecForName(encoding) ); } -void KCodecAction::setCodec( const QTextCodec *codec ) +void KCodecAction::setCodec( const TQTextCodec *codec ) { - QStringList items = this->items(); + TQStringList items = this->items(); int i = 0; - for (QStringList::ConstIterator it = items.begin(), end = items.end(); it != end; ++it, ++i) { - QString encoding = KGlobal::charsets()->encodingForName(*it); + for (TQStringList::ConstIterator it = items.begin(), end = items.end(); it != end; ++it, ++i) { + TQString encoding = KGlobal::charsets()->encodingForName(*it); if (KGlobal::charsets()->codecForName(encoding)->mibEnum() == codec->mibEnum()) { setCurrentItem(i); @@ -59,17 +59,17 @@ void KCodecAction::setCodec( const QTextCodec *codec ) * This piece of code from kdepim/kmail/kmmsgbase.cpp */ -QStringList KCodecAction::supportedEncodings(bool usAscii) +TQStringList KCodecAction::supportedEncodings(bool usAscii) { - QStringList encodingNames = KGlobal::charsets()->availableEncodingNames(); - QStringList encodings; - QMap<QString, bool> mimeNames; + TQStringList encodingNames = KGlobal::charsets()->availableEncodingNames(); + TQStringList encodings; + TQMap<TQString, bool> mimeNames; - for (QStringList::ConstIterator it = encodingNames.begin(); + for (TQStringList::ConstIterator it = encodingNames.begin(); it != encodingNames.end(); ++it) { - QTextCodec *codec = KGlobal::charsets()->codecForName(*it); - QString mimeName = (codec) ? QString(codec->mimeName()).lower() : (*it); + TQTextCodec *codec = KGlobal::charsets()->codecForName(*it); + TQString mimeName = (codec) ? TQString(codec->mimeName()).lower() : (*it); if (mimeNames.find(mimeName) == mimeNames.end()) { encodings.append(KGlobal::charsets()->languageForEncoding(*it) diff --git a/kopete/protocols/irc/kcodecaction.h b/kopete/protocols/irc/kcodecaction.h index 93f9d6c1..3ebd5f4d 100644 --- a/kopete/protocols/irc/kcodecaction.h +++ b/kopete/protocols/irc/kcodecaction.h @@ -18,7 +18,7 @@ #define KCODECACTION_H #include <kdeversion.h> -#include <qintdict.h> +#include <tqintdict.h> #if KDE_IS_VERSION( 3, 1, 90 ) #include <kactionclasses.h> @@ -30,18 +30,18 @@ class KCodecAction : public KSelectAction { Q_OBJECT public: - KCodecAction( const QString &text, const KShortcut &cut = KShortcut(), - QObject *parent = 0, const char *name = 0 ); + KCodecAction( const TQString &text, const KShortcut &cut = KShortcut(), + TQObject *parent = 0, const char *name = 0 ); - void setCodec( const QTextCodec *codec ); + void setCodec( const TQTextCodec *codec ); - static QStringList supportedEncodings( bool usAscii = false ); + static TQStringList supportedEncodings( bool usAscii = false ); signals: - void activated( const QTextCodec * ); + void activated( const TQTextCodec * ); private slots: - void slotActivated( const QString & ); + void slotActivated( const TQString & ); }; #endif diff --git a/kopete/protocols/irc/ksparser.cpp b/kopete/protocols/irc/ksparser.cpp index 66545688..f9029e84 100644 --- a/kopete/protocols/irc/ksparser.cpp +++ b/kopete/protocols/irc/ksparser.cpp @@ -23,15 +23,15 @@ Modified by Jason Keirstead <jason@keirstead.org> #include <knotifyclient.h> #include <kdebug.h> -#include <qbuffer.h> -#include <qdatastream.h> -#include <qstylesheet.h> +#include <tqbuffer.h> +#include <tqdatastream.h> +#include <tqstylesheet.h> #include "ksparser.h" #include <stdlib.h> KSParser KSParser::m_parser; -const QColor KSParser::IRC_Colors[17]= +const TQColor KSParser::IRC_Colors[17]= { Qt::white, Qt::black, @@ -49,10 +49,10 @@ const QColor KSParser::IRC_Colors[17]= Qt::magenta, Qt::darkGray, Qt::gray, - QColor() // default invalid color, must be the last + TQColor() // default invalid color, must be the last }; -const QRegExp KSParser::sm_colorsModeRegexp("(\\d{1,2})(?:,(\\d{1,2}))?"); +const TQRegExp KSParser::sm_colorsModeRegexp("(\\d{1,2})(?:,(\\d{1,2}))?"); template <typename _TYPE_> inline void swap(_TYPE_ &o1, _TYPE_ &o2) @@ -73,31 +73,31 @@ KSParser::~KSParser() } /* NOTE: If thread corruption are seen simply ad a qlock here */ -QCString KSParser::parse(const QCString &message) +TQCString KSParser::parse(const TQCString &message) { return m_parser._parse(message); } -QCString KSParser::_parse(const QCString &message) +TQCString KSParser::_parse(const TQCString &message) { - QCString data( message.size() * 2 ); - QBuffer buff( data ); + TQCString data( message.size() * 2 ); + TQBuffer buff( data ); buff.open( IO_WriteOnly ); m_tags.clear(); m_attributes.clear(); - QRegExp colorsModeRegexp(sm_colorsModeRegexp); + TQRegExp colorsModeRegexp(sm_colorsModeRegexp); // should be set to the current default colors .... - QColor fgColor; /*KopeteMesage::fg().name()*/ - QColor bgColor; /*KopeteMesage::bg().name()*/ + TQColor fgColor; /*KopeteMesage::fg().name()*/ + TQColor bgColor; /*KopeteMesage::bg().name()*/ uint chars = 0; for(uint i = 0; i < message.length(); ++i) { - const QChar &cur = message[i]; - QString toAppend; + const TQChar &cur = message[i]; + TQString toAppend; switch (cur) { @@ -108,7 +108,7 @@ QCString KSParser::_parse(const QCString &message) if (colorsModeRegexp.search(message, i+1) == (int)i+1) { i += colorsModeRegexp.matchedLength(); // + 1 will be added by ++ - QString tagStyle; + TQString tagStyle; fgColor = ircColor(colorsModeRegexp.cap(1)); bgColor = ircColor(colorsModeRegexp.cap(2)); @@ -117,17 +117,17 @@ QCString KSParser::_parse(const QCString &message) } else { - toAppend = popTag(QString::fromLatin1("span")); + toAppend = popTag(TQString::fromLatin1("span")); } break; case 0x07: //System bell: ^G - KNotifyClient::beep( QString::fromLatin1("IRC beep event received in a message") ); + KNotifyClient::beep( TQString::fromLatin1("IRC beep event received in a message") ); break; case '\t': // 0x09 - toAppend = QString::fromLatin1(" "); + toAppend = TQString::fromLatin1(" "); break; case '\n': // 0x0D - toAppend= QString::fromLatin1("<br/>"); + toAppend= TQString::fromLatin1("<br/>"); break; case 0x0D: // Italics: ^N toAppend = toggleTag("i"); @@ -145,23 +145,23 @@ QCString KSParser::_parse(const QCString &message) toAppend = toggleTag("u"); break; case '<': - toAppend = QString::fromLatin1("<"); + toAppend = TQString::fromLatin1("<"); break; case '>': - toAppend = QString::fromLatin1(">"); + toAppend = TQString::fromLatin1(">"); break; default: - if (cur < QChar(' ')) // search for control characters - toAppend = QString::fromLatin1("<%1>").arg(cur, 2, 16).upper(); + if (cur < TQChar(' ')) // search for control characters + toAppend = TQString::fromLatin1("<%1>").arg(cur, 2, 16).upper(); else - toAppend = QStyleSheet::escape(cur); + toAppend = TQStyleSheet::escape(cur); } chars += toAppend.length(); buff.writeBlock( toAppend.latin1(), toAppend.length() ); } - QString toAppend = popAll(); + TQString toAppend = popAll(); chars += toAppend.length(); buff.writeBlock( toAppend.latin1(), toAppend.length() ); @@ -174,9 +174,9 @@ QCString KSParser::_parse(const QCString &message) return data; } -QString KSParser::pushTag(const QString &tag, const QString &attributes) +TQString KSParser::pushTag(const TQString &tag, const TQString &attributes) { - QString res; + TQString res; m_tags.push(tag); if(!m_attributes.contains(tag)) m_attributes.insert(tag, attributes); @@ -188,28 +188,28 @@ QString KSParser::pushTag(const QString &tag, const QString &attributes) return res + ">"; } -QString KSParser::pushColorTag(const QColor &fgColor, const QColor &bgColor) +TQString KSParser::pushColorTag(const TQColor &fgColor, const TQColor &bgColor) { - QString tagStyle; + TQString tagStyle; if (fgColor.isValid()) - tagStyle += QString::fromLatin1("color:%1;").arg(fgColor.name()); + tagStyle += TQString::fromLatin1("color:%1;").arg(fgColor.name()); if (bgColor.isValid()) - tagStyle += QString::fromLatin1("background-color:%1;").arg(bgColor.name()); + tagStyle += TQString::fromLatin1("background-color:%1;").arg(bgColor.name()); if(!tagStyle.isEmpty()) - tagStyle = QString::fromLatin1("style=\"%1\"").arg(tagStyle); + tagStyle = TQString::fromLatin1("style=\"%1\"").arg(tagStyle); - return pushTag(QString::fromLatin1("span"), tagStyle);; + return pushTag(TQString::fromLatin1("span"), tagStyle);; } -QString KSParser::popTag(const QString &tag) +TQString KSParser::popTag(const TQString &tag) { if (!m_tags.contains(tag)) - return QString::null; + return TQString::null; - QString res; - QValueStack<QString> savedTags; + TQString res; + TQValueStack<TQString> savedTags; while(m_tags.top() != tag) { savedTags.push(m_tags.pop()); @@ -222,21 +222,21 @@ QString KSParser::popTag(const QString &tag) return res; } -QString KSParser::toggleTag(const QString &tag) +TQString KSParser::toggleTag(const TQString &tag) { return m_attributes.contains(tag)?popTag(tag):pushTag(tag); } -QString KSParser::popAll() +TQString KSParser::popAll() { - QString res; + TQString res; while(!m_tags.isEmpty()) res.append("</" + m_tags.pop() + ">"); m_attributes.clear(); return res; } -QColor KSParser::ircColor(const QString &color) +TQColor KSParser::ircColor(const TQString &color) { bool success; unsigned int intColor = color.toUInt(&success); @@ -244,19 +244,19 @@ QColor KSParser::ircColor(const QString &color) if (success) return ircColor(intColor); else - return QColor(); + return TQColor(); } -QColor KSParser::ircColor(unsigned int color) +TQColor KSParser::ircColor(unsigned int color) { - unsigned int maxcolor = sizeof(IRC_Colors)/sizeof(QColor); + unsigned int maxcolor = sizeof(IRC_Colors)/sizeof(TQColor); return color<=maxcolor?IRC_Colors[color]:IRC_Colors[maxcolor]; } -int KSParser::colorForHTML(const QString &html) +int KSParser::colorForHTML(const TQString &html) { - QColor color(html); - for(uint i=0; i<sizeof(IRC_Colors)/sizeof(QColor); i++) + TQColor color(html); + for(uint i=0; i<sizeof(IRC_Colors)/sizeof(TQColor); i++) { if(IRC_Colors[i] == color) return i; diff --git a/kopete/protocols/irc/ksparser.h b/kopete/protocols/irc/ksparser.h index dda7b7c1..cc9d9dc4 100644 --- a/kopete/protocols/irc/ksparser.h +++ b/kopete/protocols/irc/ksparser.h @@ -7,11 +7,11 @@ #ifndef __ksparser_h__ #define __ksparser_h__ -#include <qcolor.h> -#include <qmap.h> -#include <qregexp.h> -#include <qstring.h> -#include <qvaluestack.h> +#include <tqcolor.h> +#include <tqmap.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqvaluestack.h> /* * Helper class to parse IRC color/style codes and convert them to @@ -25,30 +25,30 @@ class KSParser { public: - static QCString parse(const QCString &); - static int colorForHTML( const QString &html ); + static TQCString parse(const TQCString &); + static int colorForHTML( const TQString &html ); - static QColor ircColor(const QString &color); - static QColor ircColor(unsigned int color); + static TQColor ircColor(const TQString &color); + static TQColor ircColor(unsigned int color); ~KSParser(); private: KSParser(); - QCString _parse(const QCString &); - QString pushTag(const QString &, const QString & = QString::null); - QString pushColorTag(const QColor &fgColor, const QColor &bgColor); - QString popTag(const QString &); - QString toggleTag(const QString &); - QString popAll(); + TQCString _parse(const TQCString &); + TQString pushTag(const TQString &, const TQString & = TQString::null); + TQString pushColorTag(const TQColor &fgColor, const TQColor &bgColor); + TQString popTag(const TQString &); + TQString toggleTag(const TQString &); + TQString popAll(); private: static KSParser m_parser; - static const QColor IRC_Colors[17]; - static const QRegExp sm_colorsModeRegexp; + static const TQColor IRC_Colors[17]; + static const TQRegExp sm_colorsModeRegexp; - QValueStack<QString> m_tags; - QMap<QString, QString> m_attributes; + TQValueStack<TQString> m_tags; + TQMap<TQString, TQString> m_attributes; }; #endif diff --git a/kopete/protocols/irc/libkirc/kircengine.cpp b/kopete/protocols/irc/libkirc/kircengine.cpp index 5b70d5fc..03936d5f 100644 --- a/kopete/protocols/irc/libkirc/kircengine.cpp +++ b/kopete/protocols/irc/libkirc/kircengine.cpp @@ -30,8 +30,8 @@ #include <klocale.h> #include <kstandarddirs.h> -#include <qtextcodec.h> -#include <qtimer.h> +#include <tqtextcodec.h> +#include <tqtimer.h> //Needed for getuid / getpwuid #include <unistd.h> @@ -48,13 +48,13 @@ using namespace KIRC; // FIXME: Remove slotConnected() and error(int errCode) while going to KNetwork namespace -/* Please note that the regular expression "[\\r\\n]*$" is used in a QString::replace statement many times. +/* Please note that the regular expression "[\\r\\n]*$" is used in a TQString::replace statement many times. * This gets rid of trailing \r\n, \r, \n, and \n\r characters. */ -const QRegExp Engine::m_RemoveLinefeeds( QString::fromLatin1("[\\r\\n]*$") ); +const TQRegExp Engine::m_RemoveLinefeeds( TQString::fromLatin1("[\\r\\n]*$") ); -Engine::Engine(QObject *parent, const char *name) - : QObject(parent, QString::fromLatin1("[KIRC::Engine]%1").arg(name).latin1()), +Engine::Engine(TQObject *parent, const char *name) + : TQObject(parent, TQString::fromLatin1("[KIRC::Engine]%1").arg(name).latin1()), m_status(Idle), m_FailedNickOnLogin(false), m_useSSL(false), @@ -64,7 +64,7 @@ Engine::Engine(QObject *parent, const char *name) m_ctcpReplies(17, false), codecs(577,false) { - setUserName(QString::null); + setUserName(TQString::null); m_commands.setAutoDelete(true); m_ctcpQueries.setAutoDelete(true); @@ -74,11 +74,11 @@ Engine::Engine(QObject *parent, const char *name) bindNumericReplies(); bindCtcp(); - m_VersionString = QString::fromLatin1("Anonymous client using the KIRC engine."); - m_UserString = QString::fromLatin1("Response not supplied by user."); - m_SourceString = QString::fromLatin1("Unknown client, known source."); + m_VersionString = TQString::fromLatin1("Anonymous client using the KIRC engine."); + m_UserString = TQString::fromLatin1("Response not supplied by user."); + m_SourceString = TQString::fromLatin1("Unknown client, known source."); - defaultCodec = QTextCodec::codecForMib(106); // UTF8 mib is 106 + defaultCodec = TQTextCodec::codecForMib(106); // UTF8 mib is 106 kdDebug(14120) << "Setting default engine codec, " << defaultCodec->name() << endl; m_sock = 0L; @@ -110,9 +110,9 @@ void Engine::setUseSSL( bool useSSL ) m_sock = new KSSLSocket; m_sock->setSocketFlags( KExtendedSocket::inetSocket ); - connect(m_sock, SIGNAL(certificateAccepted()), SLOT(slotConnected())); - connect(m_sock, SIGNAL(certificateRejected()), SLOT(slotConnectionClosed())); - connect(m_sock, SIGNAL(sslFailure()), SLOT(slotConnectionClosed())); + connect(m_sock, TQT_SIGNAL(certificateAccepted()), TQT_SLOT(slotConnected())); + connect(m_sock, TQT_SIGNAL(certificateRejected()), TQT_SLOT(slotConnectionClosed())); + connect(m_sock, TQT_SIGNAL(sslFailure()), TQT_SLOT(slotConnectionClosed())); } else #else @@ -124,12 +124,12 @@ void Engine::setUseSSL( bool useSSL ) m_sock = new KExtendedSocket; m_sock->setSocketFlags( KExtendedSocket::inputBufferedSocket | KExtendedSocket::inetSocket ); - connect(m_sock, SIGNAL(connectionSuccess()), SLOT(slotConnected())); - connect(m_sock, SIGNAL(connectionFailed(int)), SLOT(error(int))); + connect(m_sock, TQT_SIGNAL(connectionSuccess()), TQT_SLOT(slotConnected())); + connect(m_sock, TQT_SIGNAL(connectionFailed(int)), TQT_SLOT(error(int))); } - connect(m_sock, SIGNAL(closed(int)), SLOT(slotConnectionClosed())); - connect(m_sock, SIGNAL(readyRead()), SLOT(slotReadyRead())); + connect(m_sock, TQT_SIGNAL(closed(int)), TQT_SLOT(slotConnectionClosed())); + connect(m_sock, TQT_SIGNAL(readyRead()), TQT_SLOT(slotReadyRead())); } } @@ -183,7 +183,7 @@ void Engine::setStatus(Engine::Status status) } } -void Engine::connectToServer(const QString &host, Q_UINT16 port, const QString &nickname, bool useSSL ) +void Engine::connectToServer(const TQString &host, Q_UINT16 port, const TQString &nickname, bool useSSL ) { setUseSSL(useSSL); @@ -229,45 +229,45 @@ void Engine::error(int errCode) } } -void Engine::setVersionString(const QString &newString) +void Engine::setVersionString(const TQString &newString) { m_VersionString = newString; m_VersionString.remove(m_RemoveLinefeeds); } -void Engine::setUserString(const QString &newString) +void Engine::setUserString(const TQString &newString) { m_UserString = newString; m_UserString.remove(m_RemoveLinefeeds); } -void Engine::setSourceString(const QString &newString) +void Engine::setSourceString(const TQString &newString) { m_SourceString = newString; m_SourceString.remove(m_RemoveLinefeeds); } -void Engine::setUserName(const QString &newName) +void Engine::setUserName(const TQString &newName) { if(newName.isEmpty()) - m_Username = QString::fromLatin1(getpwuid(getuid())->pw_name); + m_Username = TQString::fromLatin1(getpwuid(getuid())->pw_name); else m_Username = newName; m_Username.remove(m_RemoveLinefeeds); } -void Engine::setRealName(const QString &newName) +void Engine::setRealName(const TQString &newName) { if(newName.isEmpty()) - m_realName = QString::fromLatin1(getpwuid(getuid())->pw_gecos); + m_realName = TQString::fromLatin1(getpwuid(getuid())->pw_gecos); else m_realName = newName; m_realName.remove(m_RemoveLinefeeds); } -bool Engine::_bind(QDict<KIRC::MessageRedirector> &dict, - QString command, QObject *object, const char *member, - int minArgs, int maxArgs, const QString &helpMessage) +bool Engine::_bind(TQDict<KIRC::MessageRedirector> &dict, + TQString command, TQObject *object, const char *member, + int minArgs, int maxArgs, const TQString &helpMessage) { // FIXME: Force upper case. // FIXME: Force number format. @@ -283,29 +283,29 @@ bool Engine::_bind(QDict<KIRC::MessageRedirector> &dict, return mr->connect(object, member); } -bool Engine::bind(const QString &command, QObject *object, const char *member, - int minArgs, int maxArgs, const QString &helpMessage) +bool Engine::bind(const TQString &command, TQObject *object, const char *member, + int minArgs, int maxArgs, const TQString &helpMessage) { return _bind(m_commands, command, object, member, minArgs, maxArgs, helpMessage); } -bool Engine::bind(int id, QObject *object, const char *member, - int minArgs, int maxArgs, const QString &helpMessage) +bool Engine::bind(int id, TQObject *object, const char *member, + int minArgs, int maxArgs, const TQString &helpMessage) { - return _bind(m_commands, QString::number(id), object, member, + return _bind(m_commands, TQString::number(id), object, member, minArgs, maxArgs, helpMessage); } -bool Engine::bindCtcpQuery(const QString &command, QObject *object, const char *member, - int minArgs, int maxArgs, const QString &helpMessage) +bool Engine::bindCtcpQuery(const TQString &command, TQObject *object, const char *member, + int minArgs, int maxArgs, const TQString &helpMessage) { return _bind(m_ctcpQueries, command, object, member, minArgs, maxArgs, helpMessage); } -bool Engine::bindCtcpReply(const QString &command, QObject *object, const char *member, - int minArgs, int maxArgs, const QString &helpMessage) +bool Engine::bindCtcpReply(const TQString &command, TQObject *object, const char *member, + int minArgs, int maxArgs, const TQString &helpMessage) { return _bind(m_ctcpReplies, command, object, member, minArgs, maxArgs, helpMessage); @@ -313,32 +313,32 @@ bool Engine::bindCtcpReply(const QString &command, QObject *object, const char * /* Message will be send as passed. */ -void Engine::writeRawMessage(const QString &rawMsg) +void Engine::writeRawMessage(const TQString &rawMsg) { Message::writeRawMessage(this, defaultCodec, rawMsg); } /* Message will be quoted before beeing send. */ -void Engine::writeMessage(const QString &msg, const QTextCodec *codec) +void Engine::writeMessage(const TQString &msg, const TQTextCodec *codec) { Message::writeMessage(this, codec ? codec : defaultCodec, msg); } -void Engine::writeMessage(const QString &command, const QStringList &args, const QString &suffix, const QTextCodec *codec) +void Engine::writeMessage(const TQString &command, const TQStringList &args, const TQString &suffix, const TQTextCodec *codec) { Message::writeMessage(this, codec ? codec : defaultCodec, command, args, suffix ); } -void Engine::writeCtcpMessage(const QString &command, const QString &to, const QString &ctcpMessage) +void Engine::writeCtcpMessage(const TQString &command, const TQString &to, const TQString &ctcpMessage) { Message::writeCtcpMessage(this, defaultCodec, command, to, ctcpMessage); } -void Engine::writeCtcpMessage(const QString &command, const QString &to, const QString &suffix, - const QString &ctcpCommand, const QStringList &ctcpArgs, const QString &ctcpSuffix, bool ) +void Engine::writeCtcpMessage(const TQString &command, const TQString &to, const TQString &suffix, + const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix, bool ) { - QString nick = Entity::userNick(to); + TQString nick = Entity::userNick(to); Message::writeCtcpMessage(this, codecForNick( nick ), command, nick, suffix, ctcpCommand, ctcpArgs, ctcpSuffix ); @@ -362,13 +362,13 @@ void Engine::slotReadyRead() // mr = m_numericCommands[ msg.command().toInt() ]; // we do this conversion because some dummy servers sends 1 instead of 001 // numbers are stored as "1" instead of "001" to make convertion faster (no 0 pading). - mr = m_commands[ QString::number(msg.command().toInt()) ]; + mr = m_commands[ TQString::number(msg.command().toInt()) ]; else mr = m_commands[ msg.command() ]; if (mr) { - QStringList errors = mr->operator()(msg); + TQStringList errors = mr->operator()(msg); if (!errors.isEmpty()) { @@ -393,19 +393,19 @@ void Engine::slotReadyRead() emit internalError(ParsingFailed, msg); } - QTimer::singleShot( 0, this, SLOT( slotReadyRead() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotReadyRead() ) ); } if(m_sock->socketStatus() != KExtendedSocket::connected) error(); } -const QTextCodec *Engine::codecForNick( const QString &nick ) const +const TQTextCodec *Engine::codecForNick( const TQString &nick ) const { if( nick.isEmpty() ) return defaultCodec; - QTextCodec *codec = codecs[ nick ]; + TQTextCodec *codec = codecs[ nick ]; kdDebug(14120) << nick << " has codec " << codec << endl; if( !codec ) @@ -427,7 +427,7 @@ void Engine::showInfoDialog() * (Only missing the \n\r final characters) * So applying the same parsing rules to the messages. */ -bool Engine::invokeCtcpCommandOfMessage(const QDict<MessageRedirector> &map, Message &msg) +bool Engine::invokeCtcpCommandOfMessage(const TQDict<MessageRedirector> &map, Message &msg) { if(msg.hasCtcpMessage() && msg.ctcpMessage().isValid()) { @@ -436,14 +436,14 @@ bool Engine::invokeCtcpCommandOfMessage(const QDict<MessageRedirector> &map, Mes MessageRedirector *mr = map[ctcpMsg.command()]; if (mr) { - QStringList errors = mr->operator()(msg); + TQStringList errors = mr->operator()(msg); if (errors.isEmpty()) return true; kdDebug(14120) << "Method error for line:" << ctcpMsg.raw() << endl; writeCtcpErrorMessage(msg.prefix(), msg.ctcpRaw(), - QString::fromLatin1("%1 internal error(s)").arg(errors.size())); + TQString::fromLatin1("%1 internal error(s)").arg(errors.size())); } else { @@ -462,7 +462,7 @@ bool Engine::invokeCtcpCommandOfMessage(const QDict<MessageRedirector> &map, Mes return false; } -EntityPtr Engine::getEntity(const QString &name) +EntityPtr Engine::getEntity(const TQString &name) { Entity *entity = 0; @@ -474,7 +474,7 @@ EntityPtr Engine::getEntity(const QString &name) m_entities.append(entity); } - connect(entity, SIGNAL(destroyed(KIRC::Entity *)), SLOT(destroyed(KIRC::Entity *))); + connect(entity, TQT_SIGNAL(destroyed(KIRC::Entity *)), TQT_SLOT(destroyed(KIRC::Entity *))); return EntityPtr(entity); } diff --git a/kopete/protocols/irc/libkirc/kircengine.h b/kopete/protocols/irc/libkirc/kircengine.h index 50cb8f49..4fb381f1 100644 --- a/kopete/protocols/irc/libkirc/kircengine.h +++ b/kopete/protocols/irc/libkirc/kircengine.h @@ -33,12 +33,12 @@ #include <kdebugclasses.h> #endif -#include <qdatetime.h> -#include <qdict.h> -#include <qintdict.h> -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdatetime.h> +#include <tqdict.h> +#include <tqintdict.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> class QRegExp; @@ -55,21 +55,21 @@ class Engine { Q_OBJECT -// Q_PROPERTY(QUrl serverURL READ serverURL WRITE setServerURL) +// Q_PROPERTY(TQUrl serverURL READ serverURL WRITE setServerURL) // Extracted from the base of the serverURL. // Q_PROPERTY(bool useSSL); -// Q_PROPERTY(QString user READ user); -// Q_PROPERTY(QString password); -// Q_PROPERTY(QString host READ host); +// Q_PROPERTY(TQString user READ user); +// Q_PROPERTY(TQString password); +// Q_PROPERTY(TQString host READ host); // Q_PROPERTY(int port READ host); // Extracted from the query of the serverURL. // Q_PROPERTY(bool reqsPasswd); -// Q_PROPERTY(QString name); // real name -// Q_PROPERTY(QStringList nickList READ nickList WRITE setNickList) -// Q_PROPERTY(QString nick READ nick) -// Q_PROPERTY(QStringList portList) +// Q_PROPERTY(TQString name); // real name +// Q_PROPERTY(TQStringList nickList READ nickList WRITE setNickList) +// Q_PROPERTY(TQString nick READ nick) +// Q_PROPERTY(TQStringList portList) Q_ENUMS(Status) @@ -105,38 +105,38 @@ public: MessageOfTheDayCondensedMessage }; - Engine( QObject *parent = 0, const char* name = 0 ); + Engine( TQObject *parent = 0, const char* name = 0 ); ~Engine(); -// QString nick() const; -// QStringList nickList() const; -// void setNickList(const QStringList& nickList); +// TQString nick() const; +// TQStringList nickList() const; +// void setNickList(const TQStringList& nickList); -// QUrl serverURL() const; -// bool setServerURL(const QUrl &url); +// TQUrl serverURL() const; +// bool setServerURL(const TQUrl &url); - inline const QString ¤tHost() const + inline const TQString ¤tHost() const { return m_Host; }; inline Q_UINT16 currentPort() { return m_Port; } - inline const QString &nickName() const + inline const TQString &nickName() const { return m_Nickname; }; - inline const QString &password() const + inline const TQString &password() const { return m_Passwd; } - inline void setPassword(const QString &passwd) + inline void setPassword(const TQString &passwd) { m_Passwd = passwd; }; - inline const QString &userName() const + inline const TQString &userName() const { return m_Username; } - void setUserName(const QString &newName); + void setUserName(const TQString &newName); - void setRealName(const QString &newName); - inline const QString &realName() const + void setRealName(const TQString &newName); + inline const TQString &realName() const { return m_realName; } inline const bool reqsPassword() const @@ -148,18 +148,18 @@ public: const bool useSSL() const { return m_useSSL; }; void setUseSSL( bool useSSL ); - inline const QTextCodec *codec() const + inline const TQTextCodec *codec() const { return defaultCodec; }; - const QTextCodec *codecForNick( const QString &nick ) const; + const TQTextCodec *codecForNick( const TQString &nick ) const; - inline void setDefaultCodec( QTextCodec* codec ) + inline void setDefaultCodec( TQTextCodec* codec ) { defaultCodec = codec; }; - void setVersionString(const QString &versionString); - void setUserString(const QString &userString); - void setSourceString(const QString &sourceString); - void connectToServer(const QString &host, Q_UINT16 port, const QString &nickname, bool useSSL = false); + void setVersionString(const TQString &versionString); + void setUserString(const TQString &userString); + void setSourceString(const TQString &sourceString); + void connectToServer(const TQString &host, Q_UINT16 port, const TQString &nickname, bool useSSL = false); KExtendedSocket *socket() { return m_sock; }; @@ -173,102 +173,102 @@ public: inline bool isConnected() const { return m_status == Connected; } - inline void setCodec( const QString &nick, const QTextCodec *codec ) + inline void setCodec( const TQString &nick, const TQTextCodec *codec ) { codecs.replace( nick, codec ); } /* Custom CTCP replies handling */ - inline QString &customCtcp( const QString &s ) + inline TQString &customCtcp( const TQString &s ) { return customCtcpMap[s]; } - inline void addCustomCtcp( const QString &ctcp, const QString &reply ) + inline void addCustomCtcp( const TQString &ctcp, const TQString &reply ) { customCtcpMap[ ctcp.lower() ] = reply; } - KIRC::EntityPtr getEntity(const QString &name); + KIRC::EntityPtr getEntity(const TQString &name); public slots: //Message output - void writeRawMessage(const QString &message); + void writeRawMessage(const TQString &message); - void writeMessage(const QString &message, const QTextCodec *codec = 0 ); - void writeMessage(const QString &command, const QStringList &args, - const QString &suffix = QString::null, const QTextCodec *codec = 0); + void writeMessage(const TQString &message, const TQTextCodec *codec = 0 ); + void writeMessage(const TQString &command, const TQStringList &args, + const TQString &suffix = TQString::null, const TQTextCodec *codec = 0); - void writeCtcpMessage(const QString &command, const QString &to, const QString &ctcpMessage); + void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &ctcpMessage); - void writeCtcpMessage(const QString &command, const QString &to, const QString &suffix, - const QString &ctcpCommand, const QStringList &ctcpArgs, const QString &ctcpSuffix = QString::null, + void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &suffix, + const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix = TQString::null, bool emitRepliedCtcp = true); - inline void writeCtcpQueryMessage(const QString &to, const QString &suffix, - const QString &ctcpCommand, const QStringList &ctcpArgs = QStringList(), const QString &ctcpSuffix = QString::null, + inline void writeCtcpQueryMessage(const TQString &to, const TQString &suffix, + const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null, bool emitRepliedCtcp = true) { return writeCtcpMessage("PRIVMSG", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); } - inline void writeCtcpReplyMessage(const QString &to, const QString &ctcpMessage) + inline void writeCtcpReplyMessage(const TQString &to, const TQString &ctcpMessage) { writeCtcpMessage("NOTICE", to, ctcpMessage); } - inline void writeCtcpReplyMessage(const QString &to, const QString &suffix, - const QString &ctcpCommand, const QStringList &ctcpArgs = QStringList(), const QString &ctcpSuffix = QString::null, + inline void writeCtcpReplyMessage(const TQString &to, const TQString &suffix, + const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null, bool emitRepliedCtcp = true) { return writeCtcpMessage("NOTICE", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); } - inline void writeCtcpErrorMessage(const QString &to, const QString &ctcpLine, const QString &errorMsg, + inline void writeCtcpErrorMessage(const TQString &to, const TQString &ctcpLine, const TQString &errorMsg, bool emitRepliedCtcp=true) - { return writeCtcpReplyMessage(to, QString::null, "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); } + { return writeCtcpReplyMessage(to, TQString::null, "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); } - bool bind(const QString &command, QObject *object, const char *member, + bool bind(const TQString &command, TQObject *object, const char *member, int minArgs = KIRC::MessageRedirector::Unknown, int maxArgs = KIRC::MessageRedirector::Unknown, - const QString &helpMessage = QString::null); + const TQString &helpMessage = TQString::null); - bool bind(int id, QObject *object, const char *member, + bool bind(int id, TQObject *object, const char *member, int minArgs = KIRC::MessageRedirector::Unknown, int maxArgs = KIRC::MessageRedirector::Unknown, - const QString &helpMessage = QString::null); + const TQString &helpMessage = TQString::null); - bool bindCtcpQuery(const QString &command, QObject *object, const char *member, + bool bindCtcpQuery(const TQString &command, TQObject *object, const char *member, int minArgs = KIRC::MessageRedirector::Unknown, int maxArgs = KIRC::MessageRedirector::Unknown, - const QString &helpMessage = QString::null); + const TQString &helpMessage = TQString::null); - bool bindCtcpReply(const QString &command, QObject *object, const char *member, + bool bindCtcpReply(const TQString &command, TQObject *object, const char *member, int minArgs = KIRC::MessageRedirector::Unknown, int maxArgs = KIRC::MessageRedirector::Unknown, - const QString &helpMessage = QString::null); + const TQString &helpMessage = TQString::null); - void away(bool isAway, const QString &awayMessage = QString::null); - void ison(const QStringList &nickList); - void join(const QString &name, const QString &key); - void kick(const QString &user, const QString &channel, const QString &reason); + void away(bool isAway, const TQString &awayMessage = TQString::null); + void ison(const TQStringList &nickList); + void join(const TQString &name, const TQString &key); + void kick(const TQString &user, const TQString &channel, const TQString &reason); void list(); - void mode(const QString &target, const QString &mode); - void motd(const QString &server = QString::null); - void nick(const QString &newNickname); - void notice(const QString &target, const QString &message); - void part(const QString &name, const QString &reason); - void pass(const QString &password); - void privmsg(const QString &contact, const QString &message); + void mode(const TQString &target, const TQString &mode); + void motd(const TQString &server = TQString::null); + void nick(const TQString &newNickname); + void notice(const TQString &target, const TQString &message); + void part(const TQString &name, const TQString &reason); + void pass(const TQString &password); + void privmsg(const TQString &contact, const TQString &message); /** * Send a quit message for the given reason. * If now is set to true the connection is closed and no event message is sent. * Therefore setting now to true should only be used while destroying the object. */ - void quit(const QString &reason, bool now=false); + void quit(const TQString &reason, bool now=false); - void topic(const QString &channel, const QString &topic); - void user(const QString &newUsername, const QString &hostname, const QString &newRealname); - void user(const QString &newUsername, Q_UINT8 mode, const QString &newRealname); - void whois(const QString &user); + void topic(const TQString &channel, const TQString &topic); + void user(const TQString &newUsername, const TQString &hostname, const TQString &newRealname); + void user(const TQString &newUsername, Q_UINT8 mode, const TQString &newRealname); + void whois(const TQString &user); /* CTCP commands */ - void CtcpRequestCommand(const QString &contact, const QString &command); - void CtcpRequest_action(const QString &contact, const QString &message); - void CtcpRequest_dcc(const QString &, const QString &, unsigned int port, KIRC::Transfer::Type type); - void CtcpRequest_ping(const QString &target); - void CtcpRequest_version(const QString &target); + void CtcpRequestCommand(const TQString &contact, const TQString &command); + void CtcpRequest_action(const TQString &contact, const TQString &message); + void CtcpRequest_dcc(const TQString &, const TQString &, unsigned int port, KIRC::Transfer::Type type); + void CtcpRequest_ping(const TQString &target); + void CtcpRequest_version(const TQString &target); public slots: void showInfoDialog(); @@ -296,88 +296,88 @@ signals: void receivedMessage( KIRC::Engine::ServerMessageType type, const KIRC::EntityPtr &from, const KIRC::EntityPtrList &to, - const QString &msg); + const TQString &msg); - void successfullyChangedNick(const QString &, const QString &); + void successfullyChangedNick(const TQString &, const TQString &); //ServerContact Signals - void incomingMotd(const QString &motd); - void incomingNotice(const QString &originating, const QString &message); - void incomingHostInfo(const QString &servername, const QString &version, - const QString &userModes, const QString &channelModes); - void incomingYourHostInfo(const QString &servername, const QString &version, - const QString &userModes, const QString &channelModes); - void incomingConnectString(const QString &clients); + void incomingMotd(const TQString &motd); + void incomingNotice(const TQString &originating, const TQString &message); + void incomingHostInfo(const TQString &servername, const TQString &version, + const TQString &userModes, const TQString &channelModes); + void incomingYourHostInfo(const TQString &servername, const TQString &version, + const TQString &userModes, const TQString &channelModes); + void incomingConnectString(const TQString &clients); //Channel Contact Signals - void incomingMessage(const QString &originating, const QString &target, const QString &message); - void incomingTopicChange(const QString &, const QString &, const QString &); - void incomingExistingTopic(const QString &, const QString &); - void incomingTopicUser(const QString &channel, const QString &user, const QDateTime &time); - void incomingJoinedChannel(const QString &channel,const QString &nick); - void incomingPartedChannel(const QString &channel,const QString &nick, const QString &reason); - void incomingNamesList(const QString &channel, const QStringList &nicknames); - void incomingEndOfNames(const QString &channel); - void incomingChannelMode(const QString &channel, const QString &mode, const QString ¶ms); - void incomingCannotSendToChannel(const QString &channel, const QString &message); - void incomingChannelModeChange(const QString &channel, const QString &nick, const QString &mode); - void incomingChannelHomePage(const QString &channel, const QString &url); + void incomingMessage(const TQString &originating, const TQString &target, const TQString &message); + void incomingTopicChange(const TQString &, const TQString &, const TQString &); + void incomingExistingTopic(const TQString &, const TQString &); + void incomingTopicUser(const TQString &channel, const TQString &user, const TQDateTime &time); + void incomingJoinedChannel(const TQString &channel,const TQString &nick); + void incomingPartedChannel(const TQString &channel,const TQString &nick, const TQString &reason); + void incomingNamesList(const TQString &channel, const TQStringList &nicknames); + void incomingEndOfNames(const TQString &channel); + void incomingChannelMode(const TQString &channel, const TQString &mode, const TQString ¶ms); + void incomingCannotSendToChannel(const TQString &channel, const TQString &message); + void incomingChannelModeChange(const TQString &channel, const TQString &nick, const TQString &mode); + void incomingChannelHomePage(const TQString &channel, const TQString &url); //Contact Signals - void incomingPrivMessage(const QString &, const QString &, const QString &); - void incomingQuitIRC(const QString &user, const QString &reason); - void incomingUserModeChange(const QString &nick, const QString &mode); - void incomingNoSuchNickname(const QString &nick); + void incomingPrivMessage(const TQString &, const TQString &, const TQString &); + void incomingQuitIRC(const TQString &user, const TQString &reason); + void incomingUserModeChange(const TQString &nick, const TQString &mode); + void incomingNoSuchNickname(const TQString &nick); // CTCP Signals -// void action(const QString &from, const QString &to, const QString &message); - void incomingAction(const QString &channel, const QString &originating, const QString &message); - void incomingPrivAction(const QString &target, const QString &originating, const QString &message); +// void action(const TQString &from, const TQString &to, const TQString &message); + void incomingAction(const TQString &channel, const TQString &originating, const TQString &message); + void incomingPrivAction(const TQString &target, const TQString &originating, const TQString &message); //Response Signals - void incomingUserOnline(const QString &nick); - void incomingWhoIsUser(const QString &nickname, const QString &username, - const QString &hostname, const QString &realname); - void incomingWhoWasUser(const QString &nickname, const QString &username, - const QString &hostname, const QString &realname); - void incomingWhoIsServer(const QString &nickname, const QString &server, const QString &serverInfo); - void incomingWhoIsOperator(const QString &nickname); - void incomingWhoIsIdentified(const QString &nickname); - void incomingWhoIsChannels(const QString &nickname, const QString &channel); - void incomingWhoIsIdle(const QString &nickname, unsigned long seconds); /* 317 */ - void incomingSignOnTime(const QString &nickname, unsigned long seconds); /* 317 */ - void incomingEndOfWhois(const QString &nickname); - void incomingEndOfWhoWas(const QString &nickname); - - void incomingWhoReply( const QString &nick, const QString &channel, const QString &user, const QString &host, - const QString &server,bool away, const QString &flag, uint hops, const QString &realName ); - - void incomingEndOfWho( const QString &query ); + void incomingUserOnline(const TQString &nick); + void incomingWhoIsUser(const TQString &nickname, const TQString &username, + const TQString &hostname, const TQString &realname); + void incomingWhoWasUser(const TQString &nickname, const TQString &username, + const TQString &hostname, const TQString &realname); + void incomingWhoIsServer(const TQString &nickname, const TQString &server, const TQString &serverInfo); + void incomingWhoIsOperator(const TQString &nickname); + void incomingWhoIsIdentified(const TQString &nickname); + void incomingWhoIsChannels(const TQString &nickname, const TQString &channel); + void incomingWhoIsIdle(const TQString &nickname, unsigned long seconds); /* 317 */ + void incomingSignOnTime(const TQString &nickname, unsigned long seconds); /* 317 */ + void incomingEndOfWhois(const TQString &nickname); + void incomingEndOfWhoWas(const TQString &nickname); + + void incomingWhoReply( const TQString &nick, const TQString &channel, const TQString &user, const TQString &host, + const TQString &server,bool away, const TQString &flag, uint hops, const TQString &realName ); + + void incomingEndOfWho( const TQString &query ); //Error Message Signals void incomingServerLoadTooHigh(); - void incomingNickInUse(const QString &usingNick); - void incomingNickChange(const QString &, const QString &); + void incomingNickInUse(const TQString &usingNick); + void incomingNickChange(const TQString &, const TQString &); void incomingFailedServerPassword(); - void incomingFailedChankey(const QString &); - void incomingFailedChanBanned(const QString &); - void incomingFailedChanInvite(const QString &); - void incomingFailedChanFull(const QString &); - void incomingFailedNickOnLogin(const QString &); - void incomingNoNickChan(const QString &); - void incomingWasNoNick(const QString &); + void incomingFailedChankey(const TQString &); + void incomingFailedChanBanned(const TQString &); + void incomingFailedChanInvite(const TQString &); + void incomingFailedChanFull(const TQString &); + void incomingFailedNickOnLogin(const TQString &); + void incomingNoNickChan(const TQString &); + void incomingWasNoNick(const TQString &); //General Signals - void incomingUnknown(const QString &); - void incomingUnknownCtcp(const QString &); - void incomingKick(const QString &channel, const QString &nick, - const QString &nickKicked, const QString &reason); + void incomingUnknown(const TQString &); + void incomingUnknownCtcp(const TQString &); + void incomingKick(const TQString &channel, const TQString &nick, + const TQString &nickKicked, const TQString &reason); - void incomingUserIsAway(const QString &nick, const QString &awayMessage); - void incomingListedChan(const QString &chan, uint users, const QString &topic); + void incomingUserIsAway(const TQString &nick, const TQString &awayMessage); + void incomingListedChan(const TQString &chan, uint users, const TQString &topic); void incomingEndOfList(); - void incomingCtcpReply(const QString &type, const QString &target, const QString &messageReceived); + void incomingCtcpReply(const TQString &type, const TQString &target, const TQString &messageReceived); private slots: void destroyed(KIRC::Entity *entity); @@ -479,50 +479,50 @@ private: void bindCtcp(); void setStatus(KIRC::Engine::Status status); - bool invokeCtcpCommandOfMessage(const QDict<KIRC::MessageRedirector> &map, KIRC::Message &message); + bool invokeCtcpCommandOfMessage(const TQDict<KIRC::MessageRedirector> &map, KIRC::Message &message); /* * Methods that handles all the bindings creations. * This methods is used by all the bind(...) methods. */ - bool _bind(QDict<KIRC::MessageRedirector> &dict, - QString command, QObject *object, const char *member, - int minArgs, int maxArgs, const QString &helpMessage); + bool _bind(TQDict<KIRC::MessageRedirector> &dict, + TQString command, TQObject *object, const char *member, + int minArgs, int maxArgs, const TQString &helpMessage); //Static regexes - static const QRegExp m_RemoveLinefeeds; + static const TQRegExp m_RemoveLinefeeds; KIRC::Engine::Status m_status; - QString m_Host; + TQString m_Host; Q_UINT16 m_Port; -// QUrl serverURL; -// QUrl currentServerURL; - QString m_Nickname; - QString m_Username; - QString m_realName; - QString m_Passwd; +// TQUrl serverURL; +// TQUrl currentServerURL; + TQString m_Nickname; + TQString m_Username; + TQString m_realName; + TQString m_Passwd; bool m_ReqsPasswd; bool m_FailedNickOnLogin; bool m_useSSL; - QValueList<KIRC::Entity *> m_entities; + TQValueList<KIRC::Entity *> m_entities; KIRC::EntityPtr m_server; KIRC::EntityPtr m_self; - QString m_VersionString; - QString m_UserString; - QString m_SourceString; - QString m_PendingNick; + TQString m_VersionString; + TQString m_UserString; + TQString m_SourceString; + TQString m_PendingNick; - QDict<KIRC::MessageRedirector> m_commands; -// QIntDict<KIRC::MessageRedirector> m_numericCommands; - QDict<KIRC::MessageRedirector> m_ctcpQueries; - QDict<KIRC::MessageRedirector> m_ctcpReplies; + TQDict<KIRC::MessageRedirector> m_commands; +// TQIntDict<KIRC::MessageRedirector> m_numericCommands; + TQDict<KIRC::MessageRedirector> m_ctcpQueries; + TQDict<KIRC::MessageRedirector> m_ctcpReplies; - QMap<QString, QString> customCtcpMap; - QDict<QTextCodec> codecs; - QTextCodec *defaultCodec; + TQMap<TQString, TQString> customCtcpMap; + TQDict<TQTextCodec> codecs; + TQTextCodec *defaultCodec; KExtendedSocket *m_sock; }; diff --git a/kopete/protocols/irc/libkirc/kircengine_commands.cpp b/kopete/protocols/irc/libkirc/kircengine_commands.cpp index 0a0f9002..21a90676 100644 --- a/kopete/protocols/irc/libkirc/kircengine_commands.cpp +++ b/kopete/protocols/irc/libkirc/kircengine_commands.cpp @@ -21,36 +21,36 @@ #include <kextsock.h> -#include <qtimer.h> +#include <tqtimer.h> using namespace KIRC; void Engine::bindCommands() { - bind("ERROR", this, SLOT(error(KIRC::Message &)), 0, 0); - bind("JOIN", this, SLOT(join(KIRC::Message &)), 0, 1); - bind("KICK", this, SLOT(kick(KIRC::Message &)), 2, 2); - bind("NICK", this, SLOT(nick(KIRC::Message &)), 0, 0); - bind("MODE", this, SLOT(mode(KIRC::Message &)), 1, 1); - bind("NOTICE", this, SLOT(notice(KIRC::Message &)), 1, 1); - bind("PART", this, SLOT(part(KIRC::Message &)), 1, 1); - bind("PING", this, SLOT(ping(KIRC::Message &)), 0, 0); - bind("PONG", this, SLOT(pong(KIRC::Message &)), 0, 0); - bind("PRIVMSG", this, SLOT(privmsg(KIRC::Message &)), 1, 1); - bind("QUIT", this, SLOT(quit(KIRC::Message &)), 0, 0); -// bind("SQUIT", this, SLOT(squit(KIRC::Message &)), 1, 1); - bind("TOPIC", this, SLOT(topic(KIRC::Message &)), 1, 1); + bind("ERROR", this, TQT_SLOT(error(KIRC::Message &)), 0, 0); + bind("JOIN", this, TQT_SLOT(join(KIRC::Message &)), 0, 1); + bind("KICK", this, TQT_SLOT(kick(KIRC::Message &)), 2, 2); + bind("NICK", this, TQT_SLOT(nick(KIRC::Message &)), 0, 0); + bind("MODE", this, TQT_SLOT(mode(KIRC::Message &)), 1, 1); + bind("NOTICE", this, TQT_SLOT(notice(KIRC::Message &)), 1, 1); + bind("PART", this, TQT_SLOT(part(KIRC::Message &)), 1, 1); + bind("PING", this, TQT_SLOT(ping(KIRC::Message &)), 0, 0); + bind("PONG", this, TQT_SLOT(pong(KIRC::Message &)), 0, 0); + bind("PRIVMSG", this, TQT_SLOT(privmsg(KIRC::Message &)), 1, 1); + bind("QUIT", this, TQT_SLOT(quit(KIRC::Message &)), 0, 0); +// bind("SQUIT", this, TQT_SLOT(squit(KIRC::Message &)), 1, 1); + bind("TOPIC", this, TQT_SLOT(topic(KIRC::Message &)), 1, 1); } -void Engine::away(bool isAway, const QString &awayMessage) +void Engine::away(bool isAway, const TQString &awayMessage) { if(isAway) if( !awayMessage.isEmpty() ) - writeMessage("AWAY", QString::null, awayMessage); + writeMessage("AWAY", TQString::null, awayMessage); else - writeMessage("AWAY", QString::null, QString::fromLatin1("I'm away.")); + writeMessage("AWAY", TQString::null, TQString::fromLatin1("I'm away.")); else - writeMessage("AWAY", QString::null); + writeMessage("AWAY", TQString::null); } // FIXME: Really handle this message @@ -59,28 +59,28 @@ void Engine::error(Message &) setStatus(Closing); } -void Engine::ison(const QStringList &nickList) +void Engine::ison(const TQStringList &nickList) { if (!nickList.isEmpty()) { - QString statement = QString::fromLatin1("ISON"); - for (QStringList::ConstIterator it = nickList.begin(); it != nickList.end(); ++it) + TQString statement = TQString::fromLatin1("ISON"); + for (TQStringList::ConstIterator it = nickList.begin(); it != nickList.end(); ++it) { if ((statement.length()+(*it).length())>509) // 512(max buf)-2("\r\n")-1(<space separator>) { writeMessage(statement); - statement = QString::fromLatin1("ISON ") + (*it); + statement = TQString::fromLatin1("ISON ") + (*it); } else - statement.append(QChar(' ') + (*it)); + statement.append(TQChar(' ') + (*it)); } writeMessage(statement); } } -void Engine::join(const QString &name, const QString &key) +void Engine::join(const TQString &name, const TQString &key) { - QStringList args(name); + TQStringList args(name); if ( !key.isNull() ) args << key; @@ -101,9 +101,9 @@ void Engine::join(Message &msg) emit incomingJoinedChannel(Kopete::Message::unescape(msg.suffix()), msg.nickFromPrefix()); } -void Engine::kick(const QString &user, const QString &channel, const QString &reason) +void Engine::kick(const TQString &user, const TQString &channel, const TQString &reason) { - writeMessage("KICK", QStringList(channel) << user << reason); + writeMessage("KICK", TQStringList(channel) << user << reason); } void Engine::kick(Message &msg) @@ -114,9 +114,9 @@ void Engine::kick(Message &msg) emit incomingKick( Kopete::Message::unescape(msg.arg(0)), msg.nickFromPrefix(), msg.arg(1), msg.suffix()); } -void Engine::mode(const QString &target, const QString &mode) +void Engine::mode(const TQString &target, const TQString &mode) { - writeMessage("MODE", QStringList(target) << mode); + writeMessage("MODE", TQStringList(target) << mode); } void Engine::mode(Message &msg) @@ -124,7 +124,7 @@ void Engine::mode(Message &msg) /* Change the mode of a user. * "<nickname> *( ( "+" / "-" ) *( "i" / "w" / "o" / "O" / "r" ) )" */ - QStringList args = msg.args(); + TQStringList args = msg.args(); args.pop_front(); if( Entity::isChannel( msg.arg(0) ) ) emit incomingChannelModeChange( msg.arg(0), msg.nickFromPrefix(), args.join(" ")); @@ -132,7 +132,7 @@ void Engine::mode(Message &msg) emit incomingUserModeChange( msg.nickFromPrefix(), args.join(" ")); } -void Engine::nick(const QString &newNickname) +void Engine::nick(const TQString &newNickname) { m_PendingNick = newNickname; writeMessage("NICK", newNickname); @@ -142,12 +142,12 @@ void Engine::nick(Message &msg) { /* Nick name of a user changed * "<nickname>" */ - QString oldNick = msg.prefix().section('!', 0, 0); - QString newNick = msg.suffix(); + TQString oldNick = msg.prefix().section('!', 0, 0); + TQString newNick = msg.suffix(); if( codecs[ oldNick ] ) { - QTextCodec *c = codecs[ oldNick ]; + TQTextCodec *c = codecs[ oldNick ]; codecs.remove( oldNick ); codecs.insert( newNick, c ); } @@ -161,7 +161,7 @@ void Engine::nick(Message &msg) emit incomingNickChange(oldNick, msg.suffix()); } -void Engine::part(const QString &channel, const QString &reason) +void Engine::part(const TQString &channel, const TQString &reason) { /* This will part a channel with 'reason' as the reason for parting */ @@ -177,7 +177,7 @@ void Engine::part(Message &msg) emit incomingPartedChannel(msg.arg(0), msg.nickFromPrefix(), msg.suffix()); } -void Engine::pass(const QString &password) +void Engine::pass(const TQString &password) { writeMessage("PASS", password); } @@ -191,7 +191,7 @@ void Engine::pong(Message &/*msg*/) { } -void Engine::quit(const QString &reason, bool /*now*/) +void Engine::quit(const TQString &reason, bool /*now*/) { kdDebug(14120) << k_funcinfo << reason << endl; @@ -199,7 +199,7 @@ void Engine::quit(const QString &reason, bool /*now*/) return; if (isConnected()) - writeMessage("QUIT", QString::null, reason); + writeMessage("QUIT", TQString::null, reason); setStatus(Closing); } @@ -212,7 +212,7 @@ void Engine::quit(Message &msg) emit incomingQuitIRC(msg.prefix(), msg.suffix()); } -void Engine::user(const QString &newUserName, const QString &hostname, const QString &newRealName) +void Engine::user(const TQString &newUserName, const TQString &hostname, const TQString &newRealName) { /* RFC1459: "<username> <hostname> <servername> <realname>" * The USER command is used at the beginning of connection to specify @@ -221,10 +221,10 @@ void Engine::user(const QString &newUserName, const QString &hostname, const QSt m_Username = newUserName; m_realName = newRealName; - writeMessage("USER", QStringList(m_Username) << hostname << m_Host, m_realName); + writeMessage("USER", TQStringList(m_Username) << hostname << m_Host, m_realName); } -void Engine::user(const QString &newUserName, Q_UINT8 mode, const QString &newRealName) +void Engine::user(const TQString &newUserName, Q_UINT8 mode, const TQString &newRealName) { /* RFC2812: "<user> <mode> <unused> <realname>" * mode is a numeric value (from a bit mask). @@ -234,10 +234,10 @@ void Engine::user(const QString &newUserName, Q_UINT8 mode, const QString &newRe m_Username = newUserName; m_realName = newRealName; - writeMessage("USER", QStringList(m_Username) << QString::number(mode) << QChar('*'), m_realName); + writeMessage("USER", TQStringList(m_Username) << TQString::number(mode) << TQChar('*'), m_realName); } -void Engine::topic(const QString &channel, const QString &topic) +void Engine::topic(const TQString &channel, const TQString &topic) { writeMessage("TOPIC", channel, topic); } @@ -252,15 +252,15 @@ void Engine::topic(Message &msg) void Engine::list() { - writeMessage("LIST", QString::null); + writeMessage("LIST", TQString::null); } -void Engine::motd(const QString &server) +void Engine::motd(const TQString &server) { writeMessage("MOTD", server); } -void Engine::privmsg(const QString &contact, const QString &message) +void Engine::privmsg(const TQString &contact, const TQString &message) { writeMessage("PRIVMSG", contact, message, codecForNick( contact ) ); } @@ -272,9 +272,9 @@ void Engine::privmsg(Message &msg) Message m = msg; if (!m.suffix().isEmpty()) { - QString user = m.arg(0); - QString message = m.suffix(); - const QTextCodec *codec = codecForNick( user ); + TQString user = m.arg(0); + TQString message = m.suffix(); + const TQTextCodec *codec = codecForNick( user ); if (codec != defaultCodec) { m.decodeAgain( codec ); message = m.suffix(); @@ -292,7 +292,7 @@ void Engine::privmsg(Message &msg) } } -void Engine::notice(const QString &target, const QString &message) +void Engine::notice(const TQString &target, const TQString &message) { writeMessage("NOTICE", target, message); } @@ -306,7 +306,7 @@ void Engine::notice(Message &msg) invokeCtcpCommandOfMessage(m_ctcpReplies, msg); } -void Engine::whois(const QString &user) +void Engine::whois(const TQString &user) { writeMessage("WHOIS", user); } diff --git a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp index db1903f3..7216dea7 100644 --- a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp +++ b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp @@ -28,37 +28,37 @@ #include <arpa/inet.h> #include <kextsock.h> -#include <qfileinfo.h> -#include <qregexp.h> +#include <tqfileinfo.h> +#include <tqregexp.h> using namespace KIRC; void Engine::bindCtcp() { - bindCtcpQuery("ACTION", this, SLOT(CtcpQuery_action(KIRC::Message &)), + bindCtcpQuery("ACTION", this, TQT_SLOT(CtcpQuery_action(KIRC::Message &)), -1, -1); - bindCtcpQuery("CLIENTINFO", this, SLOT(CtcpQuery_clientinfo(KIRC::Message &)), + bindCtcpQuery("CLIENTINFO", this, TQT_SLOT(CtcpQuery_clientinfo(KIRC::Message &)), -1, 1); - bindCtcpQuery("DCC", this, SLOT(CtcpQuery_dcc(KIRC::Message &)), + bindCtcpQuery("DCC", this, TQT_SLOT(CtcpQuery_dcc(KIRC::Message &)), 4, 5); - bindCtcpQuery("FINGER", this, SLOT(CtcpQuery_finger(KIRC::Message &)), + bindCtcpQuery("FINGER", this, TQT_SLOT(CtcpQuery_finger(KIRC::Message &)), -1, 0); - bindCtcpQuery("PING", this, SLOT(CtcpQuery_ping(KIRC::Message &)), + bindCtcpQuery("PING", this, TQT_SLOT(CtcpQuery_ping(KIRC::Message &)), 1, 1); - bindCtcpQuery("SOURCE", this, SLOT(CtcpQuery_source(KIRC::Message &)), + bindCtcpQuery("SOURCE", this, TQT_SLOT(CtcpQuery_source(KIRC::Message &)), -1, 0); - bindCtcpQuery("TIME", this, SLOT(CtcpQuery_time(KIRC::Message &)), + bindCtcpQuery("TIME", this, TQT_SLOT(CtcpQuery_time(KIRC::Message &)), -1, 0); - bindCtcpQuery("USERINFO", this, SLOT(CtcpQuery_userinfo(KIRC::Message &)), + bindCtcpQuery("USERINFO", this, TQT_SLOT(CtcpQuery_userinfo(KIRC::Message &)), -1, 0); - bindCtcpQuery("VERSION", this, SLOT(CtcpQuery_version(KIRC::Message &)), + bindCtcpQuery("VERSION", this, TQT_SLOT(CtcpQuery_version(KIRC::Message &)), -1, 0); - bindCtcpReply("ERRMSG", this, SLOT(CtcpReply_errmsg(KIRC::Message &)), + bindCtcpReply("ERRMSG", this, TQT_SLOT(CtcpReply_errmsg(KIRC::Message &)), 1, -1); - bindCtcpReply("PING", this, SLOT(CtcpReply_ping(KIRC::Message &)), + bindCtcpReply("PING", this, TQT_SLOT(CtcpReply_ping(KIRC::Message &)), 1, 1, ""); - bindCtcpReply("VERSION", this, SLOT(CtcpReply_version(KIRC::Message &)), + bindCtcpReply("VERSION", this, TQT_SLOT(CtcpReply_version(KIRC::Message &)), -1, -1, ""); } @@ -68,20 +68,20 @@ void Engine::bindCtcp() // CtcpReply_* (if any) /* Generic ctcp commnd for the /ctcp trigger */ -void Engine::CtcpRequestCommand(const QString &contact, const QString &command) +void Engine::CtcpRequestCommand(const TQString &contact, const TQString &command) { if(m_status == Connected) { - writeCtcpQueryMessage(contact, QString::null, command); + writeCtcpQueryMessage(contact, TQString::null, command); // emit ctcpCommandMessage( contact, command ); } } -void Engine::CtcpRequest_action(const QString &contact, const QString &message) +void Engine::CtcpRequest_action(const TQString &contact, const TQString &message) { if(m_status == Connected) { - writeCtcpQueryMessage(contact, QString::null, "ACTION", message); + writeCtcpQueryMessage(contact, TQString::null, "ACTION", message); if( Entity::isChannel(contact) ) emit incomingAction(Kopete::Message::unescape(contact), Kopete::Message::unescape(m_Nickname), message); @@ -92,7 +92,7 @@ void Engine::CtcpRequest_action(const QString &contact, const QString &message) void Engine::CtcpQuery_action(Message &msg) { - QString target = msg.arg(0); + TQString target = msg.arg(0); if (target[0] == '#' || target[0] == '!' || target[0] == '&') emit incomingAction(target, msg.nickFromPrefix(), msg.ctcpMessage().ctcpRaw()); else @@ -109,18 +109,18 @@ bool Engine::CtcpReply_action(Message &msg) // FIXME: the API can now answer to help commands. void Engine::CtcpQuery_clientinfo(Message &msg) { - QString clientinfo = customCtcpMap[ QString::fromLatin1("clientinfo") ]; + TQString clientinfo = customCtcpMap[ TQString::fromLatin1("clientinfo") ]; if (clientinfo.isNull()) - clientinfo = QString::fromLatin1("The following commands are supported, but " + clientinfo = TQString::fromLatin1("The following commands are supported, but " "without sub-command help: VERSION, CLIENTINFO, USERINFO, TIME, SOURCE, PING," "ACTION."); - writeCtcpReplyMessage( msg.nickFromPrefix(), QString::null, - msg.ctcpMessage().command(), QString::null, clientinfo); + writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null, + msg.ctcpMessage().command(), TQString::null, clientinfo); } -void Engine::CtcpRequest_dcc(const QString &nickname, const QString &fileName, uint port, Transfer::Type type) +void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName, uint port, Transfer::Type type) { if( m_status != Connected || m_sock->localAddress() == 0 || @@ -131,32 +131,32 @@ void Engine::CtcpRequest_dcc(const QString &nickname, const QString &fileName, u { case Transfer::Chat: { - writeCtcpQueryMessage(nickname, QString::null, - QString::fromLatin1("DCC"), - QStringList(QString::fromLatin1("CHAT")) << QString::fromLatin1("chat") << - m_sock->localAddress()->nodeName() << QString::number(port) + writeCtcpQueryMessage(nickname, TQString::null, + TQString::fromLatin1("DCC"), + TQStringList(TQString::fromLatin1("CHAT")) << TQString::fromLatin1("chat") << + m_sock->localAddress()->nodeName() << TQString::number(port) ); break; } case Transfer::FileOutgoing: { - QFileInfo file(fileName); - QString noWhiteSpace = file.fileName(); + TQFileInfo file(fileName); + TQString noWhiteSpace = file.fileName(); if (noWhiteSpace.contains(' ') > 0) - noWhiteSpace.replace(QRegExp("\\s+"), "_"); + noWhiteSpace.replace(TQRegExp("\\s+"), "_"); TransferServer *server = TransferHandler::self()->createServer(this, nickname, type, fileName, file.size()); - QString ip = m_sock->localAddress()->nodeName(); - QString ipNumber = QString::number( ntohl( inet_addr( ip.latin1() ) ) ); + TQString ip = m_sock->localAddress()->nodeName(); + TQString ipNumber = TQString::number( ntohl( inet_addr( ip.latin1() ) ) ); kdDebug(14120) << "Starting DCC file outgoing transfer." << endl; - writeCtcpQueryMessage(nickname, QString::null, - QString::fromLatin1("DCC"), - QStringList(QString::fromLatin1("SEND")) << noWhiteSpace << ipNumber << - QString::number(server->port()) << QString::number(file.size()) + writeCtcpQueryMessage(nickname, TQString::null, + TQString::fromLatin1("DCC"), + TQStringList(TQString::fromLatin1("SEND")) << noWhiteSpace << ipNumber << + TQString::number(server->port()) << TQString::number(file.size()) ); break; } @@ -171,9 +171,9 @@ void Engine::CtcpRequest_dcc(const QString &nickname, const QString &fileName, u void Engine::CtcpQuery_dcc(Message &msg) { Message &ctcpMsg = msg.ctcpMessage(); - QString dccCommand = ctcpMsg.arg(0).upper(); + TQString dccCommand = ctcpMsg.arg(0).upper(); - if (dccCommand == QString::fromLatin1("CHAT")) + if (dccCommand == TQString::fromLatin1("CHAT")) { // if(ctcpMsg.argsSize()!=4) return false; @@ -185,7 +185,7 @@ void Engine::CtcpQuery_dcc(Message &msg) */ bool okayHost, okayPort; // should ctctMsg.arg(1) be tested? - QHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost)); + TQHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost)); unsigned int port = ctcpMsg.arg(3).toUInt(&okayPort); if (okayHost && okayPort) { @@ -196,7 +196,7 @@ void Engine::CtcpQuery_dcc(Message &msg) Transfer::Chat ); } } - else if (dccCommand == QString::fromLatin1("SEND")) + else if (dccCommand == TQString::fromLatin1("SEND")) { // if(ctcpMsg.argsSize()!=5) return false; @@ -208,8 +208,8 @@ void Engine::CtcpQuery_dcc(Message &msg) * filesize = Size of file being sent */ bool okayHost, okayPort, okaySize; -// QFileInfo realfile(msg.arg(1)); - QHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost)); +// TQFileInfo realfile(msg.arg(1)); + TQHostAddress address(ctcpMsg.arg(2).toUInt(&okayHost)); unsigned int port = ctcpMsg.arg(3).toUInt(&okayPort); unsigned int size = ctcpMsg.arg(4).toUInt(&okaySize); if (okayHost && okayPort && okaySize) @@ -243,21 +243,21 @@ void Engine::CtcpQuery_finger( Message &) // To be implemented } -void Engine::CtcpRequest_ping(const QString &target) +void Engine::CtcpRequest_ping(const TQString &target) { kdDebug(14120) << k_funcinfo << endl; timeval time; if (gettimeofday(&time, 0) == 0) { - QString timeReply; + TQString timeReply; if( Entity::isChannel(target) ) - timeReply = QString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec); + timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec); else - timeReply = QString::number( time.tv_sec ); + timeReply = TQString::number( time.tv_sec ); - writeCtcpQueryMessage( target, QString::null, "PING", timeReply); + writeCtcpQueryMessage( target, TQString::null, "PING", timeReply); } // else // ((MessageRedirector *)sender())->error("failed to get current time"); @@ -265,7 +265,7 @@ void Engine::CtcpRequest_ping(const QString &target) void Engine::CtcpQuery_ping(Message &msg) { - writeCtcpReplyMessage( msg.nickFromPrefix(), QString::null, + writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null, msg.ctcpMessage().command(), msg.ctcpMessage().arg(0)); } @@ -275,30 +275,30 @@ void Engine::CtcpReply_ping(Message &msg) if (gettimeofday(&time, 0) == 0) { // FIXME: the time code is wrong for usec - QString timeReply = QString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec); + TQString timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec); double newTime = timeReply.toDouble(); double oldTime = msg.suffix().section(' ',0, 0).toDouble(); double difference = newTime - oldTime; - QString diffString; + TQString diffString; if (difference < 1) { - diffString = QString::number(difference); + diffString = TQString::number(difference); diffString.remove((diffString.find('.') -1), 2); diffString.truncate(3); diffString.append("milliseconds"); } else { - diffString = QString::number(difference); - QString seconds = diffString.section('.', 0, 0); - QString millSec = diffString.section('.', 1, 1); + diffString = TQString::number(difference); + TQString seconds = diffString.section('.', 0, 0); + TQString millSec = diffString.section('.', 1, 1); millSec.remove(millSec.find('.'), 1); millSec.truncate(3); - diffString = QString::fromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec); + diffString = TQString::fromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec); } - emit incomingCtcpReply(QString::fromLatin1("PING"), msg.nickFromPrefix(), diffString); + emit incomingCtcpReply(TQString::fromLatin1("PING"), msg.nickFromPrefix(), diffString); } // else // ((MessageRedirector *)sender())->error("failed to get current time"); @@ -306,36 +306,36 @@ void Engine::CtcpReply_ping(Message &msg) void Engine::CtcpQuery_source(Message &msg) { - writeCtcpReplyMessage(msg.nickFromPrefix(), QString::null, + writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null, msg.ctcpMessage().command(), m_SourceString); } void Engine::CtcpQuery_time(Message &msg) { - writeCtcpReplyMessage(msg.nickFromPrefix(), QString::null, - msg.ctcpMessage().command(), QDateTime::currentDateTime().toString(), - QString::null, false); + writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null, + msg.ctcpMessage().command(), TQDateTime::currentDateTime().toString(), + TQString::null, false); } void Engine::CtcpQuery_userinfo(Message &msg) { - QString userinfo = customCtcpMap[ QString::fromLatin1("userinfo") ]; + TQString userinfo = customCtcpMap[ TQString::fromLatin1("userinfo") ]; if (userinfo.isNull()) userinfo = m_UserString; - writeCtcpReplyMessage(msg.nickFromPrefix(), QString::null, - msg.ctcpMessage().command(), QString::null, userinfo); + writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null, + msg.ctcpMessage().command(), TQString::null, userinfo); } -void Engine::CtcpRequest_version(const QString &target) +void Engine::CtcpRequest_version(const TQString &target) { - writeCtcpQueryMessage(target, QString::null, "VERSION"); + writeCtcpQueryMessage(target, TQString::null, "VERSION"); } void Engine::CtcpQuery_version(Message &msg) { - QString response = customCtcpMap[ QString::fromLatin1("version") ]; + TQString response = customCtcpMap[ TQString::fromLatin1("version") ]; kdDebug(14120) << "Version check: " << response << endl; if (response.isNull()) diff --git a/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp b/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp index c47b8b05..67d3a842 100644 --- a/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp +++ b/kopete/protocols/irc/libkirc/kircengine_numericreplies.cpp @@ -20,7 +20,7 @@ #include "kircengine.h" -#include <qtimer.h> +#include <tqtimer.h> using namespace KIRC; @@ -31,69 +31,69 @@ using namespace KIRC; void Engine::bindNumericReplies() { - bind(1, this, SLOT(numericReply_001(KIRC::Message &)), 1, 1); - bind(2, this, SLOT(numericReply_002(KIRC::Message &)), 1, 1); - bind(3, this, SLOT(numericReply_003(KIRC::Message &)), 1, 1); - bind(4, this, SLOT(numericReply_004(KIRC::Message &)), 5, 5); - bind(5, this, SLOT(numericReply_004(KIRC::Message &)), 1, 1); - - bind(250, this, SLOT(numericReply_250(KIRC::Message &))); - bind(251, this, SLOT(numericReply_251(KIRC::Message &))); - bind(252, this, SLOT(numericReply_252(KIRC::Message &)), 2, 2); - bind(253, this, SLOT(numericReply_253(KIRC::Message &)), 2, 2); - bind(254, this, SLOT(numericReply_254(KIRC::Message &)), 2, 2); - bind(255, this, SLOT(numericReply_255(KIRC::Message &)), 1, 1); // incomingConnectString - - bind(263, this, SLOT(numericReply_263(KIRC::Message &))); // incomingServerLoadTooHigh - bind(265, this, SLOT(numericReply_265(KIRC::Message &))); - bind(266, this, SLOT(numericReply_266(KIRC::Message &))); - - bind(301, this, SLOT(numericReply_301(KIRC::Message &)), 2, 2); - bind(303, this, SLOT(numericReply_303(KIRC::Message &)), 1, 1); - bind(305, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are no longer marked as away - bind(306, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are marked as away - bind(307, this, SLOT(numericReply_307(KIRC::Message &)), 1, 1); - bind(311, this, SLOT(numericReply_311(KIRC::Message &)), 5, 5); - bind(312, this, SLOT(numericReply_312(KIRC::Message &)), 3, 3); - bind(313, this, SLOT(numericReply_313(KIRC::Message &)), 2, 2); - bind(314, this, SLOT(numericReply_314(KIRC::Message &)), 5, 5); - bind(315, this, SLOT(numericReply_315(KIRC::Message &)), 2, 2); - bind(317, this, SLOT(numericReply_317(KIRC::Message &)), 3, 4); - bind(318, this, SLOT(numericReply_318(KIRC::Message &)), 2, 2); - bind(319, this, SLOT(numericReply_319(KIRC::Message &)), 2, 2); - bind(320, this, SLOT(numericReply_320(KIRC::Message &)), 2, 2); - bind(321, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); - bind(322, this, SLOT(numericReply_322(KIRC::Message &)), 3, 3); - bind(323, this, SLOT(numericReply_323(KIRC::Message &)), 1, 1); - bind(324, this, SLOT(numericReply_324(KIRC::Message &)), 2, 4); - bind(328, this, SLOT(numericReply_328(KIRC::Message &)), 2, 2); - bind(329, this, SLOT(numericReply_329(KIRC::Message &)), 3, 3); - bind(330, this, SLOT(ignoreMessage(KIRC::Message &)), 0, 0); // ??? - bind(331, this, SLOT(numericReply_331(KIRC::Message &)), 2, 2); - bind(332, this, SLOT(numericReply_332(KIRC::Message &)), 2, 2); - bind(333, this, SLOT(numericReply_333(KIRC::Message &)), 4, 4); - bind(352, this, SLOT(numericReply_352(KIRC::Message &)), 5, 10); - bind(353, this, SLOT(numericReply_353(KIRC::Message &)), 3, 3); - bind(366, this, SLOT(numericReply_366(KIRC::Message &)), 2, 2); - bind(369, this, SLOT(numericReply_369(KIRC::Message &)), 2, 2); - bind(372, this, SLOT(numericReply_372(KIRC::Message &)), 1, 1); - bind(375, this, SLOT(ignoreMessage(KIRC::Message&)), 0, 0 ); - bind(376, this, SLOT(ignoreMessage(KIRC::Message&)), 0, 0 ); - - bind(401, this, SLOT(numericReply_401(KIRC::Message &)), 2, 2); // incomingNoNickChan -// bind(404, this, SLOT(numericReply_404(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel - bind(406, this, SLOT(numericReply_406(KIRC::Message &)), 2, 2); // incomingWasNoNick - bind(422, this, SLOT(numericReply_422(KIRC::Message &)), 1, 1); - bind(433, this, SLOT(numericReply_433(KIRC::Message &)), 2, 2); -// bind(442, this, SLOT(numericReply_442(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel - bind(464, this, SLOT(numericReply_464(KIRC::Message &)), 1, 1); - bind(471, this, SLOT(numericReply_471(KIRC::Message &)), 2, 2); - bind(473, this, SLOT(numericReply_473(KIRC::Message &)), 2, 2); - bind(474, this, SLOT(numericReply_474(KIRC::Message &)), 2, 2); - bind(475, this, SLOT(numericReply_475(KIRC::Message &)), 2, 2); + bind(1, this, TQT_SLOT(numericReply_001(KIRC::Message &)), 1, 1); + bind(2, this, TQT_SLOT(numericReply_002(KIRC::Message &)), 1, 1); + bind(3, this, TQT_SLOT(numericReply_003(KIRC::Message &)), 1, 1); + bind(4, this, TQT_SLOT(numericReply_004(KIRC::Message &)), 5, 5); + bind(5, this, TQT_SLOT(numericReply_004(KIRC::Message &)), 1, 1); + + bind(250, this, TQT_SLOT(numericReply_250(KIRC::Message &))); + bind(251, this, TQT_SLOT(numericReply_251(KIRC::Message &))); + bind(252, this, TQT_SLOT(numericReply_252(KIRC::Message &)), 2, 2); + bind(253, this, TQT_SLOT(numericReply_253(KIRC::Message &)), 2, 2); + bind(254, this, TQT_SLOT(numericReply_254(KIRC::Message &)), 2, 2); + bind(255, this, TQT_SLOT(numericReply_255(KIRC::Message &)), 1, 1); // incomingConnectString + + bind(263, this, TQT_SLOT(numericReply_263(KIRC::Message &))); // incomingServerLoadTooHigh + bind(265, this, TQT_SLOT(numericReply_265(KIRC::Message &))); + bind(266, this, TQT_SLOT(numericReply_266(KIRC::Message &))); + + bind(301, this, TQT_SLOT(numericReply_301(KIRC::Message &)), 2, 2); + bind(303, this, TQT_SLOT(numericReply_303(KIRC::Message &)), 1, 1); + bind(305, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are no longer marked as away + bind(306, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); // You are marked as away + bind(307, this, TQT_SLOT(numericReply_307(KIRC::Message &)), 1, 1); + bind(311, this, TQT_SLOT(numericReply_311(KIRC::Message &)), 5, 5); + bind(312, this, TQT_SLOT(numericReply_312(KIRC::Message &)), 3, 3); + bind(313, this, TQT_SLOT(numericReply_313(KIRC::Message &)), 2, 2); + bind(314, this, TQT_SLOT(numericReply_314(KIRC::Message &)), 5, 5); + bind(315, this, TQT_SLOT(numericReply_315(KIRC::Message &)), 2, 2); + bind(317, this, TQT_SLOT(numericReply_317(KIRC::Message &)), 3, 4); + bind(318, this, TQT_SLOT(numericReply_318(KIRC::Message &)), 2, 2); + bind(319, this, TQT_SLOT(numericReply_319(KIRC::Message &)), 2, 2); + bind(320, this, TQT_SLOT(numericReply_320(KIRC::Message &)), 2, 2); + bind(321, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0 ); + bind(322, this, TQT_SLOT(numericReply_322(KIRC::Message &)), 3, 3); + bind(323, this, TQT_SLOT(numericReply_323(KIRC::Message &)), 1, 1); + bind(324, this, TQT_SLOT(numericReply_324(KIRC::Message &)), 2, 4); + bind(328, this, TQT_SLOT(numericReply_328(KIRC::Message &)), 2, 2); + bind(329, this, TQT_SLOT(numericReply_329(KIRC::Message &)), 3, 3); + bind(330, this, TQT_SLOT(ignoreMessage(KIRC::Message &)), 0, 0); // ??? + bind(331, this, TQT_SLOT(numericReply_331(KIRC::Message &)), 2, 2); + bind(332, this, TQT_SLOT(numericReply_332(KIRC::Message &)), 2, 2); + bind(333, this, TQT_SLOT(numericReply_333(KIRC::Message &)), 4, 4); + bind(352, this, TQT_SLOT(numericReply_352(KIRC::Message &)), 5, 10); + bind(353, this, TQT_SLOT(numericReply_353(KIRC::Message &)), 3, 3); + bind(366, this, TQT_SLOT(numericReply_366(KIRC::Message &)), 2, 2); + bind(369, this, TQT_SLOT(numericReply_369(KIRC::Message &)), 2, 2); + bind(372, this, TQT_SLOT(numericReply_372(KIRC::Message &)), 1, 1); + bind(375, this, TQT_SLOT(ignoreMessage(KIRC::Message&)), 0, 0 ); + bind(376, this, TQT_SLOT(ignoreMessage(KIRC::Message&)), 0, 0 ); + + bind(401, this, TQT_SLOT(numericReply_401(KIRC::Message &)), 2, 2); // incomingNoNickChan +// bind(404, this, TQT_SLOT(numericReply_404(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel + bind(406, this, TQT_SLOT(numericReply_406(KIRC::Message &)), 2, 2); // incomingWasNoNick + bind(422, this, TQT_SLOT(numericReply_422(KIRC::Message &)), 1, 1); + bind(433, this, TQT_SLOT(numericReply_433(KIRC::Message &)), 2, 2); +// bind(442, this, TQT_SLOT(numericReply_442(KIRC::Message &)), 2, 2); // incomingCannotSendToChannel + bind(464, this, TQT_SLOT(numericReply_464(KIRC::Message &)), 1, 1); + bind(471, this, TQT_SLOT(numericReply_471(KIRC::Message &)), 2, 2); + bind(473, this, TQT_SLOT(numericReply_473(KIRC::Message &)), 2, 2); + bind(474, this, TQT_SLOT(numericReply_474(KIRC::Message &)), 2, 2); + bind(475, this, TQT_SLOT(numericReply_475(KIRC::Message &)), 2, 2); //Freenode seems to use this for a non-RFC compliant purpose, as does Unreal - bind(477, this, SLOT(emitSuffix(KIRC::Message&)),0,0); + bind(477, this, TQT_SLOT(emitSuffix(KIRC::Message&)),0,0); } /* 001: "Welcome to the Internet Relay Network <nick>!<user>@<host>" @@ -237,8 +237,8 @@ void Engine::numericReply_301(Message &msg) */ void Engine::numericReply_303(Message &msg) { - QStringList nicks = QStringList::split(QRegExp(QChar(' ')), msg.suffix()); - for(QStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it) + TQStringList nicks = TQStringList::split(TQRegExp(TQChar(' ')), msg.suffix()); + for(TQStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it) { if (!(*it).stripWhiteSpace().isEmpty()) emit incomingUserOnline(Kopete::Message::unescape(*it)); @@ -405,7 +405,7 @@ void Engine::numericReply_332(Message &msg) void Engine::numericReply_333( Message &msg ) { kdDebug(14120) << k_funcinfo << endl; - QDateTime d; + TQDateTime d; d.setTime_t( msg.arg(3).toLong() ); emit incomingTopicUser( Kopete::Message::unescape(msg.arg(1)), Kopete::Message::unescape(msg.arg(2)), d ); } @@ -439,7 +439,7 @@ void Engine::numericReply_352(Message &msg) */ void Engine::numericReply_353(Message &msg) { - emit incomingNamesList(Kopete::Message::unescape(msg.arg(2)), QStringList::split(' ', msg.suffix())); + emit incomingNamesList(Kopete::Message::unescape(msg.arg(2)), TQStringList::split(' ', msg.suffix())); } /* 366: "<channel> :End of NAMES list" diff --git a/kopete/protocols/irc/libkirc/kircentity.cpp b/kopete/protocols/irc/libkirc/kircentity.cpp index 6aa6fd55..ded35fe5 100644 --- a/kopete/protocols/irc/libkirc/kircentity.cpp +++ b/kopete/protocols/irc/libkirc/kircentity.cpp @@ -29,19 +29,19 @@ using namespace KNetwork; * where user and host are optionnal. * NOTE: If changes are done to the regexp string, update also the sm_userStrictRegExp regexp string. */ -const QRegExp Entity::sm_userRegExp(QString::fromLatin1("^([^\\s,:!@]+)(?:(?:!([^\\s,:!@]+))?(?:@([^\\s,!@]+)))?$")); +const TQRegExp Entity::sm_userRegExp(TQString::fromLatin1("^([^\\s,:!@]+)(?:(?:!([^\\s,:!@]+))?(?:@([^\\s,!@]+)))?$")); /** * Regexp to match strictly the complete user definition: * nick!user@host * NOTE: If changes are done to the regexp string, update also the sm_userRegExp regexp string. */ -const QRegExp Entity::sm_userStrictRegExp(QString::fromLatin1("^([^\\s,:!@]+)!([^\\s,:!@]+)@([^\\s,:!@]+)$")); +const TQRegExp Entity::sm_userStrictRegExp(TQString::fromLatin1("^([^\\s,:!@]+)!([^\\s,:!@]+)@([^\\s,:!@]+)$")); -const QRegExp Entity::sm_channelRegExp( QString::fromLatin1("^[#!+&][^\\s,]+$") ); +const TQRegExp Entity::sm_channelRegExp( TQString::fromLatin1("^[#!+&][^\\s,]+$") ); -Entity::Entity(const QString &, const Type type) - : QObject(0, "KIRC::Entity"), +Entity::Entity(const TQString &, const Type type) + : TQObject(0, "KIRC::Entity"), m_type(type) { // rename(name, type); @@ -52,12 +52,12 @@ Entity::~Entity() emit destroyed(this); } -QString Entity::name() const +TQString Entity::name() const { return m_name; } -QString Entity::host() const +TQString Entity::host() const { switch(m_type) { @@ -70,7 +70,7 @@ QString Entity::host() const return userHost(); default: kdDebug(14121) << k_funcinfo << "No host defined for type:" << m_type; - return QString::null; + return TQString::null; } } @@ -86,44 +86,44 @@ KIRC::Entity::Type Entity::guessType() } // FIXME: Implement me -KIRC::Entity::Type Entity::guessType(const QString &) +KIRC::Entity::Type Entity::guessType(const TQString &) { return Unknown; } -QString Entity::userNick() const +TQString Entity::userNick() const { return userNick(m_name); } -QString Entity::userNick(const QString &s) +TQString Entity::userNick(const TQString &s) { return userInfo(s, 1); } -QString Entity::userName() const +TQString Entity::userName() const { return userName(m_name); } -QString Entity::userName(const QString &s) +TQString Entity::userName(const TQString &s) { return userInfo(s, 2); } -QString Entity::userHost() const +TQString Entity::userHost() const { return userHost(m_name); } -QString Entity::userHost(const QString &s) +TQString Entity::userHost(const TQString &s) { return userInfo(s, 3); } -QString Entity::userInfo(const QString &s, int num) +TQString Entity::userInfo(const TQString &s, int num) { - QRegExp userRegExp(sm_userRegExp); + TQRegExp userRegExp(sm_userRegExp); userRegExp.search(s); return userRegExp.cap(num); } diff --git a/kopete/protocols/irc/libkirc/kircentity.h b/kopete/protocols/irc/libkirc/kircentity.h index c9336439..d802d8f4 100644 --- a/kopete/protocols/irc/libkirc/kircentity.h +++ b/kopete/protocols/irc/libkirc/kircentity.h @@ -22,10 +22,10 @@ #include <kresolver.h> #include <ksharedptr.h> -#include <qobject.h> -#include <qregexp.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqvaluelist.h> namespace KIRC { @@ -33,7 +33,7 @@ namespace KIRC class Engine; class Entity - : public QObject, + : public TQObject, public KShared { Q_OBJECT @@ -48,49 +48,49 @@ public: User }; - Entity(const QString &name, const Type type = Unknown); + Entity(const TQString &name, const Type type = Unknown); virtual ~Entity(); - QString name() const; - QString host() const; + TQString name() const; + TQString host() const; KIRC::Entity::Type type() const; KIRC::Entity::Type guessType(); - static KIRC::Entity::Type guessType(const QString &name); + static KIRC::Entity::Type guessType(const TQString &name); - // FIXME: Remove these is* functions ... They are duplicate with the ::guessType(const QString&) - inline static bool isUser( const QString &s ) + // FIXME: Remove these is* functions ... They are duplicate with the ::guessType(const TQString&) + inline static bool isUser( const TQString &s ) { return sm_userRegExp.exactMatch(s); }; inline bool isChannel() { return isChannel(m_name); }; - inline static bool isChannel( const QString &s ) + inline static bool isChannel( const TQString &s ) { return sm_channelRegExp.exactMatch(s); }; - QString userNick() const; - static QString userNick(const QString &s); + TQString userNick() const; + static TQString userNick(const TQString &s); - QString userName() const; - static QString userName(const QString &s); + TQString userName() const; + static TQString userName(const TQString &s); - QString userHost() const; - static QString userHost(const QString &s); + TQString userHost() const; + static TQString userHost(const TQString &s); signals: void destroyed(KIRC::Entity *self); private: - static QString userInfo(const QString &s, int num_cap); + static TQString userInfo(const TQString &s, int num_cap); - static const QRegExp sm_userRegExp; - static const QRegExp sm_userStrictRegExp; - static const QRegExp sm_channelRegExp; + static const TQRegExp sm_userRegExp; + static const TQRegExp sm_userStrictRegExp; + static const TQRegExp sm_channelRegExp; KIRC::Entity::Type m_type; QString m_name; // peer ip address if the entity is a User. - QString m_address; + TQString m_address; }; class EntityPtr @@ -107,7 +107,7 @@ public: }; class EntityPtrList - : public QValueList<EntityPtr> + : public TQValueList<EntityPtr> { public: EntityPtrList() @@ -118,8 +118,8 @@ public: append(entity); } - EntityPtrList(const QValueList<EntityPtr> &list) - : QValueList<EntityPtr>(list) + EntityPtrList(const TQValueList<EntityPtr> &list) + : TQValueList<EntityPtr>(list) { } }; diff --git a/kopete/protocols/irc/libkirc/kircmessage.cpp b/kopete/protocols/irc/libkirc/kircmessage.cpp index f1a5b61f..73a1e53f 100644 --- a/kopete/protocols/irc/libkirc/kircmessage.cpp +++ b/kopete/protocols/irc/libkirc/kircmessage.cpp @@ -30,20 +30,20 @@ using namespace KIRC; #ifndef _IRC_STRICTNESS_ -QRegExp Message::m_IRCNumericCommand("^\\d{1,3}$"); +TQRegExp Message::m_IRCNumericCommand("^\\d{1,3}$"); // TODO: This regexp parsing is no good. It's slower than it needs to be, and -// is not codec-safe since QString requires a codec. NEed to parse this with +// is not codec-safe since TQString requires a codec. NEed to parse this with // our own parsing class that operates on the raw QCStrings -QRegExp Message::m_IRCCommandType1( +TQRegExp Message::m_IRCCommandType1( "^(?::([^ ]+) )?([A-Za-z]+|\\d{1,3})((?: [^ :][^ ]*)*) ?(?: :(.*))?$"); // Extra end arg space check -------------------------^ #else // _IRC_STRICTNESS_ -QRegExp Message::m_IRCNumericCommand("^\\d{3,3}$"); +TQRegExp Message::m_IRCNumericCommand("^\\d{3,3}$"); -QRegExp Message::m_IRCCommandType1( +TQRegExp Message::m_IRCCommandType1( "^(?::([^ ]+) )?([A-Za-z]+|\\d{3,3})((?: [^ :][^ ]*){0,13})(?: :(.*))?$"); -QRegExp Message::m_IRCCommandType2( +TQRegExp Message::m_IRCCommandType2( "^(?::[[^ ]+) )?([A-Za-z]+|\\d{3,3})((?: [^ :][^ ]*){14,14})(?: (.*))?$"); #endif // _IRC_STRICTNESS_ @@ -90,7 +90,7 @@ Message::~Message() delete m_ctcpMessage; } -void Message::writeRawMessage(Engine *engine, const QTextCodec *codec, const QString &str) +void Message::writeRawMessage(Engine *engine, const TQTextCodec *codec, const TQString &str) { // FIXME: Really handle this if (!engine->socket()) @@ -99,65 +99,65 @@ void Message::writeRawMessage(Engine *engine, const QTextCodec *codec, const QSt return; } - QString txt = str + QString::fromLatin1("\r\n"); + TQString txt = str + TQString::fromLatin1("\r\n"); - QCString s(codec->fromUnicode(txt)); + TQCString s(codec->fromUnicode(txt)); kdDebug(14120) << "Message is " << s.length() << " chars" << endl; // FIXME: Should check the amount of data really writen. int wrote = engine->socket()->writeBlock(s.data(), s.length()); - kdDebug(14121) << QString::fromLatin1("(%1 bytes) >> %2").arg(wrote).arg(str) << endl; + kdDebug(14121) << TQString::fromLatin1("(%1 bytes) >> %2").arg(wrote).arg(str) << endl; } -void Message::writeMessage(Engine *engine, const QTextCodec *codec, const QString &message) +void Message::writeMessage(Engine *engine, const TQTextCodec *codec, const TQString &message) { writeRawMessage(engine, codec, quote(message)); } -void Message::writeMessage(Engine *engine, const QTextCodec *codec, - const QString &command, const QStringList &args, const QString &suffix) +void Message::writeMessage(Engine *engine, const TQTextCodec *codec, + const TQString &command, const TQStringList &args, const TQString &suffix) { - QString msg = command; + TQString msg = command; if (!args.isEmpty()) - msg += QChar(' ') + args.join(QChar(' ')).stripWhiteSpace(); // some extra check should be done here + msg += TQChar(' ') + args.join(TQChar(' ')).stripWhiteSpace(); // some extra check should be done here if (!suffix.isNull()) - msg = msg.stripWhiteSpace() + QString::fromLatin1(" :") + suffix; + msg = msg.stripWhiteSpace() + TQString::fromLatin1(" :") + suffix; writeMessage(engine, codec, msg); } -void Message::writeCtcpMessage(Engine *engine, const QTextCodec *codec, - const QString &command, const QString&to, - const QString &ctcpMessage) +void Message::writeCtcpMessage(Engine *engine, const TQTextCodec *codec, + const TQString &command, const TQString&to, + const TQString &ctcpMessage) { - writeMessage(engine, codec, command, to, QChar(0x01) + ctcpQuote(ctcpMessage) + QChar(0x01)); + writeMessage(engine, codec, command, to, TQChar(0x01) + ctcpQuote(ctcpMessage) + TQChar(0x01)); } -void Message::writeCtcpMessage(Engine *engine, const QTextCodec *codec, - const QString &command, const QString &to, const QString &suffix, - const QString &ctcpCommand, const QStringList &ctcpArgs, const QString &ctcpSuffix ) +void Message::writeCtcpMessage(Engine *engine, const TQTextCodec *codec, + const TQString &command, const TQString &to, const TQString &suffix, + const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix ) { - QString ctcpMsg = ctcpCommand; + TQString ctcpMsg = ctcpCommand; if (!ctcpArgs.isEmpty()) - ctcpMsg += QChar(' ') + ctcpArgs.join(QChar(' ')).stripWhiteSpace(); // some extra check should be done here + ctcpMsg += TQChar(' ') + ctcpArgs.join(TQChar(' ')).stripWhiteSpace(); // some extra check should be done here if (!ctcpSuffix.isNull()) - ctcpMsg += QString::fromLatin1(" :") + ctcpSuffix; + ctcpMsg += TQString::fromLatin1(" :") + ctcpSuffix; - writeMessage(engine, codec, command, to, suffix + QChar(0x01) + ctcpQuote(ctcpMsg) + QChar(0x01)); + writeMessage(engine, codec, command, to, suffix + TQChar(0x01) + ctcpQuote(ctcpMsg) + TQChar(0x01)); } -Message Message::parse(Engine *engine, const QTextCodec *codec, bool *parseSuccess) +Message Message::parse(Engine *engine, const TQTextCodec *codec, bool *parseSuccess) { if (parseSuccess) *parseSuccess=false; if (engine->socket()->canReadLine()) { - QCString raw(engine->socket()->bytesAvailable()+1); + TQCString raw(engine->socket()->bytesAvailable()+1); Q_LONG length = engine->socket()->readLine(raw.data(), raw.count()); if( length > -1 ) @@ -197,21 +197,21 @@ Message Message::parse(Engine *engine, const QTextCodec *codec, bool *parseSucce return Message(); } -QString Message::quote(const QString &str) +TQString Message::quote(const TQString &str) { - QString tmp = str; - QChar q('\020'); - tmp.replace(q, q+QString(q)); - tmp.replace(QChar('\r'), q+QString::fromLatin1("r")); - tmp.replace(QChar('\n'), q+QString::fromLatin1("n")); - tmp.replace(QChar('\0'), q+QString::fromLatin1("0")); + TQString tmp = str; + TQChar q('\020'); + tmp.replace(q, q+TQString(q)); + tmp.replace(TQChar('\r'), q+TQString::fromLatin1("r")); + tmp.replace(TQChar('\n'), q+TQString::fromLatin1("n")); + tmp.replace(TQChar('\0'), q+TQString::fromLatin1("0")); return tmp; } // FIXME: The unquote system is buggy. -QString Message::unquote(const QString &str) +TQString Message::unquote(const TQString &str) { - QString tmp = str; + TQString tmp = str; char b[3] = { 020, 020, '\0' }; const char b2[2] = { 020, '\0' }; @@ -227,23 +227,23 @@ QString Message::unquote(const QString &str) return tmp; } -QString Message::ctcpQuote(const QString &str) +TQString Message::ctcpQuote(const TQString &str) { - QString tmp = str; - tmp.replace( QChar('\\'), QString::fromLatin1("\\\\")); - tmp.replace( (char)1, QString::fromLatin1("\\1")); + TQString tmp = str; + tmp.replace( TQChar('\\'), TQString::fromLatin1("\\\\")); + tmp.replace( (char)1, TQString::fromLatin1("\\1")); return tmp; } -QString Message::ctcpUnquote(const QString &str) +TQString Message::ctcpUnquote(const TQString &str) { - QString tmp = str; + TQString tmp = str; tmp.replace("\\\\", "\\"); tmp.replace("\\1", "\1" ); return tmp; } -bool Message::matchForIRCRegExp(const QCString &line, const QTextCodec *codec, Message &message) +bool Message::matchForIRCRegExp(const TQCString &line, const TQTextCodec *codec, Message &message) { if(matchForIRCRegExp(m_IRCCommandType1, codec, line, message)) return true; @@ -256,19 +256,19 @@ bool Message::matchForIRCRegExp(const QCString &line, const QTextCodec *codec, M // FIXME: remove the decodeStrings calls or update them. // FIXME: avoid the recursive call, it make the ctcp command unquoted twice (wich is wrong, but valid in most of the cases) -bool Message::matchForIRCRegExp(QRegExp ®exp, const QTextCodec *codec, const QCString &line, Message &msg ) +bool Message::matchForIRCRegExp(TQRegExp ®exp, const TQTextCodec *codec, const TQCString &line, Message &msg ) { if( regexp.exactMatch( codec->toUnicode(line) ) ) { msg.m_raw = line; msg.m_prefix = unquote(regexp.cap(1)); msg.m_command = unquote(regexp.cap(2)); - msg.m_args = QStringList::split(' ', regexp.cap(3)); + msg.m_args = TQStringList::split(' ', regexp.cap(3)); - QCString suffix = codec->fromUnicode(unquote(regexp.cap(4))); + TQCString suffix = codec->fromUnicode(unquote(regexp.cap(4))); if (!suffix.isNull() && suffix.length() > 0) { - QCString ctcpRaw; + TQCString ctcpRaw; if (extractCtcpCommand(suffix, ctcpRaw)) { msg.m_ctcpRaw = codec->toUnicode(ctcpRaw); @@ -279,7 +279,7 @@ bool Message::matchForIRCRegExp(QRegExp ®exp, const QTextCodec *codec, const int space = ctcpRaw.find(' '); if (!matchForIRCRegExp(msg.m_ctcpMessage->m_raw, codec, *msg.m_ctcpMessage)) { - QCString command; + TQCString command; if (space > 0) command = ctcpRaw.mid(0, space).upper(); else @@ -296,28 +296,28 @@ bool Message::matchForIRCRegExp(QRegExp ®exp, const QTextCodec *codec, const msg.m_suffix = Kopete::Message::decodeString( KSParser::parse(suffix), codec ); } else - msg.m_suffix = QString::null; + msg.m_suffix = TQString::null; return true; } return false; } -void Message::decodeAgain( const QTextCodec *codec ) +void Message::decodeAgain( const TQTextCodec *codec ) { matchForIRCRegExp(m_raw, codec, *this); } // FIXME: there are missing parts -QString Message::toString() const +TQString Message::toString() const { if( !isValid() ) - return QString::null; + return TQString::null; - QString msg = m_command; - for (QStringList::ConstIterator it = m_args.begin(); it != m_args.end(); ++it) - msg += QChar(' ') + *it; + TQString msg = m_command; + for (TQStringList::ConstIterator it = m_args.begin(); it != m_args.end(); ++it) + msg += TQChar(' ') + *it; if (!m_suffix.isNull()) - msg += QString::fromLatin1(" :") + m_suffix; + msg += TQString::fromLatin1(" :") + m_suffix; return msg; } @@ -339,7 +339,7 @@ bool Message::isValid() const * string is splited to get the first part of the message and fill the ctcp command. * FIXME: The code currently only match for a textual message or a ctcp message not both mixed as it can be (even if very rare). */ -bool Message::extractCtcpCommand(QCString &message, QCString &ctcpline) +bool Message::extractCtcpCommand(TQCString &message, TQCString &ctcpline) { uint len = message.length(); diff --git a/kopete/protocols/irc/libkirc/kircmessage.h b/kopete/protocols/irc/libkirc/kircmessage.h index e37f3fb2..02631bbf 100644 --- a/kopete/protocols/irc/libkirc/kircmessage.h +++ b/kopete/protocols/irc/libkirc/kircmessage.h @@ -22,11 +22,11 @@ #include <kbufferedio.h> -#include <qdict.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtextcodec.h> -#include <qregexp.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtextcodec.h> +#include <tqregexp.h> #include <kopetemessage.h> @@ -44,20 +44,20 @@ class Message public: /** \brief Sends the message as-is to the server. */ - static void writeRawMessage(KIRC::Engine *engine, const QTextCodec *codec, const QString &str); + static void writeRawMessage(KIRC::Engine *engine, const TQTextCodec *codec, const TQString &str); - static void writeMessage(KIRC::Engine *engine, const QTextCodec *codec, const QString &str); + static void writeMessage(KIRC::Engine *engine, const TQTextCodec *codec, const TQString &str); - static void writeMessage(KIRC::Engine *engine, const QTextCodec *codec, - const QString &command, const QStringList &args, const QString &suffix); + static void writeMessage(KIRC::Engine *engine, const TQTextCodec *codec, + const TQString &command, const TQStringList &args, const TQString &suffix); - static void writeCtcpMessage(KIRC::Engine *engine, const QTextCodec *codec, - const QString &command, const QString &to, - const QString &ctcpMessage); + static void writeCtcpMessage(KIRC::Engine *engine, const TQTextCodec *codec, + const TQString &command, const TQString &to, + const TQString &ctcpMessage); - static void writeCtcpMessage(KIRC::Engine *engine, const QTextCodec *codec, - const QString &command, const QString &to, const QString &suffix, - const QString &ctcpCommand, const QStringList &ctcpArgs = QStringList(), const QString &ctcpSuffix = QString::null ); + static void writeCtcpMessage(KIRC::Engine *engine, const TQTextCodec *codec, + const TQString &command, const TQString &to, const TQString &suffix, + const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null ); Message(); Message(const KIRC::Message &obj); @@ -65,10 +65,10 @@ public: ~Message(); - inline const QString nickFromPrefix() const + inline const TQString nickFromPrefix() const { return Kopete::Message::unescape(KIRC::Entity::userNick(m_prefix)); } - QString toString() const; + TQString toString() const; /** \brief Returns true if the message command is numeric. */ @@ -84,11 +84,11 @@ public: /** \brief Re-decodes the message with given codec. */ - void decodeAgain( const QTextCodec *codec ); + void decodeAgain( const TQTextCodec *codec ); /** \brief The whole message as received. */ - inline const QCString &raw() const + inline const TQCString &raw() const { return m_raw; } /** \brief Prefix of this message. @@ -100,7 +100,7 @@ public: * message = [ ":" prefix SPACE ] command [ params ] crlf * prefix = servername / ( nickname [ [ "!" user ] "@" host ] ) */ - inline const QString &prefix() const + inline const TQString &prefix() const { return m_prefix; } /** \brief The command part of this message. @@ -109,7 +109,7 @@ public: * * Examples: "MODE", "PRIVMSG", 303, 001, ... */ - inline const QString &command() const + inline const TQString &command() const { return m_command; } /** \brief The number of command arguments this message contains. @@ -119,19 +119,19 @@ public: /** \brief i:th command argument. */ - inline const QString &arg(size_t i) const + inline const TQString &arg(size_t i) const { return m_args[i]; } /** \brief All command arguments. */ - inline const QStringList &args() const + inline const TQStringList &args() const { return m_args; } /** \brief Message suffix. */ - inline const QString &suffix() const + inline const TQString &suffix() const { return m_suffix; } - inline const QString &ctcpRaw() const + inline const TQString &ctcpRaw() const { return m_ctcpRaw; } inline bool hasCtcpMessage() const @@ -139,58 +139,58 @@ public: inline class KIRC::Message &ctcpMessage() const { return *m_ctcpMessage; } - static KIRC::Message parse(KIRC::Engine *engine, const QTextCodec *codec, bool *parseSuccess=0); + static KIRC::Message parse(KIRC::Engine *engine, const TQTextCodec *codec, bool *parseSuccess=0); private: /** * Contains the low level dequoted message. */ - QCString m_raw; + TQCString m_raw; /** * Contains the completely dequoted prefix. */ - QString m_prefix; + TQString m_prefix; /** * Contains the completely dequoted command. */ - QString m_command; + TQString m_command; /** * Contains the completely dequoted args. */ - QStringList m_args; + TQStringList m_args; /** * Contains the completely dequoted suffix. */ - QString m_suffix; + TQString m_suffix; /** * If it is a message contains the completely dequoted rawCtcpLine. * If it is a ctcp message contains the completely dequoted rawCtcpArgsLine. */ - QString m_ctcpRaw; + TQString m_ctcpRaw; // low level quoting, message quoting - static QString quote(const QString &str); - static QString unquote(const QString &str); + static TQString quote(const TQString &str); + static TQString unquote(const TQString &str); // ctcp level quoting - static QString ctcpQuote(const QString &str); - static QString ctcpUnquote(const QString &str); + static TQString ctcpQuote(const TQString &str); + static TQString ctcpUnquote(const TQString &str); - static bool extractCtcpCommand(QCString &str, QCString &ctcpline); + static bool extractCtcpCommand(TQCString &str, TQCString &ctcpline); - static bool matchForIRCRegExp(const QCString &line, const QTextCodec *codec, KIRC::Message &message); - static bool matchForIRCRegExp(QRegExp ®exp, const QTextCodec *codec, const QCString &line, KIRC::Message &message); + static bool matchForIRCRegExp(const TQCString &line, const TQTextCodec *codec, KIRC::Message &message); + static bool matchForIRCRegExp(TQRegExp ®exp, const TQTextCodec *codec, const TQCString &line, KIRC::Message &message); class KIRC::Message *m_ctcpMessage; - static QRegExp m_IRCCommandType1; + static TQRegExp m_IRCCommandType1; #ifdef _IRC_STRICTNESS_ - static QRegExp m_IRCCommandType2; + static TQRegExp m_IRCCommandType2; #endif // _IRC_STRICTNESS_ - static QRegExp m_IRCNumericCommand; + static TQRegExp m_IRCNumericCommand; }; } diff --git a/kopete/protocols/irc/libkirc/kircmessageredirector.cpp b/kopete/protocols/irc/libkirc/kircmessageredirector.cpp index 49194ce0..2e1d0b4c 100644 --- a/kopete/protocols/irc/libkirc/kircmessageredirector.cpp +++ b/kopete/protocols/irc/libkirc/kircmessageredirector.cpp @@ -22,21 +22,21 @@ using namespace KIRC; MessageRedirector::MessageRedirector(KIRC::Engine *engine, - int argsSize_min, int argsSize_max, const QString &helpMessage) - : QObject(engine, "KIRC::MessageRedirector"), + int argsSize_min, int argsSize_max, const TQString &helpMessage) + : TQObject(engine, "KIRC::MessageRedirector"), m_argsSize_min(argsSize_min), m_argsSize_max(argsSize_max), m_helpMessage(helpMessage) { } -bool MessageRedirector::connect(QObject *object, const char *member) +bool MessageRedirector::connect(TQObject *object, const char *member) { - return QObject::connect(this, SIGNAL(redirect(KIRC::Message &)), + return TQObject::connect(this, TQT_SIGNAL(redirect(KIRC::Message &)), object, member); } -QStringList MessageRedirector::operator () (Message &msg) +TQStringList MessageRedirector::operator () (Message &msg) { m_errors.clear(); @@ -49,12 +49,12 @@ QStringList MessageRedirector::operator () (Message &msg) return m_errors; } -QString MessageRedirector::helpMessage() +TQString MessageRedirector::helpMessage() { return m_helpMessage; } -void MessageRedirector::error(QString &message) +void MessageRedirector::error(TQString &message) { m_errors.append(message); } @@ -82,7 +82,7 @@ bool MessageRedirector::checkValidity(const Message &msg) ( msg.argsSize() > 0 && ( msg.arg(0) == m_Nickname || msg.arg(0) == m_PendingNick || - msg.arg(0) == QString::fromLatin1("*") + msg.arg(0) == TQString::fromLatin1("*") ) ) ) diff --git a/kopete/protocols/irc/libkirc/kircmessageredirector.h b/kopete/protocols/irc/libkirc/kircmessageredirector.h index f87a2af6..24a2f9af 100644 --- a/kopete/protocols/irc/libkirc/kircmessageredirector.h +++ b/kopete/protocols/irc/libkirc/kircmessageredirector.h @@ -18,8 +18,8 @@ #ifndef KIRC_MESSAGEREDIRECTOR_H #define KIRC_MESSAGEREDIRECTOR_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> namespace KIRC { @@ -42,27 +42,27 @@ public: MessageRedirector(KIRC::Engine *engine, int argsSize_min = KIRC::MessageRedirector::Unknown, int argsSize_max = KIRC::MessageRedirector::Unknown, - const QString &helpMessage = QString::null); + const TQString &helpMessage = TQString::null); /** * Connects the given object member signal/slot to this message redirector. * The member signal slot should be looking like: - * SIGNAL(mysignal(KIRC::Message &msg)) + * TQT_SIGNAL(mysignal(KIRC::Message &msg)) * or - * SIGNAL(myslot(KIRC::Message &msg)) + * TQT_SIGNAL(myslot(KIRC::Message &msg)) */ - bool connect(QObject *object, const char *member); + bool connect(TQObject *object, const char *member); /** * Attempt to send the message. - * @return a not empty QStringList on errors or no slots connected. + * @return a not empty TQStringList on errors or no slots connected. * The returned string list contains all the errors. */ - QStringList operator()(KIRC::Message &msg); + TQStringList operator()(KIRC::Message &msg); - void error(QString &errorMessage); + void error(TQString &errorMessage); - QString helpMessage(); + TQString helpMessage(); signals: void redirect(KIRC::Message &); @@ -74,11 +74,11 @@ private: */ bool checkValidity(const KIRC::Message &msg); - QStringList m_errors; + TQStringList m_errors; int m_argsSize_min; int m_argsSize_max; - QString m_helpMessage; + TQString m_helpMessage; }; } diff --git a/kopete/protocols/irc/libkirc/kirctransfer.cpp b/kopete/protocols/irc/libkirc/kirctransfer.cpp index 2466d6a9..af7d8948 100644 --- a/kopete/protocols/irc/libkirc/kirctransfer.cpp +++ b/kopete/protocols/irc/libkirc/kirctransfer.cpp @@ -19,30 +19,30 @@ #include <kextsock.h> #include <klocale.h> -#include <qfile.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqtimer.h> #include "kirctransfer.h" using namespace KIRC; -Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress +Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress Type type, - QObject *parent, const char *name ) - : QObject( parent, name ), + TQObject *parent, const char *name ) + : TQObject( parent, name ), m_engine(engine), m_nick(nick), m_type(type), m_socket(0), m_initiated(false), - m_file(0), m_fileName(QString::null), m_fileSize(0), m_fileSizeCur(0), m_fileSizeAck(0), + m_file(0), m_fileName(TQString::null), m_fileSize(0), m_fileSizeCur(0), m_fileSizeAck(0), m_receivedBytes(0), m_receivedBytesLimit(0), m_sentBytes(0), m_sentBytesLimit(0) { } -Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress +Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress Transfer::Type type, - QString fileName, Q_UINT32 fileSize, // put this in a QVariant ? - QObject *parent, const char *name ) - : QObject( parent, name ), + TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ? + TQObject *parent, const char *name ) + : TQObject( parent, name ), m_engine(engine), m_nick(nick), m_type(type), m_socket(0), m_initiated(false), @@ -51,12 +51,12 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress { } -Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress - QHostAddress hostAdress, Q_UINT16 port, // put this in a QVariant ? +Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress + TQHostAddress hostAdress, Q_UINT16 port, // put this in a TQVariant ? Transfer::Type type, - QString fileName, Q_UINT32 fileSize, // put this in a QVariant ? - QObject *parent, const char *name ) - : QObject( parent, name ), + TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ? + TQObject *parent, const char *name ) + : TQObject( parent, name ), m_engine(engine), m_nick(nick), m_type(type), m_socket(0), m_initiated(false), @@ -66,10 +66,10 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress setSocket(new KExtendedSocket(hostAdress.toString(), port)); } /* -Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress - Transfer::Type type, QVariant properties, - QObject *parent, const char *name ) - : QObject( parent, name ), +Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress + Transfer::Type type, TQVariant properties, + TQObject *parent, const char *name ) + : TQObject( parent, name ), m_engine(engine), m_nick(nick), m_type(type), m_socket(properties[socket]), m_initiated(false), @@ -81,11 +81,11 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress else if(!properites["hostAddress"].isNull() && !properites["hostPort"].isNull()) setSocket(new KExtendedSocket(properites["hostAddress"], properites["hostPort"])); - connect(this, SIGNAL(complete()), - this, SLOT(closeSocket())); + connect(this, TQT_SIGNAL(complete()), + this, TQT_SLOT(closeSocket())); - connect(this, SIGNAL(abort(QString)), - this, SLOT(closeSocket())); + connect(this, TQT_SIGNAL(abort(TQString)), + this, TQT_SLOT(closeSocket())); } */ Transfer::~Transfer() @@ -116,7 +116,7 @@ void Transfer::slotError( int error ) bool Transfer::initiate() { - QTimer *timer = 0; + TQTimer *timer = 0; if(m_initiated) { @@ -134,39 +134,39 @@ bool Transfer::initiate() m_file.setName(m_fileName); - connect(this, SIGNAL(complete()), - this, SLOT(closeSocket())); - connect(this, SIGNAL(abort(QString)), - this, SLOT(closeSocket())); + connect(this, TQT_SIGNAL(complete()), + this, TQT_SLOT(closeSocket())); + connect(this, TQT_SIGNAL(abort(TQString)), + this, TQT_SLOT(closeSocket())); -// connect(m_socket, SIGNAL(connectionClosed()), -// this, SLOT(slotConnectionClosed())); -// connect(m_socket, SIGNAL(delayedCloseFinished()), -// this, SLOT(slotConnectionClosed())); - connect(m_socket, SIGNAL(error(int)), // FIXME: connection failed: No such signal KExtendedSocket::error(int) - this, SLOT(slotError(int))); +// connect(m_socket, TQT_SIGNAL(connectionClosed()), +// this, TQT_SLOT(slotConnectionClosed())); +// connect(m_socket, TQT_SIGNAL(delayedCloseFinished()), +// this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(error(int)), // FIXME: connection failed: No such signal KExtendedSocket::error(int) + this, TQT_SLOT(slotError(int))); switch( m_type ) { case Chat: kdDebug(14121) << k_funcinfo << "Stting up a chat." << endl; - connect(m_socket, SIGNAL(readyRead()), - this, SLOT(readyReadFileIncoming())); + connect(m_socket, TQT_SIGNAL(readyRead()), + this, TQT_SLOT(readyReadFileIncoming())); break; case FileIncoming: kdDebug(14121) << k_funcinfo << "Stting up an incoming file transfer." << endl; m_file.open(IO_WriteOnly); - connect(m_socket, SIGNAL(readyRead()), - this, SLOT(readyReadFileIncoming())); + connect(m_socket, TQT_SIGNAL(readyRead()), + this, TQT_SLOT(readyReadFileIncoming())); break; case FileOutgoing: kdDebug(14121) << k_funcinfo << "Stting up an outgoing file transfer." << endl; m_file.open(IO_ReadOnly); - connect(m_socket, SIGNAL(readyRead()), - this, SLOT(readyReadFileOutgoing())); -// timer = new QTimer(this); -// connect(timer, SIGNAL(timeout()), -// this, SLOT(writeFileOutgoing())); + connect(m_socket, TQT_SIGNAL(readyRead()), + this, TQT_SLOT(readyReadFileOutgoing())); +// timer = new TQTimer(this); +// connect(timer, TQT_SIGNAL(timeout()), +// this, TQT_SLOT(writeFileOutgoing())); // timer->start(1000, false); writeFileOutgoing(); // send a first packet. break; @@ -189,9 +189,9 @@ bool Transfer::initiate() // I wonder if calling this is really necessary // As far as I understand, buffer (socket buffer at least) should be flushed while event-looping. // But I'm not really sure of this, so I force the flush. - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), - this, SLOT(flush())); + timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(flush())); timer->start(1000, FALSE); // flush the streams at every seconds return true; @@ -240,12 +240,12 @@ void Transfer::closeSocket() m_socket->flush(); } -void Transfer::userAbort(QString msg) +void Transfer::userAbort(TQString msg) { emit abort(msg); } -void Transfer::setCodec( QTextCodec *codec ) +void Transfer::setCodec( TQTextCodec *codec ) { switch( m_type ) { @@ -258,7 +258,7 @@ void Transfer::setCodec( QTextCodec *codec ) } } -void Transfer::writeLine( const QString &line ) +void Transfer::writeLine( const TQString &line ) { switch( m_type ) { @@ -275,7 +275,7 @@ void Transfer::readyReadLine() { if( m_socket->canReadLine() ) { - QString msg = m_socket_textStream.readLine(); + TQString msg = m_socket_textStream.readLine(); emit readLine(msg); } } diff --git a/kopete/protocols/irc/libkirc/kirctransfer.h b/kopete/protocols/irc/libkirc/kirctransfer.h index 3453f5cb..4053d1fd 100644 --- a/kopete/protocols/irc/libkirc/kirctransfer.h +++ b/kopete/protocols/irc/libkirc/kirctransfer.h @@ -18,11 +18,11 @@ #ifndef KIRCTRANSFER_H #define KIRCTRANSFER_H -#include <qdatastream.h> -#include <qfile.h> -#include <qhostaddress.h> -#include <qobject.h> -#include <qtextstream.h> +#include <tqdatastream.h> +#include <tqfile.h> +#include <tqhostaddress.h> +#include <tqobject.h> +#include <tqtextstream.h> class KExtendedSocket; @@ -56,25 +56,25 @@ public: Closed }; public: - Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress + Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress Type type = Unknown, - QObject *parent = 0L, const char *name = 0L ); + TQObject *parent = 0L, const char *name = 0L ); - Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress, - QHostAddress peer_address, Q_UINT16 peer_port, + Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress, + TQHostAddress peer_address, Q_UINT16 peer_port, Transfer::Type type, - QObject *parent = 0L, const char *name = 0L ); + TQObject *parent = 0L, const char *name = 0L ); - Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress, + Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress, Transfer::Type type, - QString fileName, Q_UINT32 fileSize, - QObject *parent = 0L, const char *name = 0L ); + TQString fileName, Q_UINT32 fileSize, + TQObject *parent = 0L, const char *name = 0L ); - Transfer( KIRC::Engine *engine, QString nick,// QString nick_peer_adress, - QHostAddress peer_address, Q_UINT16 peer_port, + Transfer( KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress, + TQHostAddress peer_address, Q_UINT16 peer_port, Transfer::Type type, - QString fileName, Q_UINT32 fileSize, - QObject *parent = 0L, const char *name = 0L ); + TQString fileName, Q_UINT32 fileSize, + TQObject *parent = 0L, const char *name = 0L ); /* For a file transfer properties are: @@ -88,15 +88,15 @@ public: Q_UINT32 fileSize for detemining the file propeties. *//* - Transfer( KIRC *engine, QString nick,// QString nick_peer_adress, - Transfer::Type type, QVariant properties, - QObject *parent = 0L, const char *name = 0L ); + Transfer( KIRC *engine, TQString nick,// TQString nick_peer_adress, + Transfer::Type type, TQVariant properties, + TQObject *parent = 0L, const char *name = 0L ); */ ~Transfer(); KIRC::Engine *engine() const { return m_engine; } - QString nick() const + TQString nick() const { return m_nick; } Type type() const { return m_type; } @@ -108,11 +108,11 @@ public: */ bool initiate(); - QString fileName() const + TQString fileName() const { return m_fileName; } /* Change the file name. */ - void setFileName(QString fileName) + void setFileName(TQString fileName) { m_fileName = fileName; } unsigned long fileSize() const { return m_fileSize; } @@ -120,15 +120,15 @@ public slots: bool setSocket( KExtendedSocket *socket ); void closeSocket(); - void setCodec( QTextCodec *codec ); - void writeLine( const QString &msg ); + void setCodec( TQTextCodec *codec ); + void writeLine( const TQString &msg ); void flush(); - void userAbort(QString); + void userAbort(TQString); signals: - void readLine( const QString &msg ); + void readLine( const TQString &msg ); void fileSizeCurrent( unsigned int ); void fileSizeAcknowledge( unsigned int ); @@ -136,7 +136,7 @@ signals: // void received(Q_UINT32); // void sent(Q_UINT32); - void abort(QString); + void abort(TQString); /* Emited when the transfer is complete. * Usually it means that the file transfer has successfully finished. @@ -166,7 +166,7 @@ protected: // Text member data QTextStream m_socket_textStream; -// QTextCodec * m_socket_codec; +// TQTextCodec * m_socket_codec; // File member data QFile m_file; diff --git a/kopete/protocols/irc/libkirc/kirctransferhandler.cpp b/kopete/protocols/irc/libkirc/kirctransferhandler.cpp index 3fa73dff..c6c2185e 100644 --- a/kopete/protocols/irc/libkirc/kirctransferhandler.cpp +++ b/kopete/protocols/irc/libkirc/kirctransferhandler.cpp @@ -19,9 +19,9 @@ #include <klocale.h> #include <kextsock.h> -#include <qfile.h> -#include <qregexp.h> -#include <qtextcodec.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqtextcodec.h> #include "kirctransferserver.h" @@ -54,9 +54,9 @@ TransferServer *TransferHandler::server( Q_UINT16 port, int backlog ) return m_server; } -TransferServer *TransferHandler::createServer(Engine *engine, QString m_userName, +TransferServer *TransferHandler::createServer(Engine *engine, TQString m_userName, Transfer::Type type, - QString fileName, Q_UINT32 fileSize) + TQString fileName, Q_UINT32 fileSize) { TransferServer *server = new TransferServer(engine, m_userName, type, fileName, fileSize, this); transferServerCreated(server); @@ -64,13 +64,13 @@ TransferServer *TransferHandler::createServer(Engine *engine, QString m_userName } Transfer *TransferHandler::createClient( - Engine *engine, QString nick,// QString nick_peer_adress, - QHostAddress peer_address, Q_UINT16 peer_port, + Engine *engine, TQString nick,// TQString nick_peer_adress, + TQHostAddress peer_address, Q_UINT16 peer_port, Transfer::Type type, - QString fileName, Q_UINT32 fileSize ) + TQString fileName, Q_UINT32 fileSize ) { Transfer *client = new Transfer( - engine, nick,// QString nick_peer_adress, + engine, nick,// TQString nick_peer_adress, peer_address, peer_port, type, fileName, fileSize, @@ -80,9 +80,9 @@ Transfer *TransferHandler::createClient( } /* -File *DCCHandler::openFile( QString file, int mode = IO_ReadWrite ) +File *DCCHandler::openFile( TQString file, int mode = IO_ReadWrite ) { - QFile *file = new QFile(filename); + TQFile *file = new TQFile(filename); if (!file->open(mode)) { delete file; diff --git a/kopete/protocols/irc/libkirc/kirctransferhandler.h b/kopete/protocols/irc/libkirc/kirctransferhandler.h index 81774c02..de03b810 100644 --- a/kopete/protocols/irc/libkirc/kirctransferhandler.h +++ b/kopete/protocols/irc/libkirc/kirctransferhandler.h @@ -18,7 +18,7 @@ #ifndef KIRCTRANSFERHANDLER_H #define KIRCTRANSFERHANDLER_H -#include <qhostaddress.h> +#include <tqhostaddress.h> #include "kirctransfer.h" #include "kirctransferserver.h" @@ -42,24 +42,24 @@ public: TransferServer *server(); TransferServer *server( Q_UINT16 port, int backlog = 1 ); - TransferServer *createServer(KIRC::Engine *engine, QString m_userName, + TransferServer *createServer(KIRC::Engine *engine, TQString m_userName, Transfer::Type type, - QString fileName, Q_UINT32 fileSize); + TQString fileName, Q_UINT32 fileSize); Transfer *createClient( - KIRC::Engine *engine, QString nick,// QString nick_peer_adress, - QHostAddress peer_address, Q_UINT16 peer_port, + KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress, + TQHostAddress peer_address, Q_UINT16 peer_port, Transfer::Type type, - QString file = QString::null, Q_UINT32 fileSize = 0 ); + TQString file = TQString::null, Q_UINT32 fileSize = 0 ); // void registerServer( DCCServer * ); -// QPtrList<DCCServer> getRegisteredServers(); -// static QPtrList<DCCServer> getAllRegisteredServers(); +// TQPtrList<DCCServer> getRegisteredServers(); +// static TQPtrList<DCCServer> getAllRegisteredServers(); // void unregisterServer( DCCServer * ); // void registerClient( DCCClient * ); -// QPtrList<DCCClient> getRegisteredClients(); -// static QPtrList<DCCClient> getAllRegisteredClients(); +// TQPtrList<DCCClient> getRegisteredClients(); +// static TQPtrList<DCCClient> getAllRegisteredClients(); // void unregisterClient( DCCClient * ); signals: @@ -70,8 +70,8 @@ private: // TransferHandler(); TransferServer *m_server; -// QPtrList<TransferServer> m_servers; -// QPtrList<Transfer> m_clients; +// TQPtrList<TransferServer> m_servers; +// TQPtrList<Transfer> m_clients; }; } diff --git a/kopete/protocols/irc/libkirc/kirctransferserver.cpp b/kopete/protocols/irc/libkirc/kirctransferserver.cpp index 96cc66fb..1fbe1629 100644 --- a/kopete/protocols/irc/libkirc/kirctransferserver.cpp +++ b/kopete/protocols/irc/libkirc/kirctransferserver.cpp @@ -25,27 +25,27 @@ using namespace KIRC; /* -TransferServer::TransferServer( QObject *parent, const char *name ) - : QObject( parent, name ), +TransferServer::TransferServer( TQObject *parent, const char *name ) + : TQObject( parent, name ), m_socket( 0 ), m_port( 0 ), m_backlog( 1 ) { } */ -TransferServer::TransferServer(Q_UINT16 port, int backlog, QObject *parent, const char *name) - : QObject( parent, name ), +TransferServer::TransferServer(Q_UINT16 port, int backlog, TQObject *parent, const char *name) + : TQObject( parent, name ), m_socket( 0 ), m_port( port ), m_backlog( backlog ) { } -TransferServer::TransferServer(Engine *engine, QString nick,// QString nick_peer_adress, +TransferServer::TransferServer(Engine *engine, TQString nick,// TQString nick_peer_adress, Transfer::Type type, - QString fileName, Q_UINT32 fileSize, - QObject *parent, const char *name) - : QObject( parent, name ), + TQString fileName, Q_UINT32 fileSize, + TQObject *parent, const char *name) + : TQObject( parent, name ), m_socket(0), m_port(0), m_backlog(1), @@ -68,8 +68,8 @@ bool TransferServer::initServer() { if (!m_socket) { - QObject::connect(this, SIGNAL(incomingNewTransfer(Transfer *)), - TransferHandler::self(), SIGNAL(transferCreated(Transfer *))); + TQObject::connect(this, TQT_SIGNAL(incomingNewTransfer(Transfer *)), + TransferHandler::self(), TQT_SIGNAL(transferCreated(Transfer *))); m_socket = new KExtendedSocket(); @@ -83,10 +83,10 @@ bool TransferServer::initServer() if (!m_socket->setTimeout(2*60)) // FIXME: allow configuration of this. kdDebug(14120) << k_funcinfo << "Failed to set timeout." << endl; - QObject::connect(m_socket, SIGNAL(readyAccept()), - this, SLOT(readyAccept())); - QObject::connect(m_socket, SIGNAL(connectionFailed(int)), - this, SLOT(connectionFailed(int))); + TQObject::connect(m_socket, TQT_SIGNAL(readyAccept()), + this, TQT_SLOT(readyAccept())); + TQObject::connect(m_socket, TQT_SIGNAL(connectionFailed(int)), + this, TQT_SLOT(connectionFailed(int))); m_socket->listen(m_backlog); m_socket->setBlockingMode(true); @@ -137,14 +137,14 @@ void Transfer::initClient() { if(!m_socket) { - connect(m_socket, SIGNAL(connectionClosed()), - this, SLOT(slotConnectionClosed())); - connect(m_socket, SIGNAL(delayedCloseFinished()), - this, SLOT(slotConnectionClosed())); - connect(m_socket, SIGNAL(error(int)), - this, SLOT(slotError(int))); - connect(m_socket, SIGNAL(readyRead()), - this, SLOT(readyReadFileOut)); + connect(m_socket, TQT_SIGNAL(connectionClosed()), + this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(delayedCloseFinished()), + this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(error(int)), + this, TQT_SLOT(slotError(int))); + connect(m_socket, TQT_SIGNAL(readyRead()), + this, TQT_SLOT(readyReadFileOut)); m_socket->enableRead( true ); m_socket->enableWrite( true ); diff --git a/kopete/protocols/irc/libkirc/kirctransferserver.h b/kopete/protocols/irc/libkirc/kirctransferserver.h index 8ac016ef..af7c498d 100644 --- a/kopete/protocols/irc/libkirc/kirctransferserver.h +++ b/kopete/protocols/irc/libkirc/kirctransferserver.h @@ -20,7 +20,7 @@ #include "kirctransfer.h" -#include <qobject.h> +#include <tqobject.h> class KExtendedSocket; @@ -36,12 +36,12 @@ class TransferServer Q_OBJECT public: -// TransferServer(QObject *parent = 0, const char *name = 0); - TransferServer(Q_UINT16 port, int backlog = 1, QObject *parent = 0, const char *name = 0); - TransferServer(KIRC::Engine *engine, QString nick,// QString nick_peer_adress, +// TransferServer(TQObject *parent = 0, const char *name = 0); + TransferServer(Q_UINT16 port, int backlog = 1, TQObject *parent = 0, const char *name = 0); + TransferServer(KIRC::Engine *engine, TQString nick,// TQString nick_peer_adress, Transfer::Type type, - QString fileName, Q_UINT32 fileSize, - QObject *parent = 0, const char *name = 0); + TQString fileName, Q_UINT32 fileSize, + TQObject *parent = 0, const char *name = 0); ~TransferServer(); @@ -71,8 +71,8 @@ private: QString m_fileName; Q_UINT32 m_fileSize; // by - // QPtrList<Transfer> m_pendingTransfers; - // QPtrList<Transfer> m_activeTransfers; + // TQPtrList<Transfer> m_pendingTransfers; + // TQPtrList<Transfer> m_activeTransfers; }; diff --git a/kopete/protocols/irc/libkirc/ksslsocket.cpp b/kopete/protocols/irc/libkirc/ksslsocket.cpp index fb2d5161..afe78fed 100644 --- a/kopete/protocols/irc/libkirc/ksslsocket.cpp +++ b/kopete/protocols/irc/libkirc/ksslsocket.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include <qsocketnotifier.h> +#include <tqsocketnotifier.h> #include <dcopclient.h> #include <klocale.h> @@ -36,8 +36,8 @@ struct KSSLSocketPrivate mutable KSSL *kssl; KSSLCertificateCache *cc; DCOPClient *dcc; - QMap<QString,QString> metaData; - QSocketNotifier *socketNotifier; + TQMap<TQString,TQString> metaData; + TQSocketNotifier *socketNotifier; }; KSSLSocket::KSSLSocket() : KExtendedSocket() @@ -52,9 +52,9 @@ KSSLSocket::KSSLSocket() : KExtendedSocket() setBlockingMode(false); //Connect internal slots - QObject::connect( this, SIGNAL(connectionSuccess()), this, SLOT(slotConnected()) ); - QObject::connect( this, SIGNAL(closed(int)), this, SLOT(slotDisconnected()) ); - QObject::connect( this, SIGNAL(connectionFailed(int)), this, SLOT(slotDisconnected())); + TQObject::connect( this, TQT_SIGNAL(connectionSuccess()), this, TQT_SLOT(slotConnected()) ); + TQObject::connect( this, TQT_SIGNAL(closed(int)), this, TQT_SLOT(slotDisconnected()) ); + TQObject::connect( this, TQT_SIGNAL(connectionFailed(int)), this, TQT_SLOT(slotDisconnected())); } KSSLSocket::~KSSLSocket() @@ -118,7 +118,7 @@ int KSSLSocket::bytesAvailable() const void KSSLSocket::slotReadData() { kdDebug(14120) << k_funcinfo << d->kssl->pending() << endl; - QByteArray buff(512); + TQByteArray buff(512); int bytesRead = d->kssl->read( buff.data(), 512 ); //Fill the read buffer @@ -148,11 +148,11 @@ void KSSLSocket::slotConnected() } //Disconnect the KExtSocket notifier slot, we use our own - QObject::disconnect( readNotifier(), SIGNAL(activated( int )), - this, SLOT(socketActivityRead()) ); + TQObject::disconnect( readNotifier(), TQT_SIGNAL(activated( int )), + this, TQT_SLOT(socketActivityRead()) ); - QObject::connect( readNotifier(), SIGNAL(activated( int )), - this, SLOT(slotReadData()) ); + TQObject::connect( readNotifier(), TQT_SIGNAL(activated( int )), + this, TQT_SLOT(slotReadData()) ); readNotifier()->setEnabled(true); @@ -182,34 +182,34 @@ void KSSLSocket::showInfoDialog() { if (!d->dcc->isApplicationRegistered("kio_uiserver")) { - KApplication::startServiceByDesktopPath("kio_uiserver.desktop",QStringList()); + KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList()); } - QByteArray data, ignore; - QCString ignoretype; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, ignore; + TQCString ignoretype; + TQDataStream arg(data, IO_WriteOnly); arg << "irc://" + peerAddress()->pretty() + ":" + port() << d->metaData; d->dcc->call("kio_uiserver", "UIServer", - "showSSLInfoDialog(QString,KIO::MetaData)", data, ignoretype, ignore); + "showSSLInfoDialog(TQString,KIO::MetaData)", data, ignoretype, ignore); } } -void KSSLSocket::setMetaData( const QString &key, const QVariant &data ) +void KSSLSocket::setMetaData( const TQString &key, const TQVariant &data ) { - QVariant v = data; + TQVariant v = data; d->metaData[key] = v.asString(); } -bool KSSLSocket::hasMetaData( const QString &key ) +bool KSSLSocket::hasMetaData( const TQString &key ) { return d->metaData.contains(key); } -QString KSSLSocket::metaData( const QString &key ) +TQString KSSLSocket::metaData( const TQString &key ) { if( d->metaData.contains(key) ) return d->metaData[key]; - return QString::null; + return TQString::null; } /* @@ -220,27 +220,27 @@ I basically copied the below from tcpKIO::SlaveBase.hpp, with some modificaions * Copyright (C) 2001 Dawit Alemayehu <adawit@kde.org> */ -int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const QString &text, const QString &caption, - const QString &buttonYes, const QString &buttonNo ) +int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const TQString &text, const TQString &caption, + const TQString &buttonYes, const TQString &buttonNo ) { kdDebug(14120) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl; - QByteArray data, result; - QCString returnType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, result; + TQCString returnType; + TQDataStream arg(data, IO_WriteOnly); arg << (int)1 << (int)type << text << caption << buttonYes << buttonNo; if (!d->dcc->isApplicationRegistered("kio_uiserver")) { - KApplication::startServiceByDesktopPath("kio_uiserver.desktop",QStringList()); + KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList()); } d->dcc->call("kio_uiserver", "UIServer", - "messageBox(int,int,QString,QString,QString,QString)", data, returnType, result); + "messageBox(int,int,TQString,TQString,TQString,TQString)", data, returnType, result); if( returnType == "int" ) { int res; - QDataStream r(result, IO_ReadOnly); + TQDataStream r(result, IO_ReadOnly); r >> res; return res; } @@ -257,10 +257,10 @@ int KSSLSocket::verifyCertificate() bool _IPmatchesCN = false; int result; bool doAddHost = false; - QString ourHost = host(); - QString ourIp = peerAddress()->pretty(); + TQString ourHost = host(); + TQString ourIp = peerAddress()->pretty(); - QString theurl = "irc://" + ourHost + ":" + port(); + TQString theurl = "irc://" + ourHost + ":" + port(); if (!d->cc) d->cc = new KSSLCertificateCache; @@ -284,15 +284,15 @@ int KSSLSocket::verifyCertificate() setMetaData("ssl_cipher", d->kssl->connectionInfo().getCipher()); setMetaData("ssl_cipher_desc", d->kssl->connectionInfo().getCipherDescription()); setMetaData("ssl_cipher_version", d->kssl->connectionInfo().getCipherVersion()); - setMetaData("ssl_cipher_used_bits", QString::number(d->kssl->connectionInfo().getCipherUsedBits())); - setMetaData("ssl_cipher_bits", QString::number(d->kssl->connectionInfo().getCipherBits())); + setMetaData("ssl_cipher_used_bits", TQString::number(d->kssl->connectionInfo().getCipherUsedBits())); + setMetaData("ssl_cipher_bits", TQString::number(d->kssl->connectionInfo().getCipherBits())); setMetaData("ssl_peer_ip", ourIp ); - QString errorStr; + TQString errorStr; for(KSSLCertificate::KSSLValidationList::ConstIterator it = ksvl.begin(); it != ksvl.end(); ++it) { - errorStr += QString::number(*it)+":"; + errorStr += TQString::number(*it)+":"; } setMetaData("ssl_cert_errors", errorStr); @@ -300,8 +300,8 @@ int KSSLSocket::verifyCertificate() if (pc.chain().isValid() && pc.chain().depth() > 1) { - QString theChain; - QPtrList<KSSLCertificate> chain = pc.chain().getChain(); + TQString theChain; + TQPtrList<KSSLCertificate> chain = pc.chain().getChain(); for (KSSLCertificate *c = chain.first(); c; c = chain.next()) { theChain += c->toString(); @@ -314,7 +314,7 @@ int KSSLSocket::verifyCertificate() setMetaData("ssl_peer_chain", ""); } - setMetaData("ssl_cert_state", QString::number(ksv)); + setMetaData("ssl_cert_state", TQString::number(ksv)); if (ksv == KSSLCertificate::Ok) { @@ -364,7 +364,7 @@ int KSSLSocket::verifyCertificate() { if (ksv == KSSLCertificate::InvalidHost) { - QString msg = i18n("The IP address of the host %1 " + TQString msg = i18n("The IP address of the host %1 " "does not match the one the " "certificate was issued to."); result = messageBox( KIO::SlaveBase::WarningYesNoCancel, @@ -375,7 +375,7 @@ int KSSLSocket::verifyCertificate() } else { - QString msg = i18n("The server certificate failed the " + TQString msg = i18n("The server certificate failed the " "authenticity test (%1)."); result = messageBox( KIO::SlaveBase::WarningYesNoCancel, msg.arg(ourHost), diff --git a/kopete/protocols/irc/libkirc/ksslsocket.h b/kopete/protocols/irc/libkirc/ksslsocket.h index 692d5288..79e3b70b 100644 --- a/kopete/protocols/irc/libkirc/ksslsocket.h +++ b/kopete/protocols/irc/libkirc/ksslsocket.h @@ -20,7 +20,7 @@ ************************************************************************* */ -#include <qvariant.h> +#include <tqvariant.h> #include <kextsock.h> #include <kio/slavebase.h> @@ -53,14 +53,14 @@ class KSSLSocket : public KExtendedSocket private: int verifyCertificate(); - int messageBox( KIO::SlaveBase::MessageBoxType type, const QString &text, - const QString &caption, const QString &buttonYes, const QString &buttonNo ); + int messageBox( KIO::SlaveBase::MessageBoxType type, const TQString &text, + const TQString &caption, const TQString &buttonYes, const TQString &buttonNo ); //Copied frm tcpslavebase to simply integrating their dialog function - void setMetaData( const QString &, const QVariant & ); - bool hasMetaData( const QString & ); - QString metaData( const QString & ); + void setMetaData( const TQString &, const TQVariant & ); + bool hasMetaData( const TQString & ); + TQString metaData( const TQString & ); KSSLSocketPrivate *d; }; diff --git a/kopete/protocols/irc/ui/channellist.cpp b/kopete/protocols/irc/ui/channellist.cpp index 5c66ede0..ea085db8 100644 --- a/kopete/protocols/irc/ui/channellist.cpp +++ b/kopete/protocols/irc/ui/channellist.cpp @@ -22,34 +22,34 @@ #include <klocale.h> #include <kmessagebox.h> -#include <qvariant.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qapplication.h> -#include <qsimplerichtext.h> -#include <qstyle.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qheader.h> +#include <tqvariant.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqapplication.h> +#include <tqsimplerichtext.h> +#include <tqstyle.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqheader.h> #include <klistview.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qtimer.h> -#include <qspinbox.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqtimer.h> +#include <tqspinbox.h> +#include <tqwhatsthis.h> class ChannelListItem : public KListViewItem { public: - ChannelListItem( KListView *parent, QString arg1, QString arg2, QString arg3 ); - virtual int compare( QListViewItem *i, int col, bool ascending ) const; - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + ChannelListItem( KListView *parent, TQString arg1, TQString arg2, TQString arg3 ); + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); private: KListView *parentList; }; -ChannelListItem::ChannelListItem( KListView *parent, QString arg1, QString arg2, QString arg3 ) : +ChannelListItem::ChannelListItem( KListView *parent, TQString arg1, TQString arg2, TQString arg3 ) : KListViewItem( parent, parent->lastItem() ), parentList( parent ) { setText(0, arg1); @@ -57,7 +57,7 @@ ChannelListItem::ChannelListItem( KListView *parent, QString arg1, QString arg2, setText(2, arg3); } -int ChannelListItem::compare( QListViewItem *i, int col, bool ascending ) const +int ChannelListItem::compare( TQListViewItem *i, int col, bool ascending ) const { if( col == 1 ) { @@ -69,58 +69,58 @@ int ChannelListItem::compare( QListViewItem *i, int col, bool ascending ) const return 1; } else - return QListViewItem::compare( i, col, ascending ); + return TQListViewItem::compare( i, col, ascending ); } -void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) +void ChannelListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) { - QPixmap back( width, height() ); - QPainter paint( &back ); + TQPixmap back( width, height() ); + TQPainter paint( &back ); //KListViewItem::paintCell( &paint, cg, column, width, align ); // PASTED FROM KLISTVIEWITEM: // set the alternate cell background colour if necessary - QColorGroup _cg = cg; + TQColorGroup _cg = cg; if (isAlternate()) if (listView()->viewport()->backgroundMode()==Qt::FixedColor) - _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); else - _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); // PASTED FROM QLISTVIEWITEM { - QPainter *p = &paint; + TQPainter *p = &paint; - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; - QFontMetrics fm( p->fontMetrics() ); + TQFontMetrics fm( p->fontMetrics() ); // any text we render is done by the Components, not by this class, so make sure we've nothing to write - QString t; + TQString t; // removed text truncating code from Qt - we do that differently, further on int marg = lv->itemMargin(); int r = marg; - // const QPixmap * icon = pixmap( column ); + // const TQPixmap * icon = pixmap( column ); const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode ); + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); if ( _cg.brush( crole ) != lv->colorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), _cg.brush( crole ) ); else { - // all copied from QListView::paintEmptyArea + // all copied from TQListView::paintEmptyArea - //lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) ); - QStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in QListView and QHeader - QStyle::SFlags how = QStyle::Style_Default; + //lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); + TQStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in TQListView and QHeader + TQStyle::SFlags how = TQStyle::Style_Default; if ( lv->isEnabled() ) - how |= QStyle::Style_Enabled; + how |= TQStyle::Style_Enabled; - lv->style().drawComplexControl( QStyle::CC_ListView, - p, lv, QRect( 0, 0, width, height() ), lv->colorGroup(), - how, QStyle::SC_ListView, QStyle::SC_None, + lv->style().drawComplexControl( TQStyle::CC_ListView, + p, lv, TQRect( 0, 0, width, height() ), lv->colorGroup(), + how, TQStyle::SC_ListView, TQStyle::SC_None, opt ); } @@ -129,7 +129,7 @@ void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, if ( isSelected() && (column == 0 || lv->allColumnsShowFocus()) ) { p->fillRect( r - marg, 0, width - r + marg, height(), - _cg.brush( QColorGroup::Highlight ) ); + _cg.brush( TQColorGroup::Highlight ) ); // removed text pen setting code from Qt } @@ -138,16 +138,16 @@ void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, // draw the tree gubbins if ( multiLinesEnabled() && column == 0 && isOpen() && childCount() ) { int textheight = fm.size( align, t ).height() + 2 * lv->itemMargin(); - textheight = QMAX( textheight, QApplication::globalStrut().height() ); + textheight = QMAX( textheight, TQApplication::globalStrut().height() ); if ( textheight % 2 > 0 ) textheight++; if ( textheight < height() ) { int w = lv->treeStepSize() / 2; - lv->style().drawComplexControl( QStyle::CC_ListView, p, lv, - QRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, - lv->isEnabled() ? QStyle::Style_Enabled : QStyle::Style_Default, - QStyle::SC_ListViewExpand, - (uint)QStyle::SC_All, QStyleOption( this ) ); + lv->style().drawComplexControl( TQStyle::CC_ListView, p, lv, + TQRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, + lv->isEnabled() ? TQStyle::Style_Enabled : TQStyle::Style_Default, + TQStyle::SC_ListViewExpand, + (uint)TQStyle::SC_All, TQStyleOption( this ) ); } } } @@ -156,33 +156,33 @@ void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, //do you see a better way to tell the TextComponent we are selected ? - Olivier 2004-09-02 if ( isSelected() ) - _cg.setColor(QColorGroup::Text , _cg.highlightedText() ); + _cg.setColor(TQColorGroup::Text , _cg.highlightedText() ); - QSimpleRichText myrichtext( text(column), paint.font() ); + TQSimpleRichText myrichtext( text(column), paint.font() ); myrichtext.draw( &paint, 0, 0, paint.window(), _cg ); paint.end(); p->drawPixmap( 0, 0, back ); } -ChannelList::ChannelList( QWidget* parent, KIRC::Engine *engine ) - : QWidget( parent ), m_engine( engine ) +ChannelList::ChannelList( TQWidget* parent, KIRC::Engine *engine ) + : TQWidget( parent ), m_engine( engine ) { - ChannelListLayout = new QVBoxLayout( this, 11, 6, "ChannelListLayout"); + ChannelListLayout = new TQVBoxLayout( this, 11, 6, "ChannelListLayout"); - layout72_2 = new QHBoxLayout( 0, 0, 6, "layout72_2"); + layout72_2 = new TQHBoxLayout( 0, 0, 6, "layout72_2"); - textLabel1_2 = new QLabel( this, "textLabel1_2" ); + textLabel1_2 = new TQLabel( this, "textLabel1_2" ); layout72_2->addWidget( textLabel1_2 ); - channelSearch = new QLineEdit( this, "channelSearch" ); + channelSearch = new TQLineEdit( this, "channelSearch" ); layout72_2->addWidget( channelSearch ); - numUsers = new QSpinBox( 0, 32767, 1, this, "num_users" ); + numUsers = new TQSpinBox( 0, 32767, 1, this, "num_users" ); numUsers->setSuffix( i18n(" members") ); layout72_2->addWidget( numUsers ); - mSearchButton = new QPushButton( this, "mSearchButton" ); + mSearchButton = new TQPushButton( this, "mSearchButton" ); layout72_2->addWidget( mSearchButton ); ChannelListLayout->addLayout( layout72_2 ); @@ -198,46 +198,46 @@ ChannelList::ChannelList( QWidget* parent, KIRC::Engine *engine ) clearWState( WState_Polished ); textLabel1_2->setText( i18n( "Search for:" ) ); - QToolTip::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here." ) ); - QToolTip::add( numUsers, i18n( "Channels returned must have at least this many members." ) ); - QWhatsThis::add( numUsers, i18n( "Channels returned must have at least this many members." ) ); - QWhatsThis::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) ); - QToolTip::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here." ) ); - QWhatsThis::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) ); + TQToolTip::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here." ) ); + TQToolTip::add( numUsers, i18n( "Channels returned must have at least this many members." ) ); + TQWhatsThis::add( numUsers, i18n( "Channels returned must have at least this many members." ) ); + TQWhatsThis::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) ); + TQToolTip::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here." ) ); + TQWhatsThis::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) ); mSearchButton->setText( i18n( "S&earch" ) ); - QToolTip::add( mSearchButton, i18n( "Perform a channel search." ) ); - QWhatsThis::add( mSearchButton, i18n( "Perform a channel search. Please be patient, as this can be slow depending on the number of channels on the server." ) ); - QToolTip::add( mChannelList, i18n( "Double click on a channel to select it." ) ); + TQToolTip::add( mSearchButton, i18n( "Perform a channel search." ) ); + TQWhatsThis::add( mSearchButton, i18n( "Perform a channel search. Please be patient, as this can be slow depending on the number of channels on the server." ) ); + TQToolTip::add( mChannelList, i18n( "Double click on a channel to select it." ) ); mChannelList->header()->setLabel( 0, i18n( "Channel" ) ); mChannelList->header()->setLabel( 1, i18n( "Users" ) ); mChannelList->header()->setLabel( 2, i18n( "Topic" ) ); // signals and slots connections - connect( mChannelList, SIGNAL( doubleClicked(QListViewItem*) ), - this, SLOT( slotItemDoubleClicked(QListViewItem*) ) ); + connect( mChannelList, TQT_SIGNAL( doubleClicked(TQListViewItem*) ), + this, TQT_SLOT( slotItemDoubleClicked(TQListViewItem*) ) ); - connect( mSearchButton, SIGNAL( clicked() ), this, SLOT( search() ) ); + connect( mSearchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( search() ) ); - connect( mChannelList, SIGNAL( selectionChanged( QListViewItem*) ), this, - SLOT( slotItemSelected( QListViewItem *) ) ); + connect( mChannelList, TQT_SIGNAL( selectionChanged( TQListViewItem*) ), this, + TQT_SLOT( slotItemSelected( TQListViewItem *) ) ); - connect( m_engine, SIGNAL( incomingListedChan( const QString &, uint, const QString & ) ), - this, SLOT( slotChannelListed( const QString &, uint, const QString & ) ) ); + connect( m_engine, TQT_SIGNAL( incomingListedChan( const TQString &, uint, const TQString & ) ), + this, TQT_SLOT( slotChannelListed( const TQString &, uint, const TQString & ) ) ); - connect( m_engine, SIGNAL( incomingEndOfList() ), this, SLOT( slotListEnd() ) ); + connect( m_engine, TQT_SIGNAL( incomingEndOfList() ), this, TQT_SLOT( slotListEnd() ) ); - connect( m_engine, SIGNAL( statusChanged(KIRC::Engine::Status) ), - this, SLOT( slotStatusChanged(KIRC::Engine::Status) ) ); + connect( m_engine, TQT_SIGNAL( statusChanged(KIRC::Engine::Status) ), + this, TQT_SLOT( slotStatusChanged(KIRC::Engine::Status) ) ); show(); } -void ChannelList::slotItemDoubleClicked( QListViewItem *i ) +void ChannelList::slotItemDoubleClicked( TQListViewItem *i ) { emit channelDoubleClicked( i->text(0) ); } -void ChannelList::slotItemSelected( QListViewItem *i ) +void ChannelList::slotItemSelected( TQListViewItem *i ) { emit channelSelected( i->text(0) ); } @@ -306,19 +306,19 @@ void ChannelList::search() } } -void ChannelList::slotChannelListed( const QString &channel, uint users, const QString &topic ) +void ChannelList::slotChannelListed( const TQString &channel, uint users, const TQString &topic ) { checkSearchResult( channel, users, topic ); - channelCache.insert( channel, QPair< uint, QString >( users, topic ) ); + channelCache.insert( channel, QPair< uint, TQString >( users, topic ) ); } -void ChannelList::checkSearchResult( const QString &channel, uint users, const QString &topic ) +void ChannelList::checkSearchResult( const TQString &channel, uint users, const TQString &topic ) { if( ( mUsers == 0 || mUsers <= users ) && ( mSearch.isEmpty() || channel.contains( mSearch, false ) || topic.contains( mSearch, false ) ) ) { - new ChannelListItem( mChannelList, channel, QString::number(users), topic ); + new ChannelListItem( mChannelList, channel, TQString::number(users), topic ); } } @@ -328,7 +328,7 @@ void ChannelList::slotSearchCache() { checkSearchResult( cacheIterator.key(), cacheIterator.data().first, cacheIterator.data().second ); ++cacheIterator; - QTimer::singleShot( 0, this, SLOT( slotSearchCache() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotSearchCache() ) ); } else { diff --git a/kopete/protocols/irc/ui/channellist.h b/kopete/protocols/irc/ui/channellist.h index c6f435a0..59b03a25 100644 --- a/kopete/protocols/irc/ui/channellist.h +++ b/kopete/protocols/irc/ui/channellist.h @@ -18,9 +18,9 @@ #ifndef CHANNELLIST_H #define CHANNELLIST_H -#include <qwidget.h> -#include <qmap.h> -#include <qpair.h> +#include <tqwidget.h> +#include <tqmap.h> +#include <tqpair.h> #include "kircengine.h" @@ -40,7 +40,7 @@ class ChannelList Q_OBJECT public: - ChannelList( QWidget *parent, KIRC::Engine *engine ); + ChannelList( TQWidget *parent, KIRC::Engine *engine ); public slots: void search(); @@ -48,33 +48,33 @@ class ChannelList void clear(); signals: - void channelDoubleClicked( const QString &channel ); - void channelSelected( const QString &channel ); + void channelDoubleClicked( const TQString &channel ); + void channelSelected( const TQString &channel ); private slots: - void slotItemDoubleClicked( QListViewItem * i ); - void slotItemSelected( QListViewItem * i ); - void slotChannelListed( const QString & channel, uint users, const QString & topic ); + void slotItemDoubleClicked( TQListViewItem * i ); + void slotItemSelected( TQListViewItem * i ); + void slotChannelListed( const TQString & channel, uint users, const TQString & topic ); void slotListEnd(); void slotSearchCache(); void slotStatusChanged( KIRC::Engine::Status ); private: - void checkSearchResult( const QString & channel, uint users, const QString & topic ); + void checkSearchResult( const TQString & channel, uint users, const TQString & topic ); - QLabel* textLabel1_2; - QLineEdit* channelSearch; - QSpinBox* numUsers; - QPushButton* mSearchButton; + TQLabel* textLabel1_2; + TQLineEdit* channelSearch; + TQSpinBox* numUsers; + TQPushButton* mSearchButton; KListView* mChannelList; - QVBoxLayout* ChannelListLayout; - QHBoxLayout* layout72_2; + TQVBoxLayout* ChannelListLayout; + TQHBoxLayout* layout72_2; KIRC::Engine *m_engine; bool mSearching; - QString mSearch; + TQString mSearch; uint mUsers; - QMap< QString, QPair< uint, QString > > channelCache; - QMap< QString, QPair< uint, QString > >::const_iterator cacheIterator; + TQMap< TQString, QPair< uint, TQString > > channelCache; + TQMap< TQString, QPair< uint, TQString > >::const_iterator cacheIterator; }; #endif diff --git a/kopete/protocols/irc/ui/channellistdialog.cpp b/kopete/protocols/irc/ui/channellistdialog.cpp index 46128730..e344d227 100644 --- a/kopete/protocols/irc/ui/channellistdialog.cpp +++ b/kopete/protocols/irc/ui/channellistdialog.cpp @@ -22,23 +22,23 @@ #include "kopeteuiglobal.h" -#include "qlayout.h" +#include "tqlayout.h" -ChannelListDialog::ChannelListDialog(KIRC::Engine *engine, const QString &caption, QObject *target, const char* slotJoinChan) +ChannelListDialog::ChannelListDialog(KIRC::Engine *engine, const TQString &caption, TQObject *target, const char* slotJoinChan) : KDialogBase(Kopete::UI::Global::mainWidget(), "channel_list_widget", false, caption, Close) { m_engine = engine; m_list = new ChannelList( this, engine ); - connect( m_list, SIGNAL( channelDoubleClicked( const QString & ) ), + connect( m_list, TQT_SIGNAL( channelDoubleClicked( const TQString & ) ), target, slotJoinChan ); - connect( m_list, SIGNAL( channelDoubleClicked( const QString & ) ), - this, SLOT( slotChannelDoubleClicked( const QString & ) ) ); + connect( m_list, TQT_SIGNAL( channelDoubleClicked( const TQString & ) ), + this, TQT_SLOT( slotChannelDoubleClicked( const TQString & ) ) ); - new QHBoxLayout( m_list, 0, spacingHint() ); + new TQHBoxLayout( m_list, 0, spacingHint() ); - setInitialSize( QSize( 500, 400 ) ); + setInitialSize( TQSize( 500, 400 ) ); setMainWidget( m_list ); show(); } @@ -53,7 +53,7 @@ void ChannelListDialog::search() m_list->search(); } -void ChannelListDialog::slotChannelDoubleClicked( const QString & ) +void ChannelListDialog::slotChannelDoubleClicked( const TQString & ) { close(); } diff --git a/kopete/protocols/irc/ui/channellistdialog.h b/kopete/protocols/irc/ui/channellistdialog.h index 2bb85f5b..9dcb0cbb 100644 --- a/kopete/protocols/irc/ui/channellistdialog.h +++ b/kopete/protocols/irc/ui/channellistdialog.h @@ -28,14 +28,14 @@ class ChannelListDialog Q_OBJECT public: - ChannelListDialog(KIRC::Engine *engine, const QString &caption, QObject *target, const char* slotJoinChan); + ChannelListDialog(KIRC::Engine *engine, const TQString &caption, TQObject *target, const char* slotJoinChan); void clear(); void search(); private slots: - void slotChannelDoubleClicked( const QString & ); + void slotChannelDoubleClicked( const TQString & ); private: KIRC::Engine *m_engine; diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.cpp b/kopete/protocols/irc/ui/irceditaccountwidget.cpp index 4a1e6ed3..06e2f166 100644 --- a/kopete/protocols/irc/ui/irceditaccountwidget.cpp +++ b/kopete/protocols/irc/ui/irceditaccountwidget.cpp @@ -36,17 +36,17 @@ #include <kglobal.h> #include <kcharsets.h> -#include <qlabel.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qconnection.h> -#include <qvalidator.h> -#include <qcombobox.h> -#include <qlistbox.h> -#include <qlineedit.h> - -IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, QWidget *parent, const char * ) +#include <tqlabel.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqconnection.h> +#include <tqvalidator.h> +#include <tqcombobox.h> +#include <tqlistbox.h> +#include <tqlineedit.h> + +IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, TQWidget *parent, const char * ) : IRCEditAccountBase(parent), KopeteEditAccountWidget(ident) { mProtocol = proto; @@ -56,8 +56,8 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident if( account() ) { - QString nickName = account()->mySelf()->nickName(); - QString serverInfo = account()->accountId(); + TQString nickName = account()->mySelf()->nickName(); + TQString serverInfo = account()->accountId(); mNickName->setText( nickName ); mAltNickname->setText( account()->altNick() ); @@ -82,23 +82,23 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident informationReplies->setCurrentItem( config->readNumEntry( "InformationReplies", IRCAccount::ActiveWindow ) - 1 ); errorMessages->setCurrentItem( config->readNumEntry( "ErrorMessages", IRCAccount::ActiveWindow ) - 1 ); - QStringList cmds = account()->connectCommands(); - for( QStringList::Iterator i = cmds.begin(); i != cmds.end(); ++i ) - new QListViewItem( commandList, *i ); + TQStringList cmds = account()->connectCommands(); + for( TQStringList::Iterator i = cmds.begin(); i != cmds.end(); ++i ) + new TQListViewItem( commandList, *i ); - const QMap< QString, QString > replies = account()->customCtcpReplies(); - for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it ) - new QListViewItem( ctcpList, it.key(), it.data() ); + const TQMap< TQString, TQString > replies = account()->customCtcpReplies(); + for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it ) + new TQListViewItem( ctcpList, it.key(), it.data() ); } - mUserName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^\\s]*$"), mUserName ) ); - mNickName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) ); - mAltNickname->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) ); + mUserName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^\\s]*$"), mUserName ) ); + mNickName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) ); + mAltNickname->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) ); charset->insertStringList( KCodecAction::supportedEncodings() ); for (int i = 0; i < charset->count(); ++i) { - QString encoding = KGlobal::charsets()->encodingForName(charset->text(i)); + TQString encoding = KGlobal::charsets()->encodingForName(charset->text(i)); if (KGlobal::charsets()->codecForName(encoding)->mibEnum() == currentCodec) { charset->setCurrentItem( i ); @@ -106,23 +106,23 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident } } - connect( commandList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), - this, SLOT( slotCommandContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); + connect( commandList, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), + this, TQT_SLOT( slotCommandContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); - connect( ctcpList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), - this, SLOT( slotCtcpContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); + connect( ctcpList, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), + this, TQT_SLOT( slotCtcpContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); - connect( addButton, SIGNAL( clicked() ), this, SLOT( slotAddCommand() ) ); - connect( editButton, SIGNAL( clicked() ), this, SLOT(slotEditNetworks() ) ); - connect( addReply, SIGNAL( clicked() ), this, SLOT( slotAddCtcp() ) ); + connect( addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddCommand() ) ); + connect( editButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT(slotEditNetworks() ) ); + connect( addReply, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddCtcp() ) ); - connect( network, SIGNAL( activated( const QString & ) ), - this, SLOT( slotUpdateNetworkDescription( const QString &) ) ); + connect( network, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SLOT( slotUpdateNetworkDescription( const TQString &) ) ); - connect( IRCProtocol::protocol(), SIGNAL( networkConfigUpdated( const QString & ) ), - this, SLOT( slotUpdateNetworks( const QString & ) ) ); + connect( IRCProtocol::protocol(), TQT_SIGNAL( networkConfigUpdated( const TQString & ) ), + this, TQT_SLOT( slotUpdateNetworks( const TQString & ) ) ); - slotUpdateNetworks( QString::null ); + slotUpdateNetworks( TQString::null ); } IRCEditAccountWidget::~IRCEditAccountWidget() @@ -134,19 +134,19 @@ IRCAccount *IRCEditAccountWidget::account () return dynamic_cast<IRCAccount *>(KopeteEditAccountWidget::account () ); } -void IRCEditAccountWidget::slotUpdateNetworks( const QString & selectedNetwork ) +void IRCEditAccountWidget::slotUpdateNetworks( const TQString & selectedNetwork ) { network->clear(); uint i = 0; - QStringList keys; - for( QDictIterator<IRCNetwork> it( IRCProtocol::protocol()->networks() ); it.current(); ++it ) + TQStringList keys; + for( TQDictIterator<IRCNetwork> it( IRCProtocol::protocol()->networks() ); it.current(); ++it ) keys.append( it.currentKey() ); keys.sort(); - QStringList::Iterator end = keys.end(); - for( QStringList::Iterator it = keys.begin(); it != end; ++it ) + TQStringList::Iterator end = keys.end(); + for( TQStringList::Iterator it = keys.begin(); it != end; ++it ) { IRCNetwork * current = IRCProtocol::protocol()->networks()[*it]; network->insertItem( current->name ); @@ -164,24 +164,24 @@ void IRCEditAccountWidget::slotEditNetworks() IRCProtocol::protocol()->editNetworks( network->currentText() ); } -void IRCEditAccountWidget::slotUpdateNetworkDescription( const QString &network ) +void IRCEditAccountWidget::slotUpdateNetworkDescription( const TQString &network ) { description->setText( IRCProtocol::protocol()->networks()[ network ]->description ); } -void IRCEditAccountWidget::slotCommandContextMenu( KListView *, QListViewItem *item, const QPoint &p ) +void IRCEditAccountWidget::slotCommandContextMenu( KListView *, TQListViewItem *item, const TQPoint &p ) { - QPopupMenu popup; + TQPopupMenu popup; popup.insertItem( i18n("Remove Command"), 1 ); if( popup.exec( p ) == 1 ) delete item; } -void IRCEditAccountWidget::slotCtcpContextMenu( KListView *, QListViewItem *item, const QPoint &p ) +void IRCEditAccountWidget::slotCtcpContextMenu( KListView *, TQListViewItem *item, const TQPoint &p ) { - QPopupMenu popup; + TQPopupMenu popup; popup.insertItem( i18n("Remove CTCP Reply"), 1 ); if( popup.exec( p ) == 1 ) delete item; @@ -191,7 +191,7 @@ void IRCEditAccountWidget::slotAddCommand() { if ( !commandEdit->text().isEmpty() ) { - new QListViewItem( commandList, commandEdit->text() ); + new TQListViewItem( commandList, commandEdit->text() ); commandEdit->clear(); } } @@ -200,21 +200,21 @@ void IRCEditAccountWidget::slotAddCtcp() { if ( !newCTCP->text().isEmpty() && !newReply->text().isEmpty() ) { - new QListViewItem( ctcpList, newCTCP->text(), newReply->text() ); + new TQListViewItem( ctcpList, newCTCP->text(), newReply->text() ); newCTCP->clear(); newReply->clear(); } } -QString IRCEditAccountWidget::generateAccountId( const QString &network ) +TQString IRCEditAccountWidget::generateAccountId( const TQString &network ) { KConfig *config = KGlobal::config(); - QString nextId = network; + TQString nextId = network; uint accountNumber = 1; - while( config->hasGroup( QString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) ) + while( config->hasGroup( TQString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) ) { - nextId = QString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber ); + nextId = TQString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber ); } kdDebug( 14120 ) << k_funcinfo << " ID IS: " << nextId << endl; return nextId; @@ -222,12 +222,12 @@ QString IRCEditAccountWidget::generateAccountId( const QString &network ) Kopete::Account *IRCEditAccountWidget::apply() { - QString nickName = mNickName->text(); - QString networkName = network->currentText(); + TQString nickName = mNickName->text(); + TQString networkName = network->currentText(); if( !account() ) { - setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), QString::null, networkName, nickName ) ); + setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), TQString::null, networkName, nickName ) ); } else @@ -251,12 +251,12 @@ Kopete::Account *IRCEditAccountWidget::apply() account()->configGroup()->writeEntry("PreferSSL", preferSSL->isChecked()); - QStringList cmds; - for( QListViewItem *i = commandList->firstChild(); i; i = i->nextSibling() ) + TQStringList cmds; + for( TQListViewItem *i = commandList->firstChild(); i; i = i->nextSibling() ) cmds.append( i->text(0) ); - QMap< QString, QString > replies; - for( QListViewItem *i = ctcpList->firstChild(); i; i = i->nextSibling() ) + TQMap< TQString, TQString > replies; + for( TQListViewItem *i = ctcpList->firstChild(); i; i = i->nextSibling() ) replies[ i->text(0) ] = i->text(1); account()->setCustomCtcpReplies( replies ); diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.h b/kopete/protocols/irc/ui/irceditaccountwidget.h index 365acaf3..348e5cc3 100644 --- a/kopete/protocols/irc/ui/irceditaccountwidget.h +++ b/kopete/protocols/irc/ui/irceditaccountwidget.h @@ -31,7 +31,7 @@ class IRCEditAccountWidget : public IRCEditAccountBase, public KopeteEditAccount Q_OBJECT public: - IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *, QWidget *parent=0, const char *name=0); + IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *, TQWidget *parent=0, const char *name=0); ~IRCEditAccountWidget(); IRCAccount *account(); @@ -39,17 +39,17 @@ class IRCEditAccountWidget : public IRCEditAccountBase, public KopeteEditAccount virtual Kopete::Account *apply(); private slots: - void slotCommandContextMenu( KListView*, QListViewItem*, const QPoint & ); - void slotCtcpContextMenu( KListView*, QListViewItem*, const QPoint & ); + void slotCommandContextMenu( KListView*, TQListViewItem*, const TQPoint & ); + void slotCtcpContextMenu( KListView*, TQListViewItem*, const TQPoint & ); void slotAddCommand(); void slotAddCtcp(); void slotEditNetworks(); - void slotUpdateNetworks( const QString & ); - void slotUpdateNetworkDescription( const QString & ); + void slotUpdateNetworks( const TQString & ); + void slotUpdateNetworkDescription( const TQString & ); private: void readNetworks(); - QString generateAccountId( const QString &network ); + TQString generateAccountId( const TQString &network ); IRCProtocol *mProtocol; }; diff --git a/kopete/protocols/irc/ui/networkconfig.ui.h b/kopete/protocols/irc/ui/networkconfig.ui.h index 7716e75f..30f9654e 100644 --- a/kopete/protocols/irc/ui/networkconfig.ui.h +++ b/kopete/protocols/irc/ui/networkconfig.ui.h @@ -15,12 +15,12 @@ void NetworkConfig::accept() { emit accepted(); - QDialog::accept(); + TQDialog::accept(); } void NetworkConfig::reject() { emit rejected(); - QDialog::reject(); + TQDialog::reject(); } diff --git a/kopete/protocols/jabber/jabberaccount.cpp b/kopete/protocols/jabber/jabberaccount.cpp index 785e9c53..bb1c0f2e 100644 --- a/kopete/protocols/jabber/jabberaccount.cpp +++ b/kopete/protocols/jabber/jabberaccount.cpp @@ -33,9 +33,9 @@ #include <time.h> -#include <qstring.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqstring.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kconfig.h> #include <kdebug.h> @@ -87,7 +87,7 @@ -JabberAccount::JabberAccount (JabberProtocol * parent, const QString & accountId, const char *name) +JabberAccount::JabberAccount (JabberProtocol * parent, const TQString & accountId, const char *name) :Kopete::PasswordedAccount ( parent, accountId, 0, name ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Instantiating new account " << accountId << endl; @@ -109,7 +109,7 @@ JabberAccount::JabberAccount (JabberProtocol * parent, const QString & accountId JabberContact *myContact = contactPool()->addContact ( XMPP::RosterItem ( accountId ), Kopete::ContactList::self()->myself(), false ); setMyself( myContact ); - QObject::connect(Kopete::ContactList::self(), SIGNAL( globalIdentityChanged(const QString&, const QVariant& ) ), SLOT( slotGlobalIdentityChanged(const QString&, const QVariant& ) ) ); + TQObject::connect(Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged(const TQString&, const TQVariant& ) ), TQT_SLOT( slotGlobalIdentityChanged(const TQString&, const TQVariant& ) ) ); m_initialPresence = XMPP::Status ( "", "", 5, true ); @@ -124,8 +124,8 @@ JabberAccount::~JabberAccount () cleanup (); - QMap<QString,JabberTransport*> tranposrts_copy=m_transports; - QMap<QString,JabberTransport*>::Iterator it; + TQMap<TQString,JabberTransport*> tranposrts_copy=m_transports; + TQMap<TQString,JabberTransport*>::Iterator it; for ( it = tranposrts_copy.begin(); it != tranposrts_copy.end(); ++it ) delete it.data(); } @@ -178,7 +178,7 @@ KActionMenu *JabberAccount::actionMenu () KAction *action; - action = new KAction (i18n ("Join Groupchat..."), "jabber_group", 0, this, SLOT (slotJoinNewChat ()), this, "actionJoinChat"); + action = new KAction (i18n ("Join Groupchat..."), "jabber_group", 0, this, TQT_SLOT (slotJoinNewChat ()), this, "actionJoinChat"); m_actionMenu->insert(action); action->setEnabled( isConnected() ); @@ -190,17 +190,17 @@ KActionMenu *JabberAccount::actionMenu () m_actionMenu->popupMenu()->insertSeparator(); action = new KAction ( i18n ("Services..."), "jabber_serv_on", 0, - this, SLOT ( slotGetServices () ), this, "actionJabberServices"); + this, TQT_SLOT ( slotGetServices () ), this, "actionJabberServices"); action->setEnabled( isConnected() ); m_actionMenu->insert ( action ); action = new KAction ( i18n ("Send Raw Packet to Server..."), "mail_new", 0, - this, SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ; + this, TQT_SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ; action->setEnabled( isConnected() ); m_actionMenu->insert ( action ); action = new KAction ( i18n ("Edit User Info..."), "identity", 0, - this, SLOT ( slotEditVCard () ), this, "actionEditVCard") ; + this, TQT_SLOT ( slotEditVCard () ), this, "actionEditVCard") ; action->setEnabled( isConnected() ); m_actionMenu->insert ( action ); @@ -229,11 +229,11 @@ JabberContactPool *JabberAccount::contactPool () } -bool JabberAccount::createContact (const QString & contactId, Kopete::MetaContact * metaContact) +bool JabberAccount::createContact (const TQString & contactId, Kopete::MetaContact * metaContact) { // collect all group names - QStringList groupNames; + TQStringList groupNames; Kopete::GroupList groupList = metaContact->groups(); for(Kopete::Group *group = groupList.first(); group; group = groupList.next()) groupNames += group->displayName(); @@ -271,11 +271,11 @@ bool JabberAccount::isConnecting () XMPP::Jid jid ( myself()->contactId () ); // see if we are currently trying to connect - return resourcePool()->bestResource ( jid ).status().show () == QString("connecting"); + return resourcePool()->bestResource ( jid ).status().show () == TQString("connecting"); } -void JabberAccount::connectWithPassword ( const QString &password ) +void JabberAccount::connectWithPassword ( const TQString &password ) { kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "called" << endl; @@ -295,40 +295,40 @@ void JabberAccount::connectWithPassword ( const QString &password ) { m_jabberClient = new JabberClient; - QObject::connect ( m_jabberClient, SIGNAL ( csDisconnected () ), this, SLOT ( slotCSDisconnected () ) ); - QObject::connect ( m_jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - QObject::connect ( m_jabberClient, SIGNAL ( error ( JabberClient::ErrorCode ) ), this, SLOT ( slotClientError ( JabberClient::ErrorCode ) ) ); - - QObject::connect ( m_jabberClient, SIGNAL ( subscription ( const XMPP::Jid &, const QString & ) ), - this, SLOT ( slotSubscription ( const XMPP::Jid &, const QString & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( rosterRequestFinished ( bool ) ), - this, SLOT ( slotRosterRequestFinished ( bool ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( newContact ( const XMPP::RosterItem & ) ), - this, SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( contactUpdated ( const XMPP::RosterItem & ) ), - this, SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( contactDeleted ( const XMPP::RosterItem & ) ), - this, SLOT ( slotContactDeleted ( const XMPP::RosterItem & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( resourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ), - this, SLOT ( slotResourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( resourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ), - this, SLOT ( slotResourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( messageReceived ( const XMPP::Message & ) ), - this, SLOT ( slotReceivedMessage ( const XMPP::Message & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( incomingFileTransfer () ), - this, SLOT ( slotIncomingFileTransfer () ) ); - QObject::connect ( m_jabberClient, SIGNAL ( groupChatJoined ( const XMPP::Jid & ) ), - this, SLOT ( slotGroupChatJoined ( const XMPP::Jid & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( groupChatLeft ( const XMPP::Jid & ) ), - this, SLOT ( slotGroupChatLeft ( const XMPP::Jid & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( groupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ), - this, SLOT ( slotGroupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( groupChatError ( const XMPP::Jid &, int, const QString & ) ), - this, SLOT ( slotGroupChatError ( const XMPP::Jid &, int, const QString & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( debugMessage ( const QString & ) ), - this, SLOT ( slotClientDebugMessage ( const QString & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csDisconnected () ), this, TQT_SLOT ( slotCSDisconnected () ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( error ( JabberClient::ErrorCode ) ), this, TQT_SLOT ( slotClientError ( JabberClient::ErrorCode ) ) ); + + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( subscription ( const XMPP::Jid &, const TQString & ) ), + this, TQT_SLOT ( slotSubscription ( const XMPP::Jid &, const TQString & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( rosterRequestFinished ( bool ) ), + this, TQT_SLOT ( slotRosterRequestFinished ( bool ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( newContact ( const XMPP::RosterItem & ) ), + this, TQT_SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( contactUpdated ( const XMPP::RosterItem & ) ), + this, TQT_SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( contactDeleted ( const XMPP::RosterItem & ) ), + this, TQT_SLOT ( slotContactDeleted ( const XMPP::RosterItem & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( resourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ), + this, TQT_SLOT ( slotResourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( resourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ), + this, TQT_SLOT ( slotResourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( messageReceived ( const XMPP::Message & ) ), + this, TQT_SLOT ( slotReceivedMessage ( const XMPP::Message & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( incomingFileTransfer () ), + this, TQT_SLOT ( slotIncomingFileTransfer () ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatJoined ( const XMPP::Jid & ) ), + this, TQT_SLOT ( slotGroupChatJoined ( const XMPP::Jid & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatLeft ( const XMPP::Jid & ) ), + this, TQT_SLOT ( slotGroupChatLeft ( const XMPP::Jid & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ), + this, TQT_SLOT ( slotGroupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatError ( const XMPP::Jid &, int, const TQString & ) ), + this, TQT_SLOT ( slotGroupChatError ( const XMPP::Jid &, int, const TQString & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( debugMessage ( const TQString & ) ), + this, TQT_SLOT ( slotClientDebugMessage ( const TQString & ) ) ); } else { @@ -363,7 +363,7 @@ void JabberAccount::connectWithPassword ( const QString &password ) m_jabberClient->setClientName ("Kopete"); m_jabberClient->setClientVersion (kapp->aboutData ()->version ()); - m_jabberClient->setOSName (QString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2)); + m_jabberClient->setOSName (TQString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2)); } // Set caps node information @@ -387,14 +387,14 @@ void JabberAccount::connectWithPassword ( const QString &password ) char str[256]; char fmt[32]; int timezoneOffset; - QString timezoneString; + TQString timezoneString; strcpy ( fmt, "%z" ); strftime ( str, 256, fmt, localtime ( &x ) ); if ( strcmp ( fmt, str ) ) { - QString s = str; + TQString s = str; if ( s.at ( 0 ) == '+' ) s.remove ( 0, 1 ); s.truncate ( s.length () - 2 ); @@ -416,7 +416,7 @@ void JabberAccount::connectWithPassword ( const QString &password ) setPresence( XMPP::Status ("connecting", "", 0, true) ); - switch ( m_jabberClient->connect ( XMPP::Jid ( accountId () + QString("/") + resource () ), password ) ) + switch ( m_jabberClient->connect ( XMPP::Jid ( accountId () + TQString("/") + resource () ), password ) ) { case JabberClient::NoTLS: // no SSL support, at the connecting stage this means the problem is client-side @@ -435,7 +435,7 @@ void JabberAccount::connectWithPassword ( const QString &password ) } -void JabberAccount::slotClientDebugMessage ( const QString &msg ) +void JabberAccount::slotClientDebugMessage ( const TQString &msg ) { kdDebug (JABBER_DEBUG_PROTOCOL) << k_funcinfo << msg << endl; @@ -444,10 +444,10 @@ void JabberAccount::slotClientDebugMessage ( const QString &msg ) bool JabberAccount::handleTLSWarning ( JabberClient *jabberClient, int warning ) { - QString validityString, code; + TQString validityString, code; - QString server = jabberClient->jid().domain (); - QString accountId = jabberClient->jid().bare (); + TQString server = jabberClient->jid().domain (); + TQString accountId = jabberClient->jid().bare (); switch ( warning ) { @@ -509,7 +509,7 @@ bool JabberAccount::handleTLSWarning ( JabberClient *jabberClient, int warning ) arg(server, accountId, validityString), i18n("Jabber Connection Certificate Problem"), KStdGuiItem::cont(), - QString("KopeteTLSWarning") + server + code) == KMessageBox::Continue ); + TQString("KopeteTLSWarning") + server + code) == KMessageBox::Continue ); } @@ -556,7 +556,7 @@ void JabberAccount::slotConnected () { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Creating Jingle Voice caller..." << endl; m_voiceCaller = new JingleVoiceCaller( this ); - QObject::connect(m_voiceCaller,SIGNAL(incoming(const Jid&)),this,SLOT(slotIncomingVoiceCall( const Jid& ))); + TQObject::connect(m_voiceCaller,TQT_SIGNAL(incoming(const Jid&)),this,TQT_SLOT(slotIncomingVoiceCall( const Jid& ))); m_voiceCaller->initialize(); } @@ -567,12 +567,12 @@ void JabberAccount::slotConnected () { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Creating Jingle Session Manager..." << endl; m_jingleSessionManager = new JingleSessionManager( this ); - QObject::connect(m_jingleSessionManager, SIGNAL(incomingSession(const QString &, JingleSession *)), this, SLOT(slotIncomingJingleSession(const QString &, JingleSession *))); + TQObject::connect(m_jingleSessionManager, TQT_SIGNAL(incomingSession(const TQString &, JingleSession *)), this, TQT_SLOT(slotIncomingJingleSession(const TQString &, JingleSession *))); } #endif // Set caps extensions - m_jabberClient->client()->addExtension("voice-v1", Features(QString("http://www.google.com/xmpp/protocol/voice/v1"))); + m_jabberClient->client()->addExtension("voice-v1", Features(TQString("http://www.google.com/xmpp/protocol/voice/v1"))); #endif kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Requesting roster..." << endl; @@ -607,7 +607,7 @@ void JabberAccount::slotIncomingFileTransfer () } -void JabberAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason) +void JabberAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason) { XMPP::Status xmppStatus = m_protocol->kosToStatus( status, reason); @@ -725,10 +725,10 @@ void JabberAccount::slotCSDisconnected () } -void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass) +void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const TQString &server, Kopete::Account::DisconnectReason &errorClass) { - QString errorText; - QString errorCondition; + TQString errorText; + TQString errorCondition; errorClass = Kopete::Account::InvalidHost; @@ -1046,7 +1046,7 @@ void JabberAccount::setPresence ( const XMPP::Status &status ) /* * Unless we are in the connecting status, send a presence packet to the server */ - if(status.show () != QString("connecting") ) + if(status.show () != TQString("connecting") ) { /* * Make sure we are actually connected before sending out a packet. @@ -1081,7 +1081,7 @@ void JabberAccount::slotSendRaw () } -void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & type) +void JabberAccount::slotSubscription (const XMPP::Jid & jid, const TQString & type) { kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << jid.full () << ", " << type << endl; @@ -1103,9 +1103,9 @@ void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & typ hideFlags |= Kopete::UI::ContactAddedNotifyDialog::AddCheckBox | Kopete::UI::ContactAddedNotifyDialog::AddGroupBox ; Kopete::UI::ContactAddedNotifyDialog *dialog= - new Kopete::UI::ContactAddedNotifyDialog( jid.full() ,QString::null,this, hideFlags ); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)), - this,SLOT(slotContactAddedNotifyDialogClosed(const QString& ))); + new Kopete::UI::ContactAddedNotifyDialog( jid.full() ,TQString::null,this, hideFlags ); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)), + this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& ))); dialog->show(); } else if (type == "unsubscribed") @@ -1150,7 +1150,7 @@ void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & typ } } -void JabberAccount::slotContactAddedNotifyDialogClosed( const QString & contactid ) +void JabberAccount::slotContactAddedNotifyDialogClosed( const TQString & contactid ) { // the dialog that asked the authorisation is closed. (it was shown in slotSubscrition) XMPP::JT_Presence *task; @@ -1187,7 +1187,7 @@ void JabberAccount::slotContactAddedNotifyDialogClosed( const QString & contacti Kopete::MetaContact *parentContact=dialog->addContact(); if(parentContact) { - QStringList groupNames; + TQStringList groupNames; Kopete::GroupList groupList = parentContact->groups(); for(Kopete::Group *group = groupList.first(); group; group = groupList.next()) groupNames += group->displayName(); @@ -1270,10 +1270,10 @@ void JabberAccount::slotContactUpdated (const XMPP::RosterItem & item) * so add a new metacontact to the list. */ metaContact = new Kopete::MetaContact (); - QStringList groups = item.groups (); + TQStringList groups = item.groups (); // add this metacontact to all groups the contact is a member of - for (QStringList::Iterator it = groups.begin (); it != groups.end (); ++it) + for (TQStringList::Iterator it = groups.begin (); it != groups.end (); ++it) metaContact->addToGroup (Kopete::ContactList::self ()->findGroup (*it)); // put it onto contact list @@ -1503,7 +1503,7 @@ void JabberAccount::slotGroupChatPresence (const XMPP::Jid & jid, const XMPP::St } -void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const QString &reason) +void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const TQString &reason) { kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Group chat error - room " << jid.full () << " had error " << error << " (" << reason << ")" << endl; @@ -1511,7 +1511,7 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q { case JabberClient::InvalidPasswordForMUC: { - QCString password; + TQCString password; int result = KPasswordDialog::getPassword(password, i18n("A password is required to join the room %1.").arg(jid.node())); if (result == KPasswordDialog::Accepted) m_jabberClient->joinGroupChat(jid.domain(), jid.node(), jid.resource(), password); @@ -1521,9 +1521,9 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q case JabberClient::NicknameConflict: { bool ok; - QString nickname = KInputDialog::getText(i18n("Error trying to join %1 : nickname %2 is already in use").arg(jid.node(), jid.resource()), + TQString nickname = KInputDialog::getText(i18n("Error trying to join %1 : nickname %2 is already in use").arg(jid.node(), jid.resource()), i18n("Give your nickname"), - QString(), + TQString(), &ok); if (ok) { @@ -1548,11 +1548,11 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q default: { - QString detailedReason = reason.isEmpty () ? i18n ( "No reason given by the server" ) : reason; + TQString detailedReason = reason.isEmpty () ? i18n ( "No reason given by the server" ) : reason; KMessageBox::queuedMessageBox ( Kopete::UI::Global::mainWidget (), KMessageBox::Error, - i18n ("There was an error processing your request for group chat %1. (Reason: %2, Code %3)").arg ( jid.full (), detailedReason, QString::number ( error ) ), + i18n ("There was an error processing your request for group chat %1. (Reason: %2, Code %3)").arg ( jid.full (), detailedReason, TQString::number ( error ) ), i18n ("Jabber Group Chat") ); } } @@ -1581,7 +1581,7 @@ void JabberAccount::slotEditVCard () static_cast<JabberContact *>( myself() )->slotUserInfo (); } -void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVariant &value) +void JabberAccount::slotGlobalIdentityChanged (const TQString &key, const TQVariant &value) { // Check if this account is excluded from Global Identity. if( !configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ) @@ -1589,8 +1589,8 @@ void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVarian JabberContact *jabberMyself = static_cast<JabberContact *>( myself() ); if( key == Kopete::Global::Properties::self()->nickName().key() ) { - QString oldNick = jabberMyself->property( protocol()->propNickName ).value().toString(); - QString newNick = value.toString(); + TQString oldNick = jabberMyself->property( protocol()->propNickName ).value().toString(); + TQString newNick = value.toString(); if( newNick != oldNick && isConnected() ) { @@ -1609,14 +1609,14 @@ void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVarian } } -const QString JabberAccount::resource () const +const TQString JabberAccount::resource () const { return configGroup()->readEntry ( "Resource", "Kopete" ); } -const QString JabberAccount::server () const +const TQString JabberAccount::server () const { return configGroup()->readEntry ( "Server" ); @@ -1653,13 +1653,13 @@ void JabberAccount::slotIncomingVoiceCall( const Jid &jid ) #endif } -// void JabberAccount::slotIncomingJingleSession( const QString &sessionType, JingleSession *session ) +// void JabberAccount::slotIncomingJingleSession( const TQString &sessionType, JingleSession *session ) // { // #ifdef SUPPORT_JINGLE // if(sessionType == "http://www.google.com/session/phone") // { -// QString from = ((XMPP::Jid)session->peers().first()).full(); -// //KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, QString("Received a voice session invitation from %1.").arg(from) ); +// TQString from = ((XMPP::Jid)session->peers().first()).full(); +// //KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, TQString("Received a voice session invitation from %1.").arg(from) ); // JingleVoiceSessionDialog *voiceDialog = new JingleVoiceSessionDialog( static_cast<JingleVoiceSession*>(session) ); // voiceDialog->show(); // } @@ -1670,12 +1670,12 @@ void JabberAccount::slotIncomingVoiceCall( const Jid &jid ) // } -void JabberAccount::addTransport( JabberTransport * tr, const QString &jid ) +void JabberAccount::addTransport( JabberTransport * tr, const TQString &jid ) { m_transports.insert(jid,tr); } -void JabberAccount::removeTransport( const QString &jid ) +void JabberAccount::removeTransport( const TQString &jid ) { m_transports.remove(jid); } @@ -1691,7 +1691,7 @@ bool JabberAccount::removeAccount( ) i18n("Unregister"), KGuiItem(i18n( "Remove and Unregister" ), "editdelete"), KGuiItem(i18n( "Remove from kopete only"), "edittrash"), - QString(), KMessageBox::Notify | KMessageBox::Dangerous ); + TQString(), KMessageBox::Notify | KMessageBox::Dangerous ); if(result == KMessageBox::Cancel) { return false; @@ -1705,21 +1705,21 @@ bool JabberAccount::removeAccount( ) } XMPP::JT_Register *task = new XMPP::JT_Register ( client()->rootTask () ); - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotUnregisterFinished ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotUnregisterFinished ) ); task->unreg (); task->go ( true ); m_removing=true; // from my experiment, not all server reply us with a response. it simply dosconnect // so after one seconde, we will force to remove the account - QTimer::singleShot(1111, this, SLOT(slotUnregisterFinished())); + TQTimer::singleShot(1111, this, TQT_SLOT(slotUnregisterFinished())); return false; //the account will be removed when the task will be finished } } //remove transports from config file. - QMap<QString,JabberTransport*> tranposrts_copy=m_transports; - QMap<QString,JabberTransport*>::Iterator it; + TQMap<TQString,JabberTransport*> tranposrts_copy=m_transports; + TQMap<TQString,JabberTransport*>::Iterator it; for ( it = tranposrts_copy.begin(); it != tranposrts_copy.end(); ++it ) { (*it)->jabberAccountRemoved(); diff --git a/kopete/protocols/jabber/jabberaccount.h b/kopete/protocols/jabber/jabberaccount.h index 3731b590..a2781006 100644 --- a/kopete/protocols/jabber/jabberaccount.h +++ b/kopete/protocols/jabber/jabberaccount.h @@ -59,15 +59,15 @@ class JabberAccount : public Kopete::PasswordedAccount Q_OBJECT public: - JabberAccount (JabberProtocol * parent, const QString & accountID, const char *name = 0L); + JabberAccount (JabberProtocol * parent, const TQString & accountID, const char *name = 0L); ~JabberAccount (); /* Returns the action menu for this account. */ virtual KActionMenu *actionMenu (); /* Return the resource of the client */ - const QString resource () const; - const QString server () const; + const TQString resource () const; + const TQString server () const; const int port () const; JabberResourcePool *resourcePool (); @@ -124,9 +124,9 @@ public: /* * Handle stream errors. Displays a dialog and returns. */ - static void handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass); + static void handleStreamError (int streamError, int streamCondition, int connectorCode, const TQString &server, Kopete::Account::DisconnectReason &errorClass); - const QMap<QString, JabberTransport *> &transports() + const TQMap<TQString, JabberTransport *> &transports() { return m_transports; } @@ -137,7 +137,7 @@ public: public slots: /* Connects to the server. */ - void connectWithPassword ( const QString &password ); + void connectWithPassword ( const TQString &password ); /* Disconnects from the server. */ void disconnect (); @@ -148,10 +148,10 @@ public slots: /* Disconnect with a reason, and status */ void disconnect( Kopete::Account::DisconnectReason reason, XMPP::Status &status ); /* Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); - void addTransport( JabberTransport *tr , const QString &jid); - void removeTransport( const QString &jid ); + void addTransport( JabberTransport *tr , const TQString &jid); + void removeTransport( const TQString &jid ); protected: @@ -172,7 +172,7 @@ protected: * @param contactId The unique ID for this protocol * @param parentContact The metacontact to add this contact to */ - virtual bool createContact (const QString & contactID, Kopete::MetaContact * parentContact); + virtual bool createContact (const TQString & contactID, Kopete::MetaContact * parentContact); @@ -211,7 +211,7 @@ private: */ bool isConnecting (); - QMap<QString, JabberTransport *>m_transports; + TQMap<TQString, JabberTransport *>m_transports; /* used in removeAccount() */ bool m_removing; @@ -247,7 +247,7 @@ private slots: void slotIncomingFileTransfer (); /* Called from Psi: debug messages from the backend. */ - void slotClientDebugMessage (const QString &msg); + void slotClientDebugMessage (const TQString &msg); /* Sends a raw message to the server (use with caution) */ void slotSendRaw (); @@ -257,13 +257,13 @@ private slots: void slotGroupChatJoined ( const XMPP::Jid &jid ); void slotGroupChatLeft ( const XMPP::Jid &jid ); void slotGroupChatPresence ( const XMPP::Jid &jid, const XMPP::Status &status ); - void slotGroupChatError ( const XMPP::Jid &jid, int error, const QString &reason ); + void slotGroupChatError ( const XMPP::Jid &jid, int error, const TQString &reason ); /* Incoming subscription request. */ - void slotSubscription ( const XMPP::Jid &jid, const QString &type ); + void slotSubscription ( const XMPP::Jid &jid, const TQString &type ); /* the dialog that asked to add the contact was closed (that dialog is shown in slotSubscription) */ - void slotContactAddedNotifyDialogClosed(const QString& contactid); + void slotContactAddedNotifyDialogClosed(const TQString& contactid); /** * A new item appeared in our roster, synch it with the @@ -295,7 +295,7 @@ private slots: void slotGetServices (); /* Update the myself information if the global identity changes. */ - void slotGlobalIdentityChanged( const QString &key, const QVariant &value ); + void slotGlobalIdentityChanged( const TQString &key, const TQVariant &value ); /* we received a voice invitation */ void slotIncomingVoiceCall(const Jid&); @@ -303,7 +303,7 @@ private slots: /* the unregister task finished */ void slotUnregisterFinished(); - //void slotIncomingJingleSession(const QString &sessionType, JingleSession *session); + //void slotIncomingJingleSession(const TQString &sessionType, JingleSession *session); }; #endif diff --git a/kopete/protocols/jabber/jabberbasecontact.cpp b/kopete/protocols/jabber/jabberbasecontact.cpp index 56cc1de4..cffc65f9 100644 --- a/kopete/protocols/jabber/jabberbasecontact.cpp +++ b/kopete/protocols/jabber/jabberbasecontact.cpp @@ -20,9 +20,9 @@ #include <klocale.h> #include <kiconloader.h> #include <kstandarddirs.h> -#include <qtimer.h> -#include <qimage.h> -#include <qregexp.h> +#include <tqtimer.h> +#include <tqimage.h> +#include <tqregexp.h> #include <kmessagebox.h> #include <kio/netaccess.h> @@ -48,7 +48,7 @@ /** * JabberBaseContact constructor */ -JabberBaseContact::JabberBaseContact (const XMPP::RosterItem &rosterItem, Kopete::Account *account, Kopete::MetaContact * mc, const QString &legacyId) +JabberBaseContact::JabberBaseContact (const XMPP::RosterItem &rosterItem, Kopete::Account *account, Kopete::MetaContact * mc, const TQString &legacyId) : Kopete::Contact (account, legacyId.isEmpty() ? rosterItem.jid().full() : legacyId , mc ) { setDontSync ( false ); @@ -112,8 +112,8 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item ) // only update the alias if its not empty if ( !item.name().isEmpty () && item.name() != item.jid().bare() ) { - QString newName = item.name (); - QString oldName = metaContact()->displayName(); + TQString newName = item.name (); + TQString oldName = metaContact()->displayName(); Kopete::Contact *source=metaContact()->displayNameSourceContact(); // kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "setting display name of " << contactId () << " to " << newName << endl; metaContact()->setDisplayName ( newName ); @@ -217,7 +217,7 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item ) setDontSync ( false ); //can't do it now because it's called from contructor at a point some virtual function are not available - QTimer::singleShot(0, this, SLOT(reevaluateStatus())); + TQTimer::singleShot(0, this, TQT_SLOT(reevaluateStatus())); } @@ -239,50 +239,50 @@ void JabberBaseContact::updateResourceList () return; } - QString resourceListStr = "<table cellspacing=\"0\">"; + TQString resourceListStr = "<table cellspacing=\"0\">"; for ( JabberResourcePool::ResourceList::iterator it = resourceList.begin (); it != resourceList.end (); ++it ) { // icon, resource name and priority - resourceListStr += QString ( "<tr><td><img src=\"kopete-onlinestatus-icon:%1\" /> <b>%2</b> (Priority: %3)</td></tr>" ). + resourceListStr += TQString ( "<tr><td><img src=\"kopete-onlinestatus-icon:%1\" /> <b>%2</b> (Priority: %3)</td></tr>" ). arg ( protocol()->resourceToKOS((*it)->resource()).mimeSourceFor ( account () ), - (*it)->resource().name (), QString::number ( (*it)->resource().priority () ) ); + (*it)->resource().name (), TQString::number ( (*it)->resource().priority () ) ); // client name, version, OS if ( !(*it)->clientName().isEmpty () ) { - resourceListStr += QString ( "<tr><td>%1: %2 (%3)</td></tr>" ). + resourceListStr += TQString ( "<tr><td>%1: %2 (%3)</td></tr>" ). arg ( i18n ( "Client" ), (*it)->clientName (), (*it)->clientSystem () ); } // Supported features #if 0 //disabled because it's just an ugly and long list of incomprehensible namespaces to the user - QStringList supportedFeatures = (*it)->features().list(); - QStringList::ConstIterator featuresIt, featuresItEnd = supportedFeatures.constEnd(); + TQStringList supportedFeatures = (*it)->features().list(); + TQStringList::ConstIterator featuresIt, featuresItEnd = supportedFeatures.constEnd(); if( !supportedFeatures.empty() ) - resourceListStr += QString( "<tr><td>Supported Features:" ); + resourceListStr += TQString( "<tr><td>Supported Features:" ); for( featuresIt = supportedFeatures.constBegin(); featuresIt != featuresItEnd; ++featuresIt ) { XMPP::Features tempFeature(*featuresIt); - resourceListStr += QString("\n<br>"); + resourceListStr += TQString("\n<br>"); if ( tempFeature.id() > XMPP::Features::FID_None ) - resourceListStr += tempFeature.name() + QString(" ("); + resourceListStr += tempFeature.name() + TQString(" ("); resourceListStr += *featuresIt; if ( tempFeature.id() > Features::FID_None ) - resourceListStr += QString(")"); + resourceListStr += TQString(")"); } if( !supportedFeatures.empty() ) - resourceListStr += QString( "</td></tr>" ); + resourceListStr += TQString( "</td></tr>" ); #endif // resource timestamp - resourceListStr += QString ( "<tr><td>%1: %2</td></tr>" ). + resourceListStr += TQString ( "<tr><td>%1: %2</td></tr>" ). arg ( i18n ( "Timestamp" ), KGlobal::locale()->formatDateTime ( (*it)->resource().status().timeStamp(), true, true ) ); // message, if any if ( !(*it)->resource().status().status().stripWhiteSpace().isEmpty () ) { - resourceListStr += QString ( "<tr><td>%1: %2</td></tr>" ). + resourceListStr += TQString ( "<tr><td>%1: %2</td></tr>" ). arg ( i18n ( "Message" ), Kopete::Message::escape( (*it)->resource().status().status () ) @@ -313,7 +313,7 @@ void JabberBaseContact::reevaluateStatus () status.weight() , protocol() , status.internalStatus() | 0x0100, - status.overlayIcons() + QStringList("status_unknown_overlay") , //FIXME: find better icon + status.overlayIcons() + TQStringList("status_unknown_overlay") , //FIXME: find better icon status.description() ); } @@ -338,7 +338,7 @@ void JabberBaseContact::reevaluateStatus () } -QString JabberBaseContact::fullAddress () +TQString JabberBaseContact::fullAddress () { XMPP::Jid jid = rosterItem().jid(); @@ -384,13 +384,13 @@ bool JabberBaseContact::dontSync () } -void JabberBaseContact::serialize (QMap < QString, QString > &serializedData, QMap < QString, QString > & /* addressBookData */ ) +void JabberBaseContact::serialize (TQMap < TQString, TQString > &serializedData, TQMap < TQString, TQString > & /* addressBookData */ ) { // Contact id and display name are already set for us, only add the rest serializedData["JID"] = mRosterItem.jid().full(); - serializedData["groups"] = mRosterItem.groups ().join (QString::fromLatin1 (",")); + serializedData["groups"] = mRosterItem.groups ().join (TQString::fromLatin1 (",")); } void JabberBaseContact::slotUserInfo( ) @@ -414,7 +414,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) // update vCard cache timestamp if this is not a temporary contact if ( metaContact() && !metaContact()->isTemporary () ) { - setProperty ( protocol()->propVCardCacheTimeStamp, QDateTime::currentDateTime().toString ( Qt::ISODate ) ); + setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::currentDateTime().toString ( Qt::ISODate ) ); } @@ -449,8 +449,8 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) if ( !vCard.fullName().isEmpty () && vCard.givenName().isEmpty () && vCard.familyName().isEmpty () ) { - QString lastName = vCard.fullName().section ( ' ', 0, -1 ); - QString firstName = vCard.fullName().left(vCard.fullName().length () - lastName.length ()).stripWhiteSpace (); + TQString lastName = vCard.fullName().section ( ' ', 0, -1 ); + TQString firstName = vCard.fullName().left(vCard.fullName().length () - lastName.length ()).stripWhiteSpace (); setProperty ( protocol()->propFirstName, firstName ); setProperty ( protocol()->propLastName, lastName ); @@ -628,22 +628,22 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) */ removeProperty( protocol()->propPhoto ); - QImage contactPhoto; - QString fullJid = mRosterItem.jid().full(); - QString finalPhotoPath = locateLocal("appdata", "jabberphotos/" + fullJid.replace(QRegExp("[./~]"),"-") +".png"); + TQImage contactPhoto; + TQString fullJid = mRosterItem.jid().full(); + TQString finalPhotoPath = locateLocal("appdata", "jabberphotos/" + fullJid.replace(TQRegExp("[./~]"),"-") +".png"); // photo() is a QByteArray if ( !vCard.photo().isEmpty() ) { kdDebug( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Contact has a photo embedded into his vCard." << endl; - // QImage is used to save to disk in PNG later. - contactPhoto = QImage( vCard.photo() ); + // TQImage is used to save to disk in PNG later. + contactPhoto = TQImage( vCard.photo() ); } // Contact photo is a URI. else if( !vCard.photoURI().isEmpty() ) { - QString tempPhotoPath = 0; + TQString tempPhotoPath = 0; // Downalod photo from URI. if( !KIO::NetAccess::download( vCard.photoURI(), tempPhotoPath, 0) ) @@ -654,7 +654,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) kdDebug( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Contact photo is a URI." << endl; - contactPhoto = QImage( tempPhotoPath ); + contactPhoto = TQImage( tempPhotoPath ); KIO::NetAccess::removeTempFile( tempPhotoPath ); } diff --git a/kopete/protocols/jabber/jabberbasecontact.h b/kopete/protocols/jabber/jabberbasecontact.h index 7ba5c3fb..ef9b7416 100644 --- a/kopete/protocols/jabber/jabberbasecontact.h +++ b/kopete/protocols/jabber/jabberbasecontact.h @@ -44,7 +44,7 @@ public: */ JabberBaseContact (const XMPP::RosterItem &rosterItem, Kopete::Account *account, Kopete::MetaContact * mc, - const QString &legacyId=QString()); + const TQString &legacyId=TQString()); /******************************************************************** * @@ -77,12 +77,12 @@ public: * Create custom context menu items for the contact * FIXME: implement manager version here? */ - virtual QPtrList<KAction> *customContextMenuActions () = 0; + virtual TQPtrList<KAction> *customContextMenuActions () = 0; /** * Serialize contact */ - virtual void serialize (QMap < QString, QString > &serializedData, QMap < QString, QString > &addressBookData); + virtual void serialize (TQMap < TQString, TQString > &serializedData, TQMap < TQString, TQString > &addressBookData); /** * Update contact if a roster item has been @@ -106,7 +106,7 @@ public: * Uses bestResource() if no presubscribed * address exists. */ - QString fullAddress (); + TQString fullAddress (); /** * Set the dontSync flag for this contact. diff --git a/kopete/protocols/jabber/jabberbookmarks.cpp b/kopete/protocols/jabber/jabberbookmarks.cpp index 720705b2..661f0974 100644 --- a/kopete/protocols/jabber/jabberbookmarks.cpp +++ b/kopete/protocols/jabber/jabberbookmarks.cpp @@ -26,9 +26,9 @@ #include "xmpp_tasks.h" -JabberBookmarks::JabberBookmarks(JabberAccount *parent) : QObject(parent) , m_account(parent) +JabberBookmarks::JabberBookmarks(JabberAccount *parent) : TQObject(parent) , m_account(parent) { - connect( m_account , SIGNAL( isConnectedChanged() ) , this , SLOT( accountConnected() ) ); + connect( m_account , TQT_SIGNAL( isConnectedChanged() ) , this , TQT_SLOT( accountConnected() ) ); } void JabberBookmarks::accountConnected() @@ -38,34 +38,34 @@ void JabberBookmarks::accountConnected() XMPP::JT_PrivateStorage * task = new XMPP::JT_PrivateStorage ( m_account->client()->rootTask ()); task->get( "storage" , "storage:bookmarks" ); - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotReceivedBookmarks() ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotReceivedBookmarks() ) ); task->go ( true ); } void JabberBookmarks::slotReceivedBookmarks( ) { XMPP::JT_PrivateStorage * task = (XMPP::JT_PrivateStorage*)(sender()); - m_storage=QDomDocument("storage"); + m_storage=TQDomDocument("storage"); m_conferencesJID.clear(); if(task->success()) { - QDomElement storage_e=task->element(); + TQDomElement storage_e=task->element(); if(!storage_e.isNull() && storage_e.tagName() == "storage") { storage_e=m_storage.importNode(storage_e,true).toElement(); m_storage.appendChild(storage_e); - for(QDomNode n = storage_e.firstChild(); !n.isNull(); n = n.nextSibling()) + for(TQDomNode n = storage_e.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + TQDomElement i = n.toElement(); if(i.isNull()) continue; if(i.tagName() == "conference") { - QString jid=i.attribute("jid"); - QString password; - for(QDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement e = n.toElement(); + TQString jid=i.attribute("jid"); + TQString password; + for(TQDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement e = n.toElement(); if(e.isNull()) continue; else if(e.tagName() == "nick") @@ -78,7 +78,7 @@ void JabberBookmarks::slotReceivedBookmarks( ) if(i.attribute("autojoin") == "true") { XMPP::Jid x_jid(jid); - QString nick=x_jid.resource(); + TQString nick=x_jid.resource(); if(nick.isEmpty()) nick=m_account->myself()->nickName(); @@ -101,7 +101,7 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid) return; } - QDomElement storage_e=m_storage.documentElement(); + TQDomElement storage_e=m_storage.documentElement(); if(storage_e.isNull()) { storage_e=m_storage.createElement("storage"); @@ -109,13 +109,13 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid) storage_e.setAttribute("xmlns","storage:bookmarks"); } - QDomElement conference=m_storage.createElement("conference"); + TQDomElement conference=m_storage.createElement("conference"); storage_e.appendChild(conference); conference.setAttribute("jid",jid.userHost()); - QDomElement nick=m_storage.createElement("nick"); + TQDomElement nick=m_storage.createElement("nick"); conference.appendChild(nick); nick.appendChild(m_storage.createTextNode(jid.resource())); - QDomElement name=m_storage.createElement("name"); + TQDomElement name=m_storage.createElement("name"); conference.appendChild(name); name.appendChild(m_storage.createTextNode(jid.full())); @@ -127,15 +127,15 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid) m_conferencesJID += jid.full(); } -KAction * JabberBookmarks::bookmarksAction(QObject *parent) +KAction * JabberBookmarks::bookmarksAction(TQObject *parent) { KSelectAction *groupchatBM = new KSelectAction( i18n("Groupchat bookmark") , "jabber_group" , 0 , parent , "actionBookMark" ); groupchatBM->setItems(m_conferencesJID); - QObject::connect(groupchatBM, SIGNAL(activated (const QString&)) , this, SLOT(slotJoinChatBookmark(const QString&))); + TQObject::connect(groupchatBM, TQT_SIGNAL(activated (const TQString&)) , this, TQT_SLOT(slotJoinChatBookmark(const TQString&))); return groupchatBM; } -void JabberBookmarks::slotJoinChatBookmark( const QString & _jid ) +void JabberBookmarks::slotJoinChatBookmark( const TQString & _jid ) { if(!m_account->isConnected()) return; diff --git a/kopete/protocols/jabber/jabberbookmarks.h b/kopete/protocols/jabber/jabberbookmarks.h index 826d15e2..31675b50 100644 --- a/kopete/protocols/jabber/jabberbookmarks.h +++ b/kopete/protocols/jabber/jabberbookmarks.h @@ -18,9 +18,9 @@ #ifndef JABBERBOOKMARKS_H #define JABBERBOOKMARKS_H -#include <qobject.h> -#include <qdom.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqdom.h> +#include <tqstringlist.h> namespace XMPP { class Jid; } class JabberAccount; @@ -52,17 +52,17 @@ class JabberBookmarks : public QObject /** * return an action that will be added in the jabber popup menu */ - KAction *bookmarksAction(QObject * parent); + KAction *bookmarksAction(TQObject * parent); private slots: void accountConnected(); void slotReceivedBookmarks(); - void slotJoinChatBookmark(const QString&); + void slotJoinChatBookmark(const TQString&); private: JabberAccount *m_account; - QDomDocument m_storage; - QStringList m_conferencesJID; + TQDomDocument m_storage; + TQStringList m_conferencesJID; }; #endif diff --git a/kopete/protocols/jabber/jabberbytestream.cpp b/kopete/protocols/jabber/jabberbytestream.cpp index 2f0f5c80..1021757d 100644 --- a/kopete/protocols/jabber/jabberbytestream.cpp +++ b/kopete/protocols/jabber/jabberbytestream.cpp @@ -17,14 +17,14 @@ * * ***************************************************************************/ -#include <qobject.h> +#include <tqobject.h> #include <kdebug.h> #include "jabberbytestream.h" #include <kbufferedsocket.h> #include <kresolver.h> #include "jabberprotocol.h" -JabberByteStream::JabberByteStream ( QObject *parent, const char */*name*/ ) +JabberByteStream::JabberByteStream ( TQObject *parent, const char */*name*/ ) : ByteStream ( parent ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Instantiating new Jabber byte stream." << endl; @@ -38,15 +38,15 @@ JabberByteStream::JabberByteStream ( QObject *parent, const char */*name*/ ) mSocket->enableRead ( true ); // connect signals and slots - QObject::connect ( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) ); - QObject::connect ( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) ); - QObject::connect ( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) ); - QObject::connect ( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) ); - QObject::connect ( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) ); + TQObject::connect ( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) ); } -bool JabberByteStream::connect ( QString host, QString service ) +bool JabberByteStream::connect ( TQString host, TQString service ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Connecting to " << host << ", service " << service << endl; @@ -78,7 +78,7 @@ int JabberByteStream::tryWrite () { // send all data from the buffers to the socket - QByteArray writeData = takeWrite(); + TQByteArray writeData = takeWrite(); socket()->writeBlock ( writeData.data (), writeData.size () ); return writeData.size (); @@ -128,7 +128,7 @@ void JabberByteStream::slotReadyRead () { // stuff all available data into our buffers - QByteArray readBuffer ( socket()->bytesAvailable () ); + TQByteArray readBuffer ( socket()->bytesAvailable () ); socket()->readBlock ( readBuffer.data (), readBuffer.size () ); diff --git a/kopete/protocols/jabber/jabberbytestream.h b/kopete/protocols/jabber/jabberbytestream.h index 97e1ceeb..882d3007 100644 --- a/kopete/protocols/jabber/jabberbytestream.h +++ b/kopete/protocols/jabber/jabberbytestream.h @@ -33,11 +33,11 @@ class JabberByteStream : public ByteStream Q_OBJECT public: - JabberByteStream ( QObject *parent = 0, const char *name = 0 ); + JabberByteStream ( TQObject *parent = 0, const char *name = 0 ); ~JabberByteStream (); - bool connect ( QString host, QString service ); + bool connect ( TQString host, TQString service ); virtual bool isOpen () const; virtual void close (); diff --git a/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp b/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp index e570d241..9d9dd770 100644 --- a/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp +++ b/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp @@ -19,12 +19,12 @@ */ #include "jabbercapabilitiesmanager.h" -#include <qstring.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qpair.h> -#include <qdom.h> -#include <qtextstream.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqpair.h> +#include <tqdom.h> +#include <tqtextstream.h> #include <kstandarddirs.h> #include <kdebug.h> @@ -40,21 +40,21 @@ using namespace XMPP; JabberCapabilitiesManager::Capabilities::Capabilities() {} -JabberCapabilitiesManager::Capabilities::Capabilities(const QString& node, const QString& version, const QString& extensions) +JabberCapabilitiesManager::Capabilities::Capabilities(const TQString& node, const TQString& version, const TQString& extensions) : m_node(node), m_version(version), m_extensions(extensions) {} -const QString& JabberCapabilitiesManager::Capabilities::node() const +const TQString& JabberCapabilitiesManager::Capabilities::node() const { return m_node; } -const QString& JabberCapabilitiesManager::Capabilities::version() const +const TQString& JabberCapabilitiesManager::Capabilities::version() const { return m_version; } -const QString& JabberCapabilitiesManager::Capabilities::extensions() const +const TQString& JabberCapabilitiesManager::Capabilities::extensions() const { return m_extensions; } @@ -64,8 +64,8 @@ JabberCapabilitiesManager::CapabilitiesList JabberCapabilitiesManager::Capabilit CapabilitiesList capsList; capsList.append( Capabilities(node(), version(), version()) ); - QStringList extensionList = QStringList::split(" ",extensions()); - QStringList::ConstIterator it, itEnd = extensionList.constEnd(); + TQStringList extensionList = TQStringList::split(" ",extensions()); + TQStringList::ConstIterator it, itEnd = extensionList.constEnd(); for(it = extensionList.constBegin(); it != itEnd; ++it) { capsList.append( Capabilities(node(),version(),*it) ); @@ -99,7 +99,7 @@ JabberCapabilitiesManager::CapabilitiesInformation::CapabilitiesInformation() updateLastSeen(); } -const QStringList& JabberCapabilitiesManager::CapabilitiesInformation::features() const +const TQStringList& JabberCapabilitiesManager::CapabilitiesInformation::features() const { return m_features; } @@ -109,14 +109,14 @@ const DiscoItem::Identities& JabberCapabilitiesManager::CapabilitiesInformation: return m_identities; } -QStringList JabberCapabilitiesManager::CapabilitiesInformation::jids() const +TQStringList JabberCapabilitiesManager::CapabilitiesInformation::jids() const { - QStringList jids; + TQStringList jids; - QValueList<QPair<QString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd(); + TQValueList<QPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd(); for( ; it != itEnd; ++it) { - QString jid( (*it).first ); + TQString jid( (*it).first ); if( !jids.contains(jid) ) jids.push_back(jid); } @@ -143,12 +143,12 @@ void JabberCapabilitiesManager::CapabilitiesInformation::reset() void JabberCapabilitiesManager::CapabilitiesInformation::removeAccount(JabberAccount *account) { - QValueList<QPair<QString,JabberAccount*> >::Iterator it = m_jids.begin(); + TQValueList<QPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin(); while( it != m_jids.end() ) { if( (*it).second == account) { - QValueList<QPair<QString,JabberAccount*> >::Iterator otherIt = it; + TQValueList<QPair<TQString,JabberAccount*> >::Iterator otherIt = it; it++; m_jids.remove(otherIt); } @@ -161,7 +161,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::removeAccount(JabberAcc void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid, JabberAccount* account) { - QPair<QString,JabberAccount*> jidAccountPair(jid.full(),account); + QPair<TQString,JabberAccount*> jidAccountPair(jid.full(),account); if( !m_jids.contains(jidAccountPair) ) { @@ -172,14 +172,14 @@ void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid, void JabberCapabilitiesManager::CapabilitiesInformation::removeJid(const Jid& jid) { - kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Unregistering " << QString(jid.full()).replace('%',"%%") << endl; + kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Unregistering " << TQString(jid.full()).replace('%',"%%") << endl; - QValueList<QPair<QString,JabberAccount*> >::Iterator it = m_jids.begin(); + TQValueList<QPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin(); while( it != m_jids.end() ) { if( (*it).first == jid.full() ) { - QValueList<QPair<QString,JabberAccount*> >::Iterator otherIt = it; + TQValueList<QPair<TQString,JabberAccount*> >::Iterator otherIt = it; it++; m_jids.remove(otherIt); } @@ -194,7 +194,7 @@ QPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::ne { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Looking for next JID" << endl; - QValueList<QPair<QString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd(); + TQValueList<QPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd(); for( ; it != itEnd; ++it) { if( (*it).first == jid.full() && (*it).second->client()->rootTask() == t) @@ -233,26 +233,26 @@ void JabberCapabilitiesManager::CapabilitiesInformation::setIdentities(const Dis m_identities = identities; } -void JabberCapabilitiesManager::CapabilitiesInformation::setFeatures(const QStringList& featureList) +void JabberCapabilitiesManager::CapabilitiesInformation::setFeatures(const TQStringList& featureList) { m_features = featureList; } void JabberCapabilitiesManager::CapabilitiesInformation::updateLastSeen() { - m_lastSeen = QDate::currentDate(); + m_lastSeen = TQDate::currentDate(); } -QDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(QDomDocument *doc) const +TQDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(TQDomDocument *doc) const { - QDomElement info = doc->createElement("info"); + TQDomElement info = doc->createElement("info"); //info.setAttribute("last-seen",lastSeen_.toString(Qt::ISODate)); // Identities DiscoItem::Identities::ConstIterator discoIt = m_identities.constBegin(), discoItEnd = m_identities.constEnd(); for( ; discoIt != discoItEnd; ++discoIt ) { - QDomElement identity = doc->createElement("identity"); + TQDomElement identity = doc->createElement("identity"); identity.setAttribute("category",(*discoIt).category); identity.setAttribute("name",(*discoIt).name); identity.setAttribute("type",(*discoIt).type); @@ -260,10 +260,10 @@ QDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(QDomDocume } // Features - QStringList::ConstIterator featuresIt = m_features.constBegin(), featuresItEnd = m_features.constEnd(); + TQStringList::ConstIterator featuresIt = m_features.constBegin(), featuresItEnd = m_features.constEnd(); for( ; featuresIt != featuresItEnd; ++featuresIt ) { - QDomElement feature = doc->createElement("feature"); + TQDomElement feature = doc->createElement("feature"); feature.setAttribute("node",*featuresIt); info.appendChild(feature); } @@ -271,7 +271,7 @@ QDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(QDomDocume return info; } -void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomElement &element) +void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const TQDomElement &element) { if( element.tagName() != "info") { @@ -280,11 +280,11 @@ void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomEleme } //if (!e.attribute("last-seen").isEmpty()) - // lastSeen_ = QDate::fromString(e.attribute("last-seen"),Qt::ISODate); + // lastSeen_ = TQDate::fromString(e.attribute("last-seen"),Qt::ISODate); - for(QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling()) + for(TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling()) { - QDomElement infoElement = node.toElement(); + TQDomElement infoElement = node.toElement(); if( infoElement.isNull() ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Null element" << endl; @@ -321,9 +321,9 @@ public: {} // Map a full jid to a capabilities - QMap<QString,Capabilities> jidCapabilitiesMap; + TQMap<TQString,Capabilities> jidCapabilitiesMap; // Map a capabilities to its detail information - QMap<Capabilities,CapabilitiesInformation> capabilitiesInformationMap; + TQMap<Capabilities,CapabilitiesInformation> capabilitiesInformationMap; }; //END Private(d-ptr) @@ -342,9 +342,9 @@ void JabberCapabilitiesManager::removeAccount(JabberAccount *account) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Removing account " << account->accountId() << endl; - QValueList<CapabilitiesInformation> info = d->capabilitiesInformationMap.values(); + TQValueList<CapabilitiesInformation> info = d->capabilitiesInformationMap.values(); - QValueList<CapabilitiesInformation>::Iterator it, itEnd = info.end(); + TQValueList<CapabilitiesInformation>::Iterator it, itEnd = info.end(); for(it = info.begin(); it != info.end(); ++it) { (*it).removeAccount(account); @@ -362,7 +362,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const if( jid.compare(account->client()->jid(), false) ) return; - QString node = status.capsNode(), version = status.capsVersion(), extensions = status.capsExt(); + TQString node = status.capsNode(), version = status.capsVersion(), extensions = status.capsExt(); Capabilities capabilities( node, version, extensions ); // Check if the capabilities was really updated(i.e the content is different) @@ -400,7 +400,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const { if( !d->capabilitiesInformationMap[*newCapsIt].discovered() && d->capabilitiesInformationMap[*newCapsIt].pendingRequests() == 0 ) { - kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << QString("Sending disco request to %1, node=%2").arg(QString(jid.full()).replace('%',"%%")).arg(node + "#" + (*newCapsIt).extensions()) << endl; + kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << TQString("Sending disco request to %1, node=%2").arg(TQString(jid.full()).replace('%',"%%")).arg(node + "#" + (*newCapsIt).extensions()) << endl; d->capabilitiesInformationMap[*newCapsIt].setPendingRequests(1); requestDiscoInfo(account, jid, node + "#" + (*newCapsIt).extensions()); @@ -410,7 +410,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const else { // Remove all caps specifications - kdDebug(JABBER_DEBUG_GLOBAL) << QString("Illegal caps info from %1: node=%2, ver=%3").arg(QString(jid.full()).replace('%',"%%")).arg(node).arg(version) << endl; + kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Illegal caps info from %1: node=%2, ver=%3").arg(TQString(jid.full()).replace('%',"%%")).arg(node).arg(version) << endl; d->jidCapabilitiesMap.remove( jid.full() ); } @@ -427,13 +427,13 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const } } -void JabberCapabilitiesManager::requestDiscoInfo(JabberAccount *account, const Jid& jid, const QString& node) +void JabberCapabilitiesManager::requestDiscoInfo(JabberAccount *account, const Jid& jid, const TQString& node) { if( !account->client()->rootTask() ) return; JT_DiscoInfo *discoInfo = new JT_DiscoInfo(account->client()->rootTask()); - connect(discoInfo, SIGNAL(finished()), SLOT(discoRequestFinished())); + connect(discoInfo, TQT_SIGNAL(finished()), TQT_SLOT(discoRequestFinished())); discoInfo->get(jid, node); //pending_++; //timer_.start(REQUEST_TIMEOUT,true); @@ -448,14 +448,14 @@ void JabberCapabilitiesManager::discoRequestFinished() DiscoItem item = discoInfo->item(); Jid jid = discoInfo->jid(); - kdDebug(JABBER_DEBUG_GLOBAL) << QString("Disco response from %1, node=%2, success=%3").arg(QString(jid.full()).replace('%',"%%")).arg(discoInfo->node()).arg(discoInfo->success()) << endl; + kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Disco response from %1, node=%2, success=%3").arg(TQString(jid.full()).replace('%',"%%")).arg(discoInfo->node()).arg(discoInfo->success()) << endl; - QStringList tokens = QStringList::split("#",discoInfo->node()); + TQStringList tokens = TQStringList::split("#",discoInfo->node()); // Update features Q_ASSERT(tokens.count() == 2); - QString node = tokens[0]; - QString extensions = tokens[1]; + TQString node = tokens[0]; + TQString extensions = tokens[1]; Capabilities jidCapabilities = d->jidCapabilitiesMap[jid.full()]; if( jidCapabilities.node() == node ) @@ -474,8 +474,8 @@ void JabberCapabilitiesManager::discoRequestFinished() saveInformation(); // Notify affected jids. - QStringList jids = d->capabilitiesInformationMap[capabilities].jids(); - QStringList::ConstIterator jidsIt = jids.constBegin(), jidsItEnd = jids.constEnd(); + TQStringList jids = d->capabilitiesInformationMap[capabilities].jids(); + TQStringList::ConstIterator jidsIt = jids.constBegin(), jidsItEnd = jids.constEnd(); for( ; jidsIt != jidsItEnd; ++jidsItEnd ) { emit capabilitiesChanged(*jidsIt); @@ -486,7 +486,7 @@ void JabberCapabilitiesManager::discoRequestFinished() QPair<Jid,JabberAccount*> jidAccountPair = d->capabilitiesInformationMap[capabilities].nextJid(jid,discoInfo->parent()); if( jidAccountPair.second ) { - kdDebug(JABBER_DEBUG_GLOBAL) << QString("Falling back on %1.").arg(QString(jidAccountPair.first.full()).replace('%',"%%")) << endl; + kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Falling back on %1.").arg(TQString(jidAccountPair.first.full()).replace('%',"%%")) << endl; requestDiscoInfo( jidAccountPair.second, jidAccountPair.first, discoInfo->node() ); } else @@ -497,7 +497,7 @@ void JabberCapabilitiesManager::discoRequestFinished() } } else - kdDebug(JABBER_DEBUG_GLOBAL) << QString("Current client node '%1' does not match response '%2'").arg(jidCapabilities.node()).arg(node) << endl; + kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Current client node '%1' does not match response '%2'").arg(jidCapabilities.node()).arg(node) << endl; //for (unsigned int i = 0; i < item.features().list().count(); i++) // printf(" Feature: %s\n",item.features().list()[i].latin1()); @@ -512,12 +512,12 @@ void JabberCapabilitiesManager::discoRequestFinished() void JabberCapabilitiesManager::loadCachedInformation() { - QString capsFileName; - capsFileName = locateLocal("appdata", QString::fromUtf8("jabber-capabilities-cache.xml")); + TQString capsFileName; + capsFileName = locateLocal("appdata", TQString::fromUtf8("jabber-capabilities-cache.xml")); // Load settings - QDomDocument doc; - QFile cacheFile(capsFileName); + TQDomDocument doc; + TQFile cacheFile(capsFileName); if( !cacheFile.open(IO_ReadOnly) ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Could not open the Capabilities cache from disk." << endl; @@ -530,17 +530,17 @@ void JabberCapabilitiesManager::loadCachedInformation() } cacheFile.close(); - QDomElement caps = doc.documentElement(); + TQDomElement caps = doc.documentElement(); if( caps.tagName() != "capabilities" ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Invalid capabilities element." << endl; return; } - QDomNode node; + TQDomNode node; for(node = caps.firstChild(); !node.isNull(); node = node.nextSibling()) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( element.isNull() ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Found a null element." << endl; @@ -568,7 +568,7 @@ bool JabberCapabilitiesManager::capabilitiesEnabled(const Jid &jid) const XMPP::Features JabberCapabilitiesManager::features(const Jid& jid) const { - QStringList featuresList; + TQStringList featuresList; if( capabilitiesEnabled(jid) ) { @@ -583,12 +583,12 @@ XMPP::Features JabberCapabilitiesManager::features(const Jid& jid) const return Features(featuresList); } -QString JabberCapabilitiesManager::clientName(const Jid& jid) const +TQString JabberCapabilitiesManager::clientName(const Jid& jid) const { if( capabilitiesEnabled(jid) ) { Capabilities caps = d->jidCapabilitiesMap[jid.full()]; - QString name = d->capabilitiesInformationMap[Capabilities(caps.node(),caps.version(),caps.version())].identities().first().name; + TQString name = d->capabilitiesInformationMap[Capabilities(caps.node(),caps.version(),caps.version())].identities().first().name; // Try to be intelligent about the name /*if (name.isEmpty()) { @@ -609,28 +609,28 @@ QString JabberCapabilitiesManager::clientName(const Jid& jid) const } else { - return QString(); + return TQString(); } } -QString JabberCapabilitiesManager::clientVersion(const Jid& jid) const +TQString JabberCapabilitiesManager::clientVersion(const Jid& jid) const { - return (capabilitiesEnabled(jid) ? d->jidCapabilitiesMap[jid.full()].version() : QString()); + return (capabilitiesEnabled(jid) ? d->jidCapabilitiesMap[jid.full()].version() : TQString()); } void JabberCapabilitiesManager::saveInformation() { - QString capsFileName; - capsFileName = locateLocal("appdata", QString::fromUtf8("jabber-capabilities-cache.xml")); + TQString capsFileName; + capsFileName = locateLocal("appdata", TQString::fromUtf8("jabber-capabilities-cache.xml")); // Generate XML - QDomDocument doc; - QDomElement capabilities = doc.createElement("capabilities"); + TQDomDocument doc; + TQDomElement capabilities = doc.createElement("capabilities"); doc.appendChild(capabilities); - QMap<Capabilities,CapabilitiesInformation>::ConstIterator it = d->capabilitiesInformationMap.constBegin(), itEnd = d->capabilitiesInformationMap.constEnd(); + TQMap<Capabilities,CapabilitiesInformation>::ConstIterator it = d->capabilitiesInformationMap.constBegin(), itEnd = d->capabilitiesInformationMap.constEnd(); for( ; it != itEnd; ++it ) { - QDomElement info = it.data().toXml(&doc); + TQDomElement info = it.data().toXml(&doc); info.setAttribute("node",it.key().node()); info.setAttribute("ver",it.key().version()); info.setAttribute("ext",it.key().extensions()); @@ -638,16 +638,16 @@ void JabberCapabilitiesManager::saveInformation() } // Save - QFile capsFile(capsFileName); + TQFile capsFile(capsFileName); if( !capsFile.open(IO_WriteOnly) ) { kdDebug(JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Error while opening Capabilities cache file." << endl; return; } - QTextStream textStream; + TQTextStream textStream; textStream.setDevice(&capsFile); - textStream.setEncoding(QTextStream::UnicodeUTF8); + textStream.setEncoding(TQTextStream::UnicodeUTF8); textStream << doc.toString(); textStream.unsetDevice(); capsFile.close(); diff --git a/kopete/protocols/jabber/jabbercapabilitiesmanager.h b/kopete/protocols/jabber/jabbercapabilitiesmanager.h index 3010479f..a783188f 100644 --- a/kopete/protocols/jabber/jabbercapabilitiesmanager.h +++ b/kopete/protocols/jabber/jabbercapabilitiesmanager.h @@ -20,7 +20,7 @@ #ifndef JABBERCAPABILITIESMANAGER_H #define JABBERCAPABILITIESMANAGER_H -#include <qobject.h> +#include <tqobject.h> #include <im.h> #include <xmpp.h> @@ -67,11 +67,11 @@ public: /** * Return the client name for the current JID. */ - QString clientName(const Jid& jid) const; + TQString clientName(const Jid& jid) const; /** * Return the client version for the current JID. */ - QString clientVersion(const Jid& jid) const; + TQString clientVersion(const Jid& jid) const; signals: void capabilitiesChanged(const XMPP::Jid &jid); @@ -107,7 +107,7 @@ private: * @param jid The target entity's JID * @param node The target disco#info node */ - void requestDiscoInfo(JabberAccount *account, const Jid& jid, const QString& node); + void requestDiscoInfo(JabberAccount *account, const Jid& jid, const TQString& node); /** * Save capabilities information to disk. @@ -115,7 +115,7 @@ private: void saveInformation(); class Capabilities; - typedef QValueList<Capabilities> CapabilitiesList; + typedef TQValueList<Capabilities> CapabilitiesList; /** * @brief A class representing an entity capability specification. * An entity capability is a combination of a node, a version, and a set of @@ -134,19 +134,19 @@ private: * @param version the version * @param extensions the list of extensions (separated by spaces) */ - Capabilities(const QString &node, const QString &version, const QString &extensions); + Capabilities(const TQString &node, const TQString &version, const TQString &extensions); /** * Returns the node of the capabilities specification. */ - const QString& node() const; + const TQString& node() const; /** * @brief Returns the version of the capabilities specification. */ - const QString& version() const; + const TQString& version() const; /** * @brief Returns the extensions of the capabilities specification. */ - const QString& extensions() const; + const TQString& extensions() const; /** * \brief Flattens the caps specification into the set of 'simple' specifications. * A 'simple' specification is a specification with exactly one extension, @@ -165,16 +165,16 @@ private: bool operator<(const Capabilities&) const; private: - QString m_node, m_version, m_extensions; + TQString m_node, m_version, m_extensions; }; class CapabilitiesInformation { public: CapabilitiesInformation(); - const QStringList& features() const; + const TQStringList& features() const; const DiscoItem::Identities& identities() const; - QStringList jids() const; + TQStringList jids() const; bool discovered() const; int pendingRequests() const; @@ -187,10 +187,10 @@ private: void setDiscovered(bool); void setPendingRequests(int); void setIdentities(const DiscoItem::Identities&); - void setFeatures(const QStringList&); + void setFeatures(const TQStringList&); - QDomElement toXml(QDomDocument *) const; - void fromXml(const QDomElement&); + TQDomElement toXml(TQDomDocument *) const; + void fromXml(const TQDomElement&); protected: void updateLastSeen(); @@ -198,10 +198,10 @@ private: private: bool m_discovered; int m_pendingRequests; - QStringList m_features; + TQStringList m_features; DiscoItem::Identities m_identities; - QValueList<QPair<QString,JabberAccount*> > m_jids; - QDate m_lastSeen; + TQValueList<QPair<TQString,JabberAccount*> > m_jids; + TQDate m_lastSeen; }; class Private; diff --git a/kopete/protocols/jabber/jabberchatsession.cpp b/kopete/protocols/jabber/jabberchatsession.cpp index faa6f950..e07582f7 100644 --- a/kopete/protocols/jabber/jabberchatsession.cpp +++ b/kopete/protocols/jabber/jabberchatsession.cpp @@ -17,12 +17,12 @@ #include "jabberchatsession.h" -#include <qptrlist.h> -#include <qlabel.h> -#include <qimage.h> -#include <qtooltip.h> -#include <qfile.h> -#include <qiconset.h> +#include <tqptrlist.h> +#include <tqlabel.h> +#include <tqimage.h> +#include <tqtooltip.h> +#include <tqfile.h> +#include <tqiconset.h> #include <kconfig.h> #include <kdebug.h> @@ -41,7 +41,7 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBaseContact *user, - Kopete::ContactPtrList others, const QString &resource, const char *name ) + Kopete::ContactPtrList others, const TQString &resource, const char *name ) : Kopete::ChatSession ( user, others, protocol, name ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "New message manager for " << user->contactId () << endl; @@ -49,12 +49,12 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas // make sure Kopete knows about this instance Kopete::ChatSessionManager::self()->registerChatSession ( this ); - connect ( this, SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), - this, SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); + connect ( this, TQT_SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), + this, TQT_SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); - connect ( this, SIGNAL ( myselfTyping ( bool ) ), this, SLOT ( slotSendTypingNotification ( bool ) ) ); + connect ( this, TQT_SIGNAL ( myselfTyping ( bool ) ), this, TQT_SLOT ( slotSendTypingNotification ( bool ) ) ); - connect ( this, SIGNAL ( onlineStatusChanged(Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ), this, SLOT ( slotUpdateDisplayName () ) ); + connect ( this, TQT_SIGNAL ( onlineStatusChanged(Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ), this, TQT_SLOT ( slotUpdateDisplayName () ) ); // check if the user ID contains a hardwired resource, // we'll have to use that one in that case @@ -64,7 +64,7 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas slotUpdateDisplayName (); #ifdef SUPPORT_JINGLE - KAction *jabber_voicecall = new KAction( i18n("Voice call" ), "voicecall", 0, members().getFirst(), SLOT(voiceCall ()), actionCollection(), "jabber_voicecall" ); + KAction *jabber_voicecall = new KAction( i18n("Voice call" ), "voicecall", 0, members().getFirst(), TQT_SLOT(voiceCall ()), actionCollection(), "jabber_voicecall" ); setInstance(protocol->instance()); jabber_voicecall->setEnabled( false ); @@ -84,7 +84,7 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas #endif - new KAction( i18n( "Send File" ), "attach", 0, this, SLOT( slotSendFile() ), actionCollection(), "jabberSendFile" ); + new KAction( i18n( "Send File" ), "attach", 0, this, TQT_SLOT( slotSendFile() ), actionCollection(), "jabberSendFile" ); setXMLFile("jabberchatui.rc"); @@ -116,7 +116,7 @@ void JabberChatSession::slotUpdateDisplayName () if ( !mResource.isEmpty () ) jid.setResource ( mResource ); - QString statusText = i18n("a contact's online status in parenthesis.", " (%1)") + TQString statusText = i18n("a contact's online status in parenthesis.", " (%1)") .arg( chatMembers.first()->onlineStatus().description() ); if ( jid.resource().isEmpty () ) setDisplayName ( chatMembers.first()->metaContact()->displayName () + statusText ); @@ -139,14 +139,14 @@ JabberAccount *JabberChatSession::account () const } -const QString &JabberChatSession::resource () const +const TQString &JabberChatSession::resource () const { return mResource; } -void JabberChatSession::appendMessage ( Kopete::Message &msg, const QString &fromResource ) +void JabberChatSession::appendMessage ( Kopete::Message &msg, const TQString &fromResource ) { mResource = fromResource; @@ -178,7 +178,7 @@ void JabberChatSession::sendNotification( XMPP::MsgEvent event ) return; JabberContact *contact; - QPtrListIterator<Kopete::Contact> listIterator ( members () ); + TQPtrListIterator<Kopete::Contact> listIterator ( members () ); while ( ( contact = dynamic_cast<JabberContact*>( listIterator.current () ) ) != 0 ) { @@ -224,7 +224,7 @@ void JabberChatSession::slotSendTypingNotification ( bool typing ) // create JID for us as sender XMPP::Jid fromJid = static_cast<const JabberBaseContact*>(myself())->rosterItem().jid(); - fromJid.setResource ( account()->configGroup()->readEntry( "Resource", QString::null ) ); + fromJid.setResource ( account()->configGroup()->readEntry( "Resource", TQString::null ) ); kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Sending out typing notification (" << typing << ") to all chat members." << endl; @@ -265,10 +265,10 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat // please don't translate the following string jabberMessage.setBody ( i18n ( "This message is encrypted." ) ); - QString encryptedBody = message.plainBody (); + TQString encryptedBody = message.plainBody (); // remove PGP header and footer from message - encryptedBody.truncate ( encryptedBody.length () - QString("-----END PGP MESSAGE-----").length () - 2 ); + encryptedBody.truncate ( encryptedBody.length () - TQString("-----END PGP MESSAGE-----").length () - 2 ); encryptedBody = encryptedBody.right ( encryptedBody.length () - encryptedBody.find ( "\n\n" ) - 2 ); // assign payload to message @@ -283,7 +283,7 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat JabberResource *bestResource = account()->resourcePool()->bestJabberResource(toJid); if( bestResource && bestResource->features().canXHTML() ) { - QString xhtmlBody = message.escapedBody(); + TQString xhtmlBody = message.escapedBody(); // According to JEP-0071 8.9 it is only RECOMMANDED to replace \n with <br/> // which mean that some implementation (gaim 2 beta) may still think that \n are linebreak. @@ -347,7 +347,7 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat void JabberChatSession::slotSendFile() { - QPtrList<Kopete::Contact>contacts = members(); + TQPtrList<Kopete::Contact>contacts = members(); static_cast<JabberContact *>(contacts.first())->sendFile(); } diff --git a/kopete/protocols/jabber/jabberchatsession.h b/kopete/protocols/jabber/jabberchatsession.h index 66b4c63b..52b6197a 100644 --- a/kopete/protocols/jabber/jabberchatsession.h +++ b/kopete/protocols/jabber/jabberchatsession.h @@ -38,7 +38,7 @@ class JabberChatSession : public Kopete::ChatSession public: JabberChatSession ( JabberProtocol *protocol, const JabberBaseContact *user, - Kopete::ContactPtrList others, const QString &resource = "", + Kopete::ContactPtrList others, const TQString &resource = "", const char *name = 0 ); ~JabberChatSession(); @@ -59,7 +59,7 @@ public: * @brief Return the resource this manager is currently associated with. * @return currently associated resource */ - const QString &resource () const; + const TQString &resource () const; public slots: /** @@ -74,7 +74,7 @@ public slots: * new message managers for messages not originating from the same resource * a manager already exists for. */ - void appendMessage ( Kopete::Message &msg, const QString &fromResource ); + void appendMessage ( Kopete::Message &msg, const TQString &fromResource ); private slots: void slotSendTypingNotification ( bool typing ); @@ -94,7 +94,7 @@ private: */ void sendNotification( XMPP::MsgEvent event ); - QString mResource; + TQString mResource; }; #endif diff --git a/kopete/protocols/jabber/jabberclient.cpp b/kopete/protocols/jabber/jabberclient.cpp index b8e05d48..41157aaa 100644 --- a/kopete/protocols/jabber/jabberclient.cpp +++ b/kopete/protocols/jabber/jabberclient.cpp @@ -21,8 +21,8 @@ #include "jabberclient.h" -#include <qtimer.h> -#include <qregexp.h> +#include <tqtimer.h> +#include <tqregexp.h> #include <qca.h> #include <bsocket.h> @@ -55,7 +55,7 @@ public: // connection details XMPP::Jid jid; - QString password; + TQString password; // XMPP backend XMPP::Client *jabberClient; @@ -70,12 +70,12 @@ public: // current S5B server instance static XMPP::S5BServer *s5bServer; // address list being handled by the S5B server instance - static QStringList s5bAddressList; + static TQStringList s5bAddressList; // port of S5B server static int s5bServerPort; // local IP address - QString localAddress; + TQString localAddress; // whether TLS (or direct SSL in case of the old protocol) should be used bool forceTLS; @@ -91,7 +91,7 @@ public: // override the default server name and port (only pre-XMPP 1.0) bool overrideHost; - QString server; + TQString server; int port; // allow transmission of plaintext passwords @@ -104,19 +104,19 @@ public: int currentPenaltyTime; // client information - QString clientName, clientVersion, osName; + TQString clientName, clientVersion, osName; // timezone information - QString timeZoneName; + TQString timeZoneName; int timeZoneOffset; // Caps(JEP-0115: Entity Capabilities) information - QString capsNode, capsVersion; + TQString capsNode, capsVersion; DiscoItem::Identity discoIdentity; }; XMPP::S5BServer *JabberClient::Private::s5bServer = 0L; -QStringList JabberClient::Private::s5bAddressList; +TQStringList JabberClient::Private::s5bAddressList; int JabberClient::Private::s5bServerPort = 8010; JabberClient::JabberClient () @@ -126,7 +126,7 @@ JabberClient::JabberClient () cleanUp (); // initiate penalty timer - QTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, SLOT ( slotUpdatePenaltyTime () ) ); + TQTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, TQT_SLOT ( slotUpdatePenaltyTime () ) ); } @@ -157,7 +157,7 @@ void JabberClient::cleanUp () d->currentPenaltyTime = 0; d->jid = XMPP::Jid (); - d->password = QString::null; + d->password = TQString::null; setForceTLS ( false ); setUseSSL ( false ); @@ -171,9 +171,9 @@ void JabberClient::cleanUp () setFileTransfersEnabled ( false ); setS5BServerPort ( 8010 ); - setClientName ( QString::null ); - setClientVersion ( QString::null ); - setOSName ( QString::null ); + setClientName ( TQString::null ); + setClientVersion ( TQString::null ); + setOSName ( TQString::null ); setTimeZone ( "UTC", 0 ); @@ -189,7 +189,7 @@ void JabberClient::slotUpdatePenaltyTime () else d->currentPenaltyTime = 0; - QTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, SLOT ( slotUpdatePenaltyTime () ) ); + TQTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, TQT_SLOT ( slotUpdatePenaltyTime () ) ); } @@ -234,7 +234,7 @@ XMPP::S5BServer *JabberClient::s5bServer () if ( !d->s5bServer ) { d->s5bServer = new XMPP::S5BServer (); - QObject::connect ( d->s5bServer, SIGNAL ( destroyed () ), this, SLOT ( slotS5BServerGone () ) ); + TQObject::connect ( d->s5bServer, TQT_SIGNAL ( destroyed () ), this, TQT_SLOT ( slotS5BServerGone () ) ); /* * Try to start the server at the default port here. @@ -263,14 +263,14 @@ void JabberClient::slotS5BServerGone () } -void JabberClient::addS5BServerAddress ( const QString &address ) +void JabberClient::addS5BServerAddress ( const TQString &address ) { - QStringList newList; + TQStringList newList; d->s5bAddressList.append ( address ); // now filter the list without dupes - for ( QStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it ) + for ( TQStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it ) { if ( !newList.contains ( *it ) ) newList.append ( *it ); @@ -280,11 +280,11 @@ void JabberClient::addS5BServerAddress ( const QString &address ) } -void JabberClient::removeS5BServerAddress ( const QString &address ) +void JabberClient::removeS5BServerAddress ( const TQString &address ) { - QStringList newList; + TQStringList newList; - QStringList::iterator it = d->s5bAddressList.find ( address ); + TQStringList::iterator it = d->s5bAddressList.find ( address ); if ( it != d->s5bAddressList.end () ) { d->s5bAddressList.remove ( it ); @@ -298,7 +298,7 @@ void JabberClient::removeS5BServerAddress ( const QString &address ) else { // now filter the list without dupes - for ( QStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it ) + for ( TQStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it ) { if ( !newList.contains ( *it ) ) newList.append ( *it ); @@ -365,7 +365,7 @@ bool JabberClient::probeSSL () const } -void JabberClient::setOverrideHost ( bool flag, const QString &server, int port ) +void JabberClient::setOverrideHost ( bool flag, const TQString &server, int port ) { d->overrideHost = flag; @@ -395,7 +395,7 @@ bool JabberClient::allowPlainTextPassword () const } -void JabberClient::setFileTransfersEnabled ( bool flag, const QString &localAddress ) +void JabberClient::setFileTransfersEnabled ( bool flag, const TQString &localAddress ) { d->fileTransfersEnabled = flag; @@ -403,7 +403,7 @@ void JabberClient::setFileTransfersEnabled ( bool flag, const QString &localAddr } -QString JabberClient::localAddress () const +TQString JabberClient::localAddress () const { return d->localAddress; @@ -417,76 +417,76 @@ bool JabberClient::fileTransfersEnabled () const } -void JabberClient::setClientName ( const QString &clientName ) +void JabberClient::setClientName ( const TQString &clientName ) { d->clientName = clientName; } -QString JabberClient::clientName () const +TQString JabberClient::clientName () const { return d->clientName; } -void JabberClient::setClientVersion ( const QString &clientVersion ) +void JabberClient::setClientVersion ( const TQString &clientVersion ) { d->clientVersion = clientVersion; } -QString JabberClient::clientVersion () const +TQString JabberClient::clientVersion () const { return d->clientVersion; } -void JabberClient::setOSName ( const QString &osName ) +void JabberClient::setOSName ( const TQString &osName ) { d->osName = osName; } -QString JabberClient::osName () const +TQString JabberClient::osName () const { return d->osName; } -void JabberClient::setCapsNode( const QString &capsNode ) +void JabberClient::setCapsNode( const TQString &capsNode ) { d->capsNode = capsNode; } -QString JabberClient::capsNode() const +TQString JabberClient::capsNode() const { return d->capsNode; } -void JabberClient::setCapsVersion( const QString &capsVersion ) +void JabberClient::setCapsVersion( const TQString &capsVersion ) { d->capsVersion = capsVersion; } -QString JabberClient::capsVersion() const +TQString JabberClient::capsVersion() const { return d->capsVersion; } -QString JabberClient::capsExt() const +TQString JabberClient::capsExt() const { if(d->jabberClient) { return d->jabberClient->capsExt(); } - return QString(); + return TQString(); } void JabberClient::setDiscoIdentity( DiscoItem::Identity identity ) { @@ -498,7 +498,7 @@ DiscoItem::Identity JabberClient::discoIdentity() const return d->discoIdentity; } -void JabberClient::setTimeZone ( const QString &timeZoneName, int timeZoneOffset ) +void JabberClient::setTimeZone ( const TQString &timeZoneName, int timeZoneOffset ) { d->timeZoneName = timeZoneName; @@ -506,7 +506,7 @@ void JabberClient::setTimeZone ( const QString &timeZoneName, int timeZoneOffset } -QString JabberClient::timeZoneName () const +TQString JabberClient::timeZoneName () const { return d->timeZoneName; @@ -587,7 +587,7 @@ XMPP::Jid JabberClient::jid () const } -JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QString &password, bool auth ) +JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const TQString &password, bool auth ) { /* * Close any existing connection. @@ -638,10 +638,10 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr { using namespace XMPP; - QObject::connect ( d->jabberTLSHandler, SIGNAL ( tlsHandshaken() ), this, SLOT ( slotTLSHandshaken () ) ); + TQObject::connect ( d->jabberTLSHandler, TQT_SIGNAL ( tlsHandshaken() ), this, TQT_SLOT ( slotTLSHandshaken () ) ); } - QPtrList<QCA::Cert> certStore; + TQPtrList<QCA::Cert> certStore; d->jabberTLS->setCertificateStore ( certStore ); } @@ -653,18 +653,18 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr { using namespace XMPP; - QObject::connect ( d->jabberClientStream, SIGNAL ( needAuthParams(bool, bool, bool) ), - this, SLOT ( slotCSNeedAuthParams (bool, bool, bool) ) ); - QObject::connect ( d->jabberClientStream, SIGNAL ( authenticated () ), - this, SLOT ( slotCSAuthenticated () ) ); - QObject::connect ( d->jabberClientStream, SIGNAL ( connectionClosed () ), - this, SLOT ( slotCSDisconnected () ) ); - QObject::connect ( d->jabberClientStream, SIGNAL ( delayedCloseFinished () ), - this, SLOT ( slotCSDisconnected () ) ); - QObject::connect ( d->jabberClientStream, SIGNAL ( warning (int) ), - this, SLOT ( slotCSWarning (int) ) ); - QObject::connect ( d->jabberClientStream, SIGNAL ( error (int) ), - this, SLOT ( slotCSError (int) ) ); + TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( needAuthParams(bool, bool, bool) ), + this, TQT_SLOT ( slotCSNeedAuthParams (bool, bool, bool) ) ); + TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( authenticated () ), + this, TQT_SLOT ( slotCSAuthenticated () ) ); + TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( connectionClosed () ), + this, TQT_SLOT ( slotCSDisconnected () ) ); + TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( delayedCloseFinished () ), + this, TQT_SLOT ( slotCSDisconnected () ) ); + TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( warning (int) ), + this, TQT_SLOT ( slotCSWarning (int) ) ); + TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( error (int) ), + this, TQT_SLOT ( slotCSError (int) ) ); } d->jabberClientStream->setOldOnly ( useXMPP09 () ); @@ -694,8 +694,8 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr { using namespace XMPP; - QObject::connect ( d->jabberClient->fileTransferManager(), SIGNAL ( incomingReady() ), - this, SLOT ( slotIncomingFileTransfer () ) ); + TQObject::connect ( d->jabberClient->fileTransferManager(), TQT_SIGNAL ( incomingReady() ), + this, TQT_SLOT ( slotIncomingFileTransfer () ) ); } } @@ -704,36 +704,36 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr */ { using namespace XMPP; - QObject::connect ( d->jabberClient, SIGNAL ( subscription (const Jid &, const QString &) ), - this, SLOT ( slotSubscription (const Jid &, const QString &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( rosterRequestFinished ( bool, int, const QString & ) ), - this, SLOT ( slotRosterRequestFinished ( bool, int, const QString & ) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( rosterItemAdded (const RosterItem &) ), - this, SLOT ( slotNewContact (const RosterItem &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( rosterItemUpdated (const RosterItem &) ), - this, SLOT ( slotContactUpdated (const RosterItem &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( rosterItemRemoved (const RosterItem &) ), - this, SLOT ( slotContactDeleted (const RosterItem &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( resourceAvailable (const Jid &, const Resource &) ), - this, SLOT ( slotResourceAvailable (const Jid &, const Resource &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( resourceUnavailable (const Jid &, const Resource &) ), - this, SLOT ( slotResourceUnavailable (const Jid &, const Resource &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( messageReceived (const Message &) ), - this, SLOT ( slotReceivedMessage (const Message &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( groupChatJoined (const Jid &) ), - this, SLOT ( slotGroupChatJoined (const Jid &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( groupChatLeft (const Jid &) ), - this, SLOT ( slotGroupChatLeft (const Jid &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( groupChatPresence (const Jid &, const Status &) ), - this, SLOT ( slotGroupChatPresence (const Jid &, const Status &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( groupChatError (const Jid &, int, const QString &) ), - this, SLOT ( slotGroupChatError (const Jid &, int, const QString &) ) ); - //QObject::connect ( d->jabberClient, SIGNAL (debugText (const QString &) ), - // this, SLOT ( slotPsiDebug (const QString &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( xmlIncoming(const QString& ) ), - this, SLOT ( slotIncomingXML (const QString &) ) ); - QObject::connect ( d->jabberClient, SIGNAL ( xmlOutgoing(const QString& ) ), - this, SLOT ( slotOutgoingXML (const QString &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( subscription (const Jid &, const TQString &) ), + this, TQT_SLOT ( slotSubscription (const Jid &, const TQString &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterRequestFinished ( bool, int, const TQString & ) ), + this, TQT_SLOT ( slotRosterRequestFinished ( bool, int, const TQString & ) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterItemAdded (const RosterItem &) ), + this, TQT_SLOT ( slotNewContact (const RosterItem &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterItemUpdated (const RosterItem &) ), + this, TQT_SLOT ( slotContactUpdated (const RosterItem &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterItemRemoved (const RosterItem &) ), + this, TQT_SLOT ( slotContactDeleted (const RosterItem &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( resourceAvailable (const Jid &, const Resource &) ), + this, TQT_SLOT ( slotResourceAvailable (const Jid &, const Resource &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( resourceUnavailable (const Jid &, const Resource &) ), + this, TQT_SLOT ( slotResourceUnavailable (const Jid &, const Resource &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( messageReceived (const Message &) ), + this, TQT_SLOT ( slotReceivedMessage (const Message &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatJoined (const Jid &) ), + this, TQT_SLOT ( slotGroupChatJoined (const Jid &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatLeft (const Jid &) ), + this, TQT_SLOT ( slotGroupChatLeft (const Jid &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatPresence (const Jid &, const Status &) ), + this, TQT_SLOT ( slotGroupChatPresence (const Jid &, const Status &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatError (const Jid &, int, const TQString &) ), + this, TQT_SLOT ( slotGroupChatError (const Jid &, int, const TQString &) ) ); + //TQObject::connect ( d->jabberClient, TQT_SIGNAL (debugText (const TQString &) ), + // this, TQT_SLOT ( slotPsiDebug (const TQString &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( xmlIncoming(const TQString& ) ), + this, TQT_SLOT ( slotIncomingXML (const TQString &) ) ); + TQObject::connect ( d->jabberClient, TQT_SIGNAL ( xmlOutgoing(const TQString& ) ), + this, TQT_SLOT ( slotOutgoingXML (const TQString &) ) ); } d->jabberClient->setClientName ( clientName () ); @@ -802,33 +802,33 @@ bool JabberClient::isConnected () const } -void JabberClient::joinGroupChat ( const QString &host, const QString &room, const QString &nick ) +void JabberClient::joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick ) { client()->groupChatJoin ( host, room, nick ); } -void JabberClient::joinGroupChat ( const QString &host, const QString &room, const QString &nick, const QString &password ) +void JabberClient::joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick, const TQString &password ) { client()->groupChatJoin ( host, room, nick, password ); } -void JabberClient::leaveGroupChat ( const QString &host, const QString &room ) +void JabberClient::leaveGroupChat ( const TQString &host, const TQString &room ) { client()->groupChatLeave ( host, room ); } -void JabberClient::setGroupChatStatus( const QString & host, const QString & room, const XMPP::Status & status ) +void JabberClient::setGroupChatStatus( const TQString & host, const TQString & room, const XMPP::Status & status ) { client()->groupChatSetStatus( host, room, status); } -void JabberClient::changeGroupChatNick( const QString & host, const QString & room, const QString & nick, const XMPP::Status & status ) +void JabberClient::changeGroupChatNick( const TQString & host, const TQString & room, const TQString & nick, const XMPP::Status & status ) { client()->groupChatChangeNick( host, room, nick, status ); } @@ -841,7 +841,7 @@ void JabberClient::sendMessage ( const XMPP::Message &message ) } -void JabberClient::send ( const QString &packet ) +void JabberClient::send ( const TQString &packet ) { client()->send ( packet ); @@ -855,34 +855,34 @@ void JabberClient::requestRoster () } -void JabberClient::slotPsiDebug ( const QString & _msg ) +void JabberClient::slotPsiDebug ( const TQString & _msg ) { - QString msg = _msg; + TQString msg = _msg; - msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" ); - msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" ); + msg = msg.replace( TQRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" ); + msg = msg.replace( TQRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" ); emit debugMessage ( "Psi: " + msg ); } -void JabberClient::slotIncomingXML ( const QString & _msg ) +void JabberClient::slotIncomingXML ( const TQString & _msg ) { - QString msg = _msg; + TQString msg = _msg; - msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" ); - msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" ); + msg = msg.replace( TQRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" ); + msg = msg.replace( TQRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" ); emit debugMessage ( "XML IN: " + msg ); } -void JabberClient::slotOutgoingXML ( const QString & _msg ) +void JabberClient::slotOutgoingXML ( const TQString & _msg ) { - QString msg = _msg; + TQString msg = _msg; - msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" ); - msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" ); + msg = msg.replace( TQRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" ); + msg = msg.replace( TQRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" ); emit debugMessage ( "XML OUT: " + msg ); @@ -1042,7 +1042,7 @@ void JabberClient::slotCSError ( int error ) } -void JabberClient::slotRosterRequestFinished ( bool success, int /*statusCode*/, const QString &/*statusString*/ ) +void JabberClient::slotRosterRequestFinished ( bool success, int /*statusCode*/, const TQString &/*statusString*/ ) { emit rosterRequestFinished ( success ); @@ -1119,14 +1119,14 @@ void JabberClient::slotGroupChatPresence ( const Jid &jid, const Status &status) } -void JabberClient::slotGroupChatError ( const Jid &jid, int error, const QString &reason) +void JabberClient::slotGroupChatError ( const Jid &jid, int error, const TQString &reason) { emit groupChatError ( jid, error, reason ); } -void JabberClient::slotSubscription ( const Jid &jid, const QString &type ) +void JabberClient::slotSubscription ( const Jid &jid, const TQString &type ) { emit subscription ( jid, type ); diff --git a/kopete/protocols/jabber/jabberclient.h b/kopete/protocols/jabber/jabberclient.h index 7cd33e02..4db2975f 100644 --- a/kopete/protocols/jabber/jabberclient.h +++ b/kopete/protocols/jabber/jabberclient.h @@ -22,7 +22,7 @@ #ifndef JABBERCLIENT_H #define JABBERCLIENT_H -#include <qobject.h> +#include <tqobject.h> // include these because of namespace reasons #include <im.h> @@ -84,7 +84,7 @@ public: * @param password Password to authenticate with. * @param auth True if authentication should be done, false if not. */ - ErrorCode connect ( const XMPP::Jid &jid, const QString &password, bool auth = true ); + ErrorCode connect ( const XMPP::Jid &jid, const TQString &password, bool auth = true ); /** * Disconnect from Jabber server. @@ -191,7 +191,7 @@ public: * This only has an effect if the old protocol (@ref useXMPP09) * has been enabled. Default is false. */ - void setOverrideHost ( bool flag, const QString &server = "", int port = 5222 ); + void setOverrideHost ( bool flag, const TQString &server = "", int port = 5222 ); /** * Returns if the server name and port are overridden. */ @@ -213,12 +213,12 @@ public: * @param flag Whether to enable file transfers. * @param localAddress Local address to receive file transfers at. Will be determined automatically if not specified. */ - void setFileTransfersEnabled ( bool flag, const QString &localAddress = QString::null ); + void setFileTransfersEnabled ( bool flag, const TQString &localAddress = TQString::null ); /** * Returns the address of the local interface. */ - QString localAddress () const; + TQString localAddress () const; /** * Returns if file transfers are enabled. @@ -228,57 +228,57 @@ public: /** * Set client name. */ - void setClientName ( const QString &clientName ); + void setClientName ( const TQString &clientName ); /** * Return client name. */ - QString clientName () const; + TQString clientName () const; /** * Set client version. */ - void setClientVersion ( const QString &clientVersion ); + void setClientVersion ( const TQString &clientVersion ); /** * Return client version. */ - QString clientVersion () const; + TQString clientVersion () const; /** * Set operating system name. */ - void setOSName ( const QString &osName ); + void setOSName ( const TQString &osName ); /** * Return operating system name. */ - QString osName () const; + TQString osName () const; /** * Set the caps(JEP-0115: Entity capabilities) node name. * @param node Node name. */ - void setCapsNode( const QString &capsNode ); + void setCapsNode( const TQString &capsNode ); /** * Return the caps node name for this client. * @return the caps node name. */ - QString capsNode() const; + TQString capsNode() const; /** * Set the caps(JEP-0115: Entity capabilities) node version. * @param capsVersion the node version. */ - void setCapsVersion( const QString &capsVersion ); + void setCapsVersion( const TQString &capsVersion ); /** * Return the caps version for this client. * @return the caps version. */ - QString capsVersion() const; + TQString capsVersion() const; /** * Return the caps extension list for this client. * @return A string containing all extensions separated by space. */ - QString capsExt() const; + TQString capsExt() const; /** * Set the disco Identity information for this client. @@ -302,11 +302,11 @@ public: /** * Set timezone information. Default is UTC. */ - void setTimeZone ( const QString &timeZoneName, int timeZoneOffset ); + void setTimeZone ( const TQString &timeZoneName, int timeZoneOffset ); /** * Return timezone name. */ - QString timeZoneName () const; + TQString timeZoneName () const; /** * Return timezone offset. */ @@ -357,7 +357,7 @@ public: * @param room Name of room to join. * @param nick Nick name you want to join with. */ - void joinGroupChat ( const QString &host, const QString &room, const QString &nick ); + void joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick ); /** * Join a group chat that require a password. @@ -366,23 +366,23 @@ public: * @param nick Nick name you want to join with. * @param password The password to join the room. */ - void joinGroupChat ( const QString &host, const QString &room, const QString &nick, const QString &password ); + void joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick, const TQString &password ); /** * Leave a group chat. * @param host Node to leave room at. * @param room Name of room to leave. */ - void leaveGroupChat ( const QString &host, const QString &room ); + void leaveGroupChat ( const TQString &host, const TQString &room ); /** * change the status of a group chat */ - void setGroupChatStatus(const QString &host, const QString &room, const XMPP::Status &); + void setGroupChatStatus(const TQString &host, const TQString &room, const XMPP::Status &); /** * change the nick in a group chat */ - void changeGroupChatNick(const QString &host, const QString &room, const QString &nick, const XMPP::Status &status =XMPP::Status()); + void changeGroupChatNick(const TQString &host, const TQString &room, const TQString &nick, const XMPP::Status &status =XMPP::Status()); /** * Send a message. @@ -392,7 +392,7 @@ public: /** * Send raw packet to the server. */ - void send ( const QString &packet ); + void send ( const TQString &packet ); /** * Request the roster from the Jabber server. @@ -496,19 +496,19 @@ signals: /** * An error was encountered joining or processing a group chat. */ - void groupChatError ( const XMPP::Jid &jid, int error, const QString &reason ); + void groupChatError ( const XMPP::Jid &jid, int error, const TQString &reason ); /** * New subscription request. */ - void subscription ( const XMPP::Jid &jid, const QString &type ); + void subscription ( const XMPP::Jid &jid, const TQString &type ); /** * Dispatches a debug message. Debug messages * include incoming and outgoing XML packets * as well as internal status messages. */ - void debugMessage ( const QString &message ); + void debugMessage ( const TQString &message ); private: class Private; @@ -526,11 +526,11 @@ private: /** * Add an address that the S5B server should handle. */ - void addS5BServerAddress ( const QString &address ); + void addS5BServerAddress ( const TQString &address ); /** * Remove an address that the S5B server currently handles. */ - void removeS5BServerAddress ( const QString &address ); + void removeS5BServerAddress ( const TQString &address ); private slots: /* S5B server object has been destroyed. */ @@ -558,7 +558,7 @@ private slots: void slotTLSHandshaken (); /* Called from Psi: roster request finished */ - void slotRosterRequestFinished ( bool success, int statusCode, const QString &statusString ); + void slotRosterRequestFinished ( bool success, int statusCode, const TQString &statusString ); /* Called from Psi: incoming file transfer */ void slotIncomingFileTransfer (); @@ -582,18 +582,18 @@ private slots: void slotReceivedMessage (const Message &); /* Called from Psi: debug messages from the backend. */ - void slotPsiDebug (const QString & msg); - void slotIncomingXML (const QString &msg); - void slotOutgoingXML (const QString &msg); + void slotPsiDebug (const TQString & msg); + void slotIncomingXML (const TQString &msg); + void slotOutgoingXML (const TQString &msg); /* Slots for handling group chats. */ void slotGroupChatJoined (const Jid & jid); void slotGroupChatLeft (const Jid & jid); void slotGroupChatPresence (const Jid & jid, const Status & status); - void slotGroupChatError (const Jid & jid, int error, const QString & reason); + void slotGroupChatError (const Jid & jid, int error, const TQString & reason); /* Incoming subscription request. */ - void slotSubscription (const Jid & jid, const QString & type); + void slotSubscription (const Jid & jid, const TQString & type); }; diff --git a/kopete/protocols/jabber/jabberconnector.cpp b/kopete/protocols/jabber/jabberconnector.cpp index 2359dd69..8fdc3e84 100644 --- a/kopete/protocols/jabber/jabberconnector.cpp +++ b/kopete/protocols/jabber/jabberconnector.cpp @@ -22,7 +22,7 @@ #include "jabberbytestream.h" #include "jabberprotocol.h" -JabberConnector::JabberConnector ( QObject *parent, const char */*name*/ ) +JabberConnector::JabberConnector ( TQObject *parent, const char */*name*/ ) : XMPP::Connector ( parent ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "New Jabber connector." << endl; @@ -31,8 +31,8 @@ JabberConnector::JabberConnector ( QObject *parent, const char */*name*/ ) mByteStream = new JabberByteStream ( this ); - connect ( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - connect ( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) ); + connect ( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + connect ( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); } @@ -43,7 +43,7 @@ JabberConnector::~JabberConnector () } -void JabberConnector::connectToServer ( const QString &server ) +void JabberConnector::connectToServer ( const TQString &server ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Initiating connection to " << server << endl; @@ -56,7 +56,7 @@ void JabberConnector::connectToServer ( const QString &server ) mErrorCode = KNetwork::KSocketBase::NoError; - if ( !mByteStream->connect ( mHost, QString::number ( mPort ) ) ) + if ( !mByteStream->connect ( mHost, TQString::number ( mPort ) ) ) { // Houston, we have a problem mErrorCode = mByteStream->socket()->error (); @@ -71,7 +71,7 @@ void JabberConnector::slotConnected () // FIXME: setPeerAddress() is something different, find out correct usage later //KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 (); - //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); + //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); emit connected (); @@ -107,7 +107,7 @@ void JabberConnector::done () } -void JabberConnector::setOptHostPort ( const QString &host, Q_UINT16 port ) +void JabberConnector::setOptHostPort ( const TQString &host, Q_UINT16 port ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl; diff --git a/kopete/protocols/jabber/jabberconnector.h b/kopete/protocols/jabber/jabberconnector.h index 6fbc4167..b7ee533a 100644 --- a/kopete/protocols/jabber/jabberconnector.h +++ b/kopete/protocols/jabber/jabberconnector.h @@ -35,15 +35,15 @@ class JabberConnector : public XMPP::Connector Q_OBJECT public: - JabberConnector ( QObject *parent = 0, const char *name = 0 ); + JabberConnector ( TQObject *parent = 0, const char *name = 0 ); ~JabberConnector (); - void connectToServer ( const QString &server ); + void connectToServer ( const TQString &server ); ByteStream *stream () const; void done (); - void setOptHostPort ( const QString &host, Q_UINT16 port ); + void setOptHostPort ( const TQString &host, Q_UINT16 port ); void setOptSSL ( bool ); void setOptProbe ( bool ); @@ -54,7 +54,7 @@ private slots: void slotError ( int ); private: - QString mHost; + TQString mHost; Q_UINT16 mPort; int mErrorCode; diff --git a/kopete/protocols/jabber/jabbercontact.cpp b/kopete/protocols/jabber/jabbercontact.cpp index c8589e1e..840f9cf3 100644 --- a/kopete/protocols/jabber/jabbercontact.cpp +++ b/kopete/protocols/jabber/jabbercontact.cpp @@ -21,12 +21,12 @@ #include "xmpp_tasks.h" #include "im.h" -#include <qtimer.h> -#include <qdatetime.h> -#include <qstylesheet.h> -#include <qimage.h> -#include <qregexp.h> -#include <qbuffer.h> +#include <tqtimer.h> +#include <tqdatetime.h> +#include <tqstylesheet.h> +#include <tqimage.h> +#include <tqregexp.h> +#include <tqbuffer.h> #include <kdebug.h> #include <klocale.h> @@ -63,7 +63,7 @@ /** * JabberContact constructor */ -JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Account *_account, Kopete::MetaContact * mc, const QString &legacyId) +JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Account *_account, Kopete::MetaContact * mc, const TQString &legacyId) : JabberBaseContact ( rosterItem, _account, mc, legacyId) , mDiscoDone(false), m_syncTimer(0L) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << contactId() << " is created - " << this << endl; @@ -89,19 +89,19 @@ JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Accoun { // this contact is a regular contact connect ( this, - SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT ( slotCheckVCard () ) ); + TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT ( slotCheckVCard () ) ); } else { // this contact is the myself instance connect ( account()->myself (), - SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT ( slotCheckVCard () ) ); + TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT ( slotCheckVCard () ) ); connect ( account()->myself (), - SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT ( slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT ( slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); /* * Trigger update once if we're already connected for contacts @@ -127,44 +127,44 @@ JabberContact::~JabberContact() kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << contactId() << " is destroyed - " << this << endl; } -QPtrList<KAction> *JabberContact::customContextMenuActions () +TQPtrList<KAction> *JabberContact::customContextMenuActions () { - QPtrList<KAction> *actionCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>(); KActionMenu *actionAuthorization = new KActionMenu ( i18n ("Authorization"), "connect_established", this, "jabber_authorization"); KAction *resendAuthAction, *requestAuthAction, *removeAuthAction; resendAuthAction = new KAction (i18n ("(Re)send Authorization To"), "mail_forward", 0, - this, SLOT (slotSendAuth ()), actionAuthorization, "actionSendAuth"); + this, TQT_SLOT (slotSendAuth ()), actionAuthorization, "actionSendAuth"); resendAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::To || mRosterItem.subscription().type() == XMPP::Subscription::None ); actionAuthorization->insert(resendAuthAction); requestAuthAction = new KAction (i18n ("(Re)request Authorization From"), "mail_reply", 0, - this, SLOT (slotRequestAuth ()), actionAuthorization, "actionRequestAuth"); + this, TQT_SLOT (slotRequestAuth ()), actionAuthorization, "actionRequestAuth"); requestAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::From || mRosterItem.subscription().type() == XMPP::Subscription::None ); actionAuthorization->insert(requestAuthAction); removeAuthAction = new KAction (i18n ("Remove Authorization From"), "mail_delete", 0, - this, SLOT (slotRemoveAuth ()), actionAuthorization, "actionRemoveAuth"); + this, TQT_SLOT (slotRemoveAuth ()), actionAuthorization, "actionRemoveAuth"); removeAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::Both || mRosterItem.subscription().type() == XMPP::Subscription::From ); actionAuthorization->insert(removeAuthAction); KActionMenu *actionSetAvailability = new KActionMenu (i18n ("Set Availability"), "kopeteavailable", this, "jabber_online"); actionSetAvailability->insert(new KAction (i18n ("Online"), protocol()->JabberKOSOnline.iconFor(this), - 0, this, SLOT (slotStatusOnline ()), actionSetAvailability, "actionOnline")); + 0, this, TQT_SLOT (slotStatusOnline ()), actionSetAvailability, "actionOnline")); actionSetAvailability->insert(new KAction (i18n ("Free to Chat"), protocol()->JabberKOSChatty.iconFor(this), - 0, this, SLOT (slotStatusChatty ()), actionSetAvailability, "actionChatty")); + 0, this, TQT_SLOT (slotStatusChatty ()), actionSetAvailability, "actionChatty")); actionSetAvailability->insert(new KAction (i18n ("Away"), protocol()->JabberKOSAway.iconFor(this), - 0, this, SLOT (slotStatusAway ()), actionSetAvailability, "actionAway")); + 0, this, TQT_SLOT (slotStatusAway ()), actionSetAvailability, "actionAway")); actionSetAvailability->insert(new KAction (i18n ("Extended Away"), protocol()->JabberKOSXA.iconFor(this), - 0, this, SLOT (slotStatusXA ()), actionSetAvailability, "actionXA")); + 0, this, TQT_SLOT (slotStatusXA ()), actionSetAvailability, "actionXA")); actionSetAvailability->insert(new KAction (i18n ("Do Not Disturb"), protocol()->JabberKOSDND.iconFor(this), - 0, this, SLOT (slotStatusDND ()), actionSetAvailability, "actionDND")); + 0, this, TQT_SLOT (slotStatusDND ()), actionSetAvailability, "actionDND")); actionSetAvailability->insert(new KAction (i18n ("Invisible"), protocol()->JabberKOSInvisible.iconFor(this), - 0, this, SLOT (slotStatusInvisible ()), actionSetAvailability, "actionInvisible")); + 0, this, TQT_SLOT (slotStatusInvisible ()), actionSetAvailability, "actionInvisible")); KActionMenu *actionSelectResource = new KActionMenu (i18n ("Select Resource"), "connect_no", this, "actionSelectResource"); @@ -176,7 +176,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () } else { - QStringList items; + TQStringList items; XMPP::ResourceList availableResources; int activeItem = 0, i = 1; @@ -198,13 +198,13 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () // now go through the string list and add the resources with their icons i = 0; - QStringList::const_iterator itemsEnd = items.end (); - for(QStringList::const_iterator it = items.begin(); it != itemsEnd; ++it) + TQStringList::const_iterator itemsEnd = items.end (); + for(TQStringList::const_iterator it = items.begin(); it != itemsEnd; ++it) { if( i == activeItem ) { - actionSelectResource->insert ( new KAction( ( *it ), "button_ok", 0, this, SLOT( slotSelectResource() ), - actionSelectResource, QString::number( i ).latin1() ) ); + actionSelectResource->insert ( new KAction( ( *it ), "button_ok", 0, this, TQT_SLOT( slotSelectResource() ), + actionSelectResource, TQString::number( i ).latin1() ) ); } else { @@ -212,11 +212,11 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () * Select icon, using bestResource() without lock for the automatic entry * and the resources' respective status icons for the rest. */ - QIconSet iconSet ( !i ? + TQIconSet iconSet ( !i ? protocol()->resourceToKOS ( account()->resourcePool()->bestResource ( mRosterItem.jid(), false ) ).iconFor ( account () ) : protocol()->resourceToKOS ( *availableResources.find(*it) ).iconFor ( account () )); - actionSelectResource->insert ( new KAction( ( *it ), iconSet, 0, this, SLOT( slotSelectResource() ), - actionSelectResource, QString::number( i ).latin1() ) ); + actionSelectResource->insert ( new KAction( ( *it ), iconSet, 0, this, TQT_SLOT( slotSelectResource() ), + actionSelectResource, TQString::number( i ).latin1() ) ); } i++; @@ -230,7 +230,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () #ifdef SUPPORT_JINGLE - KAction *actionVoiceCall = new KAction (i18n ("Voice call"), "voicecall", 0, this, SLOT (voiceCall ()), this, "jabber_voicecall"); + KAction *actionVoiceCall = new KAction (i18n ("Voice call"), "voicecall", 0, this, TQT_SLOT (voiceCall ()), this, "jabber_voicecall"); actionVoiceCall->setEnabled( false ); actionCollection->append( actionVoiceCall ); @@ -248,7 +248,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () void JabberContact::handleIncomingMessage (const XMPP::Message & message) { - QString viewPlugin; + TQString viewPlugin; Kopete::Message *newMessage = 0L; kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received Message Type:" << message.type () << endl; @@ -261,17 +261,17 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) { if (!message.invite().isEmpty()) { - QString room=message.invite(); - QString originalBody=message.body().isEmpty() ? QString() : - i18n( "The original message is : <i>\" %1 \"</i><br>" ).arg(QStyleSheet::escape(message.body())); - QString mes=i18n("<qt><i>%1</i> invited you to join the conference <b>%2</b><br>%3<br>" + TQString room=message.invite(); + TQString originalBody=message.body().isEmpty() ? TQString() : + i18n( "The original message is : <i>\" %1 \"</i><br>" ).arg(TQStyleSheet::escape(message.body())); + TQString mes=i18n("<qt><i>%1</i> invited you to join the conference <b>%2</b><br>%3<br>" "If you want to accept and join, just <b>enter your nickname</b> and press ok<br>" "If you want to decline, press cancel</qt>") .arg(message.from().full(), room , originalBody); bool ok=false; - QString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ), - mes, QString() , &ok , (mManager ? dynamic_cast<QWidget*>(mManager->view(false)) : 0) ); + TQString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ), + mes, TQString() , &ok , (mManager ? dynamic_cast<TQWidget*>(mManager->view(false)) : 0) ); if ( !ok || !account()->isConnected() || futureNewNickName.isEmpty() ) return; @@ -347,11 +347,11 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) mLastReceivedMessageId = message.id (); // retrieve and reformat body - QString body = message.body (); - QString xHTMLBody; + TQString body = message.body (); + TQString xHTMLBody; if( !message.xencrypted().isEmpty () ) { - body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n"); + body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n"); } else { @@ -393,11 +393,11 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) for ( XMPP::UrlList::const_iterator it = urlList.begin (); it != urlList.end (); ++it ) { - QString description = (*it).desc().isEmpty() ? (*it).url() : QStyleSheet::escape ( (*it).desc() ); - QString url = (*it).url (); + TQString description = (*it).desc().isEmpty() ? (*it).url() : TQStyleSheet::escape ( (*it).desc() ); + TQString url = (*it).url (); newMessage = new Kopete::Message ( message.timeStamp (), this, contactList, - QString ( "<a href=\"%1\">%2</a>" ).arg ( url, description ), + TQString ( "<a href=\"%1\">%2</a>" ).arg ( url, description ), message.subject (), Kopete::Message::Inbound, Kopete::Message::RichText, viewPlugin ); @@ -411,7 +411,7 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) void JabberContact::slotCheckVCard () { - QDateTime cacheDate; + TQDateTime cacheDate; Kopete::ContactProperty cacheDateString = property ( protocol()->propVCardCacheTimeStamp ); // don't do anything while we are offline @@ -431,8 +431,8 @@ void JabberContact::slotCheckVCard () mDiscoDone = true; //or it will happen twice, we don't want that. //disco to see if it's not a transport XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account()->client()->rootTask()); - QObject::connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished())); - jt->get(rosterItem().jid(), QString()); + TQObject::connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished())); + jt->get(rosterItem().jid(), TQString()); jt->go(true); } } @@ -440,20 +440,20 @@ void JabberContact::slotCheckVCard () // avoid warning if key does not exist in configuration file if ( cacheDateString.isNull () ) - cacheDate = QDateTime::currentDateTime().addDays ( -2 ); + cacheDate = TQDateTime::currentDateTime().addDays ( -2 ); else - cacheDate = QDateTime::fromString ( cacheDateString.value().toString (), Qt::ISODate ); + cacheDate = TQDateTime::fromString ( cacheDateString.value().toString (), Qt::ISODate ); kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Cached vCard data for " << contactId () << " from " << cacheDate.toString () << endl; - if ( !mVCardUpdateInProgress && ( cacheDate.addDays ( 1 ) < QDateTime::currentDateTime () ) ) + if ( !mVCardUpdateInProgress && ( cacheDate.addDays ( 1 ) < TQDateTime::currentDateTime () ) ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling update." << endl; mVCardUpdateInProgress = true; // current data is older than 24 hours, request a new one - QTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedVCard () ) ); + TQTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedVCard () ) ); } } @@ -479,8 +479,8 @@ void JabberContact::slotGetTimedVCard () { //disco to see if it's not a transport XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account()->client()->rootTask()); - QObject::connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished())); - jt->get(rosterItem().jid(), QString()); + TQObject::connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished())); + jt->get(rosterItem().jid(), TQString()); jt->go(true); } } @@ -492,7 +492,7 @@ void JabberContact::slotGetTimedVCard () // request vCard XMPP::JT_VCard *task = new XMPP::JT_VCard ( account()->client()->rootTask () ); // signal to ourselves when the vCard data arrived - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotVCard () ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotVCard () ) ); task->get ( mRosterItem.jid () ); task->go ( true ); @@ -506,7 +506,7 @@ void JabberContact::slotGotVCard () // update timestamp of last vCard retrieval if ( metaContact() && !metaContact()->isTemporary () ) { - setProperty ( protocol()->propVCardCacheTimeStamp, QDateTime::currentDateTime().toString ( Qt::ISODate ) ); + setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::currentDateTime().toString ( Qt::ISODate ) ); } mVCardUpdateInProgress = false; @@ -551,7 +551,7 @@ void JabberContact::slotCheckLastActivity ( Kopete::Contact *, const Kopete::Onl { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling request for last activity for " << mRosterItem.jid().bare () << endl; - QTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedLastActivity () ) ); + TQTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedLastActivity () ) ); } } @@ -578,7 +578,7 @@ void JabberContact::slotGetTimedLastActivity () kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Requesting last activity from timer for " << mRosterItem.jid().bare () << endl; XMPP::JT_GetLastActivity *task = new XMPP::JT_GetLastActivity ( account()->client()->rootTask () ); - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotLastActivity () ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotLastActivity () ) ); task->get ( mRosterItem.jid () ); task->go ( true ); } @@ -591,7 +591,7 @@ void JabberContact::slotGotLastActivity () if ( task->success () ) { - setProperty ( protocol()->propLastSeen, QDateTime::currentDateTime().addSecs ( -task->seconds () ) ); + setProperty ( protocol()->propLastSeen, TQDateTime::currentDateTime().addSecs ( -task->seconds () ) ); if( !task->message().isEmpty() ) { setProperty( protocol()->propAwayMessage, task->message() ); @@ -668,7 +668,7 @@ void JabberContact::slotSendVCard() // work information tab XMPP::VCard::Org org; org.name = property(protocol()->propCompanyName).value().toString(); - org.unit = QStringList::split(",", property(protocol()->propCompanyDepartement).value().toString()); + org.unit = TQStringList::split(",", property(protocol()->propCompanyDepartement).value().toString()); vCard.setOrg(org); vCard.setTitle (property(protocol()->propCompanyPosition).value().toString()); vCard.setRole (property(protocol()->propCompanyRole).value().toString()); @@ -703,10 +703,10 @@ void JabberContact::slotSendVCard() // Set contact photo as a binary value (if he has set a photo) if( hasProperty( protocol()->propPhoto.key() ) ) { - QString photoPath = property( protocol()->propPhoto ).value().toString(); - QImage image( photoPath ); - QByteArray ba; - QBuffer buffer( ba ); + TQString photoPath = property( protocol()->propPhoto ).value().toString(); + TQImage image( photoPath ); + TQByteArray ba; + TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); image.save( &buffer, "PNG" ); vCard.setPhoto( ba ); @@ -717,22 +717,22 @@ void JabberContact::slotSendVCard() XMPP::JT_VCard *task = new XMPP::JT_VCard (account()->client()->rootTask ()); // signal to ourselves when the vCard data arrived - QObject::connect (task, SIGNAL (finished ()), this, SLOT (slotSentVCard ())); + TQObject::connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentVCard ())); task->set (vCard); task->go (true); } -void JabberContact::setPhoto( const QString &photoPath ) +void JabberContact::setPhoto( const TQString &photoPath ) { - QImage contactPhoto(photoPath); - QString newPhotoPath = photoPath; + TQImage contactPhoto(photoPath); + TQString newPhotoPath = photoPath; if(contactPhoto.width() > 96 || contactPhoto.height() > 96) { // Save image to a new location if the image isn't the correct format. - QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); + TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); // Scale and crop the picture. - contactPhoto = contactPhoto.smoothScale( 96, 96, QImage::ScaleMin ); + contactPhoto = contactPhoto.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(contactPhoto.width() < contactPhoto.height()) contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 96, 96); @@ -741,17 +741,17 @@ void JabberContact::setPhoto( const QString &photoPath ) // Use the cropped/scaled image now. if(!contactPhoto.save(newLocation, "PNG")) - newPhotoPath = QString::null; + newPhotoPath = TQString::null; else newPhotoPath = newLocation; } else if (contactPhoto.width() < 32 || contactPhoto.height() < 32) { // Save image to a new location if the image isn't the correct format. - QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); + TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); // Scale and crop the picture. - contactPhoto = contactPhoto.smoothScale( 32, 32, QImage::ScaleMin ); + contactPhoto = contactPhoto.smoothScale( 32, 32, TQImage::ScaleMin ); // crop image if not square if(contactPhoto.width() < contactPhoto.height()) contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 32, 32); @@ -760,14 +760,14 @@ void JabberContact::setPhoto( const QString &photoPath ) // Use the cropped/scaled image now. if(!contactPhoto.save(newLocation, "PNG")) - newPhotoPath = QString::null; + newPhotoPath = TQString::null; else newPhotoPath = newLocation; } else if (contactPhoto.width() != contactPhoto.height()) { // Save image to a new location if the image isn't the correct format. - QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); + TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); if(contactPhoto.width() < contactPhoto.height()) contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, contactPhoto.height(), contactPhoto.height()); @@ -776,7 +776,7 @@ void JabberContact::setPhoto( const QString &photoPath ) // Use the cropped/scaled image now. if(!contactPhoto.save(newLocation, "PNG")) - newPhotoPath = QString::null; + newPhotoPath = TQString::null; else newPhotoPath = newLocation; } @@ -789,7 +789,7 @@ void JabberContact::slotSentVCard () } -void JabberContact::slotChatSessionDeleted ( QObject *sender ) +void JabberContact::slotChatSessionDeleted ( TQObject *sender ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Message manager deleted, collecting the pieces..." << endl; @@ -826,7 +826,7 @@ JabberChatSession *JabberContact::manager ( Kopete::ContactPtrList chatMembers, kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "No manager found, creating a new one with resource '" << jid.resource () << "'" << endl; manager = new JabberChatSession ( protocol(), static_cast<JabberBaseContact *>(account()->myself()), chatMembers, jid.resource () ); - connect ( manager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted ( QObject * ) ) ); + connect ( manager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted ( TQObject * ) ) ); mManagers.append ( manager ); } @@ -845,7 +845,7 @@ Kopete::ChatSession *JabberContact::manager ( Kopete::Contact::CanCreateFlags ca } -JabberChatSession *JabberContact::manager ( const QString &resource, Kopete::Contact::CanCreateFlags canCreate ) +JabberChatSession *JabberContact::manager ( const TQString &resource, Kopete::Contact::CanCreateFlags canCreate ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "called, canCreate: " << canCreate << ", Resource: '" << resource << "'" << endl; @@ -880,7 +880,7 @@ JabberChatSession *JabberContact::manager ( const QString &resource, Kopete::Con JabberChatSession *manager = new JabberChatSession ( protocol(), static_cast<JabberBaseContact *>(account()->myself()), chatmembers, resource ); - connect ( manager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted ( QObject * ) ) ); + connect ( manager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted ( TQObject * ) ) ); mManagers.append ( manager ); return manager; @@ -938,7 +938,7 @@ void JabberContact::deleteContact () sendSubscription("unsubscribe"); XMPP::JT_Roster * rosterTask = new XMPP::JT_Roster ( account()->client()->rootTask () ); - rosterTask->set ( mRosterItem.jid (), QString() , QStringList() ); + rosterTask->set ( mRosterItem.jid (), TQString() , TQStringList() ); rosterTask->go (true); } @@ -954,8 +954,8 @@ void JabberContact::sync ( unsigned int ) if(!m_syncTimer) { - m_syncTimer=new QTimer(this); - connect(m_syncTimer, SIGNAL(timeout()) , this , SLOT(slotDelayedSync())); + m_syncTimer=new TQTimer(this); + connect(m_syncTimer, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotDelayedSync())); } m_syncTimer->start(2*1000,true); /* @@ -979,7 +979,7 @@ void JabberContact::slotDelayedSync( ) bool changed=metaContact()->displayName() != mRosterItem.name(); - QStringList groups; + TQStringList groups; Kopete::GroupList groupList = metaContact ()->groups (); kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Synchronizing contact " << contactId () << endl; @@ -1009,17 +1009,17 @@ void JabberContact::slotDelayedSync( ) } -void JabberContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ ) +void JabberContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ ) { - QString filePath; + TQString filePath; // if the file location is null, then get it from a file open dialog if ( !sourceURL.isValid () ) - filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) ); + filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) ); else filePath = sourceURL.path(-1); - QFile file ( filePath ); + TQFile file ( filePath ); if ( file.exists () ) { @@ -1057,7 +1057,7 @@ void JabberContact::slotRemoveAuth () } -void JabberContact::sendSubscription ( const QString& subType ) +void JabberContact::sendSubscription ( const TQString& subType ) { if ( !account()->isConnected () ) @@ -1075,7 +1075,7 @@ void JabberContact::sendSubscription ( const QString& subType ) void JabberContact::slotSelectResource () { - int currentItem = QString ( static_cast<const KAction *>( sender() )->name () ).toUInt (); + int currentItem = TQString ( static_cast<const KAction *>( sender() )->name () ).toUInt (); /* * Warn the user if there is already an active chat window. @@ -1101,7 +1101,7 @@ void JabberContact::slotSelectResource () } else { - QString selectedResource = static_cast<const KAction *>(sender())->text(); + TQString selectedResource = static_cast<const KAction *>(sender())->text(); kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Moving to resource " << selectedResource << endl; @@ -1212,7 +1212,7 @@ bool JabberContact::isContactRequestingEvent( XMPP::MsgEvent event ) return false; } -QString JabberContact::lastReceivedMessageId () const +TQString JabberContact::lastReceivedMessageId () const { return mLastReceivedMessageId; } @@ -1263,12 +1263,12 @@ void JabberContact::slotDiscoFinished( ) JT_DiscoInfo *jt = (JT_DiscoInfo *)sender(); bool is_transport=false; - QString tr_type; + TQString tr_type; if ( jt->success() ) { - QValueList<XMPP::DiscoItem::Identity> identities = jt->item().identities(); - QValueList<XMPP::DiscoItem::Identity>::Iterator it; + TQValueList<XMPP::DiscoItem::Identity> identities = jt->item().identities(); + TQValueList<XMPP::DiscoItem::Identity>::Iterator it; for ( it = identities.begin(); it != identities.end(); ++it ) { XMPP::DiscoItem::Identity ident=*it; diff --git a/kopete/protocols/jabber/jabbercontact.h b/kopete/protocols/jabber/jabbercontact.h index a7a3b024..64402a48 100644 --- a/kopete/protocols/jabber/jabbercontact.h +++ b/kopete/protocols/jabber/jabbercontact.h @@ -38,7 +38,7 @@ Q_OBJECT public: JabberContact (const XMPP::RosterItem &rosterItem, - Kopete::Account *account, Kopete::MetaContact * mc, const QString &legacyId = QString()); + Kopete::Account *account, Kopete::MetaContact * mc, const TQString &legacyId = TQString()); ~JabberContact(); @@ -46,12 +46,12 @@ public: * Create custom context menu items for the contact * FIXME: implement manager version here? */ - QPtrList<KAction> *customContextMenuActions (); + TQPtrList<KAction> *customContextMenuActions (); /** * Start a rename request. */ - void rename ( const QString &newName ); + void rename ( const TQString &newName ); /** * Deal with an incoming message for this contact. @@ -69,7 +69,7 @@ public: bool isContactRequestingEvent( XMPP::MsgEvent event ); - QString lastReceivedMessageId () const; + TQString lastReceivedMessageId () const; public slots: @@ -95,7 +95,7 @@ public slots: * a nondeterminate file size (such as over a socket) */ virtual void sendFile( const KURL &sourceURL = KURL(), - const QString &fileName = QString::null, uint fileSize = 0L ); + const TQString &fileName = TQString::null, uint fileSize = 0L ); /** * Update the vCard on the server. @@ -107,7 +107,7 @@ public slots: * Set contact photo. * @param path Path to the photo. */ - void setPhoto(const QString &photoPath); + void setPhoto(const TQString &photoPath); /** * this will start a voice call to the contact @@ -146,7 +146,7 @@ private slots: */ void slotSelectResource (); - void slotChatSessionDeleted ( QObject *sender ); + void slotChatSessionDeleted ( TQObject *sender ); /** * Check if cached vCard is recent. @@ -209,7 +209,7 @@ private: * the manager. If a new manager is created, the given * resource is preselected. */ - JabberChatSession *manager ( const QString &resource, Kopete::Contact::CanCreateFlags ); + JabberChatSession *manager ( const TQString &resource, Kopete::Contact::CanCreateFlags ); /** * Create a message manager for this contact. @@ -222,7 +222,7 @@ private: /** * Sends subscription messages. */ - void sendSubscription (const QString& subType); + void sendSubscription (const TQString& subType); /** * Sends a presence packet to this contact @@ -240,7 +240,7 @@ private: * The casts in manager() and slotChatSessionDeleted() * are thus legal. */ - QPtrList<JabberChatSession> mManagers; + TQPtrList<JabberChatSession> mManagers; /** * Indicates whether the vCard is currently @@ -258,8 +258,8 @@ private: */ bool mDiscoDone :1; - QString mLastReceivedMessageId; - QTimer *m_syncTimer; + TQString mLastReceivedMessageId; + TQTimer *m_syncTimer; }; diff --git a/kopete/protocols/jabber/jabbercontactpool.cpp b/kopete/protocols/jabber/jabbercontactpool.cpp index 736c6045..43724d28 100644 --- a/kopete/protocols/jabber/jabbercontactpool.cpp +++ b/kopete/protocols/jabber/jabbercontactpool.cpp @@ -18,7 +18,7 @@ #include "jabbercontactpool.h" -#include <qptrlist.h> +#include <tqptrlist.h> #include <kdebug.h> #include <kmessagebox.h> #include <kopeteaccountmanager.h> @@ -91,7 +91,7 @@ JabberContact *JabberContactPool::addContact ( const XMPP::RosterItem &contact, kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Adding new contact " << contact.jid().full() << endl; JabberTransport *transport=0l; - QString legacyId; + TQString legacyId; //find if the contact should be added to a transport. if(mAccount->transports().contains(contact.jid().domain())) { @@ -102,7 +102,7 @@ JabberContact *JabberContactPool::addContact ( const XMPP::RosterItem &contact, // create new contact instance and add it to the dictionary JabberContact *newContact = new JabberContact ( contact, transport ? (Kopete::Account*)transport : (Kopete::Account*)mAccount, metaContact , legacyId ); JabberContactPoolItem *newContactItem = new JabberContactPoolItem ( newContact ); - connect ( newContact, SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) ); + connect ( newContact, TQT_SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, TQT_SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) ); newContactItem->setDirty ( dirty ); mPool.append ( newContactItem ); @@ -161,7 +161,7 @@ JabberBaseContact *JabberContactPool::addGroupContact ( const XMPP::RosterItem & JabberContactPoolItem *newContactItem = new JabberContactPoolItem ( newContact ); - connect ( newContact, SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) ); + connect ( newContact, TQT_SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, TQT_SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) ); newContactItem->setDirty ( dirty ); mPool.append ( newContactItem ); @@ -222,7 +222,7 @@ void JabberContactPool::slotContactDestroyed ( Kopete::Contact *contact ) else { //this is a legacy contact. we have no way to get the real Jid at this point, we can only guess it. - QString contactId= contact->contactId().replace('@','%') + "@" + contact->account()->myself()->contactId(); + TQString contactId= contact->contactId().replace('@','%') + "@" + contact->account()->myself()->contactId(); mAccount->resourcePool()->removeAllResources ( XMPP::Jid ( contactId ) ) ; } @@ -311,9 +311,9 @@ JabberBaseContact *JabberContactPool::findRelevantRecipient ( const XMPP::Jid &j } -QPtrList<JabberBaseContact> JabberContactPool::findRelevantSources ( const XMPP::Jid &jid ) +TQPtrList<JabberBaseContact> JabberContactPool::findRelevantSources ( const XMPP::Jid &jid ) { - QPtrList<JabberBaseContact> list; + TQPtrList<JabberBaseContact> list; for(JabberContactPoolItem *mContactItem = mPool.first (); mContactItem; mContactItem = mPool.next ()) { diff --git a/kopete/protocols/jabber/jabbercontactpool.h b/kopete/protocols/jabber/jabbercontactpool.h index 6582f64c..419061fd 100644 --- a/kopete/protocols/jabber/jabbercontactpool.h +++ b/kopete/protocols/jabber/jabbercontactpool.h @@ -18,7 +18,7 @@ #ifndef JABBERCONTACTPOOL_H #define JABBERCONTACTPOOL_H -#include <qobject.h> +#include <tqobject.h> #include <im.h> namespace Kopete { class MetaContact; } @@ -92,7 +92,7 @@ public: * Find relevant sources for a given JID. * This will match user@domain/resource for a given user@domain. */ - QPtrList<JabberBaseContact> findRelevantSources ( const XMPP::Jid &jid ); + TQPtrList<JabberBaseContact> findRelevantSources ( const XMPP::Jid &jid ); private slots: void slotContactDestroyed ( Kopete::Contact *contact ); @@ -100,7 +100,7 @@ private slots: private: JabberContactPoolItem *findPoolItem ( const XMPP::RosterItem &contact ); - QPtrList<JabberContactPoolItem> mPool; + TQPtrList<JabberContactPoolItem> mPool; JabberAccount *mAccount; }; diff --git a/kopete/protocols/jabber/jabberfiletransfer.cpp b/kopete/protocols/jabber/jabberfiletransfer.cpp index fde5b105..00d8be18 100644 --- a/kopete/protocols/jabber/jabberfiletransfer.cpp +++ b/kopete/protocols/jabber/jabberfiletransfer.cpp @@ -35,7 +35,7 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, XMPP::FileTransfer *incomingTransfer ) { - kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "New incoming transfer from " << incomingTransfer->peer().full () << ", filename " << incomingTransfer->fileName () << ", size " << QString::number ( incomingTransfer->fileSize () ) << endl; + kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "New incoming transfer from " << incomingTransfer->peer().full () << ", filename " << incomingTransfer->fileName () << ", size " << TQString::number ( incomingTransfer->fileSize () ) << endl; mAccount = account; mXMPPTransfer = incomingTransfer; @@ -62,10 +62,10 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, XMPP::FileTrans Kopete::ContactList::self ()->addMetaContact ( metaContact ); } - connect ( Kopete::TransferManager::transferManager (), SIGNAL ( accepted ( Kopete::Transfer *, const QString & ) ), - this, SLOT ( slotIncomingTransferAccepted ( Kopete::Transfer *, const QString & ) ) ); - connect ( Kopete::TransferManager::transferManager (), SIGNAL ( refused ( const Kopete::FileTransferInfo & ) ), - this, SLOT ( slotTransferRefused ( const Kopete::FileTransferInfo & ) ) ); + connect ( Kopete::TransferManager::transferManager (), TQT_SIGNAL ( accepted ( Kopete::Transfer *, const TQString & ) ), + this, TQT_SLOT ( slotIncomingTransferAccepted ( Kopete::Transfer *, const TQString & ) ) ); + connect ( Kopete::TransferManager::transferManager (), TQT_SIGNAL ( refused ( const Kopete::FileTransferInfo & ) ), + this, TQT_SLOT ( slotTransferRefused ( const Kopete::FileTransferInfo & ) ) ); initializeVariables (); @@ -76,7 +76,7 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, XMPP::FileTrans } -JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const QString &file ) +JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const TQString &file ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "New outgoing transfer for " << contact->contactId() << ": " << file << endl; @@ -90,15 +90,15 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, JabberBaseConta contact->contactId (), Kopete::FileTransferInfo::Outgoing ); - connect ( mKopeteTransfer, SIGNAL ( result ( KIO::Job * ) ), this, SLOT ( slotTransferResult () ) ); + connect ( mKopeteTransfer, TQT_SIGNAL ( result ( KIO::Job * ) ), this, TQT_SLOT ( slotTransferResult () ) ); mXMPPTransfer = mAccount->client()->fileTransferManager()->createTransfer (); initializeVariables (); - connect ( mXMPPTransfer, SIGNAL ( connected () ), this, SLOT ( slotOutgoingConnected () ) ); - connect ( mXMPPTransfer, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotOutgoingBytesWritten ( int ) ) ); - connect ( mXMPPTransfer, SIGNAL ( error ( int ) ), this, SLOT ( slotTransferError ( int ) ) ); + connect ( mXMPPTransfer, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotOutgoingConnected () ) ); + connect ( mXMPPTransfer, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotOutgoingBytesWritten ( int ) ) ); + connect ( mXMPPTransfer, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotTransferError ( int ) ) ); mXMPPTransfer->sendFile ( XMPP::Jid ( contact->fullAddress () ), KURL(file).fileName (), mLocalFile.size (), "" ); @@ -125,7 +125,7 @@ void JabberFileTransfer::initializeVariables () } -void JabberFileTransfer::slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const QString &fileName ) +void JabberFileTransfer::slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const TQString &fileName ) { if ( (long)transfer->info().transferId () != mTransferId ) @@ -188,9 +188,9 @@ void JabberFileTransfer::slotIncomingTransferAccepted ( Kopete::Transfer *transf } else { - connect ( mKopeteTransfer, SIGNAL ( result ( KIO::Job * ) ), this, SLOT ( slotTransferResult () ) ); - connect ( mXMPPTransfer, SIGNAL ( readyRead ( const QByteArray& ) ), this, SLOT ( slotIncomingDataReady ( const QByteArray & ) ) ); - connect ( mXMPPTransfer, SIGNAL ( error ( int ) ), this, SLOT ( slotTransferError ( int ) ) ); + connect ( mKopeteTransfer, TQT_SIGNAL ( result ( KIO::Job * ) ), this, TQT_SLOT ( slotTransferResult () ) ); + connect ( mXMPPTransfer, TQT_SIGNAL ( readyRead ( const TQByteArray& ) ), this, TQT_SLOT ( slotIncomingDataReady ( const TQByteArray & ) ) ); + connect ( mXMPPTransfer, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotTransferError ( int ) ) ); mXMPPTransfer->accept ( offset, length ); } @@ -260,7 +260,7 @@ void JabberFileTransfer::slotTransferError ( int errorCode ) } -void JabberFileTransfer::slotIncomingDataReady ( const QByteArray &data ) +void JabberFileTransfer::slotIncomingDataReady ( const TQByteArray &data ) { mBytesTransferred += data.size (); @@ -306,7 +306,7 @@ void JabberFileTransfer::slotOutgoingBytesWritten ( int nrWritten ) { int nrToWrite = mXMPPTransfer->dataSizeNeeded (); - QByteArray readBuffer ( nrToWrite ); + TQByteArray readBuffer ( nrToWrite ); mLocalFile.readBlock ( readBuffer.data (), nrToWrite ); diff --git a/kopete/protocols/jabber/jabberfiletransfer.h b/kopete/protocols/jabber/jabberfiletransfer.h index 01ba99e1..296e38ca 100644 --- a/kopete/protocols/jabber/jabberfiletransfer.h +++ b/kopete/protocols/jabber/jabberfiletransfer.h @@ -18,7 +18,7 @@ #ifndef JABBERFILETRANSFER_H #define JABBERFILETRANSFER_H -#include <qobject.h> +#include <tqobject.h> #include <filetransfer.h> class QString; @@ -41,12 +41,12 @@ public: /** * Constructor for an outgoing transfer */ - JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const QString &file ); + JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const TQString &file ); ~JabberFileTransfer (); private slots: - void slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const QString &fileName ); + void slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const TQString &fileName ); void slotTransferRefused ( const Kopete::FileTransferInfo &transfer ); void slotTransferResult (); void slotTransferError ( int errorCode ); @@ -54,7 +54,7 @@ private slots: void slotOutgoingConnected (); void slotOutgoingBytesWritten ( int nrWritten ); - void slotIncomingDataReady ( const QByteArray &data ); + void slotIncomingDataReady ( const TQByteArray &data ); private: void initializeVariables (); @@ -62,7 +62,7 @@ private: JabberAccount *mAccount; XMPP::FileTransfer *mXMPPTransfer; Kopete::Transfer *mKopeteTransfer; - QFile mLocalFile; + TQFile mLocalFile; int mTransferId; Q_LLONG mBytesTransferred; Q_LLONG mBytesToTransfer; diff --git a/kopete/protocols/jabber/jabberformlineedit.cpp b/kopete/protocols/jabber/jabberformlineedit.cpp index 04187b20..991d4a56 100644 --- a/kopete/protocols/jabber/jabberformlineedit.cpp +++ b/kopete/protocols/jabber/jabberformlineedit.cpp @@ -17,7 +17,7 @@ #include "jabberformlineedit.h" -JabberFormLineEdit::JabberFormLineEdit (const int type, const QString & realName, const QString & value, QWidget * parent, const char *name):QLineEdit (value, +JabberFormLineEdit::JabberFormLineEdit (const int type, const TQString & realName, const TQString & value, TQWidget * parent, const char *name):TQLineEdit (value, parent, name) { @@ -38,7 +38,7 @@ JabberFormLineEdit::~JabberFormLineEdit () { } -JabberFormPasswordEdit::JabberFormPasswordEdit (const int type, const QString & realName, const QString & value, QWidget * parent, const char *name):KPasswordEdit(parent, name) +JabberFormPasswordEdit::JabberFormPasswordEdit (const int type, const TQString & realName, const TQString & value, TQWidget * parent, const char *name):KPasswordEdit(parent, name) { setText(value); diff --git a/kopete/protocols/jabber/jabberformlineedit.h b/kopete/protocols/jabber/jabberformlineedit.h index 770bab39..179a8844 100644 --- a/kopete/protocols/jabber/jabberformlineedit.h +++ b/kopete/protocols/jabber/jabberformlineedit.h @@ -18,8 +18,8 @@ #ifndef JABBERFORMLINEEDIT_H #define JABBERFORMLINEEDIT_H -#include <qwidget.h> -#include <qlineedit.h> +#include <tqwidget.h> +#include <tqlineedit.h> #include <kpassdlg.h> #include "xmpp_tasks.h" @@ -32,14 +32,14 @@ class JabberFormLineEdit:public QLineEdit { Q_OBJECT public: - JabberFormLineEdit (const int type, const QString & realName, const QString & value, QWidget * parent = 0, const char *name = 0); + JabberFormLineEdit (const int type, const TQString & realName, const TQString & value, TQWidget * parent = 0, const char *name = 0); ~JabberFormLineEdit (); public slots:void slotGatherData (XMPP::Form & form); private: int fieldType; - QString fieldName; + TQString fieldName; }; @@ -47,13 +47,13 @@ class JabberFormPasswordEdit:public KPasswordEdit { Q_OBJECT public: - JabberFormPasswordEdit(const int type, const QString & realName, const QString & value, QWidget * parent = 0, const char *name = 0); + JabberFormPasswordEdit(const int type, const TQString & realName, const TQString & value, TQWidget * parent = 0, const char *name = 0); public slots:void slotGatherData (XMPP::Form & form); private: int fieldType; - QString fieldName; + TQString fieldName; }; #endif diff --git a/kopete/protocols/jabber/jabberformtranslator.cpp b/kopete/protocols/jabber/jabberformtranslator.cpp index fe6ec230..3344f802 100644 --- a/kopete/protocols/jabber/jabberformtranslator.cpp +++ b/kopete/protocols/jabber/jabberformtranslator.cpp @@ -15,14 +15,14 @@ * ************************************************************************* */ -#include <qlabel.h> +#include <tqlabel.h> #include <kdebug.h> #include "jabberformlineedit.h" #include "jabberformtranslator.h" -JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * parent, const char *name):QWidget (parent, name) +JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, TQWidget * parent, const char *name):TQWidget (parent, name) { /* Copy basic form values. */ privForm.setJid (form.jid ()); @@ -32,16 +32,16 @@ JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * p emptyForm = privForm; /* Add instructions to layout. */ - QVBoxLayout *innerLayout = new QVBoxLayout (this, 0, 4); + TQVBoxLayout *innerLayout = new TQVBoxLayout (this, 0, 4); - QLabel *label = new QLabel (form.instructions (), this, "InstructionLabel"); - label->setAlignment (int (QLabel::WordBreak | QLabel::AlignVCenter)); - label->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Fixed, true); + TQLabel *label = new TQLabel (form.instructions (), this, "InstructionLabel"); + label->setAlignment (int (TQLabel::WordBreak | TQLabel::AlignVCenter)); + label->setSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Fixed, true); label->show (); innerLayout->addWidget (label, 0); - QGridLayout *formLayout = new QGridLayout (innerLayout, form.count (), 2); + TQGridLayout *formLayout = new TQGridLayout (innerLayout, form.count (), 2); int row = 1; XMPP::Form::const_iterator formEnd = form.end (); @@ -50,11 +50,11 @@ JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * p kdDebug (14130) << "[JabberFormTranslator] Adding field realName()==" << (*it).realName () << ", fieldName()==" << (*it).fieldName () << " to the dialog" << endl; - label = new QLabel ((*it).fieldName (), this, (*it).fieldName ().latin1 ()); + label = new TQLabel ((*it).fieldName (), this, (*it).fieldName ().latin1 ()); formLayout->addWidget (label, row, 0); label->show (); - QLineEdit *edit; + TQLineEdit *edit; if ((*it).type() == XMPP::FormField::password) { edit = new JabberFormPasswordEdit((*it).type (), (*it).realName (), (*it).value (), this); @@ -67,7 +67,7 @@ JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * p formLayout->addWidget (edit, row, 1); edit->show (); - connect (this, SIGNAL (gatherData (XMPP::Form &)), edit, SLOT (slotGatherData (XMPP::Form &))); + connect (this, TQT_SIGNAL (gatherData (XMPP::Form &)), edit, TQT_SLOT (slotGatherData (XMPP::Form &))); } innerLayout->addStretch (); diff --git a/kopete/protocols/jabber/jabberformtranslator.h b/kopete/protocols/jabber/jabberformtranslator.h index d9cf4044..875594df 100644 --- a/kopete/protocols/jabber/jabberformtranslator.h +++ b/kopete/protocols/jabber/jabberformtranslator.h @@ -18,8 +18,8 @@ #ifndef JABBERFORMTRANSLATOR_H #define JABBERFORMTRANSLATOR_H -#include <qwidget.h> -#include <qlayout.h> +#include <tqwidget.h> +#include <tqlayout.h> #include "xmpp_tasks.h" @@ -33,7 +33,7 @@ class JabberFormTranslator:public QWidget Q_OBJECT public: - JabberFormTranslator (const XMPP::Form & form, QWidget * parent = 0, const char *name = 0); + JabberFormTranslator (const XMPP::Form & form, TQWidget * parent = 0, const char *name = 0); ~JabberFormTranslator (); XMPP::Form & resultData (); diff --git a/kopete/protocols/jabber/jabbergroupchatmanager.cpp b/kopete/protocols/jabber/jabbergroupchatmanager.cpp index 7686ba8c..e098fdad 100644 --- a/kopete/protocols/jabber/jabbergroupchatmanager.cpp +++ b/kopete/protocols/jabber/jabbergroupchatmanager.cpp @@ -17,7 +17,7 @@ #include "jabbergroupchatmanager.h" -#include <qptrlist.h> +#include <tqptrlist.h> #include <kdebug.h> #include <klocale.h> #include "kopetechatsessionmanager.h" @@ -40,8 +40,8 @@ JabberGroupChatManager::JabberGroupChatManager ( JabberProtocol *protocol, const // make sure Kopete knows about this instance Kopete::ChatSessionManager::self()->registerChatSession ( this ); - connect ( this, SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), - this, SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); + connect ( this, TQT_SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), + this, TQT_SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); updateDisplayName (); } @@ -102,10 +102,10 @@ void JabberGroupChatManager::slotMessageSent ( Kopete::Message &message, Kopete: // please don't translate the following string jabberMessage.setBody ( i18n ( "This message is encrypted." ) ); - QString encryptedBody = message.plainBody (); + TQString encryptedBody = message.plainBody (); // remove PGP header and footer from message - encryptedBody.truncate ( encryptedBody.length () - QString("-----END PGP MESSAGE-----").length () - 2 ); + encryptedBody.truncate ( encryptedBody.length () - TQString("-----END PGP MESSAGE-----").length () - 2 ); encryptedBody = encryptedBody.right ( encryptedBody.length () - encryptedBody.find ( "\n\n" ) - 2 ); // assign payload to message @@ -135,7 +135,7 @@ void JabberGroupChatManager::slotMessageSent ( Kopete::Message &message, Kopete: } } -void JabberGroupChatManager::inviteContact( const QString & contactId ) +void JabberGroupChatManager::inviteContact( const TQString & contactId ) { if( account()->isConnected () ) { diff --git a/kopete/protocols/jabber/jabbergroupchatmanager.h b/kopete/protocols/jabber/jabbergroupchatmanager.h index 96c689d0..98fda47a 100644 --- a/kopete/protocols/jabber/jabbergroupchatmanager.h +++ b/kopete/protocols/jabber/jabbergroupchatmanager.h @@ -61,7 +61,7 @@ public: * reimplemented from Kopete::ChatSession * called when a contact is droped in the window */ - virtual void inviteContact(const QString &contactId); + virtual void inviteContact(const TQString &contactId); private slots: void slotMessageSent ( Kopete::Message &message, Kopete::ChatSession *kmm ); diff --git a/kopete/protocols/jabber/jabbergroupcontact.cpp b/kopete/protocols/jabber/jabbergroupcontact.cpp index 83d69ab9..4cc9d628 100644 --- a/kopete/protocols/jabber/jabbergroupcontact.cpp +++ b/kopete/protocols/jabber/jabbergroupcontact.cpp @@ -58,10 +58,10 @@ JabberGroupContact::JabberGroupContact (const XMPP::RosterItem &rosterItem, Jabb mManager = new JabberGroupChatManager ( protocol (), mSelfContact, Kopete::ContactPtrList (), XMPP::Jid ( rosterItem.jid().userHost () ) ); - connect ( mManager, SIGNAL ( closing ( Kopete::ChatSession* ) ), this, SLOT ( slotChatSessionDeleted () ) ); + connect ( mManager, TQT_SIGNAL ( closing ( Kopete::ChatSession* ) ), this, TQT_SLOT ( slotChatSessionDeleted () ) ); - connect ( account->myself() , SIGNAL(onlineStatusChanged( Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ) , - this , SLOT(slotStatusChanged() ) ) ; + connect ( account->myself() , TQT_SIGNAL(onlineStatusChanged( Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ) , + this , TQT_SLOT(slotStatusChanged() ) ) ; /** * FIXME: The first contact in the list of the message manager @@ -109,11 +109,11 @@ JabberGroupContact::~JabberGroupContact () } } -QPtrList<KAction> *JabberGroupContact::customContextMenuActions () +TQPtrList<KAction> *JabberGroupContact::customContextMenuActions () { - QPtrList<KAction> *actionCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>(); - KAction *actionSetNick = new KAction (i18n ("Change nick name"), 0, 0, this, SLOT (slotChangeNick()), this, "jabber_changenick"); + KAction *actionSetNick = new KAction (i18n ("Change nick name"), 0, 0, this, TQT_SLOT (slotChangeNick()), this, "jabber_changenick"); actionCollection->append( actionSetNick ); return actionCollection; @@ -129,7 +129,7 @@ Kopete::ChatSession *JabberGroupContact::manager ( Kopete::Contact::CanCreateFla mManager->addContact ( this ); - connect ( mManager, SIGNAL ( closing ( Kopete::ChatSession* ) ), this, SLOT ( slotChatSessionDeleted () ) ); + connect ( mManager, TQT_SIGNAL ( closing ( Kopete::ChatSession* ) ), this, TQT_SLOT ( slotChatSessionDeleted () ) ); //if we have to recreate the manager, we probably have to connect again to the chat. slotStatusChanged(); @@ -141,7 +141,7 @@ Kopete::ChatSession *JabberGroupContact::manager ( Kopete::Contact::CanCreateFla void JabberGroupContact::handleIncomingMessage (const XMPP::Message & message) { // message type is always chat in a groupchat - QString viewType = "kopete_chatwindow"; + TQString viewType = "kopete_chatwindow"; Kopete::Message *newMessage = 0L; kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received a message" << endl; @@ -168,11 +168,11 @@ void JabberGroupContact::handleIncomingMessage (const XMPP::Message & message) else { // retrieve and reformat body - QString body = message.body (); + TQString body = message.body (); if( !message.xencrypted().isEmpty () ) { - body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n"); + body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n"); } // locate the originating contact @@ -238,7 +238,7 @@ JabberBaseContact *JabberGroupContact::addSubContact ( const XMPP::RosterItem &r // now, add the contact also to our own list mContactList.append ( subContact ); - connect(subContact , SIGNAL(contactDestroyed(Kopete::Contact*)) , this , SLOT(slotSubContactDestroyed(Kopete::Contact*))); + connect(subContact , TQT_SIGNAL(contactDestroyed(Kopete::Contact*)) , this , TQT_SLOT(slotSubContactDestroyed(Kopete::Contact*))); return subContact; @@ -290,17 +290,17 @@ void JabberGroupContact::removeSubContact ( const XMPP::RosterItem &rosterItem ) } -void JabberGroupContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ ) +void JabberGroupContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ ) { - QString filePath; + TQString filePath; // if the file location is null, then get it from a file open dialog if ( !sourceURL.isValid () ) - filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) ); + filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) ); else filePath = sourceURL.path(-1); - QFile file ( filePath ); + TQFile file ( filePath ); if ( file.exists () ) { @@ -329,7 +329,7 @@ void JabberGroupContact::slotStatusChanged( ) if( !account()->isConnected() ) { //we need to remove all contact, because when we connect again, we will not receive the notificaion they are gone. - QPtrList<Kopete::Contact> copy_contactlist=mContactList; + TQPtrList<Kopete::Contact> copy_contactlist=mContactList; for ( Kopete::Contact *contact = copy_contactlist.first (); contact; contact = copy_contactlist.next () ) { removeSubContact( XMPP::Jid(contact->contactId()) ); @@ -353,7 +353,7 @@ void JabberGroupContact::slotChangeNick( ) { bool ok; - QString futureNewNickName = KInputDialog::getText( i18n( "Change nickanme - Jabber Plugin" ), + TQString futureNewNickName = KInputDialog::getText( i18n( "Change nickanme - Jabber Plugin" ), i18n( "Please enter the new nick name you want to have on the room <i>%1</i>" ).arg(rosterItem().jid().userHost()), mNick, &ok ); if ( !ok || !account()->isConnected()) diff --git a/kopete/protocols/jabber/jabbergroupcontact.h b/kopete/protocols/jabber/jabbergroupcontact.h index c157b823..7cbd4f36 100644 --- a/kopete/protocols/jabber/jabbergroupcontact.h +++ b/kopete/protocols/jabber/jabbergroupcontact.h @@ -39,7 +39,7 @@ public: * Create custom context menu items for the contact * FIXME: implement manager version here? */ - QPtrList<KAction> *customContextMenuActions (); + TQPtrList<KAction> *customContextMenuActions (); /** * Deal with an incoming message for this contact. @@ -70,7 +70,7 @@ public slots: * a nondeterminate file size (such as over a socket) */ virtual void sendFile( const KURL &sourceURL = KURL(), - const QString &fileName = QString::null, uint fileSize = 0L ); + const TQString &fileName = TQString::null, uint fileSize = 0L ); private slots: @@ -96,12 +96,12 @@ private slots: private: - QPtrList<Kopete::Contact> mContactList; - QPtrList<Kopete::MetaContact> mMetaContactList; + TQPtrList<Kopete::Contact> mContactList; + TQPtrList<Kopete::MetaContact> mMetaContactList; JabberGroupChatManager *mManager; JabberBaseContact *mSelfContact; - QString mNick; + TQString mNick; }; #endif diff --git a/kopete/protocols/jabber/jabbergroupmembercontact.cpp b/kopete/protocols/jabber/jabbergroupmembercontact.cpp index 2e86b898..ca71b472 100644 --- a/kopete/protocols/jabber/jabbergroupmembercontact.cpp +++ b/kopete/protocols/jabber/jabbergroupmembercontact.cpp @@ -56,7 +56,7 @@ JabberGroupMemberContact::~JabberGroupMemberContact () } } -QPtrList<KAction> *JabberGroupMemberContact::customContextMenuActions () +TQPtrList<KAction> *JabberGroupMemberContact::customContextMenuActions () { return 0; @@ -80,7 +80,7 @@ Kopete::ChatSession *JabberGroupMemberContact::manager ( Kopete::Contact::CanCre * the global myself() instance for a correct representation. */ mManager = new JabberChatSession ( protocol(), static_cast<JabberBaseContact *>(account()->myself()), chatMembers ); - connect ( mManager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted () ) ); + connect ( mManager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted () ) ); return mManager; @@ -96,7 +96,7 @@ void JabberGroupMemberContact::slotChatSessionDeleted () void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &message ) { // message type is always chat in a groupchat - QString viewType = "kopete_chatwindow"; + TQString viewType = "kopete_chatwindow"; Kopete::Message *newMessage = 0L; kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received Message Type:" << message.type () << endl; @@ -124,11 +124,11 @@ void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &mess else { // retrieve and reformat body - QString body = message.body (); + TQString body = message.body (); if( !message.xencrypted().isEmpty () ) { - body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n"); + body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n"); } // convert XMPP::Message into Kopete::Message @@ -144,17 +144,17 @@ void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &mess } -void JabberGroupMemberContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ ) +void JabberGroupMemberContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ ) { - QString filePath; + TQString filePath; // if the file location is null, then get it from a file open dialog if ( !sourceURL.isValid () ) - filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) ); + filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) ); else filePath = sourceURL.path(-1); - QFile file ( filePath ); + TQFile file ( filePath ); if ( file.exists () ) { diff --git a/kopete/protocols/jabber/jabbergroupmembercontact.h b/kopete/protocols/jabber/jabbergroupmembercontact.h index d4ec5b06..2936a5f8 100644 --- a/kopete/protocols/jabber/jabbergroupmembercontact.h +++ b/kopete/protocols/jabber/jabbergroupmembercontact.h @@ -40,7 +40,7 @@ public: * Create custom context menu items for the contact * FIXME: implement manager version here? */ - QPtrList<KAction> *customContextMenuActions (); + TQPtrList<KAction> *customContextMenuActions (); /** * Return message manager for this instance. @@ -64,7 +64,7 @@ public slots: * a nondeterminate file size (such as over a socket) */ virtual void sendFile( const KURL &sourceURL = KURL(), - const QString &fileName = QString::null, uint fileSize = 0L ); + const TQString &fileName = TQString::null, uint fileSize = 0L ); private slots: /** diff --git a/kopete/protocols/jabber/jabberprotocol.cpp b/kopete/protocols/jabber/jabberprotocol.cpp index ea2e8039..df8dba7d 100644 --- a/kopete/protocols/jabber/jabberprotocol.cpp +++ b/kopete/protocols/jabber/jabberprotocol.cpp @@ -26,12 +26,12 @@ #include <kstandarddirs.h> #include <klineeditdlg.h> -#include <qapplication.h> -#include <qcursor.h> -#include <qmap.h> -#include <qtimer.h> -#include <qpixmap.h> -#include <qstringlist.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqmap.h> +#include <tqtimer.h> +#include <tqpixmap.h> +#include <tqstringlist.h> #include "im.h" #include "xmpp.h" @@ -69,14 +69,14 @@ typedef KGenericFactory<JabberProtocol> JabberProtocolFactory; K_EXPORT_COMPONENT_FACTORY( kopete_jabber, JabberProtocolFactory( "kopete_jabber" ) ) -JabberProtocol::JabberProtocol (QObject * parent, const char *name, const QStringList &) +JabberProtocol::JabberProtocol (TQObject * parent, const char *name, const TQStringList &) : Kopete::Protocol( JabberProtocolFactory::instance(), parent, name ), JabberKOSChatty(Kopete::OnlineStatus::Online, 100, this, JabberFreeForChat, "jabber_chatty", i18n ("Free for Chat"), i18n ("Free for Chat"), Kopete::OnlineStatusManager::FreeForChat, Kopete::OnlineStatusManager::HasAwayMessage ), - JabberKOSOnline(Kopete::OnlineStatus::Online, 90, this, JabberOnline, QString::null, i18n ("Online"), i18n ("Online"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ), + JabberKOSOnline(Kopete::OnlineStatus::Online, 90, this, JabberOnline, TQString::null, i18n ("Online"), i18n ("Online"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ), JabberKOSAway(Kopete::OnlineStatus::Away, 80, this, JabberAway, "contact_away_overlay", i18n ("Away"), i18n ("Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage), JabberKOSXA(Kopete::OnlineStatus::Away, 70, this, JabberXA, "contact_xa_overlay", i18n ("Extended Away"), i18n ("Extended Away"), 0, Kopete::OnlineStatusManager::HasAwayMessage), JabberKOSDND(Kopete::OnlineStatus::Away, 60, this, JabberDND, "contact_busy_overlay", i18n ("Do not Disturb"), i18n ("Do not Disturb"), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage), - JabberKOSOffline(Kopete::OnlineStatus::Offline, 50, this, JabberOffline, QString::null, i18n ("Offline") ,i18n ("Offline"), Kopete::OnlineStatusManager::Offline, Kopete::OnlineStatusManager::HasAwayMessage ), + JabberKOSOffline(Kopete::OnlineStatus::Offline, 50, this, JabberOffline, TQString::null, i18n ("Offline") ,i18n ("Offline"), Kopete::OnlineStatusManager::Offline, Kopete::OnlineStatusManager::HasAwayMessage ), JabberKOSInvisible(Kopete::OnlineStatus::Invisible, 40, this, JabberInvisible, "contact_invisible_overlay", i18n ("Invisible") ,i18n ("Invisible"), Kopete::OnlineStatusManager::Invisible), JabberKOSConnecting(Kopete::OnlineStatus::Connecting, 30, this, JabberConnecting, "jabber_connecting", i18n("Connecting")), propLastSeen(Kopete::Global::Properties::self()->lastSeen()), @@ -90,34 +90,34 @@ JabberProtocol::JabberProtocol (QObject * parent, const char *name, const QStrin propWorkPhone(Kopete::Global::Properties::self()->workPhone()), propWorkMobilePhone(Kopete::Global::Properties::self()->workMobilePhone()), propNickName(Kopete::Global::Properties::self()->nickName()), - propSubscriptionStatus("jabberSubscriptionStatus", i18n ("Subscription"), QString::null, true, false), - propAuthorizationStatus("jabberAuthorizationStatus", i18n ("Authorization Status"), QString::null, true, false), + propSubscriptionStatus("jabberSubscriptionStatus", i18n ("Subscription"), TQString::null, true, false), + propAuthorizationStatus("jabberAuthorizationStatus", i18n ("Authorization Status"), TQString::null, true, false), propAvailableResources("jabberAvailableResources", i18n ("Available Resources"), "jabber_chatty", false, true), - propVCardCacheTimeStamp("jabberVCardCacheTimeStamp", i18n ("vCard Cache Timestamp"), QString::null, true, false, true), + propVCardCacheTimeStamp("jabberVCardCacheTimeStamp", i18n ("vCard Cache Timestamp"), TQString::null, true, false, true), propPhoto(Kopete::Global::Properties::self()->photo()), - propJid("jabberVCardJid", i18n("Jabber ID"), QString::null, true, false), - propBirthday("jabberVCardBirthday", i18n("Birthday"), QString::null, true, false), - propTimezone("jabberVCardTimezone", i18n("Timezone"), QString::null, true, false), - propHomepage("jabberVCardHomepage", i18n("Homepage"), QString::null, true, false), - propCompanyName("jabberVCardCompanyName", i18n("Company name"), QString::null, true, false), - propCompanyDepartement("jabberVCardCompanyDepartement", i18n("Company Departement"), QString::null, true, false), - propCompanyPosition("jabberVCardCompanyPosition", i18n("Company Position"), QString::null, true, false), - propCompanyRole("jabberVCardCompanyRole", i18n("Company Role"), QString::null, true, false), - propWorkStreet("jabberVCardWorkStreet", i18n("Work Street"), QString::null, true, false), - propWorkExtAddr("jabberVCardWorkExtAddr", i18n("Work Extra Address"), QString::null, true, false), - propWorkPOBox("jabberVCardWorkPOBox", i18n("Work PO Box"), QString::null, true, false), - propWorkCity("jabberVCardWorkCity", i18n("Work City"), QString::null, true, false), - propWorkPostalCode("jabberVCardWorkPostalCode", i18n("Work Postal Code"), QString::null, true, false), - propWorkCountry("jabberVCardWorkCountry", i18n("Work Country"), QString::null, true, false), - propWorkEmailAddress("jabberVCardWorkEmailAddress", i18n("Work Email Address"), QString::null, true, false), - propHomeStreet("jabberVCardHomeStreet", i18n("Home Street"), QString::null, true, false), - propHomeExtAddr("jabberVCardHomeExt", i18n("Home Extra Address"), QString::null, true, false), - propHomePOBox("jabberVCardHomePOBox", i18n("Home PO Box"), QString::null, true, false), - propHomeCity("jabberVCardHomeCity", i18n("Home City"), QString::null, true, false), - propHomePostalCode("jabberVCardHomePostalCode", i18n("Home Postal Code"), QString::null, true, false), - propHomeCountry("jabberVCardHomeCountry", i18n("Home Country"), QString::null, true, false), - propPhoneFax("jabberVCardPhoneFax", i18n("Fax"), QString::null, true, false), - propAbout("jabberVCardAbout", i18n("About"), QString::null, true, false) + propJid("jabberVCardJid", i18n("Jabber ID"), TQString::null, true, false), + propBirthday("jabberVCardBirthday", i18n("Birthday"), TQString::null, true, false), + propTimezone("jabberVCardTimezone", i18n("Timezone"), TQString::null, true, false), + propHomepage("jabberVCardHomepage", i18n("Homepage"), TQString::null, true, false), + propCompanyName("jabberVCardCompanyName", i18n("Company name"), TQString::null, true, false), + propCompanyDepartement("jabberVCardCompanyDepartement", i18n("Company Departement"), TQString::null, true, false), + propCompanyPosition("jabberVCardCompanyPosition", i18n("Company Position"), TQString::null, true, false), + propCompanyRole("jabberVCardCompanyRole", i18n("Company Role"), TQString::null, true, false), + propWorkStreet("jabberVCardWorkStreet", i18n("Work Street"), TQString::null, true, false), + propWorkExtAddr("jabberVCardWorkExtAddr", i18n("Work Extra Address"), TQString::null, true, false), + propWorkPOBox("jabberVCardWorkPOBox", i18n("Work PO Box"), TQString::null, true, false), + propWorkCity("jabberVCardWorkCity", i18n("Work City"), TQString::null, true, false), + propWorkPostalCode("jabberVCardWorkPostalCode", i18n("Work Postal Code"), TQString::null, true, false), + propWorkCountry("jabberVCardWorkCountry", i18n("Work Country"), TQString::null, true, false), + propWorkEmailAddress("jabberVCardWorkEmailAddress", i18n("Work Email Address"), TQString::null, true, false), + propHomeStreet("jabberVCardHomeStreet", i18n("Home Street"), TQString::null, true, false), + propHomeExtAddr("jabberVCardHomeExt", i18n("Home Extra Address"), TQString::null, true, false), + propHomePOBox("jabberVCardHomePOBox", i18n("Home PO Box"), TQString::null, true, false), + propHomeCity("jabberVCardHomeCity", i18n("Home City"), TQString::null, true, false), + propHomePostalCode("jabberVCardHomePostalCode", i18n("Home Postal Code"), TQString::null, true, false), + propHomeCountry("jabberVCardHomeCountry", i18n("Home Country"), TQString::null, true, false), + propPhoneFax("jabberVCardPhoneFax", i18n("Fax"), TQString::null, true, false), + propAbout("jabberVCardAbout", i18n("About"), TQString::null, true, false) { @@ -155,13 +155,13 @@ JabberProtocol::~JabberProtocol () -AddContactPage *JabberProtocol::createAddContactWidget (QWidget * parent, Kopete::Account * i) +AddContactPage *JabberProtocol::createAddContactWidget (TQWidget * parent, Kopete::Account * i) { kdDebug (JABBER_DEBUG_GLOBAL) << "[Jabber Protocol] Create Add Contact Widget\n" << endl; return new JabberAddContactPage (i, parent); } -KopeteEditAccountWidget *JabberProtocol::createEditAccountWidget (Kopete::Account * account, QWidget * parent) +KopeteEditAccountWidget *JabberProtocol::createEditAccountWidget (Kopete::Account * account, TQWidget * parent) { kdDebug (JABBER_DEBUG_GLOBAL) << "[Jabber Protocol] Edit Account Widget\n" << endl; JabberAccount *ja=dynamic_cast < JabberAccount * >(account); @@ -179,7 +179,7 @@ KopeteEditAccountWidget *JabberProtocol::createEditAccountWidget (Kopete::Accoun } } -Kopete::Account *JabberProtocol::createNewAccount (const QString & accountId) +Kopete::Account *JabberProtocol::createNewAccount (const TQString & accountId) { kdDebug (JABBER_DEBUG_GLOBAL) << "[Jabber Protocol] Create New Account. ID: " << accountId << "\n" << endl; if( Kopete::AccountManager::self()->findAccount( pluginId() , accountId ) ) @@ -188,7 +188,7 @@ Kopete::Account *JabberProtocol::createNewAccount (const QString & accountId) int slash=accountId.find('/'); if(slash>=0) { - QString realAccountId=accountId.left(slash); + TQString realAccountId=accountId.left(slash); JabberAccount *realAccount=dynamic_cast<JabberAccount*>(Kopete::AccountManager::self()->findAccount( pluginId() , realAccountId )); if(!realAccount) //if it doesn't exist yet, create it { @@ -278,16 +278,16 @@ JabberProtocol *JabberProtocol::protocol () } Kopete::Contact *JabberProtocol::deserializeContact (Kopete::MetaContact * metaContact, - const QMap < QString, QString > &serializedData, const QMap < QString, QString > & /* addressBookData */ ) + const TQMap < TQString, TQString > &serializedData, const TQMap < TQString, TQString > & /* addressBookData */ ) { // kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Deserializing data for metacontact " << metaContact->displayName () << "\n" << endl; - QString contactId = serializedData["contactId"]; - QString displayName = serializedData["displayName"]; - QString accountId = serializedData["accountId"]; - QString jid = serializedData["JID"]; + TQString contactId = serializedData["contactId"]; + TQString displayName = serializedData["displayName"]; + TQString accountId = serializedData["accountId"]; + TQString jid = serializedData["JID"]; - QDict < Kopete::Account > accounts = Kopete::AccountManager::self ()->accounts (this); + TQDict < Kopete::Account > accounts = Kopete::AccountManager::self ()->accounts (this); Kopete::Account *account = accounts[accountId]; if (!account) @@ -304,7 +304,7 @@ Kopete::Contact *JabberProtocol::deserializeContact (Kopete::MetaContact * metaC return account->contacts()[contactId]; } -XMPP::Status JabberProtocol::kosToStatus( const Kopete::OnlineStatus & status , const QString & message ) +XMPP::Status JabberProtocol::kosToStatus( const Kopete::OnlineStatus & status , const TQString & message ) { XMPP::Status xmppStatus ( "", message ); diff --git a/kopete/protocols/jabber/jabberprotocol.h b/kopete/protocols/jabber/jabberprotocol.h index 798aafb4..35c8cdbc 100644 --- a/kopete/protocols/jabber/jabberprotocol.h +++ b/kopete/protocols/jabber/jabberprotocol.h @@ -19,11 +19,11 @@ #ifndef JABBERPROTOCOL_H #define JABBERPROTOCOL_H -#include <qstring.h> -#include <qstringlist.h> -#include <qmap.h> -#include <qpixmap.h> -#include <qmovie.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqmap.h> +#include <tqpixmap.h> +#include <tqmovie.h> #include <kaction.h> #include <kpopupmenu.h> @@ -55,21 +55,21 @@ public: /** * Object constructor and destructor */ - JabberProtocol (QObject * parent, const char *name, const QStringList &); + JabberProtocol (TQObject * parent, const char *name, const TQStringList &); ~JabberProtocol (); /** * Creates the "add contact" dialog specific to this protocol */ - virtual AddContactPage *createAddContactWidget (QWidget * parent, Kopete::Account * i); - virtual KopeteEditAccountWidget *createEditAccountWidget (Kopete::Account * account, QWidget * parent); - virtual Kopete::Account *createNewAccount (const QString & accountId); + virtual AddContactPage *createAddContactWidget (TQWidget * parent, Kopete::Account * i); + virtual KopeteEditAccountWidget *createEditAccountWidget (Kopete::Account * account, TQWidget * parent); + virtual Kopete::Account *createNewAccount (const TQString & accountId); /** * Deserialize contact data */ virtual Kopete::Contact *deserializeContact (Kopete::MetaContact * metaContact, - const QMap < QString, QString > &serializedData, const QMap < QString, QString > &addressBookData); + const TQMap < TQString, TQString > &serializedData, const TQMap < TQString, TQString > &addressBookData); enum OnlineStatus { JabberOnline, JabberFreeForChat, JabberAway, JabberXA, JabberDND, JabberOffline, JabberInvisible, JabberConnecting }; @@ -142,7 +142,7 @@ public: /** * Convert an online status to a XMPP::Status */ - XMPP::Status kosToStatus( const Kopete::OnlineStatus & status, const QString& message=QString() ); + XMPP::Status kosToStatus( const Kopete::OnlineStatus & status, const TQString& message=TQString() ); /** * Return the Entity Capabilities(JEP-0115) manager instance. diff --git a/kopete/protocols/jabber/jabberresource.cpp b/kopete/protocols/jabber/jabberresource.cpp index e74a0fa9..04b7d9f3 100644 --- a/kopete/protocols/jabber/jabberresource.cpp +++ b/kopete/protocols/jabber/jabberresource.cpp @@ -19,7 +19,7 @@ #include "jabberresource.h" // Qt includes -#include <qtimer.h> +#include <tqtimer.h> // KDE includes #include <kdebug.h> @@ -47,7 +47,7 @@ public: XMPP::Jid jid; XMPP::Resource resource; - QString clientName, clientSystem; + TQString clientName, clientSystem; XMPP::Features supportedFeatures; bool capsEnabled; }; @@ -59,10 +59,10 @@ JabberResource::JabberResource ( JabberAccount *account, const XMPP::Jid &jid, c if ( account->isConnected () ) { - QTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedClientVersion () ) ); + TQTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedClientVersion () ) ); if(!d->capsEnabled) { - QTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetDiscoCapabilties () ) ); + TQTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetDiscoCapabilties () ) ); } } } @@ -92,12 +92,12 @@ void JabberResource::setResource ( const XMPP::Resource &resource ) emit updated( this ); } -const QString &JabberResource::clientName () const +const TQString &JabberResource::clientName () const { return d->clientName; } -const QString &JabberResource::clientSystem () const +const TQString &JabberResource::clientSystem () const { return d->clientSystem; } @@ -123,7 +123,7 @@ void JabberResource::slotGetTimedClientVersion () // request client version XMPP::JT_ClientVersion *task = new XMPP::JT_ClientVersion ( d->account->client()->rootTask () ); // signal to ourselves when the vCard data arrived - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotClientVersion () ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotClientVersion () ) ); task->get ( d->jid ); task->go ( true ); } @@ -150,7 +150,7 @@ void JabberResource:: slotGetDiscoCapabilties () XMPP:: JT_DiscoInfo *task = new XMPP::JT_DiscoInfo ( d->account->client()->rootTask () ); // Retrive features when service discovery is done. - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT (slotGotDiscoCapabilities () ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT (slotGotDiscoCapabilities () ) ); task->get ( d->jid); task->go ( true ); } diff --git a/kopete/protocols/jabber/jabberresource.h b/kopete/protocols/jabber/jabberresource.h index 7b398c09..b29129be 100644 --- a/kopete/protocols/jabber/jabberresource.h +++ b/kopete/protocols/jabber/jabberresource.h @@ -23,8 +23,8 @@ * Container class for a contact's resource */ -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class JabberAccount; @@ -55,12 +55,12 @@ public: * Return the client name for this resource. * @return the client name */ - const QString &clientName () const; + const TQString &clientName () const; /** * Return the client system for this resource. * @return the client system. */ - const QString &clientSystem () const; + const TQString &clientSystem () const; /** * Get the available features for this resource. diff --git a/kopete/protocols/jabber/jabberresourcepool.cpp b/kopete/protocols/jabber/jabberresourcepool.cpp index 9d953ce6..19492790 100644 --- a/kopete/protocols/jabber/jabberresourcepool.cpp +++ b/kopete/protocols/jabber/jabberresourcepool.cpp @@ -16,7 +16,7 @@ * ************************************************************************* */ -#include <qptrlist.h> +#include <tqptrlist.h> #include <kdebug.h> #include "jabberresourcepool.h" @@ -44,8 +44,8 @@ public: pool.setAutoDelete(true); } - QPtrList<JabberResource> pool; - QPtrList<JabberResource> lockList; + TQPtrList<JabberResource> pool; + TQPtrList<JabberResource> lockList; /** * Pointer to the JabberAccount instance. @@ -62,7 +62,7 @@ JabberResourcePool::~JabberResourcePool () delete d; } -void JabberResourcePool::slotResourceDestroyed (QObject *sender) +void JabberResourcePool::slotResourceDestroyed (TQObject *sender) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Resource has been destroyed, collecting the pieces." << endl; @@ -74,7 +74,7 @@ void JabberResourcePool::slotResourceDestroyed (QObject *sender) void JabberResourcePool::slotResourceUpdated ( JabberResource *resource ) { - QPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( resource->jid () ); + TQPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( resource->jid () ); for(JabberBaseContact *mContact = list.first (); mContact; mContact = list.next ()) { @@ -91,7 +91,7 @@ void JabberResourcePool::slotResourceUpdated ( JabberResource *resource ) void JabberResourcePool::notifyRelevantContacts ( const XMPP::Jid &jid ) { - QPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( jid ); + TQPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( jid ); for(JabberBaseContact *mContact = list.first (); mContact; mContact = list.next ()) { @@ -133,8 +133,8 @@ void JabberResourcePool::addResource ( const XMPP::Jid &jid, const XMPP::Resourc // create new resource instance and add it to the dictionary JabberResource *newResource = new JabberResource(d->account, jid, resource); - connect ( newResource, SIGNAL ( destroyed (QObject *) ), this, SLOT ( slotResourceDestroyed (QObject *) ) ); - connect ( newResource, SIGNAL ( updated (JabberResource *) ), this, SLOT ( slotResourceUpdated (JabberResource *) ) ); + connect ( newResource, TQT_SIGNAL ( destroyed (TQObject *) ), this, TQT_SLOT ( slotResourceDestroyed (TQObject *) ) ); + connect ( newResource, TQT_SIGNAL ( updated (JabberResource *) ), this, TQT_SLOT ( slotResourceUpdated (JabberResource *) ) ); d->pool.append ( newResource ); // send notifications out to the relevant contacts that @@ -189,7 +189,7 @@ void JabberResourcePool::clear () * and then notify all JIDs after the resources have been deleted. */ - QStringList jidList; + TQStringList jidList; for ( JabberResource *mResource = d->pool.first (); mResource; mResource = d->pool.next () ) { @@ -206,7 +206,7 @@ void JabberResourcePool::clear () * Now go through the list of JIDs and notify each contact * of its status change */ - for ( QStringList::Iterator it = jidList.begin (); it != jidList.end (); ++it ) + for ( TQStringList::Iterator it = jidList.begin (); it != jidList.end (); ++it ) { notifyRelevantContacts ( XMPP::Jid ( *it ) ); } diff --git a/kopete/protocols/jabber/jabberresourcepool.h b/kopete/protocols/jabber/jabberresourcepool.h index a6cefcde..7378cbe0 100644 --- a/kopete/protocols/jabber/jabberresourcepool.h +++ b/kopete/protocols/jabber/jabberresourcepool.h @@ -19,7 +19,7 @@ #ifndef JABBERRESOURCEPOOL_H #define JABBERRESOURCEPOOL_H -#include <qobject.h> +#include <tqobject.h> #include <im.h> class JabberResource; @@ -35,7 +35,7 @@ class JabberResourcePool : public QObject public: static XMPP::Resource EmptyResource; - typedef QPtrList<JabberResource> ResourceList; + typedef TQPtrList<JabberResource> ResourceList; /** * Default constructor @@ -118,7 +118,7 @@ public: void findResources ( const XMPP::Jid &jid, XMPP::ResourceList &resourceList ); private slots: - void slotResourceDestroyed ( QObject *sender ); + void slotResourceDestroyed ( TQObject *sender ); void slotResourceUpdated ( JabberResource *resource ); private: diff --git a/kopete/protocols/jabber/jabbertransport.cpp b/kopete/protocols/jabber/jabbertransport.cpp index e7a8e7d3..26d16b28 100644 --- a/kopete/protocols/jabber/jabbertransport.cpp +++ b/kopete/protocols/jabber/jabbertransport.cpp @@ -29,8 +29,8 @@ #include <kopeteversion.h> -#include <qpixmap.h> -#include <qtimer.h> +#include <tqpixmap.h> +#include <tqtimer.h> #include <kaction.h> #include <kdebug.h> #include <klocale.h> @@ -38,7 +38,7 @@ #include "xmpp_tasks.h" -JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem & item, const QString& gateway_type) +JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem & item, const TQString& gateway_type) : Kopete::Account ( parentAccount->protocol(), parentAccount->accountId()+"/"+ item.jid().bare() ) { m_status=Creating; @@ -53,7 +53,7 @@ JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::Ros setColor( account()->color() ); #if KOPETE_IS_VERSION(0,11,51) //setCustomIcon is new in kopete 0.12 - QString cIcon; + TQString cIcon; if(gateway_type=="msn") cIcon="jabber_gateway_msn"; else if(gateway_type=="icq") @@ -83,18 +83,18 @@ JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::Ros configGroup()->writeEntry("GatewayJID" , item.jid().full() ); - QTimer::singleShot(0, this, SLOT(eatContacts())); + TQTimer::singleShot(0, this, TQT_SLOT(eatContacts())); m_status=Normal; } -JabberTransport::JabberTransport( JabberAccount * parentAccount, const QString & _accountId ) +JabberTransport::JabberTransport( JabberAccount * parentAccount, const TQString & _accountId ) : Kopete::Account ( parentAccount->protocol(), _accountId ) { m_status=Creating; m_account = parentAccount; - const QString contactJID_s = configGroup()->readEntry("GatewayJID"); + const TQString contactJID_s = configGroup()->readEntry("GatewayJID"); if(contactJID_s.isEmpty()) { @@ -124,13 +124,13 @@ JabberTransport::~JabberTransport () KActionMenu *JabberTransport::actionMenu () { KActionMenu *menu = new KActionMenu( accountId(), myself()->onlineStatus().iconFor( this ), this ); - QString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); menu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), nick.isNull() ? accountLabel() : i18n( "%2 <%1>" ).arg( accountLabel(), nick ) ); - QPtrList<KAction> *customActions = myself()->customContextMenuActions( ); + TQPtrList<KAction> *customActions = myself()->customContextMenuActions( ); if( customActions && !customActions->isEmpty() ) { menu->popupMenu()->insertSeparator(); @@ -147,28 +147,28 @@ KActionMenu *JabberTransport::actionMenu () m_actionMenu->popupMenu()->insertSeparator(); m_actionMenu->insert(new KAction (i18n ("Join Groupchat..."), "jabber_group", 0, - this, SLOT (slotJoinNewChat ()), this, "actionJoinChat")); + this, TQT_SLOT (slotJoinNewChat ()), this, "actionJoinChat")); m_actionMenu->popupMenu()->insertSeparator(); m_actionMenu->insert ( new KAction ( i18n ("Services..."), "jabber_serv_on", 0, - this, SLOT ( slotGetServices () ), this, "actionJabberServices") ); + this, TQT_SLOT ( slotGetServices () ), this, "actionJabberServices") ); m_actionMenu->insert ( new KAction ( i18n ("Send Raw Packet to Server..."), "mail_new", 0, - this, SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ); + this, TQT_SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ); m_actionMenu->insert ( new KAction ( i18n ("Edit User Info..."), "identity", 0, - this, SLOT ( slotEditVCard () ), this, "actionEditVCard") ); + this, TQT_SLOT ( slotEditVCard () ), this, "actionEditVCard") ); return m_actionMenu;*/ } -bool JabberTransport::createContact (const QString & contactId, Kopete::MetaContact * metaContact) +bool JabberTransport::createContact (const TQString & contactId, Kopete::MetaContact * metaContact) { #if 0 //TODO // collect all group names - QStringList groupNames; + TQStringList groupNames; Kopete::GroupList groupList = metaContact->groups(); for(Kopete::Group *group = groupList.first(); group; group = groupList.next()) groupNames += group->displayName(); @@ -188,7 +188,7 @@ bool JabberTransport::createContact (const QString & contactId, Kopete::MetaCon } -void JabberTransport::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason) +void JabberTransport::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason) { #if 0 if( status.status() == Kopete::OnlineStatus::Offline ) @@ -263,7 +263,7 @@ bool JabberTransport::removeAccount( ) m_status = Removing; XMPP::JT_Register *task = new XMPP::JT_Register ( m_account->client()->rootTask () ); - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( removeAllContacts() ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( removeAllContacts() ) ); //JabberContact *my=static_cast<JabberContact*>(myself()); task->unreg ( myself()->contactId() ); @@ -282,7 +282,7 @@ void JabberTransport::removeAllContacts( ) */ //we don't really care, we remove everithing anyway. kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "delete all contacts of the transport"<< endl; - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for( ; it.current(); ++it ) { XMPP::JT_Roster * rosterTask = new XMPP::JT_Roster ( account()->client()->rootTask () ); @@ -293,11 +293,11 @@ void JabberTransport::removeAllContacts( ) Kopete::AccountManager::self()->removeAccount( this ); //this will delete this } -QString JabberTransport::legacyId( const XMPP::Jid & jid ) +TQString JabberTransport::legacyId( const XMPP::Jid & jid ) { if(jid.node().isEmpty()) - return QString(); - QString node = jid.node(); + return TQString(); + TQString node = jid.node(); return node.replace("%","@"); } @@ -319,8 +319,8 @@ void JabberTransport::eatContacts( ) * - Olivier 2006-01-17 - */ kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << endl; - QDict<Kopete::Contact> cts=account()->contacts(); - QDictIterator<Kopete::Contact> it( cts ); + TQDict<Kopete::Contact> cts=account()->contacts(); + TQDictIterator<Kopete::Contact> it( cts ); for( ; it.current(); ++it ) { JabberContact *contact=dynamic_cast<JabberContact*>(it.current()); diff --git a/kopete/protocols/jabber/jabbertransport.h b/kopete/protocols/jabber/jabbertransport.h index b26fd9c0..605f5cc4 100644 --- a/kopete/protocols/jabber/jabbertransport.h +++ b/kopete/protocols/jabber/jabbertransport.h @@ -48,14 +48,14 @@ public: * @param item is the roster item of the gateway * @param gateway_type eg: "msn" or "icq" only used when the account is not loaded from config file for determining the icon */ - JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem &item, const QString& gateway_type=QString()); + JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem &item, const TQString& gateway_type=TQString()); /** * constructor called when the transport is loaded from config * @param parentAccount is the parent jabber account. * @param accountId is the accountId */ - JabberTransport (JabberAccount * parentAccount, const QString &accountId ); + JabberTransport (JabberAccount * parentAccount, const TQString &accountId ); ~JabberTransport (); @@ -86,12 +86,12 @@ public: * return the legacyId conrresponding to the jid * example: jhon%msn.com@msn.foojabber.org -> jhon@msn.com */ - QString legacyId( const XMPP::Jid &jid ); + TQString legacyId( const XMPP::Jid &jid ); public slots: /* Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); /** * the account has been unregistered. @@ -127,7 +127,7 @@ protected: * @param contactId The unique ID for this protocol * @param parentContact The metacontact to add this contact to */ - virtual bool createContact (const QString & contactID, Kopete::MetaContact * parentContact); + virtual bool createContact (const TQString & contactID, Kopete::MetaContact * parentContact); private: JabberAccount *m_account; diff --git a/kopete/protocols/jabber/jingle/jinglesession.cpp b/kopete/protocols/jabber/jingle/jinglesession.cpp index 6c370fca..9bebb3b8 100644 --- a/kopete/protocols/jabber/jingle/jinglesession.cpp +++ b/kopete/protocols/jabber/jingle/jinglesession.cpp @@ -34,7 +34,7 @@ public: }; JingleSession::JingleSession(JabberAccount *account, const JidList &peers) - : QObject(account, 0), d(new Private(account, peers)) + : TQObject(account, 0), d(new Private(account, peers)) { d->myself = account->client()->jid(); } @@ -64,7 +64,7 @@ JabberAccount *JingleSession::account() return d->account; } -void JingleSession::sendStanza(const QString &stanza) +void JingleSession::sendStanza(const TQString &stanza) { account()->client()->send( stanza ); } diff --git a/kopete/protocols/jabber/jingle/jinglesession.h b/kopete/protocols/jabber/jingle/jinglesession.h index 00c192bd..a9d73440 100644 --- a/kopete/protocols/jabber/jingle/jinglesession.h +++ b/kopete/protocols/jabber/jingle/jinglesession.h @@ -17,11 +17,11 @@ #ifndef JINGLESESSION_H #define JINGLESESSION_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include <xmpp.h> // XMPP::Jid -#include <qvaluelist.h> +#include <tqvaluelist.h> class JabberAccount; /** @@ -33,7 +33,7 @@ class JingleSession : public QObject { Q_OBJECT public: - typedef QValueList<XMPP::Jid> JidList; + typedef TQValueList<XMPP::Jid> JidList; JingleSession(JabberAccount *account, const JidList &peers); virtual ~JingleSession(); @@ -52,7 +52,7 @@ public: * Note that you must return the XML namespace that define * the session: ex:(http://jabber.org/protocol/jingle/sessions/audio) */ - virtual QString sessionType() = 0; + virtual TQString sessionType() = 0; public slots: /** @@ -74,7 +74,7 @@ public slots: virtual void terminate() = 0; protected slots: - void sendStanza(const QString &stanza); + void sendStanza(const TQString &stanza); signals: /** diff --git a/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp b/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp index aeec2889..54fc7274 100644 --- a/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp +++ b/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp @@ -90,7 +90,7 @@ public: } JabberAccount *account; - QValueList<JingleSession*> sessionList; + TQValueList<JingleSession*> sessionList; JingleWatchSessionTask *watchSessionTask; cricket::NetworkManager *networkManager; @@ -101,18 +101,18 @@ public: //END JingleSessionManager::Private JingleSessionManager::JingleSessionManager(JabberAccount *account) - : QObject(account, 0), d(new Private(account)) + : TQObject(account, 0), d(new Private(account)) { // Create slots proxy for libjingle slotsProxy = new SlotsProxy(this); // Create watch incoming session task. d->watchSessionTask = new JingleWatchSessionTask(account->client()->rootTask()); - connect(d->watchSessionTask, SIGNAL(watchSession(const QString &, const QString &)), this, SLOT(slotIncomingSession(const QString &, const QString &))); + connect(d->watchSessionTask, TQT_SIGNAL(watchSession(const TQString &, const TQString &)), this, TQT_SLOT(slotIncomingSession(const TQString &, const TQString &))); // Create global cricket variables common to all sessions. // Seed random generation with the JID of the account. - QString accountJid = account->client()->jid().full(); + TQString accountJid = account->client()->jid().full(); cricket::InitRandom( accountJid.ascii(), accountJid.length() ); // Create the libjingle NetworkManager that manager local network connections @@ -137,7 +137,7 @@ JingleSessionManager::~JingleSessionManager() kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << endl; kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Cleaning up Jingle sessions." << endl; - QValueList<JingleSession*>::Iterator it, itEnd = d->sessionList.end(); + TQValueList<JingleSession*>::Iterator it, itEnd = d->sessionList.end(); for(it = d->sessionList.begin(); it != itEnd; ++it) { JingleSession *deletedSession = *it; @@ -162,7 +162,7 @@ JabberAccount *JingleSessionManager::account() return d->account; } -JingleSession *JingleSessionManager::createSession(const QString &sessionType, const JidList &peers) +JingleSession *JingleSessionManager::createSession(const TQString &sessionType, const JidList &peers) { JingleSession *newSession = 0L; @@ -178,7 +178,7 @@ JingleSession *JingleSessionManager::createSession(const QString &sessionType, c return newSession; } -JingleSession *JingleSessionManager::createSession(const QString &sessionType, const XMPP::Jid &user) +JingleSession *JingleSessionManager::createSession(const TQString &sessionType, const XMPP::Jid &user) { JingleSessionManager::JidList jidList; jidList.append(user); @@ -194,7 +194,7 @@ void JingleSessionManager::removeSession(JingleSession *session) delete session; } -void JingleSessionManager::slotIncomingSession(const QString &sessionType, const QString &initiator) +void JingleSessionManager::slotIncomingSession(const TQString &sessionType, const TQString &initiator) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Incoming session: " << sessionType << ". Initiator: " << initiator << endl; diff --git a/kopete/protocols/jabber/jingle/jinglesessionmanager.h b/kopete/protocols/jabber/jingle/jinglesessionmanager.h index 06951c2f..f9bb82b9 100644 --- a/kopete/protocols/jabber/jingle/jinglesessionmanager.h +++ b/kopete/protocols/jabber/jingle/jinglesessionmanager.h @@ -20,8 +20,8 @@ #include <xmpp.h> #include <im.h> -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> namespace cricket { @@ -40,7 +40,7 @@ class JingleSessionManager : public QObject { Q_OBJECT public: - typedef QValueList<XMPP::Jid> JidList; + typedef TQValueList<XMPP::Jid> JidList; JingleSessionManager(JabberAccount *account); ~JingleSessionManager(); @@ -61,22 +61,22 @@ public slots: * @param sessionType the session you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio) * @param peers Lists of participants of the session. */ - JingleSession *createSession(const QString &sessionType, const JidList &peers); + JingleSession *createSession(const TQString &sessionType, const JidList &peers); /** * Override method that create a session for a one-to-one session. * It behave like createSession method. * @param sessionType the sesion you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio) * @param user The JID of the user you want to begin a session with. */ - JingleSession *createSession(const QString &sessionType, const XMPP::Jid &user); + JingleSession *createSession(const TQString &sessionType, const XMPP::Jid &user); void removeSession(JingleSession *session); signals: - void incomingSession(const QString &sessionType, JingleSession *session); + void incomingSession(const TQString &sessionType, JingleSession *session); private slots: - void slotIncomingSession(const QString &sessionType, const QString &initiator); + void slotIncomingSession(const TQString &sessionType, const TQString &initiator); private: class Private; diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp index 3ad6a89a..dd809cea 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp @@ -20,8 +20,8 @@ -#include <qstring.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqdom.h> @@ -47,7 +47,7 @@ public: JingleIQResponder(XMPP::Task *); ~JingleIQResponder(); - bool take(const QDomElement &); + bool take(const TQDomElement &); }; /** @@ -63,14 +63,14 @@ JingleIQResponder::~JingleIQResponder() { } -bool JingleIQResponder::take(const QDomElement &e) +bool JingleIQResponder::take(const TQDomElement &e) { if(e.tagName() != "iq") return false; - QDomElement first = e.firstChild().toElement(); + TQDomElement first = e.firstChild().toElement(); if (!first.isNull() && first.attribute("xmlns") == JINGLE_NS) { - QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id")); + TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id")); send(iq); return true; } @@ -114,7 +114,7 @@ void JingleClientSlots::callDestroyed(cricket::Call *call) qDebug("JingleClientSlots: Call destroyed"); Jid jid(call->sessions()[0]->remote_address().c_str()); if (voiceCaller_->calling(jid)) { - qDebug(QString("Removing unterminated call to %1").arg(jid.full())); + qDebug(TQString("Removing unterminated call to %1").arg(jid.full())); voiceCaller_->removeCall(jid); emit voiceCaller_->terminated(jid); } @@ -122,7 +122,7 @@ void JingleClientSlots::callDestroyed(cricket::Call *call) void JingleClientSlots::sendStanza(cricket::SessionClient*, const buzz::XmlElement *stanza) { - QString st(stanza->Str().c_str()); + TQString st(stanza->Str().c_str()); st.replace("cli:iq","iq"); st.replace(":cli=","="); fprintf(stderr,"bling\n"); @@ -138,7 +138,7 @@ void JingleClientSlots::requestSignaling() void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *session, cricket::Session::State state) { - qDebug(QString("jinglevoicecaller.cpp: State changed (%1)").arg(state)); + qDebug(TQString("jinglevoicecaller.cpp: State changed (%1)").arg(state)); // Why is c_str() stuff needed to make it compile on OS X ? Jid jid(session->remote_address().c_str()); @@ -156,7 +156,7 @@ void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *sess } else if (state == cricket::Session::STATE_SENTMODIFY) { } else if (state == cricket::Session::STATE_RECEIVEDMODIFY) { - qWarning(QString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full())); + qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full())); } else if (state == cricket::Session::STATE_SENTREJECT) { } else if (state == cricket::Session::STATE_RECEIVEDREJECT) { @@ -194,8 +194,8 @@ void JingleVoiceCaller::initialize() if (initialized_) return; - QString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full(); - qDebug(QString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid)); + TQString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full(); + qDebug(TQString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid)); if (jid.isEmpty()) { qWarning("jinglevoicecaller.cpp: Empty JID"); return; @@ -233,7 +233,7 @@ void JingleVoiceCaller::initialize() new JingleIQResponder(account()->client()->rootTask()); // Listen to incoming packets - connect(account()->client()->client(),SIGNAL(xmlIncoming(const QString&)),SLOT(receiveStanza(const QString&))); + connect(account()->client()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),TQT_SLOT(receiveStanza(const TQString&))); initialized_ = true; } @@ -245,7 +245,7 @@ void JingleVoiceCaller::deinitialize() return; // Stop listening to incoming packets - disconnect(account()->client(),SIGNAL(xmlIncoming(const QString&)),this,SLOT(receiveStanza(const QString&))); + disconnect(account()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),this,TQT_SLOT(receiveStanza(const TQString&))); // Disconnect signals (is this needed) //phone_client_->SignalCallCreate.disconnect(slots_); @@ -271,7 +271,7 @@ bool JingleVoiceCaller::calling(const Jid& jid) void JingleVoiceCaller::call(const Jid& jid) { - qDebug(QString("jinglevoicecaller.cpp: Calling %1").arg(jid.full())); + qDebug(TQString("jinglevoicecaller.cpp: Calling %1").arg(jid.full())); cricket::Call *c = ((cricket::PhoneSessionClient*)(phone_client_))->CreateCall(); c->InitiateSession(buzz::Jid(jid.full().ascii())); phone_client_->SetFocus(c); @@ -299,7 +299,7 @@ void JingleVoiceCaller::reject(const Jid& j) void JingleVoiceCaller::terminate(const Jid& j) { - qDebug(QString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full())); + qDebug(TQString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full())); cricket::Call* call = calls_[j.full()]; if (call != NULL) { call->Terminate(); @@ -309,7 +309,7 @@ void JingleVoiceCaller::terminate(const Jid& j) void JingleVoiceCaller::sendStanza(const char* stanza) { - account()->client()->send(QString(stanza)); + account()->client()->send(TQString(stanza)); } void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call) @@ -327,19 +327,19 @@ void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call) void JingleVoiceCaller::removeCall(const Jid& j) { - qDebug(QString("JingleVoiceCaller: Removing call to %1").arg(j.full())); + qDebug(TQString("JingleVoiceCaller: Removing call to %1").arg(j.full())); calls_.remove(j.full()); } -void JingleVoiceCaller::receiveStanza(const QString& stanza) +void JingleVoiceCaller::receiveStanza(const TQString& stanza) { - QDomDocument doc; + TQDomDocument doc; doc.setContent(stanza); // Check if it is offline presence from an open chat if (doc.documentElement().tagName() == "presence") { Jid from = Jid(doc.documentElement().attribute("from")); - QString type = doc.documentElement().attribute("type"); + TQString type = doc.documentElement().attribute("type"); if (type == "unavailable" && calls_.contains(from.full())) { qDebug("JingleVoiceCaller: User went offline without closing a call."); removeCall(from); @@ -351,10 +351,10 @@ void JingleVoiceCaller::receiveStanza(const QString& stanza) // Check if the packet is destined for libjingle. // We could use Session::IsClientStanza to check this, but this one crashes // for some reason. - QDomNode n = doc.documentElement().firstChild(); + TQDomNode n = doc.documentElement().firstChild(); bool ok = false; while (!n.isNull() && !ok) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if (!e.isNull() && e.attribute("xmlns") == JINGLE_NS) { ok = true; } @@ -363,7 +363,7 @@ void JingleVoiceCaller::receiveStanza(const QString& stanza) // Spread the word if (ok) { - qDebug(QString("jinglevoicecaller.cpp: Handing down %1").arg(stanza)); + qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").arg(stanza)); buzz::XmlElement *e = buzz::XmlElement::ForStr(stanza.ascii()); phone_client_->OnIncomingStanza(e); } diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.h b/kopete/protocols/jabber/jingle/jinglevoicecaller.h index 4448d530..50070289 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicecaller.h +++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.h @@ -3,7 +3,7 @@ #ifndef JINGLEVOICECALLER_H #define JINGLEVOICECALLER_H -#include <qmap.h> +#include <tqmap.h> #include "im.h" #include "voicecaller.h" @@ -54,7 +54,7 @@ protected: void removeCall(const Jid&); protected slots: - void receiveStanza(const QString&); + void receiveStanza(const TQString&); private: bool initialized_; @@ -66,7 +66,7 @@ private: cricket::SessionManager *session_manager_; cricket::PhoneSessionClient *phone_client_; JingleClientSlots *slots_; - QMap<QString,cricket::Call*> calls_; + TQMap<TQString,cricket::Call*> calls_; }; #endif diff --git a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp index 09019ce4..91fa1a77 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp @@ -39,7 +39,7 @@ #include "jinglesessionmanager.h" // Qt includes -#include <qdom.h> +#include <tqdom.h> // KDE includes #include <kdebug.h> @@ -115,7 +115,7 @@ public: {} else if (state == cricket::Session::STATE_RECEIVEDMODIFY) { - //qWarning(QString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full())); + //qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full())); } else if (state == cricket::Session::STATE_SENTREJECT) {} @@ -141,7 +141,7 @@ public: void OnSendingStanza(cricket::SessionClient*, const buzz::XmlElement *buzzStanza) { - QString irisStanza(buzzStanza->Str().c_str()); + TQString irisStanza(buzzStanza->Str().c_str()); irisStanza.replace("cli:iq","iq"); irisStanza.replace(":cli=","="); @@ -159,7 +159,7 @@ public: JingleIQResponder(XMPP::Task *); ~JingleIQResponder(); - bool take(const QDomElement &); + bool take(const TQDomElement &); }; /** @@ -175,14 +175,14 @@ JingleVoiceSession::JingleIQResponder::~JingleIQResponder() { } -bool JingleVoiceSession::JingleIQResponder::take(const QDomElement &e) +bool JingleVoiceSession::JingleIQResponder::take(const TQDomElement &e) { if(e.tagName() != "iq") return false; - QDomElement first = e.firstChild().toElement(); + TQDomElement first = e.firstChild().toElement(); if (!first.isNull() && first.attribute("xmlns") == JINGLE_NS) { - QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id")); + TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id")); send(iq); return true; } @@ -224,7 +224,7 @@ JingleVoiceSession::JingleVoiceSession(JabberAccount *account, const JidList &pe d->phoneSessionClient->SignalCallCreate.connect(slotsProxy, &JingleVoiceSession::SlotsProxy::OnCallCreated); // Listen to incoming packets - connect(account->client()->client(), SIGNAL(xmlIncoming(const QString&)), this, SLOT(receiveStanza(const QString&))); + connect(account->client()->client(), TQT_SIGNAL(xmlIncoming(const TQString&)), this, TQT_SLOT(receiveStanza(const TQString&))); new JingleIQResponder(account->client()->rootTask()); } @@ -236,9 +236,9 @@ JingleVoiceSession::~JingleVoiceSession() delete d; } -QString JingleVoiceSession::sessionType() +TQString JingleVoiceSession::sessionType() { - return QString(JINGLE_VOICE_SESSION_NS); + return TQString(JINGLE_VOICE_SESSION_NS); } void JingleVoiceSession::start() @@ -246,7 +246,7 @@ void JingleVoiceSession::start() kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Starting a voice session..." << endl; d->currentCall = d->phoneSessionClient->CreateCall(); - QString firstPeerJid = ((XMPP::Jid)peers().first()).full(); + TQString firstPeerJid = ((XMPP::Jid)peers().first()).full(); kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "With peer: " << firstPeerJid << endl; d->currentCall->InitiateSession( buzz::Jid(firstPeerJid.ascii()) ); @@ -287,16 +287,16 @@ void JingleVoiceSession::setCall(cricket::Call *call) d->phoneSessionClient->SetFocus(d->currentCall); } -void JingleVoiceSession::receiveStanza(const QString &stanza) +void JingleVoiceSession::receiveStanza(const TQString &stanza) { - QDomDocument doc; + TQDomDocument doc; doc.setContent(stanza); // Check if it is offline presence from an open chat if( doc.documentElement().tagName() == "presence" ) { XMPP::Jid from = XMPP::Jid(doc.documentElement().attribute("from")); - QString type = doc.documentElement().attribute("type"); + TQString type = doc.documentElement().attribute("type"); if( type == "unavailable" && hasPeer(peers(), from) ) { //qDebug("JingleVoiceCaller: User went offline without closing a call."); @@ -309,11 +309,11 @@ void JingleVoiceSession::receiveStanza(const QString &stanza) // Check if the packet is destined for libjingle. // We could use Session::IsClientStanza to check this, but this one crashes // for some reason. - QDomNode node = doc.documentElement().firstChild(); + TQDomNode node = doc.documentElement().firstChild(); bool ok = false; while( !node.isNull() && !ok ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() && element.attribute("xmlns") == JINGLE_NS) { ok = true; diff --git a/kopete/protocols/jabber/jingle/jinglevoicesession.h b/kopete/protocols/jabber/jingle/jinglevoicesession.h index e70d3b54..2769d351 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesession.h +++ b/kopete/protocols/jabber/jingle/jinglevoicesession.h @@ -20,7 +20,7 @@ #include <jinglesession.h> #include <xmpp.h> // XMPP::Jid -#include <qvaluelist.h> +#include <tqvaluelist.h> namespace cricket { @@ -39,12 +39,12 @@ class JingleVoiceSession : public JingleSession { Q_OBJECT public: - typedef QValueList<XMPP::Jid> JidList; + typedef TQValueList<XMPP::Jid> JidList; JingleVoiceSession(JabberAccount *account, const JidList &peers); virtual ~JingleVoiceSession(); - virtual QString sessionType(); + virtual TQString sessionType(); public slots: virtual void accept(); @@ -53,7 +53,7 @@ public slots: virtual void terminate(); protected slots: - void receiveStanza(const QString &stanza); + void receiveStanza(const TQString &stanza); private: void setCall(cricket::Call *call); diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp index 9fb61274..b017cdfd 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp +++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp @@ -17,9 +17,9 @@ #include "jinglevoicesessiondialog.h" // Qt includes -#include <qlabel.h> -#include <qpixmap.h> -#include <qimage.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqimage.h> // Jingle includes // #include "jinglevoicesession.h" @@ -40,27 +40,27 @@ using namespace XMPP; -JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, QWidget *parent, const char *name) +JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *parent, const char *name) : JingleVoiceSessionDialogBase(parent, name), m_session(caller), m_peerJid(peerJid), m_sessionState(Incoming) { - QString contactJid = m_peerJid.full(); + TQString contactJid = m_peerJid.full(); setCaption( i18n("Voice session with %1").arg(contactJid) ); - connect(buttonAccept, SIGNAL(clicked()), this, SLOT(slotAcceptClicked())); - connect(buttonDecline, SIGNAL(clicked()), this, SLOT(slotDeclineClicked())); - connect(buttonTerminate, SIGNAL(clicked()), this, SLOT(slotTerminateClicked())); + connect(buttonAccept, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAcceptClicked())); + connect(buttonDecline, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeclineClicked())); + connect(buttonTerminate, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTerminateClicked())); // NOTE: Disabled for 0.12 #if 0 - connect(m_session, SIGNAL(sessionStarted()), this, SLOT(sessionStarted())); - connect(m_session, SIGNAL(accepted()), this, SLOT(sessionAccepted())); - connect(m_session, SIGNAL(declined()), this, SLOT(sessionDeclined())); - connect(m_session, SIGNAL(terminated()), this, SLOT(sessionTerminated())); + connect(m_session, TQT_SIGNAL(sessionStarted()), this, TQT_SLOT(sessionStarted())); + connect(m_session, TQT_SIGNAL(accepted()), this, TQT_SLOT(sessionAccepted())); + connect(m_session, TQT_SIGNAL(declined()), this, TQT_SLOT(sessionDeclined())); + connect(m_session, TQT_SIGNAL(terminated()), this, TQT_SLOT(sessionTerminated())); #endif - connect(m_session, SIGNAL(accepted( const Jid & )), this, SLOT( sessionAccepted(const Jid &) )); - connect(m_session, SIGNAL(in_progress( const Jid & )), this, SLOT( sessionStarted(const Jid &) )); - connect(m_session, SIGNAL(rejected( const Jid& )), this, SLOT( sessionDeclined(const Jid &) )); - connect(m_session, SIGNAL(terminated( const Jid& )), this, SLOT( sessionTerminated(const Jid &) )); + connect(m_session, TQT_SIGNAL(accepted( const Jid & )), this, TQT_SLOT( sessionAccepted(const Jid &) )); + connect(m_session, TQT_SIGNAL(in_progress( const Jid & )), this, TQT_SLOT( sessionStarted(const Jid &) )); + connect(m_session, TQT_SIGNAL(rejected( const Jid& )), this, TQT_SLOT( sessionDeclined(const Jid &) )); + connect(m_session, TQT_SIGNAL(terminated( const Jid& )), this, TQT_SLOT( sessionTerminated(const Jid &) )); // Find JabberContact for the peer and fill this dialog with contact information. JabberContact *peerContact = static_cast<JabberContact*>( m_session->account()->contactPool()->findRelevantRecipient( m_peerJid ) ); @@ -84,12 +84,12 @@ void JingleVoiceSessionDialog::setContactInformation(JabberContact *contact) if( contact->metaContact() ) { labelDisplayName->setText( contact->metaContact()->displayName() ); - labelContactPhoto->setPixmap( QPixmap(contact->metaContact()->photo()) ); + labelContactPhoto->setPixmap( TQPixmap(contact->metaContact()->photo()) ); } else { labelDisplayName->setText( contact->nickName() ); - labelDisplayName->setPixmap( QPixmap(contact->property(Kopete::Global::Properties::self()->photo()).value().toString()) ); + labelDisplayName->setPixmap( TQPixmap(contact->property(Kopete::Global::Properties::self()->photo()).value().toString()) ); } } @@ -194,15 +194,15 @@ void JingleVoiceSessionDialog::sessionTerminated(const Jid &jid) void JingleVoiceSessionDialog::reject() { finalize(); - QDialog::reject(); + TQDialog::reject(); } void JingleVoiceSessionDialog::finalize() { - disconnect(m_session, SIGNAL(accepted( const Jid & )), this, SLOT( sessionAccepted(const Jid &) )); - disconnect(m_session, SIGNAL(in_progress( const Jid & )), this, SLOT( sessionStarted(const Jid &) )); - disconnect(m_session, SIGNAL(rejected( const Jid& )), this, SLOT( sessionDeclined(const Jid &) )); - disconnect(m_session, SIGNAL(terminated( const Jid& )), this, SLOT( sessionTerminated(const Jid &) )); + disconnect(m_session, TQT_SIGNAL(accepted( const Jid & )), this, TQT_SLOT( sessionAccepted(const Jid &) )); + disconnect(m_session, TQT_SIGNAL(in_progress( const Jid & )), this, TQT_SLOT( sessionStarted(const Jid &) )); + disconnect(m_session, TQT_SIGNAL(rejected( const Jid& )), this, TQT_SLOT( sessionDeclined(const Jid &) )); + disconnect(m_session, TQT_SIGNAL(terminated( const Jid& )), this, TQT_SLOT( sessionTerminated(const Jid &) )); } #include "jinglevoicesessiondialog.moc" diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h index 29d0c091..1a911bae 100644 --- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h +++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h @@ -33,7 +33,7 @@ class JingleVoiceSessionDialog : public JingleVoiceSessionDialogBase public: enum SessionState { Incoming, Waiting, Accepted, Declined, Started, Terminated }; - JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, QWidget *parent = 0, const char *name = 0); + JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *parent = 0, const char *name = 0); ~JingleVoiceSessionDialog(); public slots: diff --git a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp index fc7de053..571f9ff6 100644 --- a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp +++ b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp @@ -31,30 +31,30 @@ JingleWatchSessionTask::~JingleWatchSessionTask() {} //NOTE: This task watch for pre-JEP session. -bool JingleWatchSessionTask::take(const QDomElement &element) +bool JingleWatchSessionTask::take(const TQDomElement &element) { if(element.tagName() != "iq") return false; - QString sessionType, initiator; + TQString sessionType, initiator; - QDomElement first = element.firstChild().toElement(); + TQDomElement first = element.firstChild().toElement(); if( !first.isNull() && first.attribute("xmlns") == JINGLE_NS && first.tagName() == "session" ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Checking for incoming sesssion." << endl; initiator = first.attribute("initiator"); // Only proceed initiate type Jingle XMPP call. - if( first.attribute("type") != QString::fromUtf8("initiate") ) + if( first.attribute("type") != TQString::fromUtf8("initiate") ) return false; int nodeIndex; - QDomNodeList nodeList = first.childNodes(); + TQDomNodeList nodeList = first.childNodes(); // Do not check first child for(nodeIndex = 0; nodeIndex < nodeList.length(); nodeIndex++) { - QDomElement nodeElement = nodeList.item(nodeIndex).toElement(); + TQDomElement nodeElement = nodeList.item(nodeIndex).toElement(); if(nodeElement.tagName() == "description") { sessionType = nodeElement.attribute("xmlns"); diff --git a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h index 99b76661..09dbdbce 100644 --- a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h +++ b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h @@ -30,10 +30,10 @@ public: JingleWatchSessionTask(XMPP::Task *parent); ~JingleWatchSessionTask(); - bool take(const QDomElement &element); + bool take(const TQDomElement &element); signals: - void watchSession(const QString &sessionType, const QString &initiator); + void watchSession(const TQString &sessionType, const TQString &initiator); }; #endif diff --git a/kopete/protocols/jabber/kioslave/jabberdisco.cpp b/kopete/protocols/jabber/kioslave/jabberdisco.cpp index a6775320..4ceeca09 100644 --- a/kopete/protocols/jabber/kioslave/jabberdisco.cpp +++ b/kopete/protocols/jabber/kioslave/jabberdisco.cpp @@ -22,8 +22,8 @@ #include "jabberdisco.h" #include <stdlib.h> -#include <qcstring.h> -#include <qthread.h> +#include <tqcstring.h> +#include <tqthread.h> #include <kdebug.h> #include <klocale.h> #include <kapplication.h> @@ -32,7 +32,7 @@ #include <xmpp_tasks.h> #include "jabberclient.h" -JabberDiscoProtocol::JabberDiscoProtocol ( const QCString &pool_socket, const QCString &app_socket ) +JabberDiscoProtocol::JabberDiscoProtocol ( const TQCString &pool_socket, const TQCString &app_socket ) : KIO::SlaveBase ( "kio_jabberdisco", pool_socket, app_socket ) { kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << "Slave launched." << endl; @@ -51,13 +51,13 @@ JabberDiscoProtocol::~JabberDiscoProtocol () } -void JabberDiscoProtocol::setHost ( const QString &host, int port, const QString &user, const QString &pass ) +void JabberDiscoProtocol::setHost ( const TQString &host, int port, const TQString &user, const TQString &pass ) { kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << " Host " << host << ", port " << port << ", user " << user << endl; m_host = host; m_port = !port ? 5222 : port; - m_user = QString(user).replace ( "%", "@" ); + m_user = TQString(user).replace ( "%", "@" ); m_password = pass; } @@ -76,14 +76,14 @@ void JabberDiscoProtocol::openConnection () { m_jabberClient = new JabberClient; - QObject::connect ( m_jabberClient, SIGNAL ( csDisconnected () ), this, SLOT ( slotCSDisconnected () ) ); - QObject::connect ( m_jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - QObject::connect ( m_jabberClient, SIGNAL ( error ( JabberClient::ErrorCode ) ), this, SLOT ( slotClientError ( JabberClient::ErrorCode ) ) ); - - QObject::connect ( m_jabberClient, SIGNAL ( debugMessage ( const QString & ) ), - this, SLOT ( slotClientDebugMessage ( const QString & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csDisconnected () ), this, TQT_SLOT ( slotCSDisconnected () ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( error ( JabberClient::ErrorCode ) ), this, TQT_SLOT ( slotClientError ( JabberClient::ErrorCode ) ) ); + + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( debugMessage ( const TQString & ) ), + this, TQT_SLOT ( slotClientDebugMessage ( const TQString & ) ) ); } else { @@ -102,7 +102,7 @@ void JabberDiscoProtocol::openConnection () // allow plaintext password authentication or not? m_jabberClient->setAllowPlainTextPassword ( false ); - switch ( m_jabberClient->connect ( XMPP::Jid ( m_user + QString("/") + "JabberBrowser" ), m_password ) ) + switch ( m_jabberClient->connect ( XMPP::Jid ( m_user + TQString("/") + "JabberBrowser" ), m_password ) ) { case JabberClient::NoTLS: // no SSL support, at the connecting stage this means the problem is client-side @@ -173,7 +173,7 @@ void JabberDiscoProtocol::mimetype ( const KURL &/*url*/ ) } -void JabberDiscoProtocol::slotClientDebugMessage ( const QString &msg ) +void JabberDiscoProtocol::slotClientDebugMessage ( const TQString &msg ) { kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << msg << endl; @@ -228,7 +228,7 @@ void JabberDiscoProtocol::slotConnected () case ListDir: // list a directory kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << "Listing directory..." << endl; discoTask = new XMPP::JT_DiscoItems ( m_jabberClient->rootTask () ); - connect ( discoTask, SIGNAL ( finished () ), this, SLOT ( slotQueryFinished () ) ); + connect ( discoTask, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotQueryFinished () ) ); discoTask->get ( m_host ); discoTask->go ( true ); break; diff --git a/kopete/protocols/jabber/kioslave/jabberdisco.h b/kopete/protocols/jabber/kioslave/jabberdisco.h index f2f6d78d..ef6e75fa 100644 --- a/kopete/protocols/jabber/kioslave/jabberdisco.h +++ b/kopete/protocols/jabber/kioslave/jabberdisco.h @@ -20,9 +20,9 @@ #ifndef _JABBERDISCO_H_ #define _JABBERDISCO_H_ -#include <qobject.h> -#include <qstring.h> -#include <qcstring.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqcstring.h> #include <kurl.h> #include <kio/global.h> @@ -33,16 +33,16 @@ class JabberClient; -class JabberDiscoProtocol : public QObject, public KIO::SlaveBase +class JabberDiscoProtocol : public TQObject, public KIO::SlaveBase { Q_OBJECT public: - JabberDiscoProtocol ( const QCString &pool_socket, const QCString &app_socket ); + JabberDiscoProtocol ( const TQCString &pool_socket, const TQCString &app_socket ); virtual ~JabberDiscoProtocol (); - void setHost ( const QString &host, int port, const QString &user, const QString &pass ); + void setHost ( const TQString &host, int port, const TQString &user, const TQString &pass ); void openConnection (); void closeConnection (); @@ -56,7 +56,7 @@ public: void dispatchLoop (); private slots: - void slotClientDebugMessage ( const QString &msg ); + void slotClientDebugMessage ( const TQString &msg ); void slotHandleTLSWarning ( int validityResult ); void slotClientError ( JabberClient::ErrorCode errorCode ); void slotConnected (); @@ -68,7 +68,7 @@ private slots: private: enum CommandType { Get, ListDir }; - QString m_host, m_user, m_password; + TQString m_host, m_user, m_password; int m_port; KURL m_url; bool m_connected; diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp index 75b1fe2a..33c5ec8a 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp @@ -1,5 +1,5 @@ /* - * bsocket.cpp - QSocket wrapper based on Bytestream with SRV DNS support + * bsocket.cpp - TQSocket wrapper based on Bytestream with SRV DNS support * Copyright (C) 2003 Justin Karneges * * This library is free software; you can redistribute it and/or @@ -20,10 +20,10 @@ #include"bsocket.h" -#include<qcstring.h> -#include<qsocket.h> -#include<qdns.h> -#include<qguardedptr.h> +#include<tqcstring.h> +#include<tqsocket.h> +#include<tqdns.h> +#include<tqguardedptr.h> #include"safedelete.h" #ifndef NO_NDNS #include"ndns.h" @@ -46,26 +46,26 @@ public: qsock = 0; } - QSocket *qsock; + TQSocket *qsock; int state; #ifndef NO_NDNS NDns ndns; #endif SrvResolver srv; - QString host; + TQString host; int port; SafeDelete sd; }; -BSocket::BSocket(QObject *parent) +BSocket::BSocket(TQObject *parent) :ByteStream(parent) { d = new Private; #ifndef NO_NDNS - connect(&d->ndns, SIGNAL(resultsReady()), SLOT(ndns_done())); + connect(&d->ndns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done())); #endif - connect(&d->srv, SIGNAL(resultsReady()), SLOT(srv_done())); + connect(&d->srv, TQT_SIGNAL(resultsReady()), TQT_SLOT(srv_done())); reset(); } @@ -83,7 +83,7 @@ void BSocket::reset(bool clear) if(!clear && d->qsock->isOpen()) { // move remaining into the local queue - QByteArray block(d->qsock->bytesAvailable()); + TQByteArray block(d->qsock->bytesAvailable()); d->qsock->readBlock(block.data(), block.size()); appendRead(block); } @@ -112,17 +112,17 @@ void BSocket::ensureSocket() #if QT_VERSION >= 0x030200 d->qsock->setReadBufferSize(READBUFSIZE); #endif - connect(d->qsock, SIGNAL(hostFound()), SLOT(qs_hostFound())); - connect(d->qsock, SIGNAL(connected()), SLOT(qs_connected())); - connect(d->qsock, SIGNAL(connectionClosed()), SLOT(qs_connectionClosed())); - connect(d->qsock, SIGNAL(delayedCloseFinished()), SLOT(qs_delayedCloseFinished())); - connect(d->qsock, SIGNAL(readyRead()), SLOT(qs_readyRead())); - connect(d->qsock, SIGNAL(bytesWritten(int)), SLOT(qs_bytesWritten(int))); - connect(d->qsock, SIGNAL(error(int)), SLOT(qs_error(int))); + connect(d->qsock, TQT_SIGNAL(hostFound()), TQT_SLOT(qs_hostFound())); + connect(d->qsock, TQT_SIGNAL(connected()), TQT_SLOT(qs_connected())); + connect(d->qsock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(qs_connectionClosed())); + connect(d->qsock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(qs_delayedCloseFinished())); + connect(d->qsock, TQT_SIGNAL(readyRead()), TQT_SLOT(qs_readyRead())); + connect(d->qsock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(qs_bytesWritten(int))); + connect(d->qsock, TQT_SIGNAL(error(int)), TQT_SLOT(qs_error(int))); } } -void BSocket::connectToHost(const QString &host, Q_UINT16 port) +void BSocket::connectToHost(const TQString &host, Q_UINT16 port) { reset(true); d->host = host; @@ -136,7 +136,7 @@ void BSocket::connectToHost(const QString &host, Q_UINT16 port) #endif } -void BSocket::connectToServer(const QString &srv, const QString &type) +void BSocket::connectToServer(const TQString &srv, const TQString &type) { reset(true); d->state = HostLookup; @@ -188,23 +188,23 @@ void BSocket::close() } } -void BSocket::write(const QByteArray &a) +void BSocket::write(const TQByteArray &a) { if(d->state != Connected) return; #ifdef BS_DEBUG - QCString cs; + TQCString cs; cs.resize(a.size()+1); memcpy(cs.data(), a.data(), a.size()); - QString s = QString::fromUtf8(cs); + TQString s = TQString::fromUtf8(cs); fprintf(stderr, "BSocket: writing [%d]: {%s}\n", a.size(), cs.data()); #endif d->qsock->writeBlock(a.data(), a.size()); } -QByteArray BSocket::read(int bytes) +TQByteArray BSocket::read(int bytes) { - QByteArray block; + TQByteArray block; if(d->qsock) { int max = bytesAvailable(); if(bytes <= 0 || bytes > max) @@ -216,10 +216,10 @@ QByteArray BSocket::read(int bytes) block = ByteStream::read(bytes); #ifdef BS_DEBUG - QCString cs; + TQCString cs; cs.resize(block.size()+1); memcpy(cs.data(), block.data(), block.size()); - QString s = QString::fromUtf8(cs); + TQString s = TQString::fromUtf8(cs); fprintf(stderr, "BSocket: read [%d]: {%s}\n", block.size(), s.latin1()); #endif return block; @@ -240,12 +240,12 @@ int BSocket::bytesToWrite() const return d->qsock->bytesToWrite(); } -QHostAddress BSocket::address() const +TQHostAddress BSocket::address() const { if(d->qsock) return d->qsock->address(); else - return QHostAddress(); + return TQHostAddress(); } Q_UINT16 BSocket::port() const @@ -256,12 +256,12 @@ Q_UINT16 BSocket::port() const return 0; } -QHostAddress BSocket::peerAddress() const +TQHostAddress BSocket::peerAddress() const { if(d->qsock) return d->qsock->peerAddress(); else - return QHostAddress(); + return TQHostAddress(); } Q_UINT16 BSocket::peerPort() const @@ -285,7 +285,7 @@ void BSocket::srv_done() d->host = d->srv.resultAddress().toString(); d->port = d->srv.resultPort(); do_connect(); - //QTimer::singleShot(0, this, SLOT(do_connect())); + //TQTimer::singleShot(0, this, TQT_SLOT(do_connect())); //hostFound(); } @@ -296,7 +296,7 @@ void BSocket::ndns_done() d->host = d->ndns.resultString(); d->state = Connecting; do_connect(); - //QTimer::singleShot(0, this, SLOT(do_connect())); + //TQTimer::singleShot(0, this, TQT_SLOT(do_connect())); //hostFound(); } else { @@ -375,17 +375,17 @@ void BSocket::qs_error(int x) SafeDeleteLock s(&d->sd); // connection error during SRV host connect? try next - if(d->state == HostLookup && (x == QSocket::ErrConnectionRefused || x == QSocket::ErrHostNotFound)) { + if(d->state == HostLookup && (x == TQSocket::ErrConnectionRefused || x == TQSocket::ErrHostNotFound)) { d->srv.next(); return; } reset(); - if(x == QSocket::ErrConnectionRefused) + if(x == TQSocket::ErrConnectionRefused) error(ErrConnectionRefused); - else if(x == QSocket::ErrHostNotFound) + else if(x == TQSocket::ErrHostNotFound) error(ErrHostNotFound); - else if(x == QSocket::ErrSocketRead) + else if(x == TQSocket::ErrSocketRead) error(ErrRead); } diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h index f51b3470..7887b9c0 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h @@ -1,5 +1,5 @@ /* - * bsocket.h - QSocket wrapper based on Bytestream with SRV DNS support + * bsocket.h - TQSocket wrapper based on Bytestream with SRV DNS support * Copyright (C) 2003 Justin Karneges * * This library is free software; you can redistribute it and/or @@ -21,8 +21,8 @@ #ifndef CS_BSOCKET_H #define CS_BSOCKET_H -#include<qobject.h> -#include<qhostaddress.h> +#include<tqobject.h> +#include<tqhostaddress.h> #include"bytestream.h" // CS_NAMESPACE_BEGIN @@ -33,11 +33,11 @@ class BSocket : public ByteStream public: enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound }; enum State { Idle, HostLookup, Connecting, Connected, Closing }; - BSocket(QObject *parent=0); + BSocket(TQObject *parent=0); ~BSocket(); - void connectToHost(const QString &host, Q_UINT16 port); - void connectToServer(const QString &srv, const QString &type); + void connectToHost(const TQString &host, Q_UINT16 port); + void connectToServer(const TQString &srv, const TQString &type); int socket() const; void setSocket(int); int state() const; @@ -45,17 +45,17 @@ public: // from ByteStream bool isOpen() const; void close(); - void write(const QByteArray &); - QByteArray read(int bytes=0); + void write(const TQByteArray &); + TQByteArray read(int bytes=0); int bytesAvailable() const; int bytesToWrite() const; // local - QHostAddress address() const; + TQHostAddress address() const; Q_UINT16 port() const; // remote - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp index 76550db0..6abeb556 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp @@ -20,7 +20,7 @@ #include"httpconnect.h" -#include<qstringlist.h> +#include<tqstringlist.h> #include"bsocket.h" #include"base64.h" @@ -30,20 +30,20 @@ // CS_NAMESPACE_BEGIN -static QString extractLine(QByteArray *buf, bool *found) +static TQString extractLine(TQByteArray *buf, bool *found) { // scan for newline int n; for(n = 0; n < (int)buf->size()-1; ++n) { if(buf->at(n) == '\r' && buf->at(n+1) == '\n') { - QCString cstr; + TQCString cstr; cstr.resize(n+1); memcpy(cstr.data(), buf->data(), n); n += 2; // hack off CR/LF memmove(buf->data(), buf->data() + n, buf->size() - n); buf->resize(buf->size() - n); - QString s = QString::fromUtf8(cstr); + TQString s = TQString::fromUtf8(cstr); if(found) *found = true; @@ -56,7 +56,7 @@ static QString extractLine(QByteArray *buf, bool *found) return ""; } -static bool extractMainHeader(const QString &line, QString *proto, int *code, QString *msg) +static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg) { int n = line.find(' '); if(n == -1) @@ -81,31 +81,31 @@ public: Private() {} BSocket sock; - QString host; + TQString host; int port; - QString user, pass; - QString real_host; + TQString user, pass; + TQString real_host; int real_port; - QByteArray recvBuf; + TQByteArray recvBuf; bool inHeader; - QStringList headerLines; + TQStringList headerLines; int toWrite; bool active; }; -HttpConnect::HttpConnect(QObject *parent) +HttpConnect::HttpConnect(TQObject *parent) :ByteStream(parent) { d = new Private; - connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected())); - connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed())); - connect(&d->sock, SIGNAL(delayedCloseFinished()), SLOT(sock_delayedCloseFinished())); - connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead())); - connect(&d->sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int))); - connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int))); + connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected())); + connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed())); + connect(&d->sock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sock_delayedCloseFinished())); + connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead())); + connect(&d->sock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sock_bytesWritten(int))); + connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int))); reset(true); } @@ -127,13 +127,13 @@ void HttpConnect::reset(bool clear) d->active = false; } -void HttpConnect::setAuth(const QString &user, const QString &pass) +void HttpConnect::setAuth(const TQString &user, const TQString &pass) { d->user = user; d->pass = pass; } -void HttpConnect::connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port) +void HttpConnect::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port) { reset(true); @@ -164,13 +164,13 @@ void HttpConnect::close() reset(); } -void HttpConnect::write(const QByteArray &buf) +void HttpConnect::write(const TQByteArray &buf) { if(d->active) d->sock.write(buf); } -QByteArray HttpConnect::read(int bytes) +TQByteArray HttpConnect::read(int bytes) { return ByteStream::read(bytes); } @@ -197,18 +197,18 @@ void HttpConnect::sock_connected() d->headerLines.clear(); // connected, now send the request - QString s; - s += QString("CONNECT ") + d->real_host + ':' + QString::number(d->real_port) + " HTTP/1.0\r\n"; + TQString s; + s += TQString("CONNECT ") + d->real_host + ':' + TQString::number(d->real_port) + " HTTP/1.0\r\n"; if(!d->user.isEmpty()) { - QString str = d->user + ':' + d->pass; - s += QString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n"; + TQString str = d->user + ':' + d->pass; + s += TQString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n"; } s += "Proxy-Connection: Keep-Alive\r\n"; s += "Pragma: no-cache\r\n"; s += "\r\n"; - QCString cs = s.utf8(); - QByteArray block(cs.length()); + TQCString cs = s.utf8(); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); d->toWrite = block.size(); d->sock.write(block); @@ -235,7 +235,7 @@ void HttpConnect::sock_delayedCloseFinished() void HttpConnect::sock_readyRead() { - QByteArray block = d->sock.read(); + TQByteArray block = d->sock.read(); if(!d->active) { ByteStream::appendArray(&d->recvBuf, block); @@ -244,7 +244,7 @@ void HttpConnect::sock_readyRead() // grab available lines while(1) { bool found; - QString line = extractLine(&d->recvBuf, &found); + TQString line = extractLine(&d->recvBuf, &found); if(!found) break; if(line.isEmpty()) { @@ -256,12 +256,12 @@ void HttpConnect::sock_readyRead() // done with grabbing the header? if(!d->inHeader) { - QString str = d->headerLines.first(); + TQString str = d->headerLines.first(); d->headerLines.remove(d->headerLines.begin()); - QString proto; + TQString proto; int code; - QString msg; + TQString msg; if(!extractMainHeader(str, &proto, &code, &msg)) { #ifdef PROX_DEBUG fprintf(stderr, "HttpConnect: invalid header!\n"); @@ -273,7 +273,7 @@ void HttpConnect::sock_readyRead() else { #ifdef PROX_DEBUG fprintf(stderr, "HttpConnect: header proto=[%s] code=[%d] msg=[%s]\n", proto.latin1(), code, msg.latin1()); - for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) + for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) fprintf(stderr, "HttpConnect: * [%s]\n", (*it).latin1()); #endif } @@ -294,7 +294,7 @@ void HttpConnect::sock_readyRead() } else { int err; - QString errStr; + TQString errStr; if(code == 407) { // Authentication failed err = ErrProxyAuth; errStr = tr("Authentication failed"); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h index e383969b..2acef809 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h @@ -30,17 +30,17 @@ class HttpConnect : public ByteStream Q_OBJECT public: enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth }; - HttpConnect(QObject *parent=0); + HttpConnect(TQObject *parent=0); ~HttpConnect(); - void setAuth(const QString &user, const QString &pass=""); - void connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port); + void setAuth(const TQString &user, const TQString &pass=""); + void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port); // from ByteStream bool isOpen() const; void close(); - void write(const QByteArray &); - QByteArray read(int bytes=0); + void write(const TQByteArray &); + TQByteArray read(int bytes=0); int bytesAvailable() const; int bytesToWrite() const; diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp index 605d44e9..3a182457 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp @@ -20,10 +20,10 @@ #include"httppoll.h" -#include<qstringlist.h> -#include<qurl.h> -#include<qtimer.h> -#include<qguardedptr.h> +#include<tqstringlist.h> +#include<tqurl.h> +#include<tqtimer.h> +#include<tqguardedptr.h> #include<qca.h> #include<stdlib.h> #include"bsocket.h" @@ -37,9 +37,9 @@ // CS_NAMESPACE_BEGIN -static QByteArray randomArray(int size) +static TQByteArray randomArray(int size) { - QByteArray a(size); + TQByteArray a(size); for(int n = 0; n < size; ++n) a[n] = (char)(256.0*rand()/(RAND_MAX+1.0)); return a; @@ -48,12 +48,12 @@ static QByteArray randomArray(int size) //---------------------------------------------------------------------------- // HttpPoll //---------------------------------------------------------------------------- -static QString hpk(int n, const QString &s) +static TQString hpk(int n, const TQString &s) { if(n == 0) return s; else - return Base64::arrayToString( QCA::SHA1::hash( QCString(hpk(n - 1, s).latin1()) ) ); + return Base64::arrayToString( QCA::SHA1::hash( TQCString(hpk(n - 1, s).latin1()) ) ); } class HttpPoll::Private @@ -62,37 +62,37 @@ public: Private() {} HttpProxyPost http; - QString host; + TQString host; int port; - QString user, pass; - QString url; + TQString user, pass; + TQString url; bool use_proxy; - QByteArray out; + TQByteArray out; int state; bool closing; - QString ident; + TQString ident; - QTimer *t; + TQTimer *t; - QString key[POLL_KEYS]; + TQString key[POLL_KEYS]; int key_n; int polltime; }; -HttpPoll::HttpPoll(QObject *parent) +HttpPoll::HttpPoll(TQObject *parent) :ByteStream(parent) { d = new Private; d->polltime = 30; d->t = new QTimer; - connect(d->t, SIGNAL(timeout()), SLOT(do_sync())); + connect(d->t, TQT_SIGNAL(timeout()), TQT_SLOT(do_sync())); - connect(&d->http, SIGNAL(result()), SLOT(http_result())); - connect(&d->http, SIGNAL(error(int)), SLOT(http_error(int))); + connect(&d->http, TQT_SIGNAL(result()), TQT_SLOT(http_result())); + connect(&d->http, TQT_SIGNAL(error(int)), TQT_SLOT(http_error(int))); reset(true); } @@ -117,18 +117,18 @@ void HttpPoll::reset(bool clear) d->t->stop(); } -void HttpPoll::setAuth(const QString &user, const QString &pass) +void HttpPoll::setAuth(const TQString &user, const TQString &pass) { d->user = user; d->pass = pass; } -void HttpPoll::connectToUrl(const QString &url) +void HttpPoll::connectToUrl(const TQString &url) { connectToHost("", 0, url); } -void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QString &url) +void HttpPoll::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &url) { reset(true); @@ -140,7 +140,7 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr d->use_proxy = true; } else { - QUrl u = url; + TQUrl u = url; d->host = u.host(); if(u.hasPort()) d->port = u.port(); @@ -152,7 +152,7 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr resetKey(); bool last; - QString key = getKey(&last); + TQString key = getKey(&last); #ifdef PROX_DEBUG fprintf(stderr, "HttpPoll: Connecting to %s:%d [%s]", d->host.latin1(), d->port, d->url.latin1()); @@ -161,19 +161,19 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr else fprintf(stderr, ", auth {%s,%s}\n", d->user.latin1(), d->pass.latin1()); #endif - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; syncStarted(); if(!self) return; d->state = 1; d->http.setAuth(d->user, d->pass); - d->http.post(d->host, d->port, d->url, makePacket("0", key, "", QByteArray()), d->use_proxy); + d->http.post(d->host, d->port, d->url, makePacket("0", key, "", TQByteArray()), d->use_proxy); } -QByteArray HttpPoll::makePacket(const QString &ident, const QString &key, const QString &newkey, const QByteArray &block) +TQByteArray HttpPoll::makePacket(const TQString &ident, const TQString &key, const TQString &newkey, const TQByteArray &block) { - QString str = ident; + TQString str = ident; if(!key.isEmpty()) { str += ';'; str += key; @@ -183,10 +183,10 @@ QByteArray HttpPoll::makePacket(const QString &ident, const QString &key, const str += newkey; } str += ','; - QCString cs = str.latin1(); + TQCString cs = str.latin1(); int len = cs.length(); - QByteArray a(len + block.size()); + TQByteArray a(len + block.size()); memcpy(a.data(), cs.data(), len); memcpy(a.data() + len, block.data(), block.size()); return a; @@ -221,14 +221,14 @@ void HttpPoll::close() void HttpPoll::http_result() { // check for death :) - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; syncFinished(); if(!self) return; // get id and packet - QString id; - QString cookie = d->http.getHeader("Set-Cookie"); + TQString id; + TQString cookie = d->http.getHeader("Set-Cookie"); int n = cookie.find("ID="); if(n == -1) { reset(); @@ -241,7 +241,7 @@ void HttpPoll::http_result() id = cookie.mid(n, n2-n); else id = cookie.mid(n); - QByteArray block = d->http.body(); + TQByteArray block = d->http.body(); // session error? if(id.right(2) == ":0") { @@ -337,14 +337,14 @@ void HttpPoll::do_sync() d->out = takeWrite(0, false); bool last; - QString key = getKey(&last); - QString newkey; + TQString key = getKey(&last); + TQString newkey; if(last) { resetKey(); newkey = getKey(&last); } - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; syncStarted(); if(!self) return; @@ -357,15 +357,15 @@ void HttpPoll::resetKey() #ifdef PROX_DEBUG fprintf(stderr, "HttpPoll: reset key!\n"); #endif - QByteArray a = randomArray(64); - QString str = QString::fromLatin1(a.data(), a.size()); + TQByteArray a = randomArray(64); + TQString str = TQString::fromLatin1(a.data(), a.size()); d->key_n = POLL_KEYS; for(int n = 0; n < POLL_KEYS; ++n) d->key[n] = hpk(n+1, str); } -const QString & HttpPoll::getKey(bool *last) +const TQString & HttpPoll::getKey(bool *last) { *last = false; --(d->key_n); @@ -378,20 +378,20 @@ const QString & HttpPoll::getKey(bool *last) //---------------------------------------------------------------------------- // HttpProxyPost //---------------------------------------------------------------------------- -static QString extractLine(QByteArray *buf, bool *found) +static TQString extractLine(TQByteArray *buf, bool *found) { // scan for newline int n; for(n = 0; n < (int)buf->size()-1; ++n) { if(buf->at(n) == '\r' && buf->at(n+1) == '\n') { - QCString cstr; + TQCString cstr; cstr.resize(n+1); memcpy(cstr.data(), buf->data(), n); n += 2; // hack off CR/LF memmove(buf->data(), buf->data() + n, buf->size() - n); buf->resize(buf->size() - n); - QString s = QString::fromUtf8(cstr); + TQString s = TQString::fromUtf8(cstr); if(found) *found = true; @@ -404,7 +404,7 @@ static QString extractLine(QByteArray *buf, bool *found) return ""; } -static bool extractMainHeader(const QString &line, QString *proto, int *code, QString *msg) +static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg) { int n = line.find(' '); if(n == -1) @@ -429,23 +429,23 @@ public: Private() {} BSocket sock; - QByteArray postdata, recvBuf, body; - QString url; - QString user, pass; + TQByteArray postdata, recvBuf, body; + TQString url; + TQString user, pass; bool inHeader; - QStringList headerLines; + TQStringList headerLines; bool asProxy; - QString host; + TQString host; }; -HttpProxyPost::HttpProxyPost(QObject *parent) -:QObject(parent) +HttpProxyPost::HttpProxyPost(TQObject *parent) +:TQObject(parent) { d = new Private; - connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected())); - connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed())); - connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead())); - connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int))); + connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected())); + connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed())); + connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead())); + connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int))); reset(true); } @@ -464,7 +464,7 @@ void HttpProxyPost::reset(bool clear) d->body.resize(0); } -void HttpProxyPost::setAuth(const QString &user, const QString &pass) +void HttpProxyPost::setAuth(const TQString &user, const TQString &pass) { d->user = user; d->pass = pass; @@ -475,7 +475,7 @@ bool HttpProxyPost::isActive() const return (d->sock.state() == BSocket::Idle ? false: true); } -void HttpProxyPost::post(const QString &proxyHost, int proxyPort, const QString &url, const QByteArray &data, bool asProxy) +void HttpProxyPost::post(const TQString &proxyHost, int proxyPort, const TQString &url, const TQByteArray &data, bool asProxy) { reset(true); @@ -499,19 +499,19 @@ void HttpProxyPost::stop() reset(); } -QByteArray HttpProxyPost::body() const +TQByteArray HttpProxyPost::body() const { return d->body; } -QString HttpProxyPost::getHeader(const QString &var) const +TQString HttpProxyPost::getHeader(const TQString &var) const { - for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) { - const QString &s = *it; + for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) { + const TQString &s = *it; int n = s.find(": "); if(n == -1) continue; - QString v = s.mid(0, n); + TQString v = s.mid(0, n); if(v == var) return s.mid(n+2); } @@ -526,30 +526,30 @@ void HttpProxyPost::sock_connected() d->inHeader = true; d->headerLines.clear(); - QUrl u = d->url; + TQUrl u = d->url; // connected, now send the request - QString s; - s += QString("POST ") + d->url + " HTTP/1.0\r\n"; + TQString s; + s += TQString("POST ") + d->url + " HTTP/1.0\r\n"; if(d->asProxy) { if(!d->user.isEmpty()) { - QString str = d->user + ':' + d->pass; - s += QString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n"; + TQString str = d->user + ':' + d->pass; + s += TQString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n"; } s += "Proxy-Connection: Keep-Alive\r\n"; s += "Pragma: no-cache\r\n"; - s += QString("Host: ") + u.host() + "\r\n"; + s += TQString("Host: ") + u.host() + "\r\n"; } else { - s += QString("Host: ") + d->host + "\r\n"; + s += TQString("Host: ") + d->host + "\r\n"; } s += "Content-Type: application/x-www-form-urlencoded\r\n"; - s += QString("Content-Length: ") + QString::number(d->postdata.size()) + "\r\n"; + s += TQString("Content-Length: ") + TQString::number(d->postdata.size()) + "\r\n"; s += "\r\n"; // write request - QCString cs = s.utf8(); - QByteArray block(cs.length()); + TQCString cs = s.utf8(); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); d->sock.write(block); @@ -566,14 +566,14 @@ void HttpProxyPost::sock_connectionClosed() void HttpProxyPost::sock_readyRead() { - QByteArray block = d->sock.read(); + TQByteArray block = d->sock.read(); ByteStream::appendArray(&d->recvBuf, block); if(d->inHeader) { // grab available lines while(1) { bool found; - QString line = extractLine(&d->recvBuf, &found); + TQString line = extractLine(&d->recvBuf, &found); if(!found) break; if(line.isEmpty()) { @@ -585,12 +585,12 @@ void HttpProxyPost::sock_readyRead() // done with grabbing the header? if(!d->inHeader) { - QString str = d->headerLines.first(); + TQString str = d->headerLines.first(); d->headerLines.remove(d->headerLines.begin()); - QString proto; + TQString proto; int code; - QString msg; + TQString msg; if(!extractMainHeader(str, &proto, &code, &msg)) { #ifdef PROX_DEBUG fprintf(stderr, "HttpProxyPost: invalid header!\n"); @@ -602,7 +602,7 @@ void HttpProxyPost::sock_readyRead() else { #ifdef PROX_DEBUG fprintf(stderr, "HttpProxyPost: header proto=[%s] code=[%d] msg=[%s]\n", proto.latin1(), code, msg.latin1()); - for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) + for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) fprintf(stderr, "HttpProxyPost: * [%s]\n", (*it).latin1()); #endif } @@ -614,7 +614,7 @@ void HttpProxyPost::sock_readyRead() } else { int err; - QString errStr; + TQString errStr; if(code == 407) { // Authentication failed err = ErrProxyAuth; errStr = tr("Authentication failed"); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h index 4c02ead2..c38b7a8a 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h @@ -30,12 +30,12 @@ class HttpPoll : public ByteStream Q_OBJECT public: enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth }; - HttpPoll(QObject *parent=0); + HttpPoll(TQObject *parent=0); ~HttpPoll(); - void setAuth(const QString &user, const QString &pass=""); - void connectToUrl(const QString &url); - void connectToHost(const QString &proxyHost, int proxyPort, const QString &url); + void setAuth(const TQString &user, const TQString &pass=""); + void connectToUrl(const TQString &url); + void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &url); int pollInterval() const; void setPollInterval(int seconds); @@ -62,9 +62,9 @@ private: Private *d; void reset(bool clear=false); - QByteArray makePacket(const QString &ident, const QString &key, const QString &newkey, const QByteArray &block); + TQByteArray makePacket(const TQString &ident, const TQString &key, const TQString &newkey, const TQByteArray &block); void resetKey(); - const QString & getKey(bool *); + const TQString & getKey(bool *); }; class HttpProxyPost : public QObject @@ -72,15 +72,15 @@ class HttpProxyPost : public QObject Q_OBJECT public: enum Error { ErrConnectionRefused, ErrHostNotFound, ErrSocket, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth }; - HttpProxyPost(QObject *parent=0); + HttpProxyPost(TQObject *parent=0); ~HttpProxyPost(); - void setAuth(const QString &user, const QString &pass=""); + void setAuth(const TQString &user, const TQString &pass=""); bool isActive() const; - void post(const QString &proxyHost, int proxyPort, const QString &url, const QByteArray &data, bool asProxy=true); + void post(const TQString &proxyHost, int proxyPort, const TQString &url, const TQByteArray &data, bool asProxy=true); void stop(); - QByteArray body() const; - QString getHeader(const QString &) const; + TQByteArray body() const; + TQString getHeader(const TQString &) const; signals: void result(); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp index 1203315a..748db248 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp @@ -21,9 +21,9 @@ //! \class NDns ndns.h //! \brief Simple DNS resolution using native system calls //! -//! This class is to be used when Qt's QDns is not good enough. Because QDns +//! This class is to be used when Qt's TQDns is not good enough. Because QDns //! does not use threads, it cannot make a system call asyncronously. Thus, -//! QDns tries to imitate the behavior of each platform's native behavior, and +//! TQDns tries to imitate the behavior of each platform's native behavior, and //! generally falls short. //! //! NDns uses a thread to make the system call happen in the background. This @@ -45,15 +45,15 @@ //! //! // or if you want to get the IP address as a string: //! -//! QString ip_address = dns.resultString(); +//! TQString ip_address = dns.resultString(); //! \endcode #include"ndns.h" -#include<qapplication.h> -#include<qsocketdevice.h> -#include<qptrlist.h> -#include<qeventloop.h> +#include<tqapplication.h> +#include<tqsocketdevice.h> +#include<tqptrlist.h> +#include<tqeventloop.h> #ifdef Q_OS_UNIX #include<netdb.h> @@ -72,7 +72,7 @@ class NDnsWorkerEvent : public QCustomEvent { public: - enum Type { WorkerEvent = QEvent::User + 100 }; + enum Type { WorkerEvent = TQEvent::User + 100 }; NDnsWorkerEvent(NDnsWorker *); NDnsWorker *worker; @@ -81,18 +81,18 @@ public: class NDnsWorker : public QThread { public: - NDnsWorker(QObject *, const QCString &); + NDnsWorker(TQObject *, const TQCString &); bool success; bool cancelled; - QHostAddress addr; + TQHostAddress addr; protected: void run(); private: - QCString host; - QObject *par; + TQCString host; + TQObject *par; }; //! \endif @@ -100,8 +100,8 @@ private: // NDnsManager //---------------------------------------------------------------------------- #ifndef HAVE_GETHOSTBYNAME_R -static QMutex *workerMutex = 0; -static QMutex *workerCancelled = 0; +static TQMutex *workerMutex = 0; +static TQMutex *workerCancelled = 0; #endif static NDnsManager *man = 0; bool winsock_init = false; @@ -118,7 +118,7 @@ class NDnsManager::Private public: Item *find(const NDns *n) { - QPtrListIterator<Item> it(list); + TQPtrListIterator<Item> it(list); for(Item *i; (i = it.current()); ++it) { if(i->ndns == n) return i; @@ -128,7 +128,7 @@ public: Item *find(const NDnsWorker *w) { - QPtrListIterator<Item> it(list); + TQPtrListIterator<Item> it(list); for(Item *i; (i = it.current()); ++it) { if(i->worker == w) return i; @@ -136,7 +136,7 @@ public: return 0; } - QPtrList<Item> list; + TQPtrList<Item> list; }; NDnsManager::NDnsManager() @@ -149,7 +149,7 @@ NDnsManager::NDnsManager() #ifdef Q_OS_WIN32 if(!winsock_init) { winsock_init = true; - QSocketDevice *sd = new QSocketDevice; + TQSocketDevice *sd = new QSocketDevice; delete sd; } #endif @@ -157,7 +157,7 @@ NDnsManager::NDnsManager() d = new Private; d->list.setAutoDelete(true); - connect(qApp, SIGNAL(aboutToQuit()), SLOT(app_aboutToQuit())); + connect(qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(app_aboutToQuit())); } NDnsManager::~NDnsManager() @@ -172,7 +172,7 @@ NDnsManager::~NDnsManager() #endif } -void NDnsManager::resolve(NDns *self, const QString &name) +void NDnsManager::resolve(NDns *self, const TQString &name) { Item *i = new Item; i->ndns = self; @@ -204,7 +204,7 @@ bool NDnsManager::isBusy(const NDns *self) const return (i ? true: false); } -bool NDnsManager::event(QEvent *e) +bool NDnsManager::event(TQEvent *e) { if((int)e->type() == (int)NDnsWorkerEvent::WorkerEvent) { NDnsWorkerEvent *we = static_cast<NDnsWorkerEvent*>(e); @@ -215,7 +215,7 @@ bool NDnsManager::event(QEvent *e) // should NOT happen return true; } - QHostAddress addr = i->worker->addr; + TQHostAddress addr = i->worker->addr; NDns *ndns = i->ndns; delete i->worker; d->list.removeRef(i); @@ -242,8 +242,8 @@ void NDnsManager::tryDestroy() void NDnsManager::app_aboutToQuit() { while(man) { - QEventLoop *e = qApp->eventLoop(); - e->processEvents(QEventLoop::WaitForMore); + TQEventLoop *e = qApp->eventLoop(); + e->processEvents(TQEventLoop::WaitForMore); } } @@ -257,8 +257,8 @@ void NDnsManager::app_aboutToQuit() //! //! Constructs an NDns object with parent \a parent. -NDns::NDns(QObject *parent) -:QObject(parent) +NDns::NDns(TQObject *parent) +:TQObject(parent) { } @@ -271,7 +271,7 @@ NDns::~NDns() //! //! Resolves hostname \a host (eg. psi.affinix.com) -void NDns::resolve(const QString &host) +void NDns::resolve(const TQString &host) { stop(); if(!man) @@ -299,7 +299,7 @@ uint NDns::result() const //! //! Returns the IP address as a string. This will be an empty string if the lookup failed. //! \sa resultsReady() -QString NDns::resultString() const +TQString NDns::resultString() const { return addr.toString(); } @@ -313,7 +313,7 @@ bool NDns::isBusy() const return man->isBusy(this); } -void NDns::finished(const QHostAddress &a) +void NDns::finished(const TQHostAddress &a) { addr = a; resultsReady(); @@ -323,7 +323,7 @@ void NDns::finished(const QHostAddress &a) // NDnsWorkerEvent //---------------------------------------------------------------------------- NDnsWorkerEvent::NDnsWorkerEvent(NDnsWorker *p) -:QCustomEvent(WorkerEvent) +:TQCustomEvent(WorkerEvent) { worker = p; } @@ -331,7 +331,7 @@ NDnsWorkerEvent::NDnsWorkerEvent(NDnsWorker *p) //---------------------------------------------------------------------------- // NDnsWorker //---------------------------------------------------------------------------- -NDnsWorker::NDnsWorker(QObject *_par, const QCString &_host) +NDnsWorker::NDnsWorker(TQObject *_par, const TQCString &_host) { success = cancelled = false; par = _par; @@ -349,7 +349,7 @@ void NDnsWorker::run() gethostbyname_r(host.data(), &buf, char_buf, sizeof(char_buf), &h, &err); #else // lock for gethostbyname - QMutexLocker locker(workerMutex); + TQMutexLocker locker(workerMutex); // check for cancel workerCancelled->lock(); @@ -362,7 +362,7 @@ void NDnsWorker::run() if(!h) { success = false; - QApplication::postEvent(par, new NDnsWorkerEvent(this)); + TQApplication::postEvent(par, new NDnsWorkerEvent(this)); return; } @@ -370,7 +370,7 @@ void NDnsWorker::run() addr.setAddress(ntohl(a.s_addr)); success = true; - QApplication::postEvent(par, new NDnsWorkerEvent(this)); + TQApplication::postEvent(par, new NDnsWorkerEvent(this)); } // CS_NAMESPACE_END diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h index ccbc6b57..48243e30 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h @@ -21,11 +21,11 @@ #ifndef CS_NDNS_H #define CS_NDNS_H -#include<qobject.h> -#include<qcstring.h> -#include<qthread.h> -#include<qmutex.h> -#include<qhostaddress.h> +#include<tqobject.h> +#include<tqcstring.h> +#include<tqthread.h> +#include<tqmutex.h> +#include<tqhostaddress.h> // CS_NAMESPACE_BEGIN @@ -36,24 +36,24 @@ class NDns : public QObject { Q_OBJECT public: - NDns(QObject *parent=0); + NDns(TQObject *parent=0); ~NDns(); - void resolve(const QString &); + void resolve(const TQString &); void stop(); bool isBusy() const; uint result() const; - QString resultString() const; + TQString resultString() const; signals: void resultsReady(); private: - QHostAddress addr; + TQHostAddress addr; friend class NDnsManager; - void finished(const QHostAddress &); + void finished(const TQHostAddress &); }; class NDnsManager : public QObject @@ -65,7 +65,7 @@ public: //! \if _hide_doc_ protected: - bool event(QEvent *); + bool event(TQEvent *); //! \endif private slots: @@ -77,7 +77,7 @@ private: friend class NDns; NDnsManager(); - void resolve(NDns *self, const QString &name); + void resolve(NDns *self, const TQString &name); void stop(NDns *self); bool isBusy(const NDns *self) const; void tryDestroy(); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp index e503d57a..5b88b4e5 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp @@ -33,8 +33,8 @@ public: ServSockSignal *serv; }; -ServSock::ServSock(QObject *parent) -:QObject(parent) +ServSock::ServSock(TQObject *parent) +:TQObject(parent) { d = new Private; d->serv = 0; @@ -61,7 +61,7 @@ bool ServSock::listen(Q_UINT16 port) d->serv = 0; return false; } - connect(d->serv, SIGNAL(connectionReady(int)), SLOT(sss_connectionReady(int))); + connect(d->serv, TQT_SIGNAL(connectionReady(int)), TQT_SLOT(sss_connectionReady(int))); return true; } @@ -80,12 +80,12 @@ int ServSock::port() const return -1; } -QHostAddress ServSock::address() const +TQHostAddress ServSock::address() const { if(d->serv) return d->serv->address(); else - return QHostAddress(); + return TQHostAddress(); } void ServSock::sss_connectionReady(int s) @@ -98,7 +98,7 @@ void ServSock::sss_connectionReady(int s) // ServSockSignal //---------------------------------------------------------------------------- ServSockSignal::ServSockSignal(int port) -:QServerSocket(port, 16) +:TQServerSocket(port, 16) { } diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h index a19cd38e..4628d8ea 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h @@ -21,7 +21,7 @@ #ifndef CS_SERVSOCK_H #define CS_SERVSOCK_H -#include<qserversocket.h> +#include<tqserversocket.h> // CS_NAMESPACE_BEGIN @@ -29,14 +29,14 @@ class ServSock : public QObject { Q_OBJECT public: - ServSock(QObject *parent=0); + ServSock(TQObject *parent=0); ~ServSock(); bool isActive() const; bool listen(Q_UINT16 port); void stop(); int port() const; - QHostAddress address() const; + TQHostAddress address() const; signals: void connectionReady(int); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp index 2f3ca5a8..59504170 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp @@ -20,13 +20,13 @@ #include"socks.h" -#include<qhostaddress.h> -#include<qstringlist.h> -#include<qptrlist.h> -#include<qtimer.h> -#include<qguardedptr.h> -#include<qsocketdevice.h> -#include<qsocketnotifier.h> +#include<tqhostaddress.h> +#include<tqstringlist.h> +#include<tqptrlist.h> +#include<tqtimer.h> +#include<tqguardedptr.h> +#include<tqsocketdevice.h> +#include<tqsocketnotifier.h> #ifdef Q_OS_UNIX #include<sys/types.h> @@ -49,20 +49,20 @@ //---------------------------------------------------------------------------- // SocksUDP //---------------------------------------------------------------------------- -static QByteArray sp_create_udp(const QString &host, Q_UINT16 port, const QByteArray &buf) +static TQByteArray sp_create_udp(const TQString &host, Q_UINT16 port, const TQByteArray &buf) { // detect for IP addresses - //QHostAddress addr; + //TQHostAddress addr; //if(addr.setAddress(host)) // return sp_set_request(addr, port, cmd1); - QCString h = host.utf8(); + TQCString h = host.utf8(); h.truncate(255); - h = QString::fromUtf8(h).utf8(); // delete any partial characters? + h = TQString::fromUtf8(h).utf8(); // delete any partial characters? int hlen = h.length(); int at = 0; - QByteArray a(4); + TQByteArray a(4); a[at++] = 0x00; // reserved a[at++] = 0x00; // reserved a[at++] = 0x00; // frag @@ -88,19 +88,19 @@ static QByteArray sp_create_udp(const QString &host, Q_UINT16 port, const QByteA struct SPS_UDP { - QString host; + TQString host; Q_UINT16 port; - QByteArray data; + TQByteArray data; }; -static int sp_read_udp(QByteArray *from, SPS_UDP *s) +static int sp_read_udp(TQByteArray *from, SPS_UDP *s) { int full_len = 4; if((int)from->size() < full_len) return 0; - QString host; - QHostAddress addr; + TQString host; + TQHostAddress addr; unsigned char atype = from->at(3); if(atype == 0x01) { @@ -120,9 +120,9 @@ static int sp_read_udp(QByteArray *from, SPS_UDP *s) full_len += host_len; if((int)from->size() < full_len) return 0; - QCString cs(host_len+1); + TQCString cs(host_len+1); memcpy(cs.data(), from->data() + 5, host_len); - host = QString::fromLatin1(cs); + host = TQString::fromLatin1(cs); } else if(atype == 0x04) { full_len += 16; @@ -152,24 +152,24 @@ static int sp_read_udp(QByteArray *from, SPS_UDP *s) class SocksUDP::Private { public: - QSocketDevice *sd; - QSocketNotifier *sn; + TQSocketDevice *sd; + TQSocketNotifier *sn; SocksClient *sc; - QHostAddress routeAddr; + TQHostAddress routeAddr; int routePort; - QString host; + TQString host; int port; }; -SocksUDP::SocksUDP(SocksClient *sc, const QString &host, int port, const QHostAddress &routeAddr, int routePort) -:QObject(sc) +SocksUDP::SocksUDP(SocksClient *sc, const TQString &host, int port, const TQHostAddress &routeAddr, int routePort) +:TQObject(sc) { d = new Private; d->sc = sc; - d->sd = new QSocketDevice(QSocketDevice::Datagram); + d->sd = new TQSocketDevice(TQSocketDevice::Datagram); d->sd->setBlocking(false); - d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read); - connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int))); + d->sn = new TQSocketNotifier(d->sd->socket(), TQSocketNotifier::Read); + connect(d->sn, TQT_SIGNAL(activated(int)), TQT_SLOT(sn_activated(int))); d->host = host; d->port = port; d->routeAddr = routeAddr; @@ -183,15 +183,15 @@ SocksUDP::~SocksUDP() delete d; } -void SocksUDP::change(const QString &host, int port) +void SocksUDP::change(const TQString &host, int port) { d->host = host; d->port = port; } -void SocksUDP::write(const QByteArray &data) +void SocksUDP::write(const TQByteArray &data) { - QByteArray buf = sp_create_udp(d->host, d->port, data); + TQByteArray buf = sp_create_udp(d->host, d->port, data); d->sd->setBlocking(true); d->sd->writeBlock(buf.data(), buf.size(), d->routeAddr, d->routePort); d->sd->setBlocking(false); @@ -199,7 +199,7 @@ void SocksUDP::write(const QByteArray &data) void SocksUDP::sn_activated(int) { - QByteArray buf(8192); + TQByteArray buf(8192); int actual = d->sd->readBlock(buf.data(), buf.size()); buf.resize(actual); packetReady(buf); @@ -222,9 +222,9 @@ void SocksUDP::sn_activated(int) // SPSS = socks packet server struct // Version -static QByteArray spc_set_version() +static TQByteArray spc_set_version() { - QByteArray ver(4); + TQByteArray ver(4); ver[0] = 0x05; // socks version 5 ver[1] = 0x02; // number of methods ver[2] = 0x00; // no-auth @@ -232,9 +232,9 @@ static QByteArray spc_set_version() return ver; } -static QByteArray sps_set_version(int method) +static TQByteArray sps_set_version(int method) { - QByteArray ver(2); + TQByteArray ver(2); ver[0] = 0x05; ver[1] = method; return ver; @@ -243,10 +243,10 @@ static QByteArray sps_set_version(int method) struct SPCS_VERSION { unsigned char version; - QByteArray methodList; + TQByteArray methodList; }; -static int spc_get_version(QByteArray *from, SPCS_VERSION *s) +static int spc_get_version(TQByteArray *from, SPCS_VERSION *s) { if(from->size() < 1) return 0; @@ -259,7 +259,7 @@ static int spc_get_version(QByteArray *from, SPCS_VERSION *s) return -1; if(from->size() < 2 + num) return 0; - QByteArray a = ByteStream::takeArray(from, 2+num); + TQByteArray a = ByteStream::takeArray(from, 2+num); s->version = a[0]; s->methodList.resize(num); memcpy(s->methodList.data(), a.data() + 2, num); @@ -272,18 +272,18 @@ struct SPSS_VERSION unsigned char method; }; -static int sps_get_version(QByteArray *from, SPSS_VERSION *s) +static int sps_get_version(TQByteArray *from, SPSS_VERSION *s) { if(from->size() < 2) return 0; - QByteArray a = ByteStream::takeArray(from, 2); + TQByteArray a = ByteStream::takeArray(from, 2); s->version = a[0]; s->method = a[1]; return 1; } // authUsername -static QByteArray spc_set_authUsername(const QCString &user, const QCString &pass) +static TQByteArray spc_set_authUsername(const TQCString &user, const TQCString &pass) { int len1 = user.length(); int len2 = pass.length(); @@ -291,7 +291,7 @@ static QByteArray spc_set_authUsername(const QCString &user, const QCString &pas len1 = 255; if(len2 > 255) len2 = 255; - QByteArray a(1+1+len1+1+len2); + TQByteArray a(1+1+len1+1+len2); a[0] = 0x01; // username auth version 1 a[1] = len1; memcpy(a.data() + 2, user.data(), len1); @@ -300,9 +300,9 @@ static QByteArray spc_set_authUsername(const QCString &user, const QCString &pas return a; } -static QByteArray sps_set_authUsername(bool success) +static TQByteArray sps_set_authUsername(bool success) { - QByteArray a(2); + TQByteArray a(2); a[0] = 0x01; a[1] = success ? 0x00 : 0xff; return a; @@ -310,10 +310,10 @@ static QByteArray sps_set_authUsername(bool success) struct SPCS_AUTHUSERNAME { - QString user, pass; + TQString user, pass; }; -static int spc_get_authUsername(QByteArray *from, SPCS_AUTHUSERNAME *s) +static int spc_get_authUsername(TQByteArray *from, SPCS_AUTHUSERNAME *s) { if(from->size() < 1) return 0; @@ -328,15 +328,15 @@ static int spc_get_authUsername(QByteArray *from, SPCS_AUTHUSERNAME *s) unsigned char plen = from->at(ulen+2); if((int)from->size() < ulen + plen + 3) return 0; - QByteArray a = ByteStream::takeArray(from, ulen + plen + 3); + TQByteArray a = ByteStream::takeArray(from, ulen + plen + 3); - QCString user, pass; + TQCString user, pass; user.resize(ulen+1); pass.resize(plen+1); memcpy(user.data(), a.data()+2, ulen); memcpy(pass.data(), a.data()+ulen+3, plen); - s->user = QString::fromUtf8(user); - s->pass = QString::fromUtf8(pass); + s->user = TQString::fromUtf8(user); + s->pass = TQString::fromUtf8(pass); return 1; } @@ -346,21 +346,21 @@ struct SPSS_AUTHUSERNAME bool success; }; -static int sps_get_authUsername(QByteArray *from, SPSS_AUTHUSERNAME *s) +static int sps_get_authUsername(TQByteArray *from, SPSS_AUTHUSERNAME *s) { if(from->size() < 2) return 0; - QByteArray a = ByteStream::takeArray(from, 2); + TQByteArray a = ByteStream::takeArray(from, 2); s->version = a[0]; s->success = a[1] == 0 ? true: false; return 1; } // connectRequest -static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port, unsigned char cmd1) +static TQByteArray sp_set_request(const TQHostAddress &addr, unsigned short port, unsigned char cmd1) { int at = 0; - QByteArray a(4); + TQByteArray a(4); a[at++] = 0x05; // socks version 5 a[at++] = cmd1; a[at++] = 0x00; // reserved @@ -374,11 +374,11 @@ static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port, else { a[at++] = 0x04; Q_UINT8 a6[16]; - QStringList s6 = QStringList::split(':', addr.toString(), true); + TQStringList s6 = TQStringList::split(':', addr.toString(), true); int at = 0; Q_UINT16 c; bool ok; - for(QStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) { + for(TQStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) { c = (*it).toInt(&ok, 16); a6[at++] = (c >> 8); a6[at++] = c & 0xff; @@ -396,20 +396,20 @@ static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port, return a; } -static QByteArray sp_set_request(const QString &host, Q_UINT16 port, unsigned char cmd1) +static TQByteArray sp_set_request(const TQString &host, Q_UINT16 port, unsigned char cmd1) { // detect for IP addresses - QHostAddress addr; + TQHostAddress addr; if(addr.setAddress(host)) return sp_set_request(addr, port, cmd1); - QCString h = host.utf8(); + TQCString h = host.utf8(); h.truncate(255); - h = QString::fromUtf8(h).utf8(); // delete any partial characters? + h = TQString::fromUtf8(h).utf8(); // delete any partial characters? int hlen = h.length(); int at = 0; - QByteArray a(4); + TQByteArray a(4); a[at++] = 0x05; // socks version 5 a[at++] = cmd1; a[at++] = 0x00; // reserved @@ -434,19 +434,19 @@ struct SPS_CONNREQ unsigned char version; unsigned char cmd; int address_type; - QString host; - QHostAddress addr; + TQString host; + TQHostAddress addr; Q_UINT16 port; }; -static int sp_get_request(QByteArray *from, SPS_CONNREQ *s) +static int sp_get_request(TQByteArray *from, SPS_CONNREQ *s) { int full_len = 4; if((int)from->size() < full_len) return 0; - QString host; - QHostAddress addr; + TQString host; + TQHostAddress addr; unsigned char atype = from->at(3); if(atype == 0x01) { @@ -465,9 +465,9 @@ static int sp_get_request(QByteArray *from, SPS_CONNREQ *s) full_len += host_len; if((int)from->size() < full_len) return 0; - QCString cs(host_len+1); + TQCString cs(host_len+1); memcpy(cs.data(), from->data() + 5, host_len); - host = QString::fromLatin1(cs); + host = TQString::fromLatin1(cs); } else if(atype == 0x04) { full_len += 16; @@ -482,7 +482,7 @@ static int sp_get_request(QByteArray *from, SPS_CONNREQ *s) if((int)from->size() < full_len) return 0; - QByteArray a = ByteStream::takeArray(from, full_len); + TQByteArray a = ByteStream::takeArray(from, full_len); Q_UINT16 p; memcpy(&p, a.data() + full_len - 2, 2); @@ -505,29 +505,29 @@ public: Private() {} BSocket sock; - QString host; + TQString host; int port; - QString user, pass; - QString real_host; + TQString user, pass; + TQString real_host; int real_port; - QByteArray recvBuf; + TQByteArray recvBuf; bool active; int step; int authMethod; bool incoming, waiting; - QString rhost; + TQString rhost; int rport; int pending; bool udp; - QString udpAddr; + TQString udpAddr; int udpPort; }; -SocksClient::SocksClient(QObject *parent) +SocksClient::SocksClient(TQObject *parent) :ByteStream(parent) { init(); @@ -535,7 +535,7 @@ SocksClient::SocksClient(QObject *parent) d->incoming = false; } -SocksClient::SocksClient(int s, QObject *parent) +SocksClient::SocksClient(int s, TQObject *parent) :ByteStream(parent) { init(); @@ -548,12 +548,12 @@ SocksClient::SocksClient(int s, QObject *parent) void SocksClient::init() { d = new Private; - connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected())); - connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed())); - connect(&d->sock, SIGNAL(delayedCloseFinished()), SLOT(sock_delayedCloseFinished())); - connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead())); - connect(&d->sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int))); - connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int))); + connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected())); + connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed())); + connect(&d->sock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sock_delayedCloseFinished())); + connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead())); + connect(&d->sock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sock_bytesWritten(int))); + connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int))); reset(true); } @@ -582,13 +582,13 @@ bool SocksClient::isIncoming() const return d->incoming; } -void SocksClient::setAuth(const QString &user, const QString &pass) +void SocksClient::setAuth(const TQString &user, const TQString &pass) { d->user = user; d->pass = pass; } -void SocksClient::connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port, bool udpMode) +void SocksClient::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port, bool udpMode) { reset(true); @@ -620,19 +620,19 @@ void SocksClient::close() reset(); } -void SocksClient::writeData(const QByteArray &buf) +void SocksClient::writeData(const TQByteArray &buf) { d->pending += buf.size(); d->sock.write(buf); } -void SocksClient::write(const QByteArray &buf) +void SocksClient::write(const TQByteArray &buf) { if(d->active && !d->udp) d->sock.write(buf); } -QByteArray SocksClient::read(int bytes) +TQByteArray SocksClient::read(int bytes) { return ByteStream::read(bytes); } @@ -681,7 +681,7 @@ void SocksClient::sock_delayedCloseFinished() void SocksClient::sock_readyRead() { - QByteArray block = d->sock.read(); + TQByteArray block = d->sock.read(); if(!d->active) { if(d->incoming) @@ -697,7 +697,7 @@ void SocksClient::sock_readyRead() } } -void SocksClient::processOutgoing(const QByteArray &block) +void SocksClient::processOutgoing(const TQByteArray &block) { #ifdef PROX_DEBUG // show hex @@ -726,7 +726,7 @@ void SocksClient::processOutgoing(const QByteArray &block) return; } - QString str; + TQString str; if(s.method == 0x00) { str = "None"; d->authMethod = AuthNone; @@ -818,7 +818,7 @@ void SocksClient::processOutgoing(const QByteArray &block) d->active = true; - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; connected(); if(!self) return; @@ -839,11 +839,11 @@ void SocksClient::do_request() #endif d->step = StepRequest; int cmd = d->udp ? REQ_UDPASSOCIATE : REQ_CONNECT; - QByteArray buf; + TQByteArray buf; if(!d->real_host.isEmpty()) buf = sp_set_request(d->real_host, d->real_port, cmd); else - buf = sp_set_request(QHostAddress(), 0, cmd); + buf = sp_set_request(TQHostAddress(), 0, cmd); writeData(buf); } @@ -886,7 +886,7 @@ void SocksClient::serve() continueIncoming(); } -void SocksClient::processIncoming(const QByteArray &block) +void SocksClient::processIncoming(const TQByteArray &block) { #ifdef PROX_DEBUG // show hex @@ -1045,7 +1045,7 @@ void SocksClient::grantConnect() } } -void SocksClient::grantUDPAssociate(const QString &relayHost, int relayPort) +void SocksClient::grantUDPAssociate(const TQString &relayHost, int relayPort) { if(d->step != StepRequest || !d->waiting) return; @@ -1063,7 +1063,7 @@ void SocksClient::grantUDPAssociate(const QString &relayHost, int relayPort) d->recvBuf.resize(0); } -QHostAddress SocksClient::peerAddress() const +TQHostAddress SocksClient::peerAddress() const { return d->sock.peerAddress(); } @@ -1073,7 +1073,7 @@ Q_UINT16 SocksClient::peerPort() const return d->sock.peerPort(); } -QString SocksClient::udpAddress() const +TQString SocksClient::udpAddress() const { return d->udpAddr; } @@ -1083,7 +1083,7 @@ Q_UINT16 SocksClient::udpPort() const return d->udpPort; } -SocksUDP *SocksClient::createUDP(const QString &host, int port, const QHostAddress &routeAddr, int routePort) +SocksUDP *SocksClient::createUDP(const TQString &host, int port, const TQHostAddress &routeAddr, int routePort) { return new SocksUDP(this, host, port, routeAddr, routePort); } @@ -1097,18 +1097,18 @@ public: Private() {} ServSock serv; - QPtrList<SocksClient> incomingConns; - QSocketDevice *sd; - QSocketNotifier *sn; + TQPtrList<SocksClient> incomingConns; + TQSocketDevice *sd; + TQSocketNotifier *sn; }; -SocksServer::SocksServer(QObject *parent) -:QObject(parent) +SocksServer::SocksServer(TQObject *parent) +:TQObject(parent) { d = new Private; d->sd = 0; d->sn = 0; - connect(&d->serv, SIGNAL(connectionReady(int)), SLOT(connectionReady(int))); + connect(&d->serv, TQT_SIGNAL(connectionReady(int)), TQT_SLOT(connectionReady(int))); } SocksServer::~SocksServer() @@ -1130,16 +1130,16 @@ bool SocksServer::listen(Q_UINT16 port, bool udp) if(!d->serv.listen(port)) return false; if(udp) { - d->sd = new QSocketDevice(QSocketDevice::Datagram); + d->sd = new TQSocketDevice(TQSocketDevice::Datagram); d->sd->setBlocking(false); - if(!d->sd->bind(QHostAddress(), port)) { + if(!d->sd->bind(TQHostAddress(), port)) { delete d->sd; d->sd = 0; d->serv.stop(); return false; } - d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read); - connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int))); + d->sn = new TQSocketNotifier(d->sd->socket(), TQSocketNotifier::Read); + connect(d->sn, TQT_SIGNAL(activated(int)), TQT_SLOT(sn_activated(int))); } return true; } @@ -1158,7 +1158,7 @@ int SocksServer::port() const return d->serv.port(); } -QHostAddress SocksServer::address() const +TQHostAddress SocksServer::address() const { return d->serv.address(); } @@ -1172,15 +1172,15 @@ SocksClient *SocksServer::takeIncoming() d->incomingConns.removeRef(c); // we don't care about errors anymore - disconnect(c, SIGNAL(error(int)), this, SLOT(connectionError())); + disconnect(c, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError())); // don't serve the connection until the event loop, to give the caller a chance to map signals - QTimer::singleShot(0, c, SLOT(serve())); + TQTimer::singleShot(0, c, TQT_SLOT(serve())); return c; } -void SocksServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &data) +void SocksServer::writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data) { if(d->sd) { d->sd->setBlocking(true); @@ -1192,7 +1192,7 @@ void SocksServer::writeUDP(const QHostAddress &addr, int port, const QByteArray void SocksServer::connectionReady(int s) { SocksClient *c = new SocksClient(s, this); - connect(c, SIGNAL(error(int)), this, SLOT(connectionError())); + connect(c, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError())); d->incomingConns.append(c); incomingReady(); } @@ -1206,10 +1206,10 @@ void SocksServer::connectionError() void SocksServer::sn_activated(int) { - QByteArray buf(8192); + TQByteArray buf(8192); int actual = d->sd->readBlock(buf.data(), buf.size()); buf.resize(actual); - QHostAddress pa = d->sd->peerAddress(); + TQHostAddress pa = d->sd->peerAddress(); int pp = d->sd->peerPort(); SPS_UDP s; int r = sp_read_udp(&buf, &s); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h index b10361dd..507caf5f 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h @@ -35,11 +35,11 @@ class SocksUDP : public QObject public: ~SocksUDP(); - void change(const QString &host, int port); - void write(const QByteArray &data); + void change(const TQString &host, int port); + void write(const TQByteArray &data); signals: - void packetReady(const QByteArray &data); + void packetReady(const TQByteArray &data); private slots: void sn_activated(int); @@ -49,7 +49,7 @@ private: Private *d; friend class SocksClient; - SocksUDP(SocksClient *sc, const QString &host, int port, const QHostAddress &routeAddr, int routePort); + SocksUDP(SocksClient *sc, const TQString &host, int port, const TQHostAddress &routeAddr, int routePort); }; class SocksClient : public ByteStream @@ -59,39 +59,39 @@ public: enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth }; enum Method { AuthNone=0x0001, AuthUsername=0x0002 }; enum Request { ReqConnect, ReqUDPAssociate }; - SocksClient(QObject *parent=0); - SocksClient(int, QObject *parent=0); + SocksClient(TQObject *parent=0); + SocksClient(int, TQObject *parent=0); ~SocksClient(); bool isIncoming() const; // outgoing - void setAuth(const QString &user, const QString &pass=""); - void connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port, bool udpMode=false); + void setAuth(const TQString &user, const TQString &pass=""); + void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port, bool udpMode=false); // incoming void chooseMethod(int); void authGrant(bool); void requestDeny(); void grantConnect(); - void grantUDPAssociate(const QString &relayHost, int relayPort); + void grantUDPAssociate(const TQString &relayHost, int relayPort); // from ByteStream bool isOpen() const; void close(); - void write(const QByteArray &); - QByteArray read(int bytes=0); + void write(const TQByteArray &); + TQByteArray read(int bytes=0); int bytesAvailable() const; int bytesToWrite() const; // remote address - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; // udp - QString udpAddress() const; + TQString udpAddress() const; Q_UINT16 udpPort() const; - SocksUDP *createUDP(const QString &host, int port, const QHostAddress &routeAddr, int routePort); + SocksUDP *createUDP(const TQString &host, int port, const TQHostAddress &routeAddr, int routePort); signals: // outgoing @@ -99,8 +99,8 @@ signals: // incoming void incomingMethods(int); - void incomingAuth(const QString &user, const QString &pass); - void incomingConnectRequest(const QString &host, int port); + void incomingAuth(const TQString &user, const TQString &pass); + void incomingConnectRequest(const TQString &host, int port); void incomingUDPAssociateRequest(); private slots: @@ -119,31 +119,31 @@ private: void init(); void reset(bool clear=false); void do_request(); - void processOutgoing(const QByteArray &); - void processIncoming(const QByteArray &); + void processOutgoing(const TQByteArray &); + void processIncoming(const TQByteArray &); void continueIncoming(); - void writeData(const QByteArray &a); + void writeData(const TQByteArray &a); }; class SocksServer : public QObject { Q_OBJECT public: - SocksServer(QObject *parent=0); + SocksServer(TQObject *parent=0); ~SocksServer(); bool isActive() const; bool listen(Q_UINT16 port, bool udp=false); void stop(); int port() const; - QHostAddress address() const; + TQHostAddress address() const; SocksClient *takeIncoming(); - void writeUDP(const QHostAddress &addr, int port, const QByteArray &data); + void writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data); signals: void incomingReady(); - void incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data); + void incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data); private slots: void connectionReady(int); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp index 851873f2..d462a17e 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp @@ -20,9 +20,9 @@ #include"srvresolver.h" -#include<qcstring.h> -#include<qtimer.h> -#include<qdns.h> +#include<tqcstring.h> +#include<tqtimer.h> +#include<tqdns.h> #include"safedelete.h" #ifndef NO_NDNS @@ -31,14 +31,14 @@ // CS_NAMESPACE_BEGIN -static void sortSRVList(QValueList<QDns::Server> &list) +static void sortSRVList(TQValueList<TQDns::Server> &list) { - QValueList<QDns::Server> tmp = list; + TQValueList<TQDns::Server> tmp = list; list.clear(); while(!tmp.isEmpty()) { - QValueList<QDns::Server>::Iterator p = tmp.end(); - for(QValueList<QDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) { + TQValueList<TQDns::Server>::Iterator p = tmp.end(); + for(TQValueList<TQDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) { if(p == tmp.end()) p = it; else { @@ -60,34 +60,34 @@ class SrvResolver::Private public: Private() {} - QDns *qdns; + TQDns *qdns; #ifndef NO_NDNS NDns ndns; #endif bool failed; - QHostAddress resultAddress; + TQHostAddress resultAddress; Q_UINT16 resultPort; bool srvonly; - QString srv; - QValueList<QDns::Server> servers; + TQString srv; + TQValueList<TQDns::Server> servers; bool aaaa; - QTimer t; + TQTimer t; SafeDelete sd; }; -SrvResolver::SrvResolver(QObject *parent) -:QObject(parent) +SrvResolver::SrvResolver(TQObject *parent) +:TQObject(parent) { d = new Private; d->qdns = 0; #ifndef NO_NDNS - connect(&d->ndns, SIGNAL(resultsReady()), SLOT(ndns_done())); + connect(&d->ndns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done())); #endif - connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout())); + connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout())); stop(); } @@ -97,31 +97,31 @@ SrvResolver::~SrvResolver() delete d; } -void SrvResolver::resolve(const QString &server, const QString &type, const QString &proto) +void SrvResolver::resolve(const TQString &server, const TQString &type, const TQString &proto) { stop(); d->failed = false; d->srvonly = false; - d->srv = QString("_") + type + "._" + proto + '.' + server; + d->srv = TQString("_") + type + "._" + proto + '.' + server; d->t.start(15000, true); d->qdns = new QDns; - connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done())); - d->qdns->setRecordType(QDns::Srv); + connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done())); + d->qdns->setRecordType(TQDns::Srv); d->qdns->setLabel(d->srv); } -void SrvResolver::resolveSrvOnly(const QString &server, const QString &type, const QString &proto) +void SrvResolver::resolveSrvOnly(const TQString &server, const TQString &type, const TQString &proto) { stop(); d->failed = false; d->srvonly = true; - d->srv = QString("_") + type + "._" + proto + '.' + server; + d->srv = TQString("_") + type + "._" + proto + '.' + server; d->t.start(15000, true); d->qdns = new QDns; - connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done())); - d->qdns->setRecordType(QDns::Srv); + connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done())); + d->qdns->setRecordType(TQDns::Srv); d->qdns->setLabel(d->srv); } @@ -146,7 +146,7 @@ void SrvResolver::stop() if(d->ndns.isBusy()) d->ndns.stop(); #endif - d->resultAddress = QHostAddress(); + d->resultAddress = TQHostAddress(); d->resultPort = 0; d->servers.clear(); d->srv = ""; @@ -165,7 +165,7 @@ bool SrvResolver::isBusy() const return false; } -QValueList<QDns::Server> SrvResolver::servers() const +TQValueList<TQDns::Server> SrvResolver::servers() const { return d->servers; } @@ -175,7 +175,7 @@ bool SrvResolver::failed() const return d->failed; } -QHostAddress SrvResolver::resultAddress() const +TQHostAddress SrvResolver::resultAddress() const { return d->resultAddress; } @@ -191,11 +191,11 @@ void SrvResolver::tryNext() d->ndns.resolve(d->servers.first().name); #else d->qdns = new QDns; - connect(d->qdns, SIGNAL(resultsReady()), SLOT(ndns_done())); + connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done())); if(d->aaaa) - d->qdns->setRecordType(QDns::Aaaa); // IPv6 + d->qdns->setRecordType(TQDns::Aaaa); // IPv6 else - d->qdns->setRecordType(QDns::A); // IPv4 + d->qdns->setRecordType(TQDns::A); // IPv4 d->qdns->setLabel(d->servers.first().name); #endif } @@ -213,8 +213,8 @@ void SrvResolver::qdns_done() SafeDeleteLock s(&d->sd); // grab the server list and destroy the qdns object - QValueList<QDns::Server> list; - if(d->qdns->recordType() == QDns::Srv) + TQValueList<TQDns::Server> list; + if(d->qdns->recordType() == TQDns::Srv) list = d->qdns->servers(); d->qdns->disconnect(this); d->sd.deleteLater(d->qdns); @@ -247,7 +247,7 @@ void SrvResolver::ndns_done() d->servers.remove(d->servers.begin()); if(r) { - d->resultAddress = QHostAddress(d->ndns.result()); + d->resultAddress = TQHostAddress(d->ndns.result()); d->resultPort = port; resultsReady(); } @@ -273,8 +273,8 @@ void SrvResolver::ndns_done() SafeDeleteLock s(&d->sd); // grab the address list and destroy the qdns object - QValueList<QHostAddress> list; - if(d->qdns->recordType() == QDns::A || d->qdns->recordType() == QDns::Aaaa) + TQValueList<TQHostAddress> list; + if(d->qdns->recordType() == TQDns::A || d->qdns->recordType() == TQDns::Aaaa) list = d->qdns->addresses(); d->qdns->disconnect(this); d->sd.deleteLater(d->qdns); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h index fb5aa2b1..400639c1 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h @@ -21,8 +21,8 @@ #ifndef CS_SRVRESOLVER_H #define CS_SRVRESOLVER_H -#include<qvaluelist.h> -#include<qdns.h> +#include<tqvaluelist.h> +#include<tqdns.h> // CS_NAMESPACE_BEGIN @@ -30,19 +30,19 @@ class SrvResolver : public QObject { Q_OBJECT public: - SrvResolver(QObject *parent=0); + SrvResolver(TQObject *parent=0); ~SrvResolver(); - void resolve(const QString &server, const QString &type, const QString &proto); - void resolveSrvOnly(const QString &server, const QString &type, const QString &proto); + void resolve(const TQString &server, const TQString &type, const TQString &proto); + void resolveSrvOnly(const TQString &server, const TQString &type, const TQString &proto); void next(); void stop(); bool isBusy() const; - QValueList<QDns::Server> servers() const; + TQValueList<TQDns::Server> servers() const; bool failed() const; - QHostAddress resultAddress() const; + TQHostAddress resultAddress() const; Q_UINT16 resultPort() const; signals: diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp index c1483196..06df3f73 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp @@ -33,21 +33,21 @@ //! ... //! //! // encode a block of data into base64 -//! QByteArray block(1024); -//! QByteArray enc = Base64::encode(block); +//! TQByteArray block(1024); +//! TQByteArray enc = Base64::encode(block); //! //! \endcode //! //! Encodes array \a s and returns the result. -QByteArray Base64::encode(const QByteArray &s) +TQByteArray Base64::encode(const TQByteArray &s) { int i; int len = s.size(); char tbl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; int a, b, c; - QByteArray p((len+2)/3*4); + TQByteArray p((len+2)/3*4); int at = 0; for( i = 0; i < len; i += 3 ) { a = ((unsigned char)s[i] & 3) << 4; @@ -74,10 +74,10 @@ QByteArray Base64::encode(const QByteArray &s) //! //! Decodes array \a s and returns the result. -QByteArray Base64::decode(const QByteArray &s) +TQByteArray Base64::decode(const TQByteArray &s) { // return value - QByteArray p; + TQByteArray p; // -1 specifies invalid // 64 specifies eof @@ -140,41 +140,41 @@ QByteArray Base64::decode(const QByteArray &s) //! //! Encodes array \a a and returns the result as a string. -QString Base64::arrayToString(const QByteArray &a) +TQString Base64::arrayToString(const TQByteArray &a) { - QByteArray b = encode(a); - QCString c; + TQByteArray b = encode(a); + TQCString c; c.resize(b.size()+1); memcpy(c.data(), b.data(), b.size()); - return QString::fromLatin1(c); + return TQString::fromLatin1(c); } //! //! Decodes string \a s and returns the result as an array. -QByteArray Base64::stringToArray(const QString &s) +TQByteArray Base64::stringToArray(const TQString &s) { if(s.isEmpty()) - return QByteArray(); + return TQByteArray(); // Unfold data - QString us(s); + TQString us(s); us.remove('\n'); const char *c = us.latin1(); int len = strlen(c); - QByteArray b(len); + TQByteArray b(len); memcpy(b.data(), c, len); - QByteArray a = decode(b); + TQByteArray a = decode(b); return a; } //! //! Encodes string \a s and returns the result as a string. -QString Base64::encodeString(const QString &s) +TQString Base64::encodeString(const TQString &s) { - QCString c = s.utf8(); + TQCString c = s.utf8(); int len = c.length(); - QByteArray b(len); + TQByteArray b(len); memcpy(b.data(), c.data(), len); return arrayToString(b); } diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/base64.h b/kopete/protocols/jabber/libiris/cutestuff/util/base64.h index 3aae2ba6..eaa2ff5b 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/base64.h +++ b/kopete/protocols/jabber/libiris/cutestuff/util/base64.h @@ -21,18 +21,18 @@ #ifndef CS_BASE64_H #define CS_BASE64_H -#include<qstring.h> +#include<tqstring.h> // CS_NAMESPACE_BEGIN class Base64 { public: - static QByteArray encode(const QByteArray &); - static QByteArray decode(const QByteArray &); - static QString arrayToString(const QByteArray &); - static QByteArray stringToArray(const QString &); - static QString encodeString(const QString &); + static TQByteArray encode(const TQByteArray &); + static TQByteArray decode(const TQByteArray &); + static TQString arrayToString(const TQByteArray &); + static TQByteArray stringToArray(const TQString &); + static TQString encodeString(const TQString &); }; // CS_NAMESPACE_END diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp index 068e39a0..e78c2f9a 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp @@ -35,7 +35,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>. +//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -59,13 +59,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -95,7 +95,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -109,7 +109,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { return takeRead(bytes); } @@ -130,9 +130,9 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -153,14 +153,14 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { appendArray(&d->readBuf, block); } //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { appendArray(&d->writeBuf, block); } @@ -169,7 +169,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { return takeArray(&d->readBuf, size, del); } @@ -178,21 +178,21 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { return takeArray(&d->writeBuf, size, del); } //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { return d->writeBuf; } @@ -207,7 +207,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -218,9 +218,9 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h index b90f109d..f10b46a1 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h +++ b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include<qobject.h> -#include<qcstring.h> +#include<tqobject.h> +#include<tqcstring.h> // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp index f1581a6f..8f918dde 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp @@ -25,9 +25,9 @@ #include"bytestream.h" #include"qrandom.h" -static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, const QByteArray &key, const QByteArray &iv, bool pad, QByteArray *out) +static bool lib_encryptArray(const EVP_CIPHER *type, const TQByteArray &buf, const TQByteArray &key, const TQByteArray &iv, bool pad, TQByteArray *out) { - QByteArray result(buf.size()+type->block_size); + TQByteArray result(buf.size()+type->block_size); int len; EVP_CIPHER_CTX c; @@ -42,7 +42,7 @@ static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons return false; result.resize(len); if(pad) { - QByteArray last(type->block_size); + TQByteArray last(type->block_size); if(!EVP_EncryptFinal_ex(&c, (unsigned char *)last.data(), &len)) return false; last.resize(len); @@ -54,9 +54,9 @@ static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons return true; } -static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, const QByteArray &key, const QByteArray &iv, bool pad, QByteArray *out) +static bool lib_decryptArray(const EVP_CIPHER *type, const TQByteArray &buf, const TQByteArray &key, const TQByteArray &iv, bool pad, TQByteArray *out) { - QByteArray result(buf.size()+type->block_size); + TQByteArray result(buf.size()+type->block_size); int len; EVP_CIPHER_CTX c; @@ -77,7 +77,7 @@ static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons } result.resize(len); if(pad) { - QByteArray last(type->block_size); + TQByteArray last(type->block_size); if(!EVP_DecryptFinal_ex(&c, (unsigned char *)last.data(), &len)) return false; last.resize(len); @@ -89,9 +89,9 @@ static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons return true; } -static bool lib_generateKeyIV(const EVP_CIPHER *type, const QByteArray &data, const QByteArray &salt, QByteArray *key, QByteArray *iv) +static bool lib_generateKeyIV(const EVP_CIPHER *type, const TQByteArray &data, const TQByteArray &salt, TQByteArray *key, TQByteArray *iv) { - QByteArray k, i; + TQByteArray k, i; unsigned char *kp = 0; unsigned char *ip = 0; if(key) { @@ -129,7 +129,7 @@ Cipher::Key Cipher::generateKey(Type t) const EVP_CIPHER *type = typeToCIPHER(t); if(!type) return k; - QByteArray out; + TQByteArray out; if(!lib_generateKeyIV(type, QRandom::randomArray(128), QRandom::randomArray(2), &out, 0)) return k; k.setType(t); @@ -137,14 +137,14 @@ Cipher::Key Cipher::generateKey(Type t) return k; } -QByteArray Cipher::generateIV(Type t) +TQByteArray Cipher::generateIV(Type t) { const EVP_CIPHER *type = typeToCIPHER(t); if(!type) - return QByteArray(); - QByteArray out; - if(!lib_generateKeyIV(type, QCString("Get this man an iv!"), QByteArray(), 0, &out)) - return QByteArray(); + return TQByteArray(); + TQByteArray out; + if(!lib_generateKeyIV(type, TQCString("Get this man an iv!"), TQByteArray(), 0, &out)) + return TQByteArray(); return out; } @@ -156,32 +156,32 @@ int Cipher::ivSize(Type t) return type->iv_len; } -QByteArray Cipher::encrypt(const QByteArray &buf, const Key &key, const QByteArray &iv, bool pad, bool *ok) +TQByteArray Cipher::encrypt(const TQByteArray &buf, const Key &key, const TQByteArray &iv, bool pad, bool *ok) { if(ok) *ok = false; const EVP_CIPHER *type = typeToCIPHER(key.type()); if(!type) - return QByteArray(); - QByteArray out; + return TQByteArray(); + TQByteArray out; if(!lib_encryptArray(type, buf, key.data(), iv, pad, &out)) - return QByteArray(); + return TQByteArray(); if(ok) *ok = true; return out; } -QByteArray Cipher::decrypt(const QByteArray &buf, const Key &key, const QByteArray &iv, bool pad, bool *ok) +TQByteArray Cipher::decrypt(const TQByteArray &buf, const Key &key, const TQByteArray &iv, bool pad, bool *ok) { if(ok) *ok = false; const EVP_CIPHER *type = typeToCIPHER(key.type()); if(!type) - return QByteArray(); - QByteArray out; + return TQByteArray(); + TQByteArray out; if(!lib_decryptArray(type, buf, key.data(), iv, pad, &out)) - return QByteArray(); + return TQByteArray(); if(ok) *ok = true; @@ -272,7 +272,7 @@ RSAKey generateRSAKey() return key; } -QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok) +TQByteArray encryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok) { if(ok) *ok = false; @@ -281,12 +281,12 @@ QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok) int flen = buf.size(); if(flen >= size - 11) flen = size - 11; - QByteArray result(size); + TQByteArray result(size); unsigned char *from = (unsigned char *)buf.data(); unsigned char *to = (unsigned char *)result.data(); int r = RSA_public_encrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_PADDING); if(r == -1) - return QByteArray(); + return TQByteArray(); result.resize(r); if(ok) @@ -294,19 +294,19 @@ QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok) return result; } -QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok) +TQByteArray decryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok) { if(ok) *ok = false; int size = RSA_size((RSA *)key.data()); int flen = buf.size(); - QByteArray result(size); + TQByteArray result(size); unsigned char *from = (unsigned char *)buf.data(); unsigned char *to = (unsigned char *)result.data(); int r = RSA_private_decrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_PADDING); if(r == -1) - return QByteArray(); + return TQByteArray(); result.resize(r); if(ok) @@ -314,7 +314,7 @@ QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok) return result; } -QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok) +TQByteArray encryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok) { if(ok) *ok = false; @@ -323,12 +323,12 @@ QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok) int flen = buf.size(); if(flen >= size - 41) flen = size - 41; - QByteArray result(size); + TQByteArray result(size); unsigned char *from = (unsigned char *)buf.data(); unsigned char *to = (unsigned char *)result.data(); int r = RSA_public_encrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_OAEP_PADDING); if(r == -1) - return QByteArray(); + return TQByteArray(); result.resize(r); if(ok) @@ -336,19 +336,19 @@ QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok) return result; } -QByteArray decryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok) +TQByteArray decryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok) { if(ok) *ok = false; int size = RSA_size((RSA *)key.data()); int flen = buf.size(); - QByteArray result(size); + TQByteArray result(size); unsigned char *from = (unsigned char *)buf.data(); unsigned char *to = (unsigned char *)result.data(); int r = RSA_private_decrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_OAEP_PADDING); if(r == -1) - return QByteArray(); + return TQByteArray(); result.resize(r); if(ok) diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h index 148deff8..02c7606c 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h +++ b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h @@ -21,8 +21,8 @@ #ifndef CS_CIPHER_H #define CS_CIPHER_H -#include<qstring.h> -#include<qcstring.h> +#include<tqstring.h> +#include<tqcstring.h> namespace Cipher { @@ -36,19 +36,19 @@ namespace Cipher bool isValid() const { return (v_type == None ? false: true); } void setType(Type x) { v_type = x; } Type type() const { return v_type; } - void setData(const QByteArray &d) { v_data = d; } - const QByteArray & data() const { return v_data; } + void setData(const TQByteArray &d) { v_data = d; } + const TQByteArray & data() const { return v_data; } private: Type v_type; - QByteArray v_data; + TQByteArray v_data; }; Key generateKey(Type); - QByteArray generateIV(Type); + TQByteArray generateIV(Type); int ivSize(Type); - QByteArray encrypt(const QByteArray &, const Key &, const QByteArray &iv, bool pad, bool *ok=0); - QByteArray decrypt(const QByteArray &, const Key &, const QByteArray &iv, bool pad, bool *ok=0); + TQByteArray encrypt(const TQByteArray &, const Key &, const TQByteArray &iv, bool pad, bool *ok=0); + TQByteArray decrypt(const TQByteArray &, const Key &, const TQByteArray &iv, bool pad, bool *ok=0); } class RSAKey @@ -71,9 +71,9 @@ private: }; RSAKey generateRSAKey(); -QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok=0); -QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok=0); -QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok=0); -QByteArray decryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok=0); +TQByteArray encryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok=0); +TQByteArray decryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok=0); +TQByteArray encryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok=0); +TQByteArray decryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok=0); #endif diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp index 3becd7c5..9805de2f 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp @@ -9,15 +9,15 @@ uchar QRandom::randomChar() uint QRandom::randomInt() { - QByteArray a = randomArray(sizeof(uint)); + TQByteArray a = randomArray(sizeof(uint)); uint x; memcpy(&x, a.data(), a.size()); return x; } -QByteArray QRandom::randomArray(uint size) +TQByteArray QRandom::randomArray(uint size) { - QByteArray a(size); + TQByteArray a(size); for(uint n = 0; n < size; ++n) a[n] = randomChar(); return a; diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h index 92339fb0..f04c7e0f 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h +++ b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h @@ -1,14 +1,14 @@ #ifndef CS_QRANDOM_H #define CS_QRANDOM_H -#include<qcstring.h> +#include<tqcstring.h> class QRandom { public: static uchar randomChar(); static uint randomInt(); - static QByteArray randomArray(uint size); + static TQByteArray randomArray(uint size); }; #endif diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp index 6bd012e9..12ed189b 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp @@ -1,6 +1,6 @@ #include"safedelete.h" -#include<qtimer.h> +#include<tqtimer.h> //---------------------------------------------------------------------------- // SafeDelete @@ -16,7 +16,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -35,16 +35,16 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -97,7 +97,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -106,7 +106,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h index 078d36cd..add5af6b 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h +++ b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h @@ -1,8 +1,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include<qobject.h> -#include<qobjectlist.h> +#include<tqobject.h> +#include<tqobjectlist.h> class SafeDelete; class SafeDeleteLock @@ -24,13 +24,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -43,7 +43,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -52,7 +52,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp index f4ad554f..a3195d89 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp @@ -161,10 +161,10 @@ void SHA1::final(unsigned char digest[20], SHA1_CONTEXT* context) memset(&finalcount, 0, 8); } -QByteArray SHA1::hash(const QByteArray &a) +TQByteArray SHA1::hash(const TQByteArray &a) { SHA1_CONTEXT context; - QByteArray b(20); + TQByteArray b(20); SHA1 s; s.init(&context); @@ -173,19 +173,19 @@ QByteArray SHA1::hash(const QByteArray &a) return b; } -QByteArray SHA1::hashString(const QCString &cs) +TQByteArray SHA1::hashString(const TQCString &cs) { - QByteArray a(cs.length()); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return SHA1::hash(a); } -QString SHA1::digest(const QString &in) +TQString SHA1::digest(const TQString &in) { - QByteArray a = SHA1::hashString(in.utf8()); - QString out; + TQByteArray a = SHA1::hashString(in.utf8()); + TQString out; for(int n = 0; n < (int)a.size(); ++n) { - QString str; + TQString str; str.sprintf("%02x", (uchar)a[n]); out.append(str); } diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h index 797c3753..7f1a3f9e 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h +++ b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h @@ -21,16 +21,16 @@ #ifndef CS_SHA1_H #define CS_SHA1_H -#include<qstring.h> +#include<tqstring.h> // CS_NAMESPACE_BEGIN class SHA1 { public: - static QByteArray hash(const QByteArray &); - static QByteArray hashString(const QCString &); - static QString digest(const QString &); + static TQByteArray hash(const TQByteArray &); + static TQByteArray hashString(const TQCString &); + static TQString digest(const TQString &); private: SHA1(); diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp index fa446d58..0c8b46df 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp @@ -20,38 +20,38 @@ #include"showtextdlg.h" -#include<qlayout.h> -#include<qtextedit.h> -#include<qpushbutton.h> -#include<qfile.h> -#include<qtextstream.h> +#include<tqlayout.h> +#include<tqtextedit.h> +#include<tqpushbutton.h> +#include<tqfile.h> +#include<tqtextstream.h> -ShowTextDlg::ShowTextDlg(const QString &fname, bool rich, QWidget *parent, const char *name) -:QDialog(parent, name, FALSE, WDestructiveClose) +ShowTextDlg::ShowTextDlg(const TQString &fname, bool rich, TQWidget *parent, const char *name) +:TQDialog(parent, name, FALSE, WDestructiveClose) { - QString text; + TQString text; - QFile f(fname); + TQFile f(fname); if(f.open(IO_ReadOnly)) { - QTextStream t(&f); + TQTextStream t(&f); while(!t.eof()) text += t.readLine() + '\n'; f.close(); } - QVBoxLayout *vb1 = new QVBoxLayout(this, 8); - QTextEdit *te = new QTextEdit(this); + TQVBoxLayout *vb1 = new TQVBoxLayout(this, 8); + TQTextEdit *te = new TQTextEdit(this); te->setReadOnly(TRUE); - te->setTextFormat(rich ? QTextEdit::RichText : QTextEdit::PlainText); + te->setTextFormat(rich ? TQTextEdit::RichText : TQTextEdit::PlainText); te->setText(text); vb1->addWidget(te); - QHBoxLayout *hb1 = new QHBoxLayout(vb1); + TQHBoxLayout *hb1 = new TQHBoxLayout(vb1); hb1->addStretch(1); - QPushButton *pb = new QPushButton(tr("&OK"), this); - connect(pb, SIGNAL(clicked()), SLOT(accept())); + TQPushButton *pb = new TQPushButton(tr("&OK"), this); + connect(pb, TQT_SIGNAL(clicked()), TQT_SLOT(accept())); hb1->addWidget(pb); hb1->addStretch(1); diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h index 08c74c5d..3d92dd74 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h +++ b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h @@ -21,13 +21,13 @@ #ifndef CS_SHOWTEXTDLG_H #define CS_SHOWTEXTDLG_H -#include<qdialog.h> +#include<tqdialog.h> class ShowTextDlg : public QDialog { Q_OBJECT public: - ShowTextDlg(const QString &fname, bool rich=FALSE, QWidget *parent=0, const char *name=0); + ShowTextDlg(const TQString &fname, bool rich=FALSE, TQWidget *parent=0, const char *name=0); }; #endif diff --git a/kopete/protocols/jabber/libiris/iris/include/im.h b/kopete/protocols/jabber/libiris/iris/include/im.h index 170338fc..f4905057 100644 --- a/kopete/protocols/jabber/libiris/iris/include/im.h +++ b/kopete/protocols/jabber/libiris/iris/include/im.h @@ -21,8 +21,8 @@ #ifndef XMPP_IM_H #define XMPP_IM_H -#include<qdatetime.h> -#include<qvaluelist.h> +#include<tqdatetime.h> +#include<tqvaluelist.h> #include"xmpp.h" namespace XMPP @@ -30,24 +30,24 @@ namespace XMPP class Url { public: - Url(const QString &url="", const QString &desc=""); + Url(const TQString &url="", const TQString &desc=""); Url(const Url &); Url & operator=(const Url &); ~Url(); - QString url() const; - QString desc() const; + TQString url() const; + TQString desc() const; - void setUrl(const QString &); - void setDesc(const QString &); + void setUrl(const TQString &); + void setDesc(const TQString &); private: class Private; Private *d; }; - typedef QValueList<Url> UrlList; - typedef QMap<QString, QString> StringMap; + typedef TQValueList<Url> UrlList; + typedef TQMap<TQString, TQString> StringMap; typedef enum { OfflineEvent, DeliveredEvent, DisplayedEvent, ComposingEvent, CancelEvent, InactiveEvent, GoneEvent } MsgEvent; @@ -61,29 +61,29 @@ namespace XMPP Jid to() const; Jid from() const; - QString id() const; - QString type() const; - QString lang() const; - QString subject(const QString &lang="") const; - QString body(const QString &lang="") const; - QString xHTMLBody(const QString &lang="") const; - QString thread() const; + TQString id() const; + TQString type() const; + TQString lang() const; + TQString subject(const TQString &lang="") const; + TQString body(const TQString &lang="") const; + TQString xHTMLBody(const TQString &lang="") const; + TQString thread() const; Stanza::Error error() const; void setTo(const Jid &j); void setFrom(const Jid &j); - void setId(const QString &s); - void setType(const QString &s); - void setLang(const QString &s); - void setSubject(const QString &s, const QString &lang=""); - void setBody(const QString &s, const QString &lang=""); - void setXHTMLBody(const QString &s, const QString &lang="", const QString &attr = ""); - void setThread(const QString &s); + void setId(const TQString &s); + void setType(const TQString &s); + void setLang(const TQString &s); + void setSubject(const TQString &s, const TQString &lang=""); + void setBody(const TQString &s, const TQString &lang=""); + void setXHTMLBody(const TQString &s, const TQString &lang="", const TQString &attr = ""); + void setThread(const TQString &s); void setError(const Stanza::Error &err); // JEP-0091 - QDateTime timeStamp() const; - void setTimeStamp(const QDateTime &ts); + TQDateTime timeStamp() const; + void setTimeStamp(const TQDateTime &ts); // JEP-0066 UrlList urlList() const; @@ -92,19 +92,19 @@ namespace XMPP void setUrlList(const UrlList &list); // JEP-0022 - QString eventId() const; - void setEventId(const QString& id); + TQString eventId() const; + void setEventId(const TQString& id); bool containsEvents() const; bool containsEvent(MsgEvent e) const; void addEvent(MsgEvent e); // JEP-0027 - QString xencrypted() const; - void setXEncrypted(const QString &s); + TQString xencrypted() const; + void setXEncrypted(const TQString &s); // Obsolete invitation - QString invite() const; - void setInvite(const QString &s); + TQString invite() const; + void setInvite(const TQString &s); // for compatibility. delete me later bool spooled() const; @@ -129,8 +129,8 @@ namespace XMPP int type() const; - QString toString() const; - bool fromString(const QString &); + TQString toString() const; + bool fromString(const TQString &); private: SubType value; @@ -139,56 +139,56 @@ namespace XMPP class Status { public: - Status(const QString &show="", const QString &status="", int priority=0, bool available=true); + Status(const TQString &show="", const TQString &status="", int priority=0, bool available=true); ~Status(); int priority() const; - const QString & show() const; - const QString & status() const; - QDateTime timeStamp() const; - const QString & keyID() const; + const TQString & show() const; + const TQString & status() const; + TQDateTime timeStamp() const; + const TQString & keyID() const; bool isAvailable() const; bool isAway() const; bool isInvisible() const; bool hasError() const; int errorCode() const; - const QString & errorString() const; + const TQString & errorString() const; - const QString & xsigned() const; - const QString & songTitle() const; - const QString & capsNode() const; - const QString & capsVersion() const; - const QString & capsExt() const; + const TQString & xsigned() const; + const TQString & songTitle() const; + const TQString & capsNode() const; + const TQString & capsVersion() const; + const TQString & capsExt() const; void setPriority(int); - void setShow(const QString &); - void setStatus(const QString &); - void setTimeStamp(const QDateTime &); - void setKeyID(const QString &); + void setShow(const TQString &); + void setStatus(const TQString &); + void setTimeStamp(const TQDateTime &); + void setKeyID(const TQString &); void setIsAvailable(bool); void setIsInvisible(bool); - void setError(int, const QString &); - void setCapsNode(const QString&); - void setCapsVersion(const QString&); - void setCapsExt(const QString&); + void setError(int, const TQString &); + void setCapsNode(const TQString&); + void setCapsVersion(const TQString&); + void setCapsExt(const TQString&); - void setXSigned(const QString &); - void setSongTitle(const QString &); + void setXSigned(const TQString &); + void setSongTitle(const TQString &); private: int v_priority; - QString v_show, v_status, v_key; - QDateTime v_timeStamp; + TQString v_show, v_status, v_key; + TQDateTime v_timeStamp; bool v_isAvailable; bool v_isInvisible; - QString v_xsigned; + TQString v_xsigned; // gabber song extension - QString v_songTitle; - QString v_capsNode, v_capsVersion, v_capsExt; + TQString v_songTitle; + TQString v_capsNode, v_capsVersion, v_capsExt; int ecode; - QString estr; + TQString estr; class Private; Private *d; @@ -197,33 +197,33 @@ namespace XMPP class Resource { public: - Resource(const QString &name="", const Status &s=Status()); + Resource(const TQString &name="", const Status &s=Status()); ~Resource(); - const QString & name() const; + const TQString & name() const; int priority() const; const Status & status() const; - void setName(const QString &); + void setName(const TQString &); void setStatus(const Status &); private: - QString v_name; + TQString v_name; Status v_status; class ResourcePrivate *d; }; - class ResourceList : public QValueList<Resource> + class ResourceList : public TQValueList<Resource> { public: ResourceList(); ~ResourceList(); - ResourceList::Iterator find(const QString &); + ResourceList::Iterator find(const TQString &); ResourceList::Iterator priority(); - ResourceList::ConstIterator find(const QString &) const; + ResourceList::ConstIterator find(const TQString &) const; ResourceList::ConstIterator priority() const; private: @@ -237,37 +237,37 @@ namespace XMPP virtual ~RosterItem(); const Jid & jid() const; - const QString & name() const; - const QStringList & groups() const; + const TQString & name() const; + const TQStringList & groups() const; const Subscription & subscription() const; - const QString & ask() const; + const TQString & ask() const; bool isPush() const; - bool inGroup(const QString &) const; + bool inGroup(const TQString &) const; virtual void setJid(const Jid &); - void setName(const QString &); - void setGroups(const QStringList &); + void setName(const TQString &); + void setGroups(const TQStringList &); void setSubscription(const Subscription &); - void setAsk(const QString &); + void setAsk(const TQString &); void setIsPush(bool); - bool addGroup(const QString &); - bool removeGroup(const QString &); + bool addGroup(const TQString &); + bool removeGroup(const TQString &); - QDomElement toXml(QDomDocument *) const; - bool fromXml(const QDomElement &); + TQDomElement toXml(TQDomDocument *) const; + bool fromXml(const TQDomElement &); private: Jid v_jid; - QString v_name; - QStringList v_groups; + TQString v_name; + TQStringList v_groups; Subscription v_subscription; - QString v_ask; + TQString v_ask; bool v_push; class RosterItemPrivate *d; }; - class Roster : public QValueList<RosterItem> + class Roster : public TQValueList<RosterItem> { public: Roster(); @@ -284,12 +284,12 @@ namespace XMPP { public: Features(); - Features(const QStringList &); - Features(const QString &); + Features(const TQStringList &); + Features(const TQString &); ~Features(); - QStringList list() const; // actual featurelist - void setList(const QStringList &); + TQStringList list() const; // actual featurelist + void setList(const TQStringList &); // features bool canRegister() const; @@ -317,19 +317,19 @@ namespace XMPP }; // useful functions - bool test(const QStringList &) const; + bool test(const TQStringList &) const; - QString name() const; - static QString name(long id); - static QString name(const QString &feature); + TQString name() const; + static TQString name(long id); + static TQString name(const TQString &feature); long id() const; - static long id(const QString &feature); - static QString feature(long id); + static long id(const TQString &feature); + static TQString feature(long id); class FeatureName; private: - QStringList _list; + TQStringList _list; }; class AgentItem @@ -338,24 +338,24 @@ namespace XMPP AgentItem() { } const Jid & jid() const { return v_jid; } - const QString & name() const { return v_name; } - const QString & category() const { return v_category; } - const QString & type() const { return v_type; } + const TQString & name() const { return v_name; } + const TQString & category() const { return v_category; } + const TQString & type() const { return v_type; } const Features & features() const { return v_features; } void setJid(const Jid &j) { v_jid = j; } - void setName(const QString &n) { v_name = n; } - void setCategory(const QString &c) { v_category = c; } - void setType(const QString &t) { v_type = t; } + void setName(const TQString &n) { v_name = n; } + void setCategory(const TQString &c) { v_category = c; } + void setType(const TQString &t) { v_type = t; } void setFeatures(const Features &f) { v_features = f; } private: Jid v_jid; - QString v_name, v_category, v_type; + TQString v_name, v_category, v_type; Features v_features; }; - typedef QValueList<AgentItem> AgentList; + typedef TQValueList<AgentItem> AgentList; class DiscoItem { @@ -364,12 +364,12 @@ namespace XMPP ~DiscoItem(); const Jid &jid() const; - const QString &node() const; - const QString &name() const; + const TQString &node() const; + const TQString &name() const; void setJid(const Jid &); - void setName(const QString &); - void setNode(const QString &); + void setName(const TQString &); + void setNode(const TQString &); enum Action { None = 0, @@ -385,19 +385,19 @@ namespace XMPP struct Identity { - QString category; - QString name; - QString type; + TQString category; + TQString name; + TQString type; }; - typedef QValueList<Identity> Identities; + typedef TQValueList<Identity> Identities; const Identities &identities() const; void setIdentities(const Identities &); // some useful helper functions - static Action string2action(QString s); - static QString action2string(Action a); + static Action string2action(TQString s); + static TQString action2string(Action a); DiscoItem & operator= (const DiscoItem &); DiscoItem(const DiscoItem &); @@ -411,51 +411,51 @@ namespace XMPP Private *d; }; - typedef QValueList<DiscoItem> DiscoList; + typedef TQValueList<DiscoItem> DiscoList; class FormField { public: enum { username, nick, password, name, first, last, email, address, city, state, zip, phone, url, date, misc }; - FormField(const QString &type="", const QString &value=""); + FormField(const TQString &type="", const TQString &value=""); ~FormField(); int type() const; - QString fieldName() const; - QString realName() const; + TQString fieldName() const; + TQString realName() const; bool isSecret() const; - const QString & value() const; + const TQString & value() const; void setType(int); - bool setType(const QString &); - void setValue(const QString &); + bool setType(const TQString &); + void setValue(const TQString &); private: - int tagNameToType(const QString &) const; - QString typeToTagName(int) const; + int tagNameToType(const TQString &) const; + TQString typeToTagName(int) const; int v_type; - QString v_value; + TQString v_value; class Private; Private *d; }; - class Form : public QValueList<FormField> + class Form : public TQValueList<FormField> { public: Form(const Jid &j=""); ~Form(); Jid jid() const; - QString instructions() const; - QString key() const; + TQString instructions() const; + TQString key() const; void setJid(const Jid &); - void setInstructions(const QString &); - void setKey(const QString &); + void setInstructions(const TQString &); + void setKey(const TQString &); private: Jid v_jid; - QString v_instructions, v_key; + TQString v_instructions, v_key; class Private; Private *d; @@ -468,20 +468,20 @@ namespace XMPP ~SearchResult(); const Jid & jid() const; - const QString & nick() const; - const QString & first() const; - const QString & last() const; - const QString & email() const; + const TQString & nick() const; + const TQString & first() const; + const TQString & last() const; + const TQString & email() const; void setJid(const Jid &); - void setNick(const QString &); - void setFirst(const QString &); - void setLast(const QString &); - void setEmail(const QString &); + void setNick(const TQString &); + void setFirst(const TQString &); + void setLast(const TQString &); + void setEmail(const TQString &); private: Jid v_jid; - QString v_nick, v_first, v_last, v_email; + TQString v_nick, v_first, v_last, v_email; }; class Client; @@ -503,15 +503,15 @@ namespace XMPP Task *parent() const; Client *client() const; - QDomDocument *doc() const; - QString id() const; + TQDomDocument *doc() const; + TQString id() const; bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go(bool autoDelete=false); - virtual bool take(const QDomElement &); + virtual bool take(const TQDomElement &); void safeDelete(); signals: @@ -520,13 +520,13 @@ namespace XMPP protected: virtual void onGo(); virtual void onDisconnect(); - void send(const QDomElement &); - void setSuccess(int code=0, const QString &str=""); - void setError(const QDomElement &); - void setError(int code=0, const QString &str=""); + void send(const TQDomElement &); + void setSuccess(int code=0, const TQString &str=""); + void setError(const TQDomElement &); + void setError(int code=0, const TQString &str=""); void debug(const char *, ...); - void debug(const QString &); - bool iqVerify(const QDomElement &x, const Jid &to, const QString &id, const QString &xmlns=""); + void debug(const TQString &); + bool iqVerify(const TQDomElement &x, const Jid &to, const TQString &id, const TQString &xmlns=""); private slots: void clientDisconnected(); @@ -544,60 +544,60 @@ namespace XMPP Q_OBJECT public: - Client(QObject *parent=0); + Client(TQObject *parent=0); ~Client(); bool isActive() const; void connectToServer(ClientStream *s, const Jid &j, bool auth=true); - void start(const QString &host, const QString &user, const QString &pass, const QString &resource); + void start(const TQString &host, const TQString &user, const TQString &pass, const TQString &resource); void close(bool fast=false); Stream & stream(); const LiveRoster & roster() const; const ResourceList & resourceList() const; - void send(const QDomElement &); - void send(const QString &); + void send(const TQDomElement &); + void send(const TQString &); - QString host() const; - QString user() const; - QString pass() const; - QString resource() const; + TQString host() const; + TQString user() const; + TQString pass() const; + TQString resource() const; Jid jid() const; void rosterRequest(); void sendMessage(const Message &); - void sendSubscription(const Jid &, const QString &); + void sendSubscription(const Jid &, const TQString &); void setPresence(const Status &); - void debug(const QString &); - QString genUniqueId(); + void debug(const TQString &); + TQString genUniqueId(); Task *rootTask(); - QDomDocument *doc() const; + TQDomDocument *doc() const; - QString OSName() const; - QString timeZone() const; + TQString OSName() const; + TQString timeZone() const; int timeZoneOffset() const; - QString clientName() const; - QString clientVersion() const; - QString capsNode() const; - QString capsVersion() const; - QString capsExt() const; - - void setOSName(const QString &); - void setTimeZone(const QString &, int); - void setClientName(const QString &); - void setClientVersion(const QString &); - void setCapsNode(const QString &); - void setCapsVersion(const QString &); + TQString clientName() const; + TQString clientVersion() const; + TQString capsNode() const; + TQString capsVersion() const; + TQString capsExt() const; + + void setOSName(const TQString &); + void setTimeZone(const TQString &, int); + void setClientName(const TQString &); + void setClientVersion(const TQString &); + void setCapsNode(const TQString &); + void setCapsVersion(const TQString &); void setIdentity(DiscoItem::Identity); DiscoItem::Identity identity(); - void addExtension(const QString& ext, const Features& f); - void removeExtension(const QString& ext); - const Features& extension(const QString& ext) const; - QStringList extensions() const; + void addExtension(const TQString& ext, const Features& f); + void removeExtension(const TQString& ext); + const Features& extension(const TQString& ext) const; + TQStringList extensions() const; S5BManager *s5bManager() const; IBBManager *ibbManager() const; @@ -606,32 +606,32 @@ namespace XMPP void setFileTransferEnabled(bool b); FileTransferManager *fileTransferManager() const; - bool groupChatJoin(const QString &host, const QString &room, const QString &nick); - bool groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password); - void groupChatSetStatus(const QString &host, const QString &room, const Status &); - void groupChatChangeNick(const QString &host, const QString &room, const QString &nick, const Status &); - void groupChatLeave(const QString &host, const QString &room); + bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick); + bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick, const TQString &password); + void groupChatSetStatus(const TQString &host, const TQString &room, const Status &); + void groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &); + void groupChatLeave(const TQString &host, const TQString &room); signals: void activated(); void disconnected(); - //void authFinished(bool, int, const QString &); - void rosterRequestFinished(bool, int, const QString &); + //void authFinished(bool, int, const TQString &); + void rosterRequestFinished(bool, int, const TQString &); void rosterItemAdded(const RosterItem &); void rosterItemUpdated(const RosterItem &); void rosterItemRemoved(const RosterItem &); void resourceAvailable(const Jid &, const Resource &); void resourceUnavailable(const Jid &, const Resource &); - void presenceError(const Jid &, int, const QString &); - void subscription(const Jid &, const QString &); + void presenceError(const Jid &, int, const TQString &); + void subscription(const Jid &, const TQString &); void messageReceived(const Message &); - void debugText(const QString &); - void xmlIncoming(const QString &); - void xmlOutgoing(const QString &); + void debugText(const TQString &); + void xmlIncoming(const TQString &); + void xmlOutgoing(const TQString &); void groupChatJoined(const Jid &); void groupChatLeft(const Jid &); void groupChatPresence(const Jid &, const Status &); - void groupChatError(const Jid &, int, const QString &); + void groupChatError(const Jid &, int, const TQString &); void incomingJidLink(); @@ -643,13 +643,13 @@ namespace XMPP //void streamCloseFinished(); void streamError(int); void streamReadyRead(); - void streamIncomingXml(const QString &); - void streamOutgoingXml(const QString &); + void streamIncomingXml(const TQString &); + void streamOutgoingXml(const TQString &); void slotRosterRequestFinished(); // basic daemons - void ppSubscription(const Jid &, const QString &); + void ppSubscription(const Jid &, const TQString &); void ppPresence(const Jid &, const Status &); void pmMessage(const Message &); void prRoster(const Roster &); @@ -661,7 +661,7 @@ namespace XMPP class GroupChat; private: void cleanup(); - void distribute(const QDomElement &); + void distribute(const TQDomElement &); void importRoster(const Roster &); void importRosterItem(const RosterItem &); void updateSelfPresence(const Jid &, const Status &); @@ -702,7 +702,7 @@ namespace XMPP LiveRosterItemPrivate *d; }; - class LiveRoster : public QValueList<LiveRosterItem> + class LiveRoster : public TQValueList<LiveRosterItem> { public: LiveRoster(); diff --git a/kopete/protocols/jabber/libiris/iris/include/xmpp.h b/kopete/protocols/jabber/libiris/iris/include/xmpp.h index dbb1b2cf..12d87d18 100644 --- a/kopete/protocols/jabber/libiris/iris/include/xmpp.h +++ b/kopete/protocols/jabber/libiris/iris/include/xmpp.h @@ -21,13 +21,13 @@ #ifndef XMPP_H #define XMPP_H -#include<qobject.h> -#include<qstring.h> -#include<qhostaddress.h> -#include<qstring.h> -#include<qcstring.h> -#include<qxml.h> -#include<qdom.h> +#include<tqobject.h> +#include<tqstring.h> +#include<tqhostaddress.h> +#include<tqstring.h> +#include<tqcstring.h> +#include<tqxml.h> +#include<tqdom.h> namespace QCA { @@ -51,11 +51,11 @@ namespace XMPP public: virtual ~Debug(); - virtual void msg(const QString &)=0; - virtual void outgoingTag(const QString &)=0; - virtual void incomingTag(const QString &)=0; - virtual void outgoingXml(const QDomElement &)=0; - virtual void incomingXml(const QDomElement &)=0; + virtual void msg(const TQString &)=0; + virtual void outgoingTag(const TQString &)=0; + virtual void incomingTag(const TQString &)=0; + virtual void outgoingXml(const TQDomElement &)=0; + virtual void incomingXml(const TQDomElement &)=0; }; void setDebug(Debug *); @@ -64,16 +64,16 @@ namespace XMPP { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool useSSL() const; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -83,12 +83,12 @@ namespace XMPP protected: void setUseSSL(bool b); void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool ssl; bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; @@ -97,7 +97,7 @@ namespace XMPP Q_OBJECT public: enum Error { ErrConnectionRefused, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth, ErrStream }; - AdvancedConnector(QObject *parent=0); + AdvancedConnector(TQObject *parent=0); virtual ~AdvancedConnector(); class Proxy @@ -108,42 +108,42 @@ namespace XMPP ~Proxy(); int type() const; - QString host() const; + TQString host() const; Q_UINT16 port() const; - QString url() const; - QString user() const; - QString pass() const; + TQString url() const; + TQString user() const; + TQString pass() const; int pollInterval() const; - void setHttpConnect(const QString &host, Q_UINT16 port); - void setHttpPoll(const QString &host, Q_UINT16 port, const QString &url); - void setSocks(const QString &host, Q_UINT16 port); - void setUserPass(const QString &user, const QString &pass); + void setHttpConnect(const TQString &host, Q_UINT16 port); + void setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url); + void setSocks(const TQString &host, Q_UINT16 port); + void setUserPass(const TQString &user, const TQString &pass); void setPollInterval(int secs); private: int t; - QString v_host, v_url; + TQString v_host, v_url; Q_UINT16 v_port; - QString v_user, v_pass; + TQString v_user, v_pass; int v_poll; }; void setProxy(const Proxy &proxy); - void setOptHostPort(const QString &host, Q_UINT16 port); + void setOptHostPort(const TQString &host, Q_UINT16 port); void setOptProbe(bool); void setOptSSL(bool); void changePollInterval(int secs); - void connectToServer(const QString &server); + void connectToServer(const TQString &server); ByteStream *stream() const; void done(); int errorCode() const; signals: - void srvLookup(const QString &server); + void srvLookup(const TQString &server); void srvResult(bool success); void httpSyncStarted(); void httpSyncFinished(); @@ -170,20 +170,20 @@ namespace XMPP { Q_OBJECT public: - TLSHandler(QObject *parent=0); + TLSHandler(TQObject *parent=0); virtual ~TLSHandler(); virtual void reset()=0; - virtual void startClient(const QString &host)=0; - virtual void write(const QByteArray &a)=0; - virtual void writeIncoming(const QByteArray &a)=0; + virtual void startClient(const TQString &host)=0; + virtual void write(const TQByteArray &a)=0; + virtual void writeIncoming(const TQByteArray &a)=0; signals: void success(); void fail(); void closed(); - void readyRead(const QByteArray &a); - void readyReadOutgoing(const QByteArray &a, int plainBytes); + void readyRead(const TQByteArray &a); + void readyReadOutgoing(const TQByteArray &a, int plainBytes); }; class QCATLSHandler : public TLSHandler @@ -197,9 +197,9 @@ namespace XMPP int tlsError() const; void reset(); - void startClient(const QString &host); - void write(const QByteArray &a); - void writeIncoming(const QByteArray &a); + void startClient(const TQString &host); + void write(const TQByteArray &a); + void writeIncoming(const TQByteArray &a); signals: void tlsHandshaken(); @@ -225,45 +225,45 @@ namespace XMPP Jid(); ~Jid(); - Jid(const QString &s); + Jid(const TQString &s); Jid(const char *s); - Jid & operator=(const QString &s); + Jid & operator=(const TQString &s); Jid & operator=(const char *s); - void set(const QString &s); - void set(const QString &domain, const QString &node, const QString &resource=""); + void set(const TQString &s); + void set(const TQString &domain, const TQString &node, const TQString &resource=""); - void setDomain(const QString &s); - void setNode(const QString &s); - void setResource(const QString &s); + void setDomain(const TQString &s); + void setNode(const TQString &s); + void setResource(const TQString &s); - const QString & domain() const { return d; } - const QString & node() const { return n; } - const QString & resource() const { return r; } - const QString & bare() const { return b; } - const QString & full() const { return f; } + const TQString & domain() const { return d; } + const TQString & node() const { return n; } + const TQString & resource() const { return r; } + const TQString & bare() const { return b; } + const TQString & full() const { return f; } - Jid withNode(const QString &s) const; - Jid withResource(const QString &s) const; + Jid withNode(const TQString &s) const; + Jid withResource(const TQString &s) const; bool isValid() const; bool isEmpty() const; bool compare(const Jid &a, bool compareRes=true) const; - static bool validDomain(const QString &s, QString *norm=0); - static bool validNode(const QString &s, QString *norm=0); - static bool validResource(const QString &s, QString *norm=0); + static bool validDomain(const TQString &s, TQString *norm=0); + static bool validNode(const TQString &s, TQString *norm=0); + static bool validResource(const TQString &s, TQString *norm=0); // TODO: kill these later - const QString & host() const { return d; } - const QString & user() const { return n; } - const QString & userHost() const { return b; } + const TQString & host() const { return d; } + const TQString & user() const { return n; } + const TQString & userHost() const { return b; } private: void reset(); void update(); - QString f, b, d, n, r; + TQString f, b, d, n, r; bool valid; }; @@ -303,42 +303,42 @@ namespace XMPP class Error { public: - Error(int type=Cancel, int condition=UndefinedCondition, const QString &text="", const QDomElement &appSpec=QDomElement()); + Error(int type=Cancel, int condition=UndefinedCondition, const TQString &text="", const TQDomElement &appSpec=TQDomElement()); int type; int condition; - QString text; - QDomElement appSpec; + TQString text; + TQDomElement appSpec; }; bool isNull() const; - QDomElement element() const; - QString toString() const; + TQDomElement element() const; + TQString toString() const; - QDomDocument & doc() const; - QString baseNS() const; - QString xhtmlImNS() const; - QString xhtmlNS() const; - QDomElement createElement(const QString &ns, const QString &tagName); - QDomElement createTextElement(const QString &ns, const QString &tagName, const QString &text); - QDomElement createXHTMLElement(const QString &xHTML); - void appendChild(const QDomElement &e); + TQDomDocument & doc() const; + TQString baseNS() const; + TQString xhtmlImNS() const; + TQString xhtmlNS() const; + TQDomElement createElement(const TQString &ns, const TQString &tagName); + TQDomElement createTextElement(const TQString &ns, const TQString &tagName, const TQString &text); + TQDomElement createXHTMLElement(const TQString &xHTML); + void appendChild(const TQDomElement &e); Kind kind() const; void setKind(Kind k); Jid to() const; Jid from() const; - QString id() const; - QString type() const; - QString lang() const; + TQString id() const; + TQString type() const; + TQString lang() const; void setTo(const Jid &j); void setFrom(const Jid &j); - void setId(const QString &id); - void setType(const QString &type); - void setLang(const QString &lang); + void setId(const TQString &id); + void setType(const TQString &type); + void setLang(const TQString &lang); Error error() const; void setError(const Error &err); @@ -346,8 +346,8 @@ namespace XMPP private: friend class Stream; - Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QString &id); - Stanza(Stream *s, const QDomElement &e); + Stanza(Stream *s, Kind k, const Jid &to, const TQString &type, const TQString &id); + Stanza(Stream *s, const TQDomElement &e); class Private; Private *d; @@ -370,13 +370,13 @@ namespace XMPP SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); - virtual QDomDocument & doc() const=0; - virtual QString baseNS() const=0; - virtual QString xhtmlImNS() const=0; - virtual QString xhtmlNS() const=0; + virtual TQDomDocument & doc() const=0; + virtual TQString baseNS() const=0; + virtual TQString xhtmlImNS() const=0; + virtual TQString xhtmlNS() const=0; virtual bool old() const=0; virtual void close()=0; @@ -385,13 +385,13 @@ namespace XMPP virtual void write(const Stanza &s)=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; - virtual QDomElement errorAppSpec() const=0; + virtual TQString errorText() const=0; + virtual TQDomElement errorAppSpec() const=0; - Stanza createStanza(Stanza::Kind k, const Jid &to="", const QString &type="", const QString &id=""); - Stanza createStanza(const QDomElement &e); + Stanza createStanza(Stanza::Kind k, const Jid &to="", const TQString &type="", const TQString &id=""); + Stanza createStanza(const TQDomElement &e); - static QString xmlToString(const QDomElement &e, bool clip=false); + static TQString xmlToString(const TQDomElement &e, bool clip=false); signals: void connectionClosed(); @@ -450,8 +450,8 @@ namespace XMPP BindConflict // resource in-use }; - ClientStream(Connector *conn, TLSHandler *tlsHandler=0, QObject *parent=0); - ClientStream(const QString &host, const QString &defRealm, ByteStream *bs, QCA::TLS *tls=0, QObject *parent=0); // server + ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *parent=0); + ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls=0, TQObject *parent=0); // server ~ClientStream(); Jid jid() const; @@ -461,13 +461,13 @@ namespace XMPP bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); - void setRealm(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); + void setRealm(const TQString &s); void continueAfterParams(); // SASL information - QString saslMechanism() const; + TQString saslMechanism() const; int saslSSF() const; // binding @@ -478,14 +478,14 @@ namespace XMPP void setRequireMutualAuth(bool); void setSSFRange(int low, int high); void setOldOnly(bool); - void setSASLMechanism(const QString &s); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setSASLMechanism(const TQString &s); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); // reimplemented - QDomDocument & doc() const; - QString baseNS() const; - QString xhtmlImNS() const; - QString xhtmlNS() const; + TQDomDocument & doc() const; + TQString baseNS() const; + TQString xhtmlImNS() const; + TQString xhtmlNS() const; bool old() const; void close(); @@ -494,11 +494,11 @@ namespace XMPP void write(const Stanza &s); int errorCondition() const; - QString errorText() const; - QDomElement errorAppSpec() const; + TQString errorText() const; + TQDomElement errorAppSpec() const; // extra - void writeDirect(const QString &s); + void writeDirect(const TQString &s); void setNoopTime(int mills); signals: @@ -507,8 +507,8 @@ namespace XMPP void needAuthParams(bool user, bool pass, bool realm); void authenticated(); void warning(int); - void incomingXml(const QString &s); - void outgoingXml(const QString &s); + void incomingXml(const TQString &s); + void outgoingXml(const TQString &s); public slots: void continueAfterWarning(); @@ -527,10 +527,10 @@ namespace XMPP void ss_tlsClosed(); void ss_error(int); - void sasl_clientFirstStep(const QString &mech, const QByteArray *clientInit); - void sasl_nextStep(const QByteArray &stepData); + void sasl_clientFirstStep(const TQString &mech, const TQByteArray *clientInit); + void sasl_nextStep(const TQByteArray &stepData); void sasl_needParams(bool user, bool authzid, bool pass, bool realm); - void sasl_authCheck(const QString &user, const QString &authzid); + void sasl_authCheck(const TQString &user, const TQString &authzid); void sasl_authenticated(); void sasl_error(int); diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp index dd458ef0..87743e7f 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp +++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp @@ -20,10 +20,10 @@ #include"filetransfer.h" -#include<qtimer.h> -#include<qptrlist.h> -#include<qguardedptr.h> -#include<qfileinfo.h> +#include<tqtimer.h> +#include<tqptrlist.h> +#include<tqguardedptr.h> +#include<tqfileinfo.h> #include"xmpp_xmlcommon.h" #include"s5b.h" @@ -34,13 +34,13 @@ using namespace XMPP; // firstChildElement // // Get an element's first child element -static QDomElement firstChildElement(const QDomElement &e) +static TQDomElement firstChildElement(const TQDomElement &e) { - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { if(n.isElement()) return n.toElement(); } - return QDomElement(); + return TQDomElement(); } //---------------------------------------------------------------------------- @@ -52,23 +52,23 @@ public: FileTransferManager *m; JT_FT *ft; Jid peer; - QString fname; + TQString fname; Q_LLONG size; Q_LLONG sent; - QString desc; + TQString desc; bool rangeSupported; Q_LLONG rangeOffset, rangeLength, length; - QString streamType; + TQString streamType; bool needStream; - QString id, iq_id; + TQString id, iq_id; S5BConnection *c; Jid proxy; int state; bool sender; }; -FileTransfer::FileTransfer(FileTransferManager *m, QObject *parent) -:QObject(parent) +FileTransfer::FileTransfer(FileTransferManager *m, TQObject *parent) +:TQObject(parent) { d = new Private; d->m = m; @@ -104,7 +104,7 @@ void FileTransfer::setProxy(const Jid &proxy) d->proxy = proxy; } -void FileTransfer::sendFile(const Jid &to, const QString &fname, Q_LLONG size, const QString &desc) +void FileTransfer::sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc) { d->state = Requesting; d->peer = to; @@ -115,8 +115,8 @@ void FileTransfer::sendFile(const Jid &to, const QString &fname, Q_LLONG size, c d->id = d->m->link(this); d->ft = new JT_FT(d->m->client()->rootTask()); - connect(d->ft, SIGNAL(finished()), SLOT(ft_finished())); - QStringList list; + connect(d->ft, TQT_SIGNAL(finished()), TQT_SLOT(ft_finished())); + TQStringList list; list += "http://jabber.org/protocol/bytestreams"; d->ft->request(to, d->id, fname, size, desc, list); d->ft->go(true); @@ -134,14 +134,14 @@ int FileTransfer::dataSizeNeeded() const return size; } -void FileTransfer::writeFileData(const QByteArray &a) +void FileTransfer::writeFileData(const TQByteArray &a) { int pending = d->c->bytesToWrite(); Q_LLONG left = d->length - (d->sent + pending); if(left == 0) return; - QByteArray block; + TQByteArray block; if((Q_LLONG)a.size() > left) { block = a.copy(); block.resize((uint)left); @@ -156,7 +156,7 @@ Jid FileTransfer::peer() const return d->peer; } -QString FileTransfer::fileName() const +TQString FileTransfer::fileName() const { return d->fname; } @@ -166,7 +166,7 @@ Q_LLONG FileTransfer::fileSize() const return d->size; } -QString FileTransfer::description() const +TQString FileTransfer::description() const { return d->desc; } @@ -228,10 +228,10 @@ void FileTransfer::ft_finished() d->length = d->size - d->rangeOffset; d->streamType = ft->streamType(); d->c = d->m->client()->s5bManager()->createConnection(); - connect(d->c, SIGNAL(connected()), SLOT(s5b_connected())); - connect(d->c, SIGNAL(connectionClosed()), SLOT(s5b_connectionClosed())); - connect(d->c, SIGNAL(bytesWritten(int)), SLOT(s5b_bytesWritten(int))); - connect(d->c, SIGNAL(error(int)), SLOT(s5b_error(int))); + connect(d->c, TQT_SIGNAL(connected()), TQT_SLOT(s5b_connected())); + connect(d->c, TQT_SIGNAL(connectionClosed()), TQT_SLOT(s5b_connectionClosed())); + connect(d->c, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(s5b_bytesWritten(int))); + connect(d->c, TQT_SIGNAL(error(int)), TQT_SLOT(s5b_error(int))); if(d->proxy.isValid()) d->c->setProxy(d->proxy); @@ -250,14 +250,14 @@ void FileTransfer::ft_finished() void FileTransfer::takeConnection(S5BConnection *c) { d->c = c; - connect(d->c, SIGNAL(connected()), SLOT(s5b_connected())); - connect(d->c, SIGNAL(connectionClosed()), SLOT(s5b_connectionClosed())); - connect(d->c, SIGNAL(readyRead()), SLOT(s5b_readyRead())); - connect(d->c, SIGNAL(error(int)), SLOT(s5b_error(int))); + connect(d->c, TQT_SIGNAL(connected()), TQT_SLOT(s5b_connected())); + connect(d->c, TQT_SIGNAL(connectionClosed()), TQT_SLOT(s5b_connectionClosed())); + connect(d->c, TQT_SIGNAL(readyRead()), TQT_SLOT(s5b_readyRead())); + connect(d->c, TQT_SIGNAL(error(int)), TQT_SLOT(s5b_error(int))); if(d->proxy.isValid()) d->c->setProxy(d->proxy); accepted(); - QTimer::singleShot(0, this, SLOT(doAccept())); + TQTimer::singleShot(0, this, TQT_SLOT(doAccept())); } void FileTransfer::s5b_connected() @@ -274,7 +274,7 @@ void FileTransfer::s5b_connectionClosed() void FileTransfer::s5b_readyRead() { - QByteArray a = d->c->read(); + TQByteArray a = d->c->read(); Q_LLONG need = d->length - d->sent; if((Q_LLONG)a.size() > need) a.resize((uint)need); @@ -327,18 +327,18 @@ class FileTransferManager::Private { public: Client *client; - QPtrList<FileTransfer> list, incoming; + TQPtrList<FileTransfer> list, incoming; JT_PushFT *pft; }; FileTransferManager::FileTransferManager(Client *client) -:QObject(client) +:TQObject(client) { d = new Private; d->client = client; d->pft = new JT_PushFT(d->client->rootTask()); - connect(d->pft, SIGNAL(incoming(const FTRequest &)), SLOT(pft_incoming(const FTRequest &))); + connect(d->pft, TQT_SIGNAL(incoming(const FTRequest &)), TQT_SLOT(pft_incoming(const FTRequest &))); } FileTransferManager::~FileTransferManager() @@ -376,7 +376,7 @@ FileTransfer *FileTransferManager::takeIncoming() void FileTransferManager::pft_incoming(const FTRequest &req) { bool found = false; - for(QStringList::ConstIterator it = req.streamTypes.begin(); it != req.streamTypes.end(); ++it) { + for(TQStringList::ConstIterator it = req.streamTypes.begin(); it != req.streamTypes.end(); ++it) { if((*it) == "http://jabber.org/protocol/bytestreams") { found = true; break; @@ -399,7 +399,7 @@ void FileTransferManager::pft_incoming(const FTRequest &req) void FileTransferManager::s5b_incomingReady(S5BConnection *c) { - QPtrListIterator<FileTransfer> it(d->list); + TQPtrListIterator<FileTransfer> it(d->list); FileTransfer *ft = 0; for(FileTransfer *i; (i = it.current()); ++it) { if(i->d->needStream && i->d->peer.compare(c->peer()) && i->d->id == c->sid()) { @@ -415,7 +415,7 @@ void FileTransferManager::s5b_incomingReady(S5BConnection *c) ft->takeConnection(c); } -QString FileTransferManager::link(FileTransfer *ft) +TQString FileTransferManager::link(FileTransfer *ft) { d->list.append(ft); return d->client->s5bManager()->genUniqueSID(ft->d->peer); @@ -443,11 +443,11 @@ void FileTransferManager::unlink(FileTransfer *ft) class JT_FT::Private { public: - QDomElement iq; + TQDomElement iq; Jid to; Q_LLONG size, rangeOffset, rangeLength; - QString streamType; - QStringList streamTypes; + TQString streamType; + TQStringList streamTypes; }; JT_FT::JT_FT(Task *parent) @@ -461,41 +461,41 @@ JT_FT::~JT_FT() delete d; } -void JT_FT::request(const Jid &to, const QString &_id, const QString &fname, Q_LLONG size, const QString &desc, const QStringList &streamTypes) +void JT_FT::request(const Jid &to, const TQString &_id, const TQString &fname, Q_LLONG size, const TQString &desc, const TQStringList &streamTypes) { - QDomElement iq; + TQDomElement iq; d->to = to; iq = createIQ(doc(), "set", to.full(), id()); - QDomElement si = doc()->createElement("si"); + TQDomElement si = doc()->createElement("si"); si.setAttribute("xmlns", "http://jabber.org/protocol/si"); si.setAttribute("id", _id); si.setAttribute("profile", "http://jabber.org/protocol/si/profile/file-transfer"); - QDomElement file = doc()->createElement("file"); + TQDomElement file = doc()->createElement("file"); file.setAttribute("xmlns", "http://jabber.org/protocol/si/profile/file-transfer"); file.setAttribute("name", fname); - file.setAttribute("size", QString::number(size)); + file.setAttribute("size", TQString::number(size)); if(!desc.isEmpty()) { - QDomElement de = doc()->createElement("desc"); + TQDomElement de = doc()->createElement("desc"); de.appendChild(doc()->createTextNode(desc)); file.appendChild(de); } - QDomElement range = doc()->createElement("range"); + TQDomElement range = doc()->createElement("range"); file.appendChild(range); si.appendChild(file); - QDomElement feature = doc()->createElement("feature"); + TQDomElement feature = doc()->createElement("feature"); feature.setAttribute("xmlns", "http://jabber.org/protocol/feature-neg"); - QDomElement x = doc()->createElement("x"); + TQDomElement x = doc()->createElement("x"); x.setAttribute("xmlns", "jabber:x:data"); x.setAttribute("type", "form"); - QDomElement field = doc()->createElement("field"); + TQDomElement field = doc()->createElement("field"); field.setAttribute("var", "stream-method"); field.setAttribute("type", "list-single"); - for(QStringList::ConstIterator it = streamTypes.begin(); it != streamTypes.end(); ++it) { - QDomElement option = doc()->createElement("option"); - QDomElement value = doc()->createElement("value"); + for(TQStringList::ConstIterator it = streamTypes.begin(); it != streamTypes.end(); ++it) { + TQDomElement option = doc()->createElement("option"); + TQDomElement value = doc()->createElement("value"); value.appendChild(doc()->createTextNode(*it)); option.appendChild(value); field.appendChild(option); @@ -522,7 +522,7 @@ Q_LLONG JT_FT::rangeLength() const return d->rangeLength; } -QString JT_FT::streamType() const +TQString JT_FT::streamType() const { return d->streamType; } @@ -532,26 +532,26 @@ void JT_FT::onGo() send(d->iq); } -bool JT_FT::take(const QDomElement &x) +bool JT_FT::take(const TQDomElement &x) { if(!iqVerify(x, d->to, id())) return false; if(x.attribute("type") == "result") { - QDomElement si = firstChildElement(x); + TQDomElement si = firstChildElement(x); if(si.attribute("xmlns") != "http://jabber.org/protocol/si" || si.tagName() != "si") { setError(900, ""); return true; } - QString id = si.attribute("id"); + TQString id = si.attribute("id"); Q_LLONG range_offset = 0; Q_LLONG range_length = 0; - QDomElement file = si.elementsByTagName("file").item(0).toElement(); + TQDomElement file = si.elementsByTagName("file").item(0).toElement(); if(!file.isNull()) { - QDomElement range = file.elementsByTagName("range").item(0).toElement(); + TQDomElement range = file.elementsByTagName("range").item(0).toElement(); if(!range.isNull()) { int x; bool ok; @@ -587,14 +587,14 @@ bool JT_FT::take(const QDomElement &x) return true; } - QString streamtype; - QDomElement feature = si.elementsByTagName("feature").item(0).toElement(); + TQString streamtype; + TQDomElement feature = si.elementsByTagName("feature").item(0).toElement(); if(!feature.isNull() && feature.attribute("xmlns") == "http://jabber.org/protocol/feature-neg") { - QDomElement x = feature.elementsByTagName("x").item(0).toElement(); + TQDomElement x = feature.elementsByTagName("x").item(0).toElement(); if(!x.isNull() && x.attribute("type") == "submit") { - QDomElement field = x.elementsByTagName("field").item(0).toElement(); + TQDomElement field = x.elementsByTagName("field").item(0).toElement(); if(!field.isNull() && field.attribute("var") == "stream-method") { - QDomElement value = field.elementsByTagName("value").item(0).toElement(); + TQDomElement value = field.elementsByTagName("value").item(0).toElement(); if(!value.isNull()) streamtype = value.text(); } @@ -603,7 +603,7 @@ bool JT_FT::take(const QDomElement &x) // must be one of the offered streamtypes bool found = false; - for(QStringList::ConstIterator it = d->streamTypes.begin(); it != d->streamTypes.end(); ++it) { + for(TQStringList::ConstIterator it = d->streamTypes.begin(); it != d->streamTypes.end(); ++it) { if((*it) == streamtype) { found = true; break; @@ -636,33 +636,33 @@ JT_PushFT::~JT_PushFT() { } -void JT_PushFT::respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const QString &streamType) +void JT_PushFT::respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType) { - QDomElement iq = createIQ(doc(), "result", to.full(), id); - QDomElement si = doc()->createElement("si"); + TQDomElement iq = createIQ(doc(), "result", to.full(), id); + TQDomElement si = doc()->createElement("si"); si.setAttribute("xmlns", "http://jabber.org/protocol/si"); if(rangeOffset != 0 || rangeLength != 0) { - QDomElement file = doc()->createElement("file"); + TQDomElement file = doc()->createElement("file"); file.setAttribute("xmlns", "http://jabber.org/protocol/si/profile/file-transfer"); - QDomElement range = doc()->createElement("range"); + TQDomElement range = doc()->createElement("range"); if(rangeOffset > 0) - range.setAttribute("offset", QString::number(rangeOffset)); + range.setAttribute("offset", TQString::number(rangeOffset)); if(rangeLength > 0) - range.setAttribute("length", QString::number(rangeLength)); + range.setAttribute("length", TQString::number(rangeLength)); file.appendChild(range); si.appendChild(file); } - QDomElement feature = doc()->createElement("feature"); + TQDomElement feature = doc()->createElement("feature"); feature.setAttribute("xmlns", "http://jabber.org/protocol/feature-neg"); - QDomElement x = doc()->createElement("x"); + TQDomElement x = doc()->createElement("x"); x.setAttribute("xmlns", "jabber:x:data"); x.setAttribute("type", "submit"); - QDomElement field = doc()->createElement("field"); + TQDomElement field = doc()->createElement("field"); field.setAttribute("var", "stream-method"); - QDomElement value = doc()->createElement("value"); + TQDomElement value = doc()->createElement("value"); value.appendChild(doc()->createTextNode(streamType)); field.appendChild(value); @@ -674,16 +674,16 @@ void JT_PushFT::respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOf send(iq); } -void JT_PushFT::respondError(const Jid &to, const QString &id, int code, const QString &str) +void JT_PushFT::respondError(const Jid &to, const TQString &id, int code, const TQString &str) { - QDomElement iq = createIQ(doc(), "error", to.full(), id); - QDomElement err = textTag(doc(), "error", str); - err.setAttribute("code", QString::number(code)); + TQDomElement iq = createIQ(doc(), "error", to.full(), id); + TQDomElement err = textTag(doc(), "error", str); + err.setAttribute("code", TQString::number(code)); iq.appendChild(err); send(iq); } -bool JT_PushFT::take(const QDomElement &e) +bool JT_PushFT::take(const TQDomElement &e) { // must be an iq-set tag if(e.tagName() != "iq") @@ -691,20 +691,20 @@ bool JT_PushFT::take(const QDomElement &e) if(e.attribute("type") != "set") return false; - QDomElement si = firstChildElement(e); + TQDomElement si = firstChildElement(e); if(si.attribute("xmlns") != "http://jabber.org/protocol/si" || si.tagName() != "si") return false; if(si.attribute("profile") != "http://jabber.org/protocol/si/profile/file-transfer") return false; Jid from(e.attribute("from")); - QString id = si.attribute("id"); + TQString id = si.attribute("id"); - QDomElement file = si.elementsByTagName("file").item(0).toElement(); + TQDomElement file = si.elementsByTagName("file").item(0).toElement(); if(file.isNull()) return true; - QString fname = file.attribute("name"); + TQString fname = file.attribute("name"); if(fname.isEmpty()) { respondError(from, id, 400, "Bad file name"); return true; @@ -712,7 +712,7 @@ bool JT_PushFT::take(const QDomElement &e) // ensure kosher { - QFileInfo fi(fname); + TQFileInfo fi(fname); fname = fi.fileName(); } @@ -727,27 +727,27 @@ bool JT_PushFT::take(const QDomElement &e) return true; } - QString desc; - QDomElement de = file.elementsByTagName("desc").item(0).toElement(); + TQString desc; + TQDomElement de = file.elementsByTagName("desc").item(0).toElement(); if(!de.isNull()) desc = de.text(); bool rangeSupported = false; - QDomElement range = file.elementsByTagName("range").item(0).toElement(); + TQDomElement range = file.elementsByTagName("range").item(0).toElement(); if(!range.isNull()) rangeSupported = true; - QStringList streamTypes; - QDomElement feature = si.elementsByTagName("feature").item(0).toElement(); + TQStringList streamTypes; + TQDomElement feature = si.elementsByTagName("feature").item(0).toElement(); if(!feature.isNull() && feature.attribute("xmlns") == "http://jabber.org/protocol/feature-neg") { - QDomElement x = feature.elementsByTagName("x").item(0).toElement(); + TQDomElement x = feature.elementsByTagName("x").item(0).toElement(); if(!x.isNull() /*&& x.attribute("type") == "form"*/) { - QDomElement field = x.elementsByTagName("field").item(0).toElement(); + TQDomElement field = x.elementsByTagName("field").item(0).toElement(); if(!field.isNull() && field.attribute("var") == "stream-method" && field.attribute("type") == "list-single") { - QDomNodeList nl = field.elementsByTagName("option"); + TQDomNodeList nl = field.elementsByTagName("option"); for(uint n = 0; n < nl.count(); ++n) { - QDomElement e = nl.item(n).toElement(); - QDomElement value = e.elementsByTagName("value").item(0).toElement(); + TQDomElement e = nl.item(n).toElement(); + TQDomElement value = e.elementsByTagName("value").item(0).toElement(); if(!value.isNull()) streamTypes += value.text(); } diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h index f31a4d10..9026b478 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h +++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h @@ -43,17 +43,17 @@ namespace XMPP void setProxy(const Jid &proxy); // send - void sendFile(const Jid &to, const QString &fname, Q_LLONG size, const QString &desc); + void sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc); Q_LLONG offset() const; Q_LLONG length() const; int dataSizeNeeded() const; - void writeFileData(const QByteArray &a); + void writeFileData(const TQByteArray &a); // receive Jid peer() const; - QString fileName() const; + TQString fileName() const; Q_LLONG fileSize() const; - QString description() const; + TQString description() const; bool rangeSupported() const; void accept(Q_LLONG offset=0, Q_LLONG length=0); @@ -64,7 +64,7 @@ namespace XMPP signals: void accepted(); // indicates S5BConnection has started void connected(); - void readyRead(const QByteArray &a); + void readyRead(const TQByteArray &a); void bytesWritten(int); void error(int); @@ -84,7 +84,7 @@ namespace XMPP void reset(); friend class FileTransferManager; - FileTransfer(FileTransferManager *, QObject *parent=0); + FileTransfer(FileTransferManager *, TQObject *parent=0); void man_waitForAccept(const FTRequest &req); void takeConnection(S5BConnection *c); }; @@ -114,7 +114,7 @@ namespace XMPP void s5b_incomingReady(S5BConnection *); friend class FileTransfer; - QString link(FileTransfer *); + TQString link(FileTransfer *); void con_accept(FileTransfer *); void con_reject(FileTransfer *); void unlink(FileTransfer *); @@ -127,13 +127,13 @@ namespace XMPP JT_FT(Task *parent); ~JT_FT(); - void request(const Jid &to, const QString &id, const QString &fname, Q_LLONG size, const QString &desc, const QStringList &streamTypes); + void request(const Jid &to, const TQString &id, const TQString &fname, Q_LLONG size, const TQString &desc, const TQStringList &streamTypes); Q_LLONG rangeOffset() const; Q_LLONG rangeLength() const; - QString streamType() const; + TQString streamType() const; void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); private: class Private; @@ -143,12 +143,12 @@ namespace XMPP struct FTRequest { Jid from; - QString iq_id, id; - QString fname; + TQString iq_id, id; + TQString fname; Q_LLONG size; - QString desc; + TQString desc; bool rangeSupported; - QStringList streamTypes; + TQStringList streamTypes; }; class JT_PushFT : public Task { @@ -157,10 +157,10 @@ namespace XMPP JT_PushFT(Task *parent); ~JT_PushFT(); - void respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const QString &streamType); - void respondError(const Jid &to, const QString &id, int code, const QString &str); + void respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType); + void respondError(const Jid &to, const TQString &id, int code, const TQString &str); - bool take(const QDomElement &); + bool take(const TQDomElement &); signals: void incoming(const FTRequest &req); diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp index f48da694..df753925 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp +++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp @@ -22,8 +22,8 @@ #include"s5b.h" -#include<qtimer.h> -#include<qguardedptr.h> +#include<tqtimer.h> +#include<tqguardedptr.h> #include<stdlib.h> #include<qca.h> #include"xmpp_xmlcommon.h" @@ -46,9 +46,9 @@ namespace XMPP { -static QString makeKey(const QString &sid, const Jid &initiator, const Jid &target) +static TQString makeKey(const TQString &sid, const Jid &initiator, const Jid &target) { - QString str = sid + initiator.full() + target.full(); + TQString str = sid + initiator.full() + target.full(); return QCA::SHA1::hashToString(str.utf8()); } @@ -70,7 +70,7 @@ public: enum { Unknown, Fast, NotFast }; S5BManager *m; int state; - QString sid, key, out_key, out_id, in_id; + TQString sid, key, out_key, out_id, in_id; Jid self, peer; StreamHostList in_hosts; JT_S5B *task, *proxy_task; @@ -94,9 +94,9 @@ public: ~Item(); void reset(); - void startInitiator(const QString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool udp); - void startTarget(const QString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const QString &iq_id, bool fast, bool udp); - void handleFast(const StreamHostList &hosts, const QString &iq_id); + void startInitiator(const TQString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool udp); + void startTarget(const TQString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const TQString &iq_id, bool fast, bool udp); + void handleFast(const StreamHostList &hosts, const TQString &iq_id); void doOutgoing(); void doIncoming(); @@ -137,7 +137,7 @@ S5BDatagram::S5BDatagram() _dest = 0; } -S5BDatagram::S5BDatagram(int source, int dest, const QByteArray &data) +S5BDatagram::S5BDatagram(int source, int dest, const TQByteArray &data) { _source = source; _dest = dest; @@ -154,7 +154,7 @@ int S5BDatagram::destPort() const return _dest; } -QByteArray S5BDatagram::data() const +TQByteArray S5BDatagram::data() const { return _buf; } @@ -170,7 +170,7 @@ public: SocksUDP *su; int state; Jid peer; - QString sid; + TQString sid; bool remote; bool switched; bool notifyRead, notifyClose; @@ -178,13 +178,13 @@ public: S5BRequest req; Jid proxy; Mode mode; - QPtrList<S5BDatagram> dglist; + TQPtrList<S5BDatagram> dglist; }; static int id_conn = 0; static int num_conn = 0; -S5BConnection::S5BConnection(S5BManager *m, QObject *parent) +S5BConnection::S5BConnection(S5BManager *m, TQObject *parent) :ByteStream(parent) { d = new Private; @@ -229,7 +229,7 @@ void S5BConnection::reset(bool clear) } d->state = Idle; d->peer = Jid(); - d->sid = QString(); + d->sid = TQString(); d->remote = false; d->switched = false; d->notifyRead = false; @@ -246,7 +246,7 @@ void S5BConnection::setProxy(const Jid &proxy) d->proxy = proxy; } -void S5BConnection::connectToJid(const Jid &peer, const QString &sid, Mode m) +void S5BConnection::connectToJid(const Jid &peer, const TQString &sid, Mode m) { reset(true); if(!d->m->isAcceptableSID(peer, sid)) @@ -294,7 +294,7 @@ Jid S5BConnection::peer() const return d->peer; } -QString S5BConnection::sid() const +TQString S5BConnection::sid() const { return d->sid; } @@ -322,18 +322,18 @@ bool S5BConnection::isOpen() const return false; } -void S5BConnection::write(const QByteArray &buf) +void S5BConnection::write(const TQByteArray &buf) { if(d->state == Active && d->mode == Stream) d->sc->write(buf); } -QByteArray S5BConnection::read(int bytes) +TQByteArray S5BConnection::read(int bytes) { if(d->sc) return d->sc->read(bytes); else - return QByteArray(); + return TQByteArray(); } int S5BConnection::bytesAvailable() const @@ -354,10 +354,10 @@ int S5BConnection::bytesToWrite() const void S5BConnection::writeDatagram(const S5BDatagram &i) { - QByteArray buf(i.data().size() + 4); + TQByteArray buf(i.data().size() + 4); ushort ssp = htons(i.sourcePort()); ushort sdp = htons(i.destPort()); - QByteArray data = i.data(); + TQByteArray data = i.data(); memcpy(buf.data(), &ssp, 2); memcpy(buf.data() + 2, &sdp, 2); memcpy(buf.data() + 4, data.data(), data.size()); @@ -393,15 +393,15 @@ void S5BConnection::man_waitForAccept(const S5BRequest &r) void S5BConnection::man_clientReady(SocksClient *sc, SocksUDP *sc_udp) { d->sc = sc; - connect(d->sc, SIGNAL(connectionClosed()), SLOT(sc_connectionClosed())); - connect(d->sc, SIGNAL(delayedCloseFinished()), SLOT(sc_delayedCloseFinished())); - connect(d->sc, SIGNAL(readyRead()), SLOT(sc_readyRead())); - connect(d->sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int))); - connect(d->sc, SIGNAL(error(int)), SLOT(sc_error(int))); + connect(d->sc, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sc_connectionClosed())); + connect(d->sc, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sc_delayedCloseFinished())); + connect(d->sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead())); + connect(d->sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int))); + connect(d->sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int))); if(sc_udp) { d->su = sc_udp; - connect(d->su, SIGNAL(packetReady(const QByteArray &)), SLOT(su_packetReady(const QByteArray &))); + connect(d->su, TQT_SIGNAL(packetReady(const TQByteArray &)), TQT_SLOT(su_packetReady(const TQByteArray &))); } d->state = Active; @@ -424,7 +424,7 @@ void S5BConnection::man_clientReady(SocksClient *sc, SocksUDP *sc_udp) d->notifyClose = true; } if(d->notifyRead || d->notifyClose) - QTimer::singleShot(0, this, SLOT(doPending())); + TQTimer::singleShot(0, this, TQT_SLOT(doPending())); connected(); } @@ -432,14 +432,14 @@ void S5BConnection::doPending() { if(d->notifyRead) { if(d->notifyClose) - QTimer::singleShot(0, this, SLOT(doPending())); + TQTimer::singleShot(0, this, TQT_SLOT(doPending())); sc_readyRead(); } else if(d->notifyClose) sc_connectionClosed(); } -void S5BConnection::man_udpReady(const QByteArray &buf) +void S5BConnection::man_udpReady(const TQByteArray &buf) { handleUDP(buf); } @@ -503,12 +503,12 @@ void S5BConnection::sc_error(int) error(ErrSocket); } -void S5BConnection::su_packetReady(const QByteArray &buf) +void S5BConnection::su_packetReady(const TQByteArray &buf) { handleUDP(buf); } -void S5BConnection::handleUDP(const QByteArray &buf) +void S5BConnection::handleUDP(const TQByteArray &buf) { // must be at least 4 bytes, to accomodate virtual ports if(buf.size() < 4) @@ -519,14 +519,14 @@ void S5BConnection::handleUDP(const QByteArray &buf) memcpy(&sdp, buf.data() + 2, 2); int source = ntohs(ssp); int dest = ntohs(sdp); - QByteArray data(buf.size() - 4); + TQByteArray data(buf.size() - 4); memcpy(data.data(), buf.data() + 4, data.size()); d->dglist.append(new S5BDatagram(source, dest, data)); datagramReady(); } -void S5BConnection::sendUDP(const QByteArray &buf) +void S5BConnection::sendUDP(const TQByteArray &buf) { if(d->su) d->su->write(buf); @@ -554,13 +554,13 @@ public: S5BConnection *c; Item *i; - QString sid; + TQString sid; JT_S5B *query; StreamHost proxyInfo; - QGuardedPtr<S5BServer> relatedServer; + TQGuardedPtr<S5BServer> relatedServer; bool udp_init; - QHostAddress udp_addr; + TQHostAddress udp_addr; int udp_port; }; @@ -569,13 +569,13 @@ class S5BManager::Private public: Client *client; S5BServer *serv; - QPtrList<Entry> activeList; + TQPtrList<Entry> activeList; S5BConnectionList incomingConns; JT_PushS5B *ps; }; S5BManager::S5BManager(Client *parent) -:QObject(parent) +:TQObject(parent) { // S5B needs SHA1 if(!QCA::isSupported(QCA::CAP_SHA1)) @@ -587,9 +587,9 @@ S5BManager::S5BManager(Client *parent) d->activeList.setAutoDelete(true); d->ps = new JT_PushS5B(d->client->rootTask()); - connect(d->ps, SIGNAL(incoming(const S5BRequest &)), SLOT(ps_incoming(const S5BRequest &))); - connect(d->ps, SIGNAL(incomingUDPSuccess(const Jid &, const QString &)), SLOT(ps_incomingUDPSuccess(const Jid &, const QString &))); - connect(d->ps, SIGNAL(incomingActivate(const Jid &, const QString &, const Jid &)), SLOT(ps_incomingActivate(const Jid &, const QString &, const Jid &))); + connect(d->ps, TQT_SIGNAL(incoming(const S5BRequest &)), TQT_SLOT(ps_incoming(const S5BRequest &))); + connect(d->ps, TQT_SIGNAL(incomingUDPSuccess(const Jid &, const TQString &)), TQT_SLOT(ps_incomingUDPSuccess(const Jid &, const TQString &))); + connect(d->ps, TQT_SIGNAL(incomingActivate(const Jid &, const TQString &, const Jid &)), TQT_SLOT(ps_incomingActivate(const Jid &, const TQString &, const Jid &))); } S5BManager::~S5BManager() @@ -697,7 +697,7 @@ void S5BManager::ps_incoming(const S5BRequest &req) incomingReady(); } -void S5BManager::ps_incomingUDPSuccess(const Jid &from, const QString &key) +void S5BManager::ps_incomingUDPSuccess(const Jid &from, const TQString &key) { Entry *e = findEntryByHash(key); if(e && e->i) { @@ -708,38 +708,38 @@ void S5BManager::ps_incomingUDPSuccess(const Jid &from, const QString &key) } } -void S5BManager::ps_incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost) +void S5BManager::ps_incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost) { Entry *e = findEntryBySID(from, sid); if(e && e->i) e->i->incomingActivate(streamHost); } -void S5BManager::doSuccess(const Jid &peer, const QString &id, const Jid &streamHost) +void S5BManager::doSuccess(const Jid &peer, const TQString &id, const Jid &streamHost) { d->ps->respondSuccess(peer, id, streamHost); } -void S5BManager::doError(const Jid &peer, const QString &id, int code, const QString &str) +void S5BManager::doError(const Jid &peer, const TQString &id, int code, const TQString &str) { d->ps->respondError(peer, id, code, str); } -void S5BManager::doActivate(const Jid &peer, const QString &sid, const Jid &streamHost) +void S5BManager::doActivate(const Jid &peer, const TQString &sid, const Jid &streamHost) { d->ps->sendActivate(peer, sid, streamHost); } -QString S5BManager::genUniqueSID(const Jid &peer) const +TQString S5BManager::genUniqueSID(const Jid &peer) const { // get unused key - QString sid; + TQString sid; do { sid = "s5b_"; for(int i = 0; i < 4; ++i) { int word = rand() & 0xffff; for(int n = 0; n < 4; ++n) { - QString s; + TQString s; s.sprintf("%x", (word >> (n * 4)) & 0xf); sid.append(s); } @@ -748,10 +748,10 @@ QString S5BManager::genUniqueSID(const Jid &peer) const return sid; } -bool S5BManager::isAcceptableSID(const Jid &peer, const QString &sid) const +bool S5BManager::isAcceptableSID(const Jid &peer, const TQString &sid) const { - QString key = makeKey(sid, d->client->jid(), peer); - QString key_out = makeKey(sid, peer, d->client->jid()); + TQString key = makeKey(sid, d->client->jid(), peer); + TQString key_out = makeKey(sid, peer, d->client->jid()); // if we have a server, then check through it if(d->serv) { @@ -765,9 +765,9 @@ bool S5BManager::isAcceptableSID(const Jid &peer, const QString &sid) const return true; } -S5BConnection *S5BManager::findIncoming(const Jid &from, const QString &sid) const +S5BConnection *S5BManager::findIncoming(const Jid &from, const TQString &sid) const { - QPtrListIterator<S5BConnection> it(d->incomingConns); + TQPtrListIterator<S5BConnection> it(d->incomingConns); for(S5BConnection *c; (c = it.current()); ++it) { if(c->d->peer.compare(from) && c->d->sid == sid) return c; @@ -777,7 +777,7 @@ S5BConnection *S5BManager::findIncoming(const Jid &from, const QString &sid) con S5BManager::Entry *S5BManager::findEntry(S5BConnection *c) const { - QPtrListIterator<Entry> it(d->activeList); + TQPtrListIterator<Entry> it(d->activeList); for(Entry *e; (e = it.current()); ++it) { if(e->c == c) return e; @@ -787,7 +787,7 @@ S5BManager::Entry *S5BManager::findEntry(S5BConnection *c) const S5BManager::Entry *S5BManager::findEntry(Item *i) const { - QPtrListIterator<Entry> it(d->activeList); + TQPtrListIterator<Entry> it(d->activeList); for(Entry *e; (e = it.current()); ++it) { if(e->i == i) return e; @@ -795,9 +795,9 @@ S5BManager::Entry *S5BManager::findEntry(Item *i) const return 0; } -S5BManager::Entry *S5BManager::findEntryByHash(const QString &key) const +S5BManager::Entry *S5BManager::findEntryByHash(const TQString &key) const { - QPtrListIterator<Entry> it(d->activeList); + TQPtrListIterator<Entry> it(d->activeList); for(Entry *e; (e = it.current()); ++it) { if(e->i && e->i->key == key) return e; @@ -805,9 +805,9 @@ S5BManager::Entry *S5BManager::findEntryByHash(const QString &key) const return 0; } -S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const QString &sid) const +S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const TQString &sid) const { - QPtrListIterator<Entry> it(d->activeList); + TQPtrListIterator<Entry> it(d->activeList); for(Entry *e; (e = it.current()); ++it) { if(e->i && e->i->peer.compare(peer) && e->sid == sid) return e; @@ -815,10 +815,10 @@ S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const QString &si return 0; } -S5BManager::Entry *S5BManager::findServerEntryByHash(const QString &key) const +S5BManager::Entry *S5BManager::findServerEntryByHash(const TQString &key) const { - const QPtrList<S5BManager> &manList = d->serv->managerList(); - QPtrListIterator<S5BManager> it(manList); + const TQPtrList<S5BManager> &manList = d->serv->managerList(); + TQPtrListIterator<S5BManager> it(manList); for(S5BManager *m; (m = it.current()); ++it) { Entry *e = m->findEntryByHash(key); if(e) @@ -827,14 +827,14 @@ S5BManager::Entry *S5BManager::findServerEntryByHash(const QString &key) const return 0; } -bool S5BManager::srv_ownsHash(const QString &key) const +bool S5BManager::srv_ownsHash(const TQString &key) const { if(findEntryByHash(key)) return true; return false; } -void S5BManager::srv_incomingReady(SocksClient *sc, const QString &key) +void S5BManager::srv_incomingReady(SocksClient *sc, const TQString &key) { Entry *e = findEntryByHash(key); if(!e->i->allowIncoming) { @@ -850,7 +850,7 @@ void S5BManager::srv_incomingReady(SocksClient *sc, const QString &key) e->i->setIncomingClient(sc); } -void S5BManager::srv_incomingUDP(bool init, const QHostAddress &addr, int port, const QString &key, const QByteArray &data) +void S5BManager::srv_incomingUDP(bool init, const TQHostAddress &addr, int port, const TQString &key, const TQByteArray &data) { Entry *e = findEntryByHash(key); if(!e->c->d->mode != S5BConnection::Datagram) @@ -935,7 +935,7 @@ void S5BManager::con_unlink(S5BConnection *c) d->activeList.removeRef(e); } -void S5BManager::con_sendUDP(S5BConnection *c, const QByteArray &buf) +void S5BManager::con_sendUDP(S5BConnection *c, const TQByteArray &buf) { Entry *e = findEntry(c); if(!e) @@ -1007,12 +1007,12 @@ void S5BManager::entryContinue(Entry *e) e->i = new Item(this); e->i->proxy = e->proxyInfo; - connect(e->i, SIGNAL(accepted()), SLOT(item_accepted())); - connect(e->i, SIGNAL(tryingHosts(const StreamHostList &)), SLOT(item_tryingHosts(const StreamHostList &))); - connect(e->i, SIGNAL(proxyConnect()), SLOT(item_proxyConnect())); - connect(e->i, SIGNAL(waitingForActivation()), SLOT(item_waitingForActivation())); - connect(e->i, SIGNAL(connected()), SLOT(item_connected())); - connect(e->i, SIGNAL(error(int)), SLOT(item_error(int))); + connect(e->i, TQT_SIGNAL(accepted()), TQT_SLOT(item_accepted())); + connect(e->i, TQT_SIGNAL(tryingHosts(const StreamHostList &)), TQT_SLOT(item_tryingHosts(const StreamHostList &))); + connect(e->i, TQT_SIGNAL(proxyConnect()), TQT_SLOT(item_proxyConnect())); + connect(e->i, TQT_SIGNAL(waitingForActivation()), TQT_SLOT(item_waitingForActivation())); + connect(e->i, TQT_SIGNAL(connected()), TQT_SLOT(item_connected())); + connect(e->i, TQT_SIGNAL(error(int)), TQT_SLOT(item_error(int))); if(e->c->isRemote()) { const S5BRequest &req = e->c->d->req; @@ -1026,7 +1026,7 @@ void S5BManager::entryContinue(Entry *e) void S5BManager::queryProxy(Entry *e) { - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; e->c->proxyQuery(); // signal if(!self) return; @@ -1035,7 +1035,7 @@ void S5BManager::queryProxy(Entry *e) printf("querying proxy: [%s]\n", e->c->d->proxy.full().latin1()); #endif e->query = new JT_S5B(d->client->rootTask()); - connect(e->query, SIGNAL(finished()), SLOT(query_finished())); + connect(e->query, TQT_SIGNAL(finished()), TQT_SLOT(query_finished())); e->query->requestProxyInfo(e->c->d->proxy); e->query->go(true); } @@ -1045,7 +1045,7 @@ void S5BManager::query_finished() JT_S5B *query = (JT_S5B *)sender(); Entry *e; bool found = false; - QPtrListIterator<Entry> it(d->activeList); + TQPtrListIterator<Entry> it(d->activeList); for(; (e = it.current()); ++it) { if(e->query == query) { found = true; @@ -1071,7 +1071,7 @@ void S5BManager::query_finished() #endif } - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; e->c->proxyResult(query->success()); // signal if(!self) return; @@ -1101,7 +1101,7 @@ bool S5BManager::targetShouldOfferProxy(Entry *e) //---------------------------------------------------------------------------- // S5BManager::Item //---------------------------------------------------------------------------- -S5BManager::Item::Item(S5BManager *manager) : QObject(0) +S5BManager::Item::Item(S5BManager *manager) : TQObject(0) { m = manager; task = 0; @@ -1159,7 +1159,7 @@ void S5BManager::Item::reset() udp = false; } -void S5BManager::Item::startInitiator(const QString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool _udp) +void S5BManager::Item::startInitiator(const TQString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool _udp) { sid = _sid; self = _self; @@ -1176,7 +1176,7 @@ void S5BManager::Item::startInitiator(const QString &_sid, const Jid &_self, con doOutgoing(); } -void S5BManager::Item::startTarget(const QString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const QString &iq_id, bool _fast, bool _udp) +void S5BManager::Item::startTarget(const TQString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const TQString &iq_id, bool _fast, bool _udp) { sid = _sid; peer = _peer; @@ -1197,11 +1197,11 @@ void S5BManager::Item::startTarget(const QString &_sid, const Jid &_self, const doIncoming(); } -void S5BManager::Item::handleFast(const StreamHostList &hosts, const QString &iq_id) +void S5BManager::Item::handleFast(const StreamHostList &hosts, const TQString &iq_id) { targetMode = Fast; - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; accepted(); if(!self) return; @@ -1222,8 +1222,8 @@ void S5BManager::Item::doOutgoing() StreamHostList hosts; S5BServer *serv = m->server(); if(serv && serv->isActive() && !haveHost(in_hosts, m->client()->jid())) { - QStringList hostList = serv->hostList(); - for(QStringList::ConstIterator it = hostList.begin(); it != hostList.end(); ++it) { + TQStringList hostList = serv->hostList(); + for(TQStringList::ConstIterator it = hostList.begin(); it != hostList.end(); ++it) { StreamHost h; h.setJid(m->client()->jid()); h.setHost(*it); @@ -1245,7 +1245,7 @@ void S5BManager::Item::doOutgoing() allowIncoming = true; task = new JT_S5B(m->client()->rootTask()); - connect(task, SIGNAL(finished()), SLOT(jt_finished())); + connect(task, TQT_SIGNAL(finished()), TQT_SLOT(jt_finished())); task->request(peer, sid, hosts, state == Initiator ? wantFast : false, udp); out_id = task->id(); task->go(true); @@ -1291,9 +1291,9 @@ void S5BManager::Item::doIncoming() } conn = new S5BConnector; - connect(conn, SIGNAL(result(bool)), SLOT(conn_result(bool))); + connect(conn, TQT_SIGNAL(result(bool)), TQT_SLOT(conn_result(bool))); - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; tryingHosts(list); if(!self) return; @@ -1307,9 +1307,9 @@ void S5BManager::Item::setIncomingClient(SocksClient *sc) printf("S5BManager::Item: %s [%s] successful incoming connection\n", peer.full().latin1(), sid.latin1()); #endif - connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead())); - connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int))); - connect(sc, SIGNAL(error(int)), SLOT(sc_error(int))); + connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead())); + connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int))); + connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int))); client = sc; allowIncoming = false; @@ -1335,7 +1335,7 @@ void S5BManager::Item::jt_finished() if(state == Initiator) { if(targetMode == Unknown) { targetMode = NotFast; - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; accepted(); if(!self) return; @@ -1387,11 +1387,11 @@ void S5BManager::Item::jt_finished() #endif // connect to the proxy proxy_conn = new S5BConnector; - connect(proxy_conn, SIGNAL(result(bool)), SLOT(proxy_result(bool))); + connect(proxy_conn, TQT_SIGNAL(result(bool)), TQT_SLOT(proxy_result(bool))); StreamHostList list; list += proxy; - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; proxyConnect(); if(!self) return; @@ -1441,9 +1441,9 @@ void S5BManager::Item::conn_result(bool b) printf("S5BManager::Item: %s [%s] successful outgoing connection\n", peer.full().latin1(), sid.latin1()); #endif - connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead())); - connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int))); - connect(sc, SIGNAL(error(int)), SLOT(sc_error(int))); + connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead())); + connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int))); + connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int))); m->doSuccess(peer, in_id, h.jid()); @@ -1492,9 +1492,9 @@ void S5BManager::Item::proxy_result(bool b) delete proxy_conn; proxy_conn = 0; - connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead())); - connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int))); - connect(sc, SIGNAL(error(int)), SLOT(sc_error(int))); + connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead())); + connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int))); + connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int))); client = sc; client_udp = sc_udp; @@ -1504,7 +1504,7 @@ void S5BManager::Item::proxy_result(bool b) printf("activating proxy stream\n"); #endif proxy_task = new JT_S5B(m->client()->rootTask()); - connect(proxy_task, SIGNAL(finished()), SLOT(proxy_finished())); + connect(proxy_task, TQT_SIGNAL(finished()), TQT_SLOT(proxy_finished())); proxy_task->requestActivation(proxy.jid(), sid, peer); proxy_task->go(true); } @@ -1608,7 +1608,7 @@ void S5BManager::Item::tryActivation() printf("sending extra CR\n"); #endif // must send [CR] to activate target streamhost - QByteArray a(1); + TQByteArray a(1); a[0] = '\r'; client->write(a); } @@ -1617,12 +1617,12 @@ void S5BManager::Item::tryActivation() void S5BManager::Item::checkForActivation() { - QPtrList<SocksClient> clientList; + TQPtrList<SocksClient> clientList; if(client) clientList.append(client); if(client_out) clientList.append(client_out); - QPtrListIterator<SocksClient> it(clientList); + TQPtrListIterator<SocksClient> it(clientList); for(SocksClient *sc; (sc = it.current()); ++it) { #ifdef S5B_DEBUG printf("checking for activation\n"); @@ -1641,7 +1641,7 @@ void S5BManager::Item::checkForActivation() #endif if(sc->bytesAvailable() >= 1) { clientList.removeRef(sc); - QByteArray a = sc->read(1); + TQByteArray a = sc->read(1); if(a[0] != '\r') { delete sc; return; @@ -1752,13 +1752,13 @@ public: SocksClient *client; SocksUDP *client_udp; StreamHost host; - QString key; + TQString key; bool udp; int udp_tries; - QTimer t; + TQTimer t; Jid jid; - Item(const Jid &self, const StreamHost &_host, const QString &_key, bool _udp) : QObject(0) + Item(const Jid &self, const StreamHost &_host, const TQString &_key, bool _udp) : TQObject(0) { jid = self; host = _host; @@ -1766,9 +1766,9 @@ public: udp = _udp; client = new SocksClient; client_udp = 0; - connect(client, SIGNAL(connected()), SLOT(sc_connected())); - connect(client, SIGNAL(error(int)), SLOT(sc_error(int))); - connect(&t, SIGNAL(timeout()), SLOT(trySendUDP())); + connect(client, TQT_SIGNAL(connected()), TQT_SLOT(sc_connected())); + connect(client, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int))); + connect(&t, TQT_SIGNAL(timeout()), TQT_SLOT(trySendUDP())); } ~Item() @@ -1826,8 +1826,8 @@ private slots: } // send initialization with our JID - QCString cs = jid.full().utf8(); - QByteArray a(cs.length()); + TQCString cs = jid.full().utf8(); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); client_udp->write(a); ++udp_tries; @@ -1857,20 +1857,20 @@ class S5BConnector::Private public: SocksClient *active; SocksUDP *active_udp; - QPtrList<Item> itemList; - QString key; + TQPtrList<Item> itemList; + TQString key; StreamHost activeHost; - QTimer t; + TQTimer t; }; -S5BConnector::S5BConnector(QObject *parent) -:QObject(parent) +S5BConnector::S5BConnector(TQObject *parent) +:TQObject(parent) { d = new Private; d->active = 0; d->active_udp = 0; d->itemList.setAutoDelete(true); - connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout())); + connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout())); } S5BConnector::~S5BConnector() @@ -1889,7 +1889,7 @@ void S5BConnector::reset() d->itemList.clear(); } -void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const QString &key, bool udp, int timeout) +void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const TQString &key, bool udp, int timeout) { reset(); @@ -1898,7 +1898,7 @@ void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const QSt #endif for(StreamHostList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it) { Item *i = new Item(self, *it, key, udp); - connect(i, SIGNAL(result(bool)), SLOT(item_result(bool))); + connect(i, TQT_SIGNAL(result(bool)), TQT_SLOT(item_result(bool))); d->itemList.append(i); i->start(); } @@ -1964,7 +1964,7 @@ void S5BConnector::t_timeout() void S5BConnector::man_udpSuccess(const Jid &streamHost) { // was anyone sending to this streamhost? - QPtrListIterator<Item> it(d->itemList); + TQPtrListIterator<Item> it(d->itemList); for(Item *i; (i = it.current()); ++it) { if(i->host.jid().compare(streamHost) && i->client_udp) { i->udpSuccess(); @@ -1981,17 +1981,17 @@ class S5BServer::Item : public QObject Q_OBJECT public: SocksClient *client; - QString host; - QTimer expire; + TQString host; + TQTimer expire; - Item(SocksClient *c) : QObject(0) + Item(SocksClient *c) : TQObject(0) { client = c; - connect(client, SIGNAL(incomingMethods(int)), SLOT(sc_incomingMethods(int))); - connect(client, SIGNAL(incomingConnectRequest(const QString &, int)), SLOT(sc_incomingConnectRequest(const QString &, int))); - connect(client, SIGNAL(error(int)), SLOT(sc_error(int))); + connect(client, TQT_SIGNAL(incomingMethods(int)), TQT_SLOT(sc_incomingMethods(int))); + connect(client, TQT_SIGNAL(incomingConnectRequest(const TQString &, int)), TQT_SLOT(sc_incomingConnectRequest(const TQString &, int))); + connect(client, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int))); - connect(&expire, SIGNAL(timeout()), SLOT(doError())); + connect(&expire, TQT_SIGNAL(timeout()), TQT_SLOT(doError())); resetExpiration(); } @@ -2025,7 +2025,7 @@ private slots: doError(); } - void sc_incomingConnectRequest(const QString &_host, int port) + void sc_incomingConnectRequest(const TQString &_host, int port) { if(port == 0) { host = _host; @@ -2046,18 +2046,18 @@ class S5BServer::Private { public: SocksServer serv; - QStringList hostList; - QPtrList<S5BManager> manList; - QPtrList<Item> itemList; + TQStringList hostList; + TQPtrList<S5BManager> manList; + TQPtrList<Item> itemList; }; -S5BServer::S5BServer(QObject *parent) -:QObject(parent) +S5BServer::S5BServer(TQObject *parent) +:TQObject(parent) { d = new Private; d->itemList.setAutoDelete(true); - connect(&d->serv, SIGNAL(incomingReady()), SLOT(ss_incomingReady())); - connect(&d->serv, SIGNAL(incomingUDP(const QString &, int, const QHostAddress &, int, const QByteArray &)), SLOT(ss_incomingUDP(const QString &, int, const QHostAddress &, int, const QByteArray &))); + connect(&d->serv, TQT_SIGNAL(incomingReady()), TQT_SLOT(ss_incomingReady())); + connect(&d->serv, TQT_SIGNAL(incomingUDP(const TQString &, int, const TQHostAddress &, int, const TQByteArray &)), TQT_SLOT(ss_incomingUDP(const TQString &, int, const TQHostAddress &, int, const TQByteArray &))); } S5BServer::~S5BServer() @@ -2082,12 +2082,12 @@ void S5BServer::stop() d->serv.stop(); } -void S5BServer::setHostList(const QStringList &list) +void S5BServer::setHostList(const TQStringList &list) { d->hostList = list; } -QStringList S5BServer::hostList() const +TQStringList S5BServer::hostList() const { return d->hostList; } @@ -2103,16 +2103,16 @@ void S5BServer::ss_incomingReady() #ifdef S5B_DEBUG printf("S5BServer: incoming connection from %s:%d\n", i->client->peerAddress().toString().latin1(), i->client->peerPort()); #endif - connect(i, SIGNAL(result(bool)), SLOT(item_result(bool))); + connect(i, TQT_SIGNAL(result(bool)), TQT_SLOT(item_result(bool))); d->itemList.append(i); } -void S5BServer::ss_incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data) +void S5BServer::ss_incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data) { if(port != 0 || port != 1) return; - QPtrListIterator<S5BManager> it(d->manList); + TQPtrListIterator<S5BManager> it(d->manList); for(S5BManager *m; (m = it.current()); ++it) { if(m->srv_ownsHash(host)) { m->srv_incomingUDP(port == 1 ? true : false, addr, sourcePort, host, data); @@ -2134,11 +2134,11 @@ void S5BServer::item_result(bool b) SocksClient *c = i->client; i->client = 0; - QString key = i->host; + TQString key = i->host; d->itemList.removeRef(i); // find the appropriate manager for this incoming connection - QPtrListIterator<S5BManager> it(d->manList); + TQPtrListIterator<S5BManager> it(d->manList); for(S5BManager *m; (m = it.current()); ++it) { if(m->srv_ownsHash(key)) { m->srv_incomingReady(c, key); @@ -2162,18 +2162,18 @@ void S5BServer::unlink(S5BManager *m) void S5BServer::unlinkAll() { - QPtrListIterator<S5BManager> it(d->manList); + TQPtrListIterator<S5BManager> it(d->manList); for(S5BManager *m; (m = it.current()); ++it) m->srv_unlink(); d->manList.clear(); } -const QPtrList<S5BManager> & S5BServer::managerList() const +const TQPtrList<S5BManager> & S5BServer::managerList() const { return d->manList; } -void S5BServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &data) +void S5BServer::writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data) { d->serv.writeUDP(addr, port, data); } @@ -2184,12 +2184,12 @@ void S5BServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &d class JT_S5B::Private { public: - QDomElement iq; + TQDomElement iq; Jid to; Jid streamHost; StreamHost proxyInfo; int mode; - QTimer t; + TQTimer t; }; JT_S5B::JT_S5B(Task *parent) @@ -2197,7 +2197,7 @@ JT_S5B::JT_S5B(Task *parent) { d = new Private; d->mode = -1; - connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout())); + connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout())); } JT_S5B::~JT_S5B() @@ -2205,32 +2205,32 @@ JT_S5B::~JT_S5B() delete d; } -void JT_S5B::request(const Jid &to, const QString &sid, const StreamHostList &hosts, bool fast, bool udp) +void JT_S5B::request(const Jid &to, const TQString &sid, const StreamHostList &hosts, bool fast, bool udp) { d->mode = 0; - QDomElement iq; + TQDomElement iq; d->to = to; iq = createIQ(doc(), "set", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams"); query.setAttribute("sid", sid); query.setAttribute("mode", udp ? "udp" : "tcp" ); iq.appendChild(query); for(StreamHostList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it) { - QDomElement shost = doc()->createElement("streamhost"); + TQDomElement shost = doc()->createElement("streamhost"); shost.setAttribute("jid", (*it).jid().full()); shost.setAttribute("host", (*it).host()); - shost.setAttribute("port", QString::number((*it).port())); + shost.setAttribute("port", TQString::number((*it).port())); if((*it).isProxy()) { - QDomElement p = doc()->createElement("proxy"); + TQDomElement p = doc()->createElement("proxy"); p.setAttribute("xmlns", "http://affinix.com/jabber/stream"); shost.appendChild(p); } query.appendChild(shost); } if(fast) { - QDomElement e = doc()->createElement("fast"); + TQDomElement e = doc()->createElement("fast"); e.setAttribute("xmlns", "http://affinix.com/jabber/stream"); query.appendChild(e); } @@ -2241,27 +2241,27 @@ void JT_S5B::requestProxyInfo(const Jid &to) { d->mode = 1; - QDomElement iq; + TQDomElement iq; d->to = to; iq = createIQ(doc(), "get", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams"); iq.appendChild(query); d->iq = iq; } -void JT_S5B::requestActivation(const Jid &to, const QString &sid, const Jid &target) +void JT_S5B::requestActivation(const Jid &to, const TQString &sid, const Jid &target) { d->mode = 2; - QDomElement iq; + TQDomElement iq; d->to = to; iq = createIQ(doc(), "set", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams"); query.setAttribute("sid", sid); iq.appendChild(query); - QDomElement act = doc()->createElement("activate"); + TQDomElement act = doc()->createElement("activate"); act.appendChild(doc()->createTextNode(target.full())); query.appendChild(act); d->iq = iq; @@ -2279,7 +2279,7 @@ void JT_S5B::onDisconnect() d->t.stop(); } -bool JT_S5B::take(const QDomElement &x) +bool JT_S5B::take(const TQDomElement &x) { if(d->mode == -1) return false; @@ -2290,11 +2290,11 @@ bool JT_S5B::take(const QDomElement &x) d->t.stop(); if(x.attribute("type") == "result") { - QDomElement q = queryTag(x); + TQDomElement q = queryTag(x); if(d->mode == 0) { d->streamHost = ""; if(!q.isNull()) { - QDomElement shost = q.elementsByTagName("streamhost-used").item(0).toElement(); + TQDomElement shost = q.elementsByTagName("streamhost-used").item(0).toElement(); if(!shost.isNull()) d->streamHost = shost.attribute("jid"); } @@ -2303,11 +2303,11 @@ bool JT_S5B::take(const QDomElement &x) } else if(d->mode == 1) { if(!q.isNull()) { - QDomElement shost = q.elementsByTagName("streamhost").item(0).toElement(); + TQDomElement shost = q.elementsByTagName("streamhost").item(0).toElement(); if(!shost.isNull()) { Jid j = shost.attribute("jid"); if(j.isValid()) { - QString host = shost.attribute("host"); + TQString host = shost.attribute("host"); if(!host.isEmpty()) { int port = shost.attribute("port").toInt(); StreamHost h; @@ -2367,11 +2367,11 @@ int JT_PushS5B::priority() const return 1; } -bool JT_PushS5B::take(const QDomElement &e) +bool JT_PushS5B::take(const TQDomElement &e) { // look for udpsuccess if(e.tagName() == "message") { - QDomElement x = e.elementsByTagName("udpsuccess").item(0).toElement(); + TQDomElement x = e.elementsByTagName("udpsuccess").item(0).toElement(); if(!x.isNull() && x.attribute("xmlns") == "http://jabber.org/protocol/bytestreams") { incomingUDPSuccess(Jid(x.attribute("from")), x.attribute("dstaddr")); return true; @@ -2393,22 +2393,22 @@ bool JT_PushS5B::take(const QDomElement &e) return false; Jid from(e.attribute("from")); - QDomElement q = queryTag(e); - QString sid = q.attribute("sid"); + TQDomElement q = queryTag(e); + TQString sid = q.attribute("sid"); StreamHostList hosts; - QDomNodeList nl = q.elementsByTagName("streamhost"); + TQDomNodeList nl = q.elementsByTagName("streamhost"); for(uint n = 0; n < nl.count(); ++n) { - QDomElement shost = nl.item(n).toElement(); + TQDomElement shost = nl.item(n).toElement(); if(hosts.count() < MAXSTREAMHOSTS) { Jid j = shost.attribute("jid"); if(!j.isValid()) continue; - QString host = shost.attribute("host"); + TQString host = shost.attribute("host"); if(host.isEmpty()) continue; int port = shost.attribute("port").toInt(); - QDomElement p = shost.elementsByTagName("proxy").item(0).toElement(); + TQDomElement p = shost.elementsByTagName("proxy").item(0).toElement(); bool isProxy = false; if(!p.isNull() && p.attribute("xmlns") == "http://affinix.com/jabber/stream") isProxy = true; @@ -2423,7 +2423,7 @@ bool JT_PushS5B::take(const QDomElement &e) } bool fast = false; - QDomElement t; + TQDomElement t; t = q.elementsByTagName("fast").item(0).toElement(); if(!t.isNull() && t.attribute("xmlns") == "http://affinix.com/jabber/stream") fast = true; @@ -2440,43 +2440,43 @@ bool JT_PushS5B::take(const QDomElement &e) return true; } -void JT_PushS5B::respondSuccess(const Jid &to, const QString &id, const Jid &streamHost) +void JT_PushS5B::respondSuccess(const Jid &to, const TQString &id, const Jid &streamHost) { - QDomElement iq = createIQ(doc(), "result", to.full(), id); - QDomElement query = doc()->createElement("query"); + TQDomElement iq = createIQ(doc(), "result", to.full(), id); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams"); iq.appendChild(query); - QDomElement shost = doc()->createElement("streamhost-used"); + TQDomElement shost = doc()->createElement("streamhost-used"); shost.setAttribute("jid", streamHost.full()); query.appendChild(shost); send(iq); } -void JT_PushS5B::respondError(const Jid &to, const QString &id, int code, const QString &str) +void JT_PushS5B::respondError(const Jid &to, const TQString &id, int code, const TQString &str) { - QDomElement iq = createIQ(doc(), "error", to.full(), id); - QDomElement err = textTag(doc(), "error", str); - err.setAttribute("code", QString::number(code)); + TQDomElement iq = createIQ(doc(), "error", to.full(), id); + TQDomElement err = textTag(doc(), "error", str); + err.setAttribute("code", TQString::number(code)); iq.appendChild(err); send(iq); } -void JT_PushS5B::sendUDPSuccess(const Jid &to, const QString &dstaddr) +void JT_PushS5B::sendUDPSuccess(const Jid &to, const TQString &dstaddr) { - QDomElement m = doc()->createElement("message"); + TQDomElement m = doc()->createElement("message"); m.setAttribute("to", to.full()); - QDomElement u = doc()->createElement("udpsuccess"); + TQDomElement u = doc()->createElement("udpsuccess"); u.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams"); u.setAttribute("dstaddr", dstaddr); m.appendChild(u); send(m); } -void JT_PushS5B::sendActivate(const Jid &to, const QString &sid, const Jid &streamHost) +void JT_PushS5B::sendActivate(const Jid &to, const TQString &sid, const Jid &streamHost) { - QDomElement m = doc()->createElement("message"); + TQDomElement m = doc()->createElement("message"); m.setAttribute("to", to.full()); - QDomElement act = doc()->createElement("activate"); + TQDomElement act = doc()->createElement("activate"); act.setAttribute("xmlns", "http://affinix.com/jabber/stream"); act.setAttribute("sid", sid); act.setAttribute("jid", streamHost.full()); @@ -2498,7 +2498,7 @@ const Jid & StreamHost::jid() const return j; } -const QString & StreamHost::host() const +const TQString & StreamHost::host() const { return v_host; } @@ -2518,7 +2518,7 @@ void StreamHost::setJid(const Jid &_j) j = _j; } -void StreamHost::setHost(const QString &host) +void StreamHost::setHost(const TQString &host) { v_host = host; } diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h index 353b5f75..d8c301c1 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h +++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h @@ -21,10 +21,10 @@ #ifndef XMPP_S5B_H #define XMPP_S5B_H -#include<qobject.h> -#include<qcstring.h> -#include<qptrlist.h> -#include<qvaluelist.h> +#include<tqobject.h> +#include<tqcstring.h> +#include<tqptrlist.h> +#include<tqvaluelist.h> #include"im.h" #include"bytestream.h" @@ -38,23 +38,23 @@ namespace XMPP class S5BManager; class S5BServer; struct S5BRequest; - typedef QValueList<StreamHost> StreamHostList; - typedef QPtrList<S5BConnection> S5BConnectionList; - typedef QPtrListIterator<S5BConnection> S5BConnectionListIt; + typedef TQValueList<StreamHost> StreamHostList; + typedef TQPtrList<S5BConnection> S5BConnectionList; + typedef TQPtrListIterator<S5BConnection> S5BConnectionListIt; class S5BDatagram { public: S5BDatagram(); - S5BDatagram(int source, int dest, const QByteArray &data); + S5BDatagram(int source, int dest, const TQByteArray &data); int sourcePort() const; int destPort() const; - QByteArray data() const; + TQByteArray data() const; private: int _source, _dest; - QByteArray _buf; + TQByteArray _buf; }; class S5BConnection : public ByteStream @@ -69,19 +69,19 @@ namespace XMPP Jid proxy() const; void setProxy(const Jid &proxy); - void connectToJid(const Jid &peer, const QString &sid, Mode m = Stream); + void connectToJid(const Jid &peer, const TQString &sid, Mode m = Stream); void accept(); void close(); Jid peer() const; - QString sid() const; + TQString sid() const; bool isRemote() const; Mode mode() const; int state() const; bool isOpen() const; - void write(const QByteArray &); - QByteArray read(int bytes=0); + void write(const TQByteArray &); + TQByteArray read(int bytes=0); int bytesAvailable() const; int bytesToWrite() const; @@ -109,22 +109,22 @@ namespace XMPP void sc_bytesWritten(int); void sc_error(int); - void su_packetReady(const QByteArray &buf); + void su_packetReady(const TQByteArray &buf); private: class Private; Private *d; void reset(bool clear=false); - void handleUDP(const QByteArray &buf); - void sendUDP(const QByteArray &buf); + void handleUDP(const TQByteArray &buf); + void sendUDP(const TQByteArray &buf); friend class S5BManager; void man_waitForAccept(const S5BRequest &r); void man_clientReady(SocksClient *, SocksUDP *); - void man_udpReady(const QByteArray &buf); + void man_udpReady(const TQByteArray &buf); void man_failed(int); - S5BConnection(S5BManager *, QObject *parent=0); + S5BConnection(S5BManager *, TQObject *parent=0); }; class S5BManager : public QObject @@ -138,8 +138,8 @@ namespace XMPP S5BServer *server() const; void setServer(S5BServer *s); - bool isAcceptableSID(const Jid &peer, const QString &sid) const; - QString genUniqueSID(const Jid &peer) const; + bool isAcceptableSID(const Jid &peer, const TQString &sid) const; + TQString genUniqueSID(const Jid &peer) const; S5BConnection *createConnection(); S5BConnection *takeIncoming(); @@ -152,8 +152,8 @@ namespace XMPP private slots: void ps_incoming(const S5BRequest &req); - void ps_incomingUDPSuccess(const Jid &from, const QString &dstaddr); - void ps_incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost); + void ps_incomingUDPSuccess(const Jid &from, const TQString &dstaddr); + void ps_incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost); void item_accepted(); void item_tryingHosts(const StreamHostList &list); void item_proxyConnect(); @@ -166,12 +166,12 @@ namespace XMPP class Private; Private *d; - S5BConnection *findIncoming(const Jid &from, const QString &sid) const; + S5BConnection *findIncoming(const Jid &from, const TQString &sid) const; Entry *findEntry(S5BConnection *) const; Entry *findEntry(Item *) const; - Entry *findEntryByHash(const QString &key) const; - Entry *findEntryBySID(const Jid &peer, const QString &sid) const; - Entry *findServerEntryByHash(const QString &key) const; + Entry *findEntryByHash(const TQString &key) const; + Entry *findEntryBySID(const Jid &peer, const TQString &sid) const; + Entry *findServerEntryByHash(const TQString &key) const; void entryContinue(Entry *e); void queryProxy(Entry *e); @@ -182,29 +182,29 @@ namespace XMPP void con_accept(S5BConnection *); void con_reject(S5BConnection *); void con_unlink(S5BConnection *); - void con_sendUDP(S5BConnection *, const QByteArray &buf); + void con_sendUDP(S5BConnection *, const TQByteArray &buf); friend class S5BServer; - bool srv_ownsHash(const QString &key) const; - void srv_incomingReady(SocksClient *sc, const QString &key); - void srv_incomingUDP(bool init, const QHostAddress &addr, int port, const QString &key, const QByteArray &data); + bool srv_ownsHash(const TQString &key) const; + void srv_incomingReady(SocksClient *sc, const TQString &key); + void srv_incomingUDP(bool init, const TQHostAddress &addr, int port, const TQString &key, const TQByteArray &data); void srv_unlink(); friend class Item; - void doSuccess(const Jid &peer, const QString &id, const Jid &streamHost); - void doError(const Jid &peer, const QString &id, int, const QString &); - void doActivate(const Jid &peer, const QString &sid, const Jid &streamHost); + void doSuccess(const Jid &peer, const TQString &id, const Jid &streamHost); + void doError(const Jid &peer, const TQString &id, int, const TQString &); + void doActivate(const Jid &peer, const TQString &sid, const Jid &streamHost); }; class S5BConnector : public QObject { Q_OBJECT public: - S5BConnector(QObject *parent=0); + S5BConnector(TQObject *parent=0); ~S5BConnector(); void reset(); - void start(const Jid &self, const StreamHostList &hosts, const QString &key, bool udp, int timeout); + void start(const Jid &self, const StreamHostList &hosts, const TQString &key, bool udp, int timeout); SocksClient *takeClient(); SocksUDP *takeUDP(); StreamHost streamHostUsed() const; @@ -231,21 +231,21 @@ namespace XMPP { Q_OBJECT public: - S5BServer(QObject *par=0); + S5BServer(TQObject *par=0); ~S5BServer(); bool isActive() const; bool start(int port); void stop(); int port() const; - void setHostList(const QStringList &); - QStringList hostList() const; + void setHostList(const TQStringList &); + TQStringList hostList() const; class Item; private slots: void ss_incomingReady(); - void ss_incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data); + void ss_incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data); void item_result(bool); private: @@ -256,8 +256,8 @@ namespace XMPP void link(S5BManager *); void unlink(S5BManager *); void unlinkAll(); - const QPtrList<S5BManager> & managerList() const; - void writeUDP(const QHostAddress &addr, int port, const QByteArray &data); + const TQPtrList<S5BManager> & managerList() const; + void writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data); }; class JT_S5B : public Task @@ -267,13 +267,13 @@ namespace XMPP JT_S5B(Task *); ~JT_S5B(); - void request(const Jid &to, const QString &sid, const StreamHostList &hosts, bool fast, bool udp=false); + void request(const Jid &to, const TQString &sid, const StreamHostList &hosts, bool fast, bool udp=false); void requestProxyInfo(const Jid &to); - void requestActivation(const Jid &to, const QString &sid, const Jid &target); + void requestActivation(const Jid &to, const TQString &sid, const Jid &target); void onGo(); void onDisconnect(); - bool take(const QDomElement &); + bool take(const TQDomElement &); Jid streamHostUsed() const; StreamHost proxyInfo() const; @@ -289,7 +289,7 @@ namespace XMPP struct S5BRequest { Jid from; - QString id, sid; + TQString id, sid; StreamHostList hosts; bool fast; bool udp; @@ -303,17 +303,17 @@ namespace XMPP int priority() const; - void respondSuccess(const Jid &to, const QString &id, const Jid &streamHost); - void respondError(const Jid &to, const QString &id, int code, const QString &str); - void sendUDPSuccess(const Jid &to, const QString &dstaddr); - void sendActivate(const Jid &to, const QString &sid, const Jid &streamHost); + void respondSuccess(const Jid &to, const TQString &id, const Jid &streamHost); + void respondError(const Jid &to, const TQString &id, int code, const TQString &str); + void sendUDPSuccess(const Jid &to, const TQString &dstaddr); + void sendActivate(const Jid &to, const TQString &sid, const Jid &streamHost); - bool take(const QDomElement &); + bool take(const TQDomElement &); signals: void incoming(const S5BRequest &req); - void incomingUDPSuccess(const Jid &from, const QString &dstaddr); - void incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost); + void incomingUDPSuccess(const Jid &from, const TQString &dstaddr); + void incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost); }; class StreamHost @@ -322,17 +322,17 @@ namespace XMPP StreamHost(); const Jid & jid() const; - const QString & host() const; + const TQString & host() const; int port() const; bool isProxy() const; void setJid(const Jid &); - void setHost(const QString &); + void setHost(const TQString &); void setPort(int); void setIsProxy(bool); private: Jid j; - QString v_host; + TQString v_host; int v_port; bool proxy; }; diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp index ee6857e3..2ca012c1 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp +++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp @@ -20,7 +20,7 @@ #include"xmpp_ibb.h" -#include<qtimer.h> +#include<tqtimer.h> #include"xmpp_xmlcommon.h" #include"base64.h" @@ -44,14 +44,14 @@ public: int state; Jid peer; - QString sid; + TQString sid; IBBManager *m; JT_IBB *j; - QDomElement comment; - QString iq_id; + TQDomElement comment; + TQString iq_id; int blockSize; - QByteArray recvbuf, sendbuf; + TQByteArray recvbuf, sendbuf; bool closePending, closing; int id; @@ -67,7 +67,7 @@ IBBConnection::IBBConnection(IBBManager *m) ++num_conn; d->id = id_conn++; - QString dstr; dstr.sprintf("IBBConnection[%d]: constructing, count=%d\n", d->id, num_conn); + TQString dstr; dstr.sprintf("IBBConnection[%d]: constructing, count=%d\n", d->id, num_conn); d->m->client()->debug(dstr); } @@ -91,13 +91,13 @@ IBBConnection::~IBBConnection() reset(true); --num_conn; - QString dstr; dstr.sprintf("IBBConnection[%d]: destructing, count=%d\n", d->id, num_conn); + TQString dstr; dstr.sprintf("IBBConnection[%d]: destructing, count=%d\n", d->id, num_conn); d->m->client()->debug(dstr); delete d; } -void IBBConnection::connectToJid(const Jid &peer, const QDomElement &comment) +void IBBConnection::connectToJid(const Jid &peer, const TQDomElement &comment) { close(); reset(true); @@ -106,11 +106,11 @@ void IBBConnection::connectToJid(const Jid &peer, const QDomElement &comment) d->peer = peer; d->comment = comment; - QString dstr; dstr.sprintf("IBBConnection[%d]: initiating request to %s\n", d->id, peer.full().latin1()); + TQString dstr; dstr.sprintf("IBBConnection[%d]: initiating request to %s\n", d->id, peer.full().latin1()); d->m->client()->debug(dstr); d->j = new JT_IBB(d->m->client()->rootTask()); - connect(d->j, SIGNAL(finished()), SLOT(ibb_finished())); + connect(d->j, TQT_SIGNAL(finished()), TQT_SLOT(ibb_finished())); d->j->request(d->peer, comment); d->j->go(true); } @@ -120,7 +120,7 @@ void IBBConnection::accept() if(d->state != WaitingForAccept) return; - QString dstr; dstr.sprintf("IBBConnection[%d]: accepting %s [%s]\n", d->id, d->peer.full().latin1(), d->sid.latin1()); + TQString dstr; dstr.sprintf("IBBConnection[%d]: accepting %s [%s]\n", d->id, d->peer.full().latin1(), d->sid.latin1()); d->m->client()->debug(dstr); d->m->doAccept(this, d->iq_id); @@ -139,7 +139,7 @@ void IBBConnection::close() return; } - QString dstr; dstr.sprintf("IBBConnection[%d]: closing\n", d->id); + TQString dstr; dstr.sprintf("IBBConnection[%d]: closing\n", d->id); d->m->client()->debug(dstr); if(d->state == Active) { @@ -152,7 +152,7 @@ void IBBConnection::close() // send a close packet JT_IBB *j = new JT_IBB(d->m->client()->rootTask()); - j->sendData(d->peer, d->sid, QByteArray(), true); + j->sendData(d->peer, d->sid, TQByteArray(), true); j->go(true); } @@ -169,12 +169,12 @@ Jid IBBConnection::peer() const return d->peer; } -QString IBBConnection::streamid() const +TQString IBBConnection::streamid() const { return d->sid; } -QDomElement IBBConnection::comment() const +TQDomElement IBBConnection::comment() const { return d->comment; } @@ -187,7 +187,7 @@ bool IBBConnection::isOpen() const return false; } -void IBBConnection::write(const QByteArray &a) +void IBBConnection::write(const TQByteArray &a) { if(d->state != Active || d->closePending || d->closing) return; @@ -200,10 +200,10 @@ void IBBConnection::write(const QByteArray &a) trySend(); } -QByteArray IBBConnection::read(int) +TQByteArray IBBConnection::read(int) { // TODO: obey argument - QByteArray a = d->recvbuf.copy(); + TQByteArray a = d->recvbuf.copy(); d->recvbuf.resize(0); return a; } @@ -218,7 +218,7 @@ int IBBConnection::bytesToWrite() const return d->sendbuf.size(); } -void IBBConnection::waitForAccept(const Jid &peer, const QString &sid, const QDomElement &comment, const QString &iq_id) +void IBBConnection::waitForAccept(const Jid &peer, const TQString &sid, const TQDomElement &comment, const TQString &iq_id) { close(); reset(true); @@ -230,7 +230,7 @@ void IBBConnection::waitForAccept(const Jid &peer, const QString &sid, const QDo d->iq_id = iq_id; } -void IBBConnection::takeIncomingData(const QByteArray &a, bool close) +void IBBConnection::takeIncomingData(const TQByteArray &a, bool close) { // append to the end of our recv buffer int oldsize = d->recvbuf.size(); @@ -254,7 +254,7 @@ void IBBConnection::ibb_finished() if(j->mode() == JT_IBB::ModeRequest) { d->sid = j->streamid(); - QString dstr; dstr.sprintf("IBBConnection[%d]: %s [%s] accepted.\n", d->id, d->peer.full().latin1(), d->sid.latin1()); + TQString dstr; dstr.sprintf("IBBConnection[%d]: %s [%s] accepted.\n", d->id, d->peer.full().latin1(), d->sid.latin1()); d->m->client()->debug(dstr); d->state = Active; @@ -270,12 +270,12 @@ void IBBConnection::ibb_finished() } if(!d->sendbuf.isEmpty() || d->closePending) - QTimer::singleShot(IBB_PACKET_DELAY, this, SLOT(trySend())); + TQTimer::singleShot(IBB_PACKET_DELAY, this, TQT_SLOT(trySend())); } } else { if(j->mode() == JT_IBB::ModeRequest) { - QString dstr; dstr.sprintf("IBBConnection[%d]: %s refused.\n", d->id, d->peer.full().latin1()); + TQString dstr; dstr.sprintf("IBBConnection[%d]: %s refused.\n", d->id, d->peer.full().latin1()); d->m->client()->debug(dstr); reset(true); @@ -294,7 +294,7 @@ void IBBConnection::trySend() if(d->j) return; - QByteArray a; + TQByteArray a; if(!d->sendbuf.isEmpty()) { // take a chunk if(d->sendbuf.size() < IBB_PACKET_SIZE) @@ -326,7 +326,7 @@ void IBBConnection::trySend() d->blockSize = a.size(); d->j = new JT_IBB(d->m->client()->rootTask()); - connect(d->j, SIGNAL(finished()), SLOT(ibb_finished())); + connect(d->j, TQT_SIGNAL(finished()), TQT_SLOT(ibb_finished())); d->j->sendData(d->peer, d->sid, a, doClose); d->j->go(true); } @@ -347,14 +347,14 @@ public: }; IBBManager::IBBManager(Client *parent) -:QObject(parent) +:TQObject(parent) { d = new Private; d->client = parent; d->ibb = new JT_IBB(d->client->rootTask(), true); - connect(d->ibb, SIGNAL(incomingRequest(const Jid &, const QString &, const QDomElement &)), SLOT(ibb_incomingRequest(const Jid &, const QString &, const QDomElement &))); - connect(d->ibb, SIGNAL(incomingData(const Jid &, const QString &, const QString &, const QByteArray &, bool)), SLOT(ibb_incomingData(const Jid &, const QString &, const QString &, const QByteArray &, bool))); + connect(d->ibb, TQT_SIGNAL(incomingRequest(const Jid &, const TQString &, const TQDomElement &)), TQT_SLOT(ibb_incomingRequest(const Jid &, const TQString &, const TQDomElement &))); + connect(d->ibb, TQT_SIGNAL(incomingData(const Jid &, const TQString &, const TQString &, const TQByteArray &, bool)), TQT_SLOT(ibb_incomingData(const Jid &, const TQString &, const TQString &, const TQByteArray &, bool))); } IBBManager::~IBBManager() @@ -380,9 +380,9 @@ IBBConnection *IBBManager::takeIncoming() return c; } -void IBBManager::ibb_incomingRequest(const Jid &from, const QString &id, const QDomElement &comment) +void IBBManager::ibb_incomingRequest(const Jid &from, const TQString &id, const TQDomElement &comment) { - QString sid = genUniqueKey(); + TQString sid = genUniqueKey(); // create a "waiting" connection IBBConnection *c = new IBBConnection(this); @@ -391,7 +391,7 @@ void IBBManager::ibb_incomingRequest(const Jid &from, const QString &id, const Q incomingReady(); } -void IBBManager::ibb_incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close) +void IBBManager::ibb_incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close) { IBBConnection *c = findConnection(streamid, from); if(!c) { @@ -403,14 +403,14 @@ void IBBManager::ibb_incomingData(const Jid &from, const QString &streamid, cons } } -QString IBBManager::genKey() const +TQString IBBManager::genKey() const { - QString key = "ibb_"; + TQString key = "ibb_"; for(int i = 0; i < 4; ++i) { int word = rand() & 0xffff; for(int n = 0; n < 4; ++n) { - QString s; + TQString s; s.sprintf("%x", (word >> (n * 4)) & 0xf); key.append(s); } @@ -419,10 +419,10 @@ QString IBBManager::genKey() const return key; } -QString IBBManager::genUniqueKey() const +TQString IBBManager::genUniqueKey() const { // get unused key - QString key; + TQString key; while(1) { key = genKey(); @@ -443,7 +443,7 @@ void IBBManager::unlink(IBBConnection *c) d->activeConns.removeRef(c); } -IBBConnection *IBBManager::findConnection(const QString &sid, const Jid &peer) const +IBBConnection *IBBManager::findConnection(const TQString &sid, const Jid &peer) const { IBBConnectionListIt it(d->activeConns); for(IBBConnection *c; (c = it.current()); ++it) { @@ -453,12 +453,12 @@ IBBConnection *IBBManager::findConnection(const QString &sid, const Jid &peer) c return 0; } -void IBBManager::doAccept(IBBConnection *c, const QString &id) +void IBBManager::doAccept(IBBConnection *c, const TQString &id) { d->ibb->respondSuccess(c->peer(), id, c->streamid()); } -void IBBManager::doReject(IBBConnection *c, const QString &id, int code, const QString &str) +void IBBManager::doReject(IBBConnection *c, const TQString &id, int code, const TQString &str) { d->ibb->respondError(c->peer(), id, code, str); } @@ -472,11 +472,11 @@ class JT_IBB::Private public: Private() {} - QDomElement iq; + TQDomElement iq; int mode; bool serve; Jid to; - QString streamid; + TQString streamid; }; JT_IBB::JT_IBB(Task *parent, bool serve) @@ -491,60 +491,60 @@ JT_IBB::~JT_IBB() delete d; } -void JT_IBB::request(const Jid &to, const QDomElement &comment) +void JT_IBB::request(const Jid &to, const TQDomElement &comment) { d->mode = ModeRequest; - QDomElement iq; + TQDomElement iq; d->to = to; iq = createIQ(doc(), "set", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/ibb"); iq.appendChild(query); query.appendChild(comment); d->iq = iq; } -void JT_IBB::sendData(const Jid &to, const QString &streamid, const QByteArray &a, bool close) +void JT_IBB::sendData(const Jid &to, const TQString &streamid, const TQByteArray &a, bool close) { d->mode = ModeSendData; - QDomElement iq; + TQDomElement iq; d->to = to; iq = createIQ(doc(), "set", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/ibb"); iq.appendChild(query); query.appendChild(textTag(doc(), "streamid", streamid)); if(!a.isEmpty()) query.appendChild(textTag(doc(), "data", Base64::arrayToString(a))); if(close) { - QDomElement c = doc()->createElement("close"); + TQDomElement c = doc()->createElement("close"); query.appendChild(c); } d->iq = iq; } -void JT_IBB::respondSuccess(const Jid &to, const QString &id, const QString &streamid) +void JT_IBB::respondSuccess(const Jid &to, const TQString &id, const TQString &streamid) { - QDomElement iq = createIQ(doc(), "result", to.full(), id); - QDomElement query = doc()->createElement("query"); + TQDomElement iq = createIQ(doc(), "result", to.full(), id); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/ibb"); iq.appendChild(query); query.appendChild(textTag(doc(), "streamid", streamid)); send(iq); } -void JT_IBB::respondError(const Jid &to, const QString &id, int code, const QString &str) +void JT_IBB::respondError(const Jid &to, const TQString &id, int code, const TQString &str) { - QDomElement iq = createIQ(doc(), "error", to.full(), id); - QDomElement err = textTag(doc(), "error", str); - err.setAttribute("code", QString::number(code)); + TQDomElement iq = createIQ(doc(), "error", to.full(), id); + TQDomElement err = textTag(doc(), "error", str); + err.setAttribute("code", TQString::number(code)); iq.appendChild(err); send(iq); } -void JT_IBB::respondAck(const Jid &to, const QString &id) +void JT_IBB::respondAck(const Jid &to, const TQString &id) { - QDomElement iq = createIQ(doc(), "result", to.full(), id); + TQDomElement iq = createIQ(doc(), "result", to.full(), id); send(iq); } @@ -553,7 +553,7 @@ void JT_IBB::onGo() send(d->iq); } -bool JT_IBB::take(const QDomElement &e) +bool JT_IBB::take(const TQDomElement &e) { if(d->serve) { // must be an iq-set tag @@ -564,18 +564,18 @@ bool JT_IBB::take(const QDomElement &e) return false; Jid from(e.attribute("from")); - QString id = e.attribute("id"); - QDomElement q = queryTag(e); + TQString id = e.attribute("id"); + TQDomElement q = queryTag(e); bool found; - QDomElement s = findSubTag(q, "streamid", &found); + TQDomElement s = findSubTag(q, "streamid", &found); if(!found) { - QDomElement comment = findSubTag(q, "comment", &found); + TQDomElement comment = findSubTag(q, "comment", &found); incomingRequest(from, id, comment); } else { - QString sid = tagContent(s); - QByteArray a; + TQString sid = tagContent(s); + TQByteArray a; bool close = false; s = findSubTag(q, "data", &found); if(found) @@ -595,12 +595,12 @@ bool JT_IBB::take(const QDomElement &e) return false; if(e.attribute("type") == "result") { - QDomElement q = queryTag(e); + TQDomElement q = queryTag(e); // request if(d->mode == ModeRequest) { bool found; - QDomElement s = findSubTag(q, "streamid", &found); + TQDomElement s = findSubTag(q, "streamid", &found); if(found) d->streamid = tagContent(s); else @@ -621,7 +621,7 @@ bool JT_IBB::take(const QDomElement &e) } } -QString JT_IBB::streamid() const +TQString JT_IBB::streamid() const { return d->streamid; } diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h index 682c5a06..e5a0ed93 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h +++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h @@ -21,10 +21,10 @@ #ifndef JABBER_IBB_H #define JABBER_IBB_H -#include<qobject.h> -#include<qdom.h> -#include<qstring.h> -#include<qptrlist.h> +#include<tqobject.h> +#include<tqdom.h> +#include<tqstring.h> +#include<tqptrlist.h> #include"bytestream.h" #include"im.h" @@ -43,18 +43,18 @@ namespace XMPP IBBConnection(IBBManager *); ~IBBConnection(); - void connectToJid(const Jid &peer, const QDomElement &comment); + void connectToJid(const Jid &peer, const TQDomElement &comment); void accept(); void close(); int state() const; Jid peer() const; - QString streamid() const; - QDomElement comment() const; + TQString streamid() const; + TQDomElement comment() const; bool isOpen() const; - void write(const QByteArray &); - QByteArray read(int bytes=0); + void write(const TQByteArray &); + TQByteArray read(int bytes=0); int bytesAvailable() const; int bytesToWrite() const; @@ -72,12 +72,12 @@ namespace XMPP void reset(bool clear=false); friend class IBBManager; - void waitForAccept(const Jid &peer, const QString &sid, const QDomElement &comment, const QString &iq_id); - void takeIncomingData(const QByteArray &, bool close); + void waitForAccept(const Jid &peer, const TQString &sid, const TQDomElement &comment, const TQString &iq_id); + void takeIncomingData(const TQByteArray &, bool close); }; - typedef QPtrList<IBBConnection> IBBConnectionList; - typedef QPtrListIterator<IBBConnection> IBBConnectionListIt; + typedef TQPtrList<IBBConnection> IBBConnectionList; + typedef TQPtrListIterator<IBBConnection> IBBConnectionListIt; class IBBManager : public QObject { Q_OBJECT @@ -93,22 +93,22 @@ namespace XMPP void incomingReady(); private slots: - void ibb_incomingRequest(const Jid &from, const QString &id, const QDomElement &); - void ibb_incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close); + void ibb_incomingRequest(const Jid &from, const TQString &id, const TQDomElement &); + void ibb_incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close); private: class Private; Private *d; - QString genKey() const; + TQString genKey() const; friend class IBBConnection; - IBBConnection *findConnection(const QString &sid, const Jid &peer="") const; - QString genUniqueKey() const; + IBBConnection *findConnection(const TQString &sid, const Jid &peer="") const; + TQString genUniqueKey() const; void link(IBBConnection *); void unlink(IBBConnection *); - void doAccept(IBBConnection *c, const QString &id); - void doReject(IBBConnection *c, const QString &id, int, const QString &); + void doAccept(IBBConnection *c, const TQString &id); + void doReject(IBBConnection *c, const TQString &id, int, const TQString &); }; class JT_IBB : public Task @@ -119,22 +119,22 @@ namespace XMPP JT_IBB(Task *, bool serve=false); ~JT_IBB(); - void request(const Jid &, const QDomElement &comment); - void sendData(const Jid &, const QString &streamid, const QByteArray &data, bool close); - void respondSuccess(const Jid &, const QString &id, const QString &streamid); - void respondError(const Jid &, const QString &id, int code, const QString &str); - void respondAck(const Jid &to, const QString &id); + void request(const Jid &, const TQDomElement &comment); + void sendData(const Jid &, const TQString &streamid, const TQByteArray &data, bool close); + void respondSuccess(const Jid &, const TQString &id, const TQString &streamid); + void respondError(const Jid &, const TQString &id, int code, const TQString &str); + void respondAck(const Jid &to, const TQString &id); void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); - QString streamid() const; + TQString streamid() const; Jid jid() const; int mode() const; signals: - void incomingRequest(const Jid &from, const QString &id, const QDomElement &); - void incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close); + void incomingRequest(const Jid &from, const TQString &id, const TQDomElement &); + void incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close); private: class Private; diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp index 987ac0c7..a39d92b9 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp +++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp @@ -20,8 +20,8 @@ #include"xmpp_jidlink.h" -#include<qdom.h> -#include<qtimer.h> +#include<tqdom.h> +#include<tqtimer.h> #include"im.h" #include"s5b.h" #include"xmpp_ibb.h" @@ -42,7 +42,7 @@ public: }; JidLink::JidLink(Client *client) -:QObject(client->jidLinkManager()) +:TQObject(client->jidLinkManager()) { d = new Private; d->client = client; @@ -73,7 +73,7 @@ void JidLink::reset(bool clear) } } -void JidLink::connectToJid(const Jid &jid, int type, const QDomElement &comment) +void JidLink::connectToJid(const Jid &jid, int type, const TQDomElement &comment) { reset(true); if(type == DTCP) @@ -105,18 +105,18 @@ void JidLink::link() { if(d->type == DTCP) { S5BConnection *c = (S5BConnection *)d->bs; - connect(c, SIGNAL(connected()), SLOT(dtcp_connected())); - connect(c, SIGNAL(accepted()), SLOT(dtcp_accepted())); + connect(c, TQT_SIGNAL(connected()), TQT_SLOT(dtcp_connected())); + connect(c, TQT_SIGNAL(accepted()), TQT_SLOT(dtcp_accepted())); } else { IBBConnection *c = (IBBConnection *)d->bs; - connect(c, SIGNAL(connected()), SLOT(ibb_connected())); + connect(c, TQT_SIGNAL(connected()), TQT_SLOT(ibb_connected())); } - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int))); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); } void JidLink::unlink() @@ -129,7 +129,7 @@ void JidLink::accept() if(d->state != WaitingForAccept) return; - QTimer::singleShot(0, this, SLOT(doRealAccept())); + TQTimer::singleShot(0, this, TQT_SLOT(doRealAccept())); } void JidLink::doRealAccept() @@ -202,18 +202,18 @@ void JidLink::close() reset(); } -void JidLink::write(const QByteArray &a) +void JidLink::write(const TQByteArray &a) { if(d->state == Active) d->bs->write(a); } -QByteArray JidLink::read(int bytes) +TQByteArray JidLink::read(int bytes) { if(d->bs) return d->bs->read(bytes); else - return QByteArray(); + return TQByteArray(); } int JidLink::bytesAvailable() const @@ -283,11 +283,11 @@ public: Private() {} Client *client; - QPtrList<JidLink> incomingList; + TQPtrList<JidLink> incomingList; }; JidLinkManager::JidLinkManager(Client *par) -:QObject(par) +:TQObject(par) { d = new Private; d->client = par; diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h index ac852349..40d3d4eb 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h +++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h @@ -25,8 +25,8 @@ #ifndef JABBER_JIDLINK_H #define JABBER_JIDLINK_H -#include<qobject.h> -#include<qstring.h> +#include<tqobject.h> +#include<tqstring.h> #include"xmpp.h" class ByteStream; @@ -46,7 +46,7 @@ namespace XMPP JidLink(Client *client); ~JidLink(); - void connectToJid(const Jid &jid, int type, const QDomElement &comment); + void connectToJid(const Jid &jid, int type, const TQDomElement &comment); void accept(); int type() const; @@ -55,8 +55,8 @@ namespace XMPP bool isOpen() const; void close(); - void write(const QByteArray &); - QByteArray read(int bytes=0); + void write(const TQByteArray &); + TQByteArray read(int bytes=0); int bytesAvailable() const; int bytesToWrite() const; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp index 55b43c06..3ba5cb16 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp @@ -31,12 +31,12 @@ #include"xmpp.h" -#include<qguardedptr.h> +#include<tqguardedptr.h> #include<qca.h> #include"safedelete.h" #ifdef NO_NDNS -#include<qdns.h> +#include<tqdns.h> #else #include"ndns.h" #endif @@ -55,8 +55,8 @@ using namespace XMPP; //---------------------------------------------------------------------------- // Connector //---------------------------------------------------------------------------- -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setUseSSL(false); setPeerAddressNone(); @@ -76,7 +76,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -94,11 +94,11 @@ void Connector::setUseSSL(bool b) void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; @@ -124,7 +124,7 @@ int AdvancedConnector::Proxy::type() const return t; } -QString AdvancedConnector::Proxy::host() const +TQString AdvancedConnector::Proxy::host() const { return v_host; } @@ -134,17 +134,17 @@ Q_UINT16 AdvancedConnector::Proxy::port() const return v_port; } -QString AdvancedConnector::Proxy::url() const +TQString AdvancedConnector::Proxy::url() const { return v_url; } -QString AdvancedConnector::Proxy::user() const +TQString AdvancedConnector::Proxy::user() const { return v_user; } -QString AdvancedConnector::Proxy::pass() const +TQString AdvancedConnector::Proxy::pass() const { return v_pass; } @@ -154,14 +154,14 @@ int AdvancedConnector::Proxy::pollInterval() const return v_poll; } -void AdvancedConnector::Proxy::setHttpConnect(const QString &host, Q_UINT16 port) +void AdvancedConnector::Proxy::setHttpConnect(const TQString &host, Q_UINT16 port) { t = HttpConnect; v_host = host; v_port = port; } -void AdvancedConnector::Proxy::setHttpPoll(const QString &host, Q_UINT16 port, const QString &url) +void AdvancedConnector::Proxy::setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url) { t = HttpPoll; v_host = host; @@ -169,14 +169,14 @@ void AdvancedConnector::Proxy::setHttpPoll(const QString &host, Q_UINT16 port, c v_url = url; } -void AdvancedConnector::Proxy::setSocks(const QString &host, Q_UINT16 port) +void AdvancedConnector::Proxy::setSocks(const TQString &host, Q_UINT16 port) { t = Socks; v_host = host; v_port = port; } -void AdvancedConnector::Proxy::setUserPass(const QString &user, const QString &pass) +void AdvancedConnector::Proxy::setUserPass(const TQString &user, const TQString &pass) { v_user = user; v_pass = pass; @@ -198,21 +198,21 @@ public: int mode; ByteStream *bs; #ifdef NO_NDNS - QDns *qdns; + TQDns *qdns; #else NDns dns; #endif SrvResolver srv; - QString server; - QString opt_host; + TQString server; + TQString opt_host; int opt_port; bool opt_probe, opt_ssl; Proxy proxy; - QString host; + TQString host; int port; - QValueList<QDns::Server> servers; + TQValueList<TQDns::Server> servers; int errorCode; bool multi, using_srv; @@ -223,7 +223,7 @@ public: SafeDelete sd; }; -AdvancedConnector::AdvancedConnector(QObject *parent) +AdvancedConnector::AdvancedConnector(TQObject *parent) :Connector(parent) { d = new Private; @@ -231,9 +231,9 @@ AdvancedConnector::AdvancedConnector(QObject *parent) #ifdef NO_NDNS d->qdns = 0; #else - connect(&d->dns, SIGNAL(resultsReady()), SLOT(dns_done())); + connect(&d->dns, TQT_SIGNAL(resultsReady()), TQT_SLOT(dns_done())); #endif - connect(&d->srv, SIGNAL(resultsReady()), SLOT(srv_done())); + connect(&d->srv, TQT_SIGNAL(resultsReady()), TQT_SLOT(srv_done())); d->opt_probe = false; d->opt_ssl = false; cleanup(); @@ -285,7 +285,7 @@ void AdvancedConnector::setProxy(const Proxy &proxy) d->proxy = proxy; } -void AdvancedConnector::setOptHostPort(const QString &host, Q_UINT16 _port) +void AdvancedConnector::setOptHostPort(const TQString &host, Q_UINT16 _port) { if(d->mode != Idle) return; @@ -307,7 +307,7 @@ void AdvancedConnector::setOptSSL(bool b) d->opt_ssl = b; } -void AdvancedConnector::connectToServer(const QString &server) +void AdvancedConnector::connectToServer(const TQString &server) { if(d->mode != Idle) return; @@ -326,10 +326,10 @@ void AdvancedConnector::connectToServer(const QString &server) HttpPoll *s = new HttpPoll; d->bs = s; - connect(s, SIGNAL(connected()), SLOT(bs_connected())); - connect(s, SIGNAL(syncStarted()), SLOT(http_syncStarted())); - connect(s, SIGNAL(syncFinished()), SLOT(http_syncFinished())); - connect(s, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected())); + connect(s, TQT_SIGNAL(syncStarted()), TQT_SLOT(http_syncStarted())); + connect(s, TQT_SIGNAL(syncFinished()), TQT_SLOT(http_syncFinished())); + connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); if(!d->proxy.user().isEmpty()) s->setAuth(d->proxy.user(), d->proxy.pass()); s->setPollInterval(d->proxy.pollInterval()); @@ -348,7 +348,7 @@ void AdvancedConnector::connectToServer(const QString &server) else { d->multi = true; - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; srvLookup(d->server); if(!self) return; @@ -389,11 +389,11 @@ void AdvancedConnector::do_resolve() #ifdef NO_NDNS printf("resolving (aaaa=%d)\n", d->aaaa); d->qdns = new QDns; - connect(d->qdns, SIGNAL(resultsReady()), SLOT(dns_done())); + connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(dns_done())); if(d->aaaa) - d->qdns->setRecordType(QDns::Aaaa); // IPv6 + d->qdns->setRecordType(TQDns::Aaaa); // IPv6 else - d->qdns->setRecordType(QDns::A); // IPv4 + d->qdns->setRecordType(TQDns::A); // IPv4 d->qdns->setLabel(d->host); #else d->dns.resolve(d->host); @@ -403,7 +403,7 @@ void AdvancedConnector::do_resolve() void AdvancedConnector::dns_done() { bool failed = false; - QHostAddress addr; + TQHostAddress addr; #ifdef NO_NDNS //if(!d->qdns) @@ -416,7 +416,7 @@ void AdvancedConnector::dns_done() //SafeDeleteLock s(&d->sd); // grab the address list and destroy the qdns object - QValueList<QHostAddress> list = d->qdns->addresses(); + TQValueList<TQHostAddress> list = d->qdns->addresses(); d->qdns->disconnect(this); d->qdns->deleteLater(); //d->sd.deleteLater(d->qdns); @@ -438,7 +438,7 @@ void AdvancedConnector::dns_done() if(d->dns.result() == 0) failed = true; else - addr = QHostAddress(d->dns.result()); + addr = TQHostAddress(d->dns.result()); #endif if(failed) { @@ -502,8 +502,8 @@ void AdvancedConnector::do_connect() #endif BSocket *s = new BSocket; d->bs = s; - connect(s, SIGNAL(connected()), SLOT(bs_connected())); - connect(s, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected())); + connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); s->connectToHost(d->host, d->port); } else if(t == Proxy::HttpConnect) { @@ -512,8 +512,8 @@ void AdvancedConnector::do_connect() #endif HttpConnect *s = new HttpConnect; d->bs = s; - connect(s, SIGNAL(connected()), SLOT(bs_connected())); - connect(s, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected())); + connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); if(!d->proxy.user().isEmpty()) s->setAuth(d->proxy.user(), d->proxy.pass()); s->connectToHost(d->proxy.host(), d->proxy.port(), d->host, d->port); @@ -524,8 +524,8 @@ void AdvancedConnector::do_connect() #endif SocksClient *s = new SocksClient; d->bs = s; - connect(s, SIGNAL(connected()), SLOT(bs_connected())); - connect(s, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected())); + connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); if(!d->proxy.user().isEmpty()) s->setAuth(d->proxy.user(), d->proxy.pass()); s->connectToHost(d->proxy.host(), d->proxy.port(), d->host, d->port); @@ -545,7 +545,7 @@ void AdvancedConnector::tryNextSrv() void AdvancedConnector::srv_done() { - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; #ifdef XMPP_DEBUG printf("srv_done1\n"); #endif @@ -591,7 +591,7 @@ void AdvancedConnector::srv_done() void AdvancedConnector::bs_connected() { if(d->proxy.type() == Proxy::None) { - QHostAddress h = (static_cast<BSocket*>(d->bs))->peerAddress(); + TQHostAddress h = (static_cast<BSocket*>(d->bs))->peerAddress(); int p = (static_cast<BSocket*>(d->bs))->peerPort(); setPeerAddress(h, p); } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp index 3c0389b5..4c8307cb 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp @@ -473,9 +473,9 @@ public: sha1_update(&_context, (unsigned char *)in, (unsigned int)len); } - void final(QByteArray *out) + void final(TQByteArray *out) { - QByteArray b(20); + TQByteArray b(20); sha1_final((unsigned char *)b.data(), &_context); *out = b; } @@ -621,9 +621,9 @@ public: md5_append(&md5, (const md5_byte_t *)in, len); } - void final(QByteArray *out) + void final(TQByteArray *out) { - QByteArray b(16); + TQByteArray b(16); md5_finish(&md5, (md5_byte_t *)b.data()); *out = b; } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp index 2a40f050..090cc9df 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp @@ -20,7 +20,7 @@ #include"xmpp.h" -#include<qdict.h> +#include<tqdict.h> #include<stringprep.h> using namespace XMPP; @@ -31,12 +31,12 @@ using namespace XMPP; class StringPrepCache { public: - static bool nameprep(const QString &in, int maxbytes, QString *out) + static bool nameprep(const TQString &in, int maxbytes, TQString *out) { if(in.isEmpty()) { if(out) - *out = QString(); + *out = TQString(); return true; } @@ -52,7 +52,7 @@ public: return true; } - QCString cs = in.utf8(); + TQCString cs = in.utf8(); cs.resize(maxbytes); if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_nameprep) != 0) { @@ -60,19 +60,19 @@ public: return false; } - QString norm = QString::fromUtf8(cs); + TQString norm = TQString::fromUtf8(cs); that->nameprep_table.insert(in, new Result(norm)); if(out) *out = norm; return true; } - static bool nodeprep(const QString &in, int maxbytes, QString *out) + static bool nodeprep(const TQString &in, int maxbytes, TQString *out) { if(in.isEmpty()) { if(out) - *out = QString(); + *out = TQString(); return true; } @@ -88,7 +88,7 @@ public: return true; } - QCString cs = in.utf8(); + TQCString cs = in.utf8(); cs.resize(maxbytes); if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_xmpp_nodeprep) != 0) { @@ -96,19 +96,19 @@ public: return false; } - QString norm = QString::fromUtf8(cs); + TQString norm = TQString::fromUtf8(cs); that->nodeprep_table.insert(in, new Result(norm)); if(out) *out = norm; return true; } - static bool resourceprep(const QString &in, int maxbytes, QString *out) + static bool resourceprep(const TQString &in, int maxbytes, TQString *out) { if(in.isEmpty()) { if(out) - *out = QString(); + *out = TQString(); return true; } @@ -124,7 +124,7 @@ public: return true; } - QCString cs = in.utf8(); + TQCString cs = in.utf8(); cs.resize(maxbytes); if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_xmpp_resourceprep) != 0) { @@ -132,7 +132,7 @@ public: return false; } - QString norm = QString::fromUtf8(cs); + TQString norm = TQString::fromUtf8(cs); that->resourceprep_table.insert(in, new Result(norm)); if(out) *out = norm; @@ -143,13 +143,13 @@ private: class Result { public: - QString *norm; + TQString *norm; Result() : norm(0) { } - Result(const QString &s) : norm(new QString(s)) + Result(const TQString &s) : norm(new TQString(s)) { } @@ -159,9 +159,9 @@ private: } }; - QDict<Result> nameprep_table; - QDict<Result> nodeprep_table; - QDict<Result> resourceprep_table; + TQDict<Result> nameprep_table; + TQDict<Result> nodeprep_table; + TQDict<Result> resourceprep_table; static StringPrepCache *instance; @@ -194,17 +194,17 @@ Jid::~Jid() { } -Jid::Jid(const QString &s) +Jid::Jid(const TQString &s) { set(s); } Jid::Jid(const char *s) { - set(QString(s)); + set(TQString(s)); } -Jid & Jid::operator=(const QString &s) +Jid & Jid::operator=(const TQString &s) { set(s); return *this; @@ -212,17 +212,17 @@ Jid & Jid::operator=(const QString &s) Jid & Jid::operator=(const char *s) { - set(QString(s)); + set(TQString(s)); return *this; } void Jid::reset() { - f = QString(); - b = QString(); - d = QString(); - n = QString(); - r = QString(); + f = TQString(); + b = TQString(); + d = TQString(); + n = TQString(); + r = TQString(); valid = false; } @@ -244,10 +244,10 @@ void Jid::update() valid = false; } -void Jid::set(const QString &s) +void Jid::set(const TQString &s) { - QString rest, domain, node, resource; - QString norm_domain, norm_node, norm_resource; + TQString rest, domain, node, resource; + TQString norm_domain, norm_node, norm_resource; int x = s.find('/'); if(x != -1) { rest = s.mid(0, x); @@ -255,7 +255,7 @@ void Jid::set(const QString &s) } else { rest = s; - resource = QString(); + resource = TQString(); } if(!validResource(resource, &norm_resource)) { reset(); @@ -268,7 +268,7 @@ void Jid::set(const QString &s) domain = rest.mid(x+1); } else { - node = QString(); + node = TQString(); domain = rest; } if(!validDomain(domain, &norm_domain) || !validNode(node, &norm_node)) { @@ -283,9 +283,9 @@ void Jid::set(const QString &s) update(); } -void Jid::set(const QString &domain, const QString &node, const QString &resource) +void Jid::set(const TQString &domain, const TQString &node, const TQString &resource) { - QString norm_domain, norm_node, norm_resource; + TQString norm_domain, norm_node, norm_resource; if(!validDomain(domain, &norm_domain) || !validNode(node, &norm_node) || !validResource(resource, &norm_resource)) { reset(); return; @@ -297,11 +297,11 @@ void Jid::set(const QString &domain, const QString &node, const QString &resourc update(); } -void Jid::setDomain(const QString &s) +void Jid::setDomain(const TQString &s) { if(!valid) return; - QString norm; + TQString norm; if(!validDomain(s, &norm)) { reset(); return; @@ -310,11 +310,11 @@ void Jid::setDomain(const QString &s) update(); } -void Jid::setNode(const QString &s) +void Jid::setNode(const TQString &s) { if(!valid) return; - QString norm; + TQString norm; if(!validNode(s, &norm)) { reset(); return; @@ -323,11 +323,11 @@ void Jid::setNode(const QString &s) update(); } -void Jid::setResource(const QString &s) +void Jid::setResource(const TQString &s) { if(!valid) return; - QString norm; + TQString norm; if(!validResource(s, &norm)) { reset(); return; @@ -336,14 +336,14 @@ void Jid::setResource(const QString &s) update(); } -Jid Jid::withNode(const QString &s) const +Jid Jid::withNode(const TQString &s) const { Jid j = *this; j.setNode(s); return j; } -Jid Jid::withResource(const QString &s) const +Jid Jid::withResource(const TQString &s) const { Jid j = *this; j.setResource(s); @@ -372,38 +372,38 @@ bool Jid::compare(const Jid &a, bool compareRes) const return true; } -bool Jid::validDomain(const QString &s, QString *norm) +bool Jid::validDomain(const TQString &s, TQString *norm) { - /*QCString cs = s.utf8(); + /*TQCString cs = s.utf8(); cs.resize(1024); if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_nameprep) != 0) return false; if(norm) - *norm = QString::fromUtf8(cs); + *norm = TQString::fromUtf8(cs); return true;*/ return StringPrepCache::nameprep(s, 1024, norm); } -bool Jid::validNode(const QString &s, QString *norm) +bool Jid::validNode(const TQString &s, TQString *norm) { - /*QCString cs = s.utf8(); + /*TQCString cs = s.utf8(); cs.resize(1024); if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_xmpp_nodeprep) != 0) return false; if(norm) - *norm = QString::fromUtf8(cs); + *norm = TQString::fromUtf8(cs); return true;*/ return StringPrepCache::nodeprep(s, 1024, norm); } -bool Jid::validResource(const QString &s, QString *norm) +bool Jid::validResource(const TQString &s, TQString *norm) { - /*QCString cs = s.utf8(); + /*TQCString cs = s.utf8(); cs.resize(1024); if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_xmpp_resourceprep) != 0) return false; if(norm) - *norm = QString::fromUtf8(cs); + *norm = TQString::fromUtf8(cs); return true;*/ return StringPrepCache::resourceprep(s, 1024, norm); } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp index 558a5fcd..2348c88e 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp @@ -24,12 +24,12 @@ For XMPP::Parser to be "perfect", some things must be solved/changed in the Qt library: - - Fix weird QDomElement::haveAttributeNS() bug (patch submitted to + - Fix weird TQDomElement::haveAttributeNS() bug (patch submitted to Trolltech on Aug 31st, 2003). - - Fix weird behavior in QXmlSimpleReader of reporting endElement() when + - Fix weird behavior in TQXmlSimpleReader of reporting endElement() when the '/' character of a self-closing tag is reached, instead of when the final '>' is reached. - - Fix incremental parsing bugs in QXmlSimpleReader. At the moment, the + - Fix incremental parsing bugs in TQXmlSimpleReader. At the moment, the only bug I've found is related to attribute parsing, but there might be more (search for '###' in $QTDIR/src/xml/qxml.cpp). @@ -38,10 +38,10 @@ - Deal with the <?xml?> processing instruction as an event type, so that we can feed it back to the application properly. Right now it is completely untrackable and is simply tacked into the first event's actualString. We - can't easily do this because QXmlSimpleReader eats an extra byte beyond + can't easily do this because TQXmlSimpleReader eats an extra byte beyond the processing instruction before reporting it. - - Make QXmlInputSource capable of accepting data incrementally, to ensure + - Make TQXmlInputSource capable of accepting data incrementally, to ensure proper text encoding detection and processing over a network. This is technically not a bug, as we have our own subclass below to do it, but it would be nice if Qt had this already. @@ -49,8 +49,8 @@ #include"parser.h" -#include<qtextcodec.h> -#include<qptrlist.h> +#include<tqtextcodec.h> +#include<tqptrlist.h> #include<string.h> using namespace XMPP; @@ -85,7 +85,7 @@ public: paused = false; mightChangeEncoding = true; checkBad = true; - last = QChar(); + last = TQChar(); v_encoding = ""; resetLastData(); } @@ -95,12 +95,12 @@ public: last_string = ""; } - QString lastString() const + TQString lastString() const { return last_string; } - void appendData(const QByteArray &a) + void appendData(const TQByteArray &a) { int oldsize = in.size(); in.resize(oldsize + a.size()); @@ -108,12 +108,12 @@ public: processBuf(); } - QChar lastRead() + TQChar lastRead() { return last; } - QChar next() + TQChar next() { if(paused) return EndOfData; @@ -123,14 +123,14 @@ public: // NOTE: setting 'peek' to true allows the same char to be read again, // however this still advances the internal byte processing. - QChar readNext(bool peek=false) + TQChar readNext(bool peek=false) { - QChar c; + TQChar c; if(mightChangeEncoding) c = EndOfData; else { if(out.isEmpty()) { - QString s; + TQString s; if(!tryExtractPart(&s)) c = EndOfData; else { @@ -158,9 +158,9 @@ public: return c; } - QByteArray unprocessed() const + TQByteArray unprocessed() const { - QByteArray a(in.size() - at); + TQByteArray a(in.size() - at); memcpy(a.data(), in.data() + at, a.size()); return a; } @@ -175,21 +175,21 @@ public: return paused; } - QString encoding() const + TQString encoding() const { return v_encoding; } private: - QTextDecoder *dec; - QByteArray in; - QString out; + TQTextDecoder *dec; + TQByteArray in; + TQString out; int at; bool paused; bool mightChangeEncoding; - QChar last; - QString v_encoding; - QString last_string; + TQChar last; + TQString v_encoding; + TQString last_string; bool checkBad; void processBuf() @@ -198,7 +198,7 @@ private: printf("processing. size=%d, at=%d\n", in.size(), at); #endif if(!dec) { - QTextCodec *codec = 0; + TQTextCodec *codec = 0; uchar *p = (uchar *)in.data() + at; int size = in.size() - at; @@ -216,9 +216,9 @@ private: } } if(utf16) - codec = QTextCodec::codecForMib(1000); // UTF-16 + codec = TQTextCodec::codecForMib(1000); // UTF-16 else - codec = QTextCodec::codecForMib(106); // UTF-8 + codec = TQTextCodec::codecForMib(106); // UTF-8 v_encoding = codec->name(); dec = codec->makeDecoder(); @@ -238,11 +238,11 @@ private: int n2 = out.find('>', n); if(n2 != -1) { ++n2; - QString h = out.mid(n, n2-n); - QString enc = processXmlHeader(h); - QTextCodec *codec = 0; + TQString h = out.mid(n, n2-n); + TQString enc = processXmlHeader(h); + TQTextCodec *codec = 0; if(!enc.isEmpty()) - codec = QTextCodec::codecForName(enc.latin1()); + codec = TQTextCodec::codecForName(enc.latin1()); // changing codecs if(codec) { @@ -257,7 +257,7 @@ private: break; } } - QString s; + TQString s; if(!tryExtractPart(&s)) break; if(checkBad && checkForBadChars(s)) { @@ -273,7 +273,7 @@ private: } } - QString processXmlHeader(const QString &h) + TQString processXmlHeader(const TQString &h) { if(h.left(5) != "<?xml") return ""; @@ -281,7 +281,7 @@ private: int endPos = h.find(">"); int startPos = h.find("encoding"); if(startPos < endPos && startPos != -1) { - QString encoding; + TQString encoding; do { startPos++; if(startPos > endPos) { @@ -302,13 +302,13 @@ private: return ""; } - bool tryExtractPart(QString *s) + bool tryExtractPart(TQString *s) { int size = in.size() - at; if(size == 0) return false; uchar *p = (uchar *)in.data() + at; - QString nextChars; + TQString nextChars; while(1) { nextChars = dec->toUnicode((const char *)p, 1); ++p; @@ -333,7 +333,7 @@ private: return true; } - bool checkForBadChars(const QString &s) + bool checkForBadChars(const TQString &s) { int len = s.find('<'); if(len == -1) @@ -357,7 +357,7 @@ namespace XMPP class ParserHandler : public QXmlDefaultHandler { public: - ParserHandler(StreamInput *_in, QDomDocument *_doc) + ParserHandler(StreamInput *_in, TQDomDocument *_doc) { in = _in; doc = _doc; @@ -381,7 +381,7 @@ namespace XMPP return true; } - bool startPrefixMapping(const QString &prefix, const QString &uri) + bool startPrefixMapping(const TQString &prefix, const TQString &uri) { if(depth == 0) { nsnames += prefix; @@ -390,14 +390,14 @@ namespace XMPP return true; } - bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts) + bool startElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts) { if(depth == 0) { Parser::Event *e = new Parser::Event; - QXmlAttributes a; + TQXmlAttributes a; for(int n = 0; n < atts.length(); ++n) { - QString uri = atts.uri(n); - QString ln = atts.localName(n); + TQString uri = atts.uri(n); + TQString ln = atts.localName(n); if(a.index(uri, ln) == -1) a.append(atts.qName(n), uri, ln, atts.value(n)); } @@ -411,10 +411,10 @@ namespace XMPP in->pause(true); } else { - QDomElement e = doc->createElementNS(namespaceURI, qName); + TQDomElement e = doc->createElementNS(namespaceURI, qName); for(int n = 0; n < atts.length(); ++n) { - QString uri = atts.uri(n); - QString ln = atts.localName(n); + TQString uri = atts.uri(n); + TQString ln = atts.localName(n); bool have; if(!uri.isEmpty()) { have = e.hasAttributeNS(uri, ln); @@ -440,7 +440,7 @@ namespace XMPP return true; } - bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName) + bool endElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName) { --depth; if(depth == 0) { @@ -461,8 +461,8 @@ namespace XMPP eventList.append(e); in->pause(true); - elem = QDomElement(); - current = QDomElement(); + elem = TQDomElement(); + current = TQDomElement(); } else current = current.parentNode().toElement(); @@ -474,22 +474,22 @@ namespace XMPP return true; } - bool characters(const QString &str) + bool characters(const TQString &str) { if(depth >= 1) { - QString content = str; + TQString content = str; if(content.isEmpty()) return true; if(!current.isNull()) { - QDomText text = doc->createTextNode(content); + TQDomText text = doc->createTextNode(content); current.appendChild(text); } } return true; } - /*bool processingInstruction(const QString &target, const QString &data) + /*bool processingInstruction(const TQString &target, const TQString &data) { printf("Processing: [%s], [%s]\n", target.latin1(), data.latin1()); in->resetLastData(); @@ -498,22 +498,22 @@ namespace XMPP void checkNeedMore() { - // Here we will work around QXmlSimpleReader strangeness and self-closing tags. + // Here we will work around TQXmlSimpleReader strangeness and self-closing tags. // The problem is that endElement() is called when the '/' is read, not when // the final '>' is read. This is a potential problem when obtaining unprocessed // bytes from StreamInput after this event, as the '>' character will end up // in the unprocessed chunk. To work around this, we need to advance StreamInput's // internal byte processing, but not the xml character data. This way, the '>' // will get processed and will no longer be in the unprocessed return, but - // QXmlSimpleReader can still read it. To do this, we call StreamInput::readNext + // TQXmlSimpleReader can still read it. To do this, we call StreamInput::readNext // with 'peek' mode. - QChar c = in->readNext(true); // peek - if(c == QXmlInputSource::EndOfData) { + TQChar c = in->readNext(true); // peek + if(c == TQXmlInputSource::EndOfData) { needMore = true; } else { // We'll assume the next char is a '>'. If it isn't, then - // QXmlSimpleReader will deal with that problem on the next + // TQXmlSimpleReader will deal with that problem on the next // parse. We don't need to take any action here. needMore = false; @@ -540,11 +540,11 @@ namespace XMPP } StreamInput *in; - QDomDocument *doc; + TQDomDocument *doc; int depth; - QStringList nsnames, nsvalues; - QDomElement elem, current; - QPtrList<Parser::Event> eventList; + TQStringList nsnames, nsvalues; + TQDomElement elem, current; + TQPtrList<Parser::Event> eventList; bool needMore; }; } @@ -557,11 +557,11 @@ class Parser::Event::Private { public: int type; - QString ns, ln, qn; - QXmlAttributes a; - QDomElement e; - QString str; - QStringList nsnames, nsvalues; + TQString ns, ln, qn; + TQXmlAttributes a; + TQDomElement e; + TQString str; + TQStringList nsnames, nsvalues; }; Parser::Event::Event() @@ -601,49 +601,49 @@ int Parser::Event::type() const return d->type; } -QString Parser::Event::nsprefix(const QString &s) const +TQString Parser::Event::nsprefix(const TQString &s) const { - QStringList::ConstIterator it = d->nsnames.begin(); - QStringList::ConstIterator it2 = d->nsvalues.begin(); + TQStringList::ConstIterator it = d->nsnames.begin(); + TQStringList::ConstIterator it2 = d->nsvalues.begin(); for(; it != d->nsnames.end(); ++it) { if((*it) == s) return (*it2); ++it2; } - return QString::null; + return TQString::null; } -QString Parser::Event::namespaceURI() const +TQString Parser::Event::namespaceURI() const { return d->ns; } -QString Parser::Event::localName() const +TQString Parser::Event::localName() const { return d->ln; } -QString Parser::Event::qName() const +TQString Parser::Event::qName() const { return d->qn; } -QXmlAttributes Parser::Event::atts() const +TQXmlAttributes Parser::Event::atts() const { return d->a; } -QString Parser::Event::actualString() const +TQString Parser::Event::actualString() const { return d->str; } -QDomElement Parser::Event::element() const +TQDomElement Parser::Event::element() const { return d->e; } -void Parser::Event::setDocumentOpen(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts, const QStringList &nsnames, const QStringList &nsvalues) +void Parser::Event::setDocumentOpen(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts, const TQStringList &nsnames, const TQStringList &nsvalues) { if(!d) d = new Private; @@ -656,7 +656,7 @@ void Parser::Event::setDocumentOpen(const QString &namespaceURI, const QString & d->nsvalues = nsvalues; } -void Parser::Event::setDocumentClose(const QString &namespaceURI, const QString &localName, const QString &qName) +void Parser::Event::setDocumentClose(const TQString &namespaceURI, const TQString &localName, const TQString &qName) { if(!d) d = new Private; @@ -666,7 +666,7 @@ void Parser::Event::setDocumentClose(const QString &namespaceURI, const QString d->qn = qName; } -void Parser::Event::setElement(const QDomElement &elem) +void Parser::Event::setElement(const TQDomElement &elem) { if(!d) d = new Private; @@ -681,7 +681,7 @@ void Parser::Event::setError() d->type = Error; } -void Parser::Event::setActualString(const QString &str) +void Parser::Event::setActualString(const TQString &str) { d->str = str; } @@ -727,10 +727,10 @@ public: } } - QDomDocument *doc; + TQDomDocument *doc; StreamInput *in; ParserHandler *handler; - QXmlSimpleReader *reader; + TQXmlSimpleReader *reader; }; Parser::Parser() @@ -740,7 +740,7 @@ Parser::Parser() // check for evil bug in Qt <= 3.2.1 if(!qt_bug_check) { qt_bug_check = true; - QDomElement e = d->doc->createElementNS("someuri", "somename"); + TQDomElement e = d->doc->createElementNS("someuri", "somename"); if(e.hasAttributeNS("someuri", "somename")) qt_bug_have = true; else @@ -758,7 +758,7 @@ void Parser::reset() d->reset(); } -void Parser::appendData(const QByteArray &a) +void Parser::appendData(const TQByteArray &a) { d->in->appendData(a); @@ -787,12 +787,12 @@ Parser::Event Parser::readNext() return e; } -QByteArray Parser::unprocessed() const +TQByteArray Parser::unprocessed() const { return d->in->unprocessed(); } -QString Parser::encoding() const +TQString Parser::encoding() const { return d->in->encoding(); } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h index b43be57e..b702ad55 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h @@ -21,8 +21,8 @@ #ifndef PARSER_H #define PARSER_H -#include<qdom.h> -#include<qxml.h> +#include<tqdom.h> +#include<tqxml.h> namespace XMPP { @@ -45,26 +45,26 @@ namespace XMPP int type() const; // for document open - QString nsprefix(const QString &s=QString::null) const; + TQString nsprefix(const TQString &s=TQString::null) const; // for document open / close - QString namespaceURI() const; - QString localName() const; - QString qName() const; - QXmlAttributes atts() const; + TQString namespaceURI() const; + TQString localName() const; + TQString qName() const; + TQXmlAttributes atts() const; // for element - QDomElement element() const; + TQDomElement element() const; // for any - QString actualString() const; + TQString actualString() const; // setup - void setDocumentOpen(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts, const QStringList &nsnames, const QStringList &nsvalues); - void setDocumentClose(const QString &namespaceURI, const QString &localName, const QString &qName); - void setElement(const QDomElement &elem); + void setDocumentOpen(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts, const TQStringList &nsnames, const TQStringList &nsvalues); + void setDocumentClose(const TQString &namespaceURI, const TQString &localName, const TQString &qName); + void setElement(const TQDomElement &elem); void setError(); - void setActualString(const QString &); + void setActualString(const TQString &); private: class Private; @@ -72,10 +72,10 @@ namespace XMPP }; void reset(); - void appendData(const QByteArray &a); + void appendData(const TQByteArray &a); Event readNext(); - QByteArray unprocessed() const; - QString encoding() const; + TQByteArray unprocessed() const; + TQString encoding() const; private: class Private; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp index fd1e6cdc..76d3c781 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp @@ -40,13 +40,13 @@ using namespace XMPP; // This function prints out an array of bytes as latin characters, converting // non-printable bytes into hex values as necessary. Useful for displaying // QByteArrays for debugging purposes. -static QString printArray(const QByteArray &a) +static TQString printArray(const TQByteArray &a) { - QString s; + TQString s; for(uint n = 0; n < a.size(); ++n) { unsigned char c = (unsigned char)a[(int)n]; if(c < 32 || c >= 127) { - QString str; + TQString str; str.sprintf("[%02x]", c); s += str; } @@ -59,13 +59,13 @@ static QString printArray(const QByteArray &a) // firstChildElement // // Get an element's first child element -static QDomElement firstChildElement(const QDomElement &e) +static TQDomElement firstChildElement(const TQDomElement &e) { - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { if(n.isElement()) return n.toElement(); } - return QDomElement(); + return TQDomElement(); } //---------------------------------------------------------------------------- @@ -159,30 +159,30 @@ void BasicProtocol::reset() XmlProtocol::reset(); init(); - to = QString(); - from = QString(); - id = QString(); - lang = QString(); + to = TQString(); + from = TQString(); + id = TQString(); + lang = TQString(); version = Version(1,0); - errText = QString(); - errAppSpec = QDomElement(); - otherHost = QString(); + errText = TQString(); + errAppSpec = TQDomElement(); + otherHost = TQString(); spare.resize(0); - sasl_mech = QString(); + sasl_mech = TQString(); sasl_mechlist.clear(); sasl_step.resize(0); - stanzaToRecv = QDomElement(); + stanzaToRecv = TQDomElement(); sendList.clear(); } -void BasicProtocol::sendStanza(const QDomElement &e) +void BasicProtocol::sendStanza(const TQDomElement &e) { SendItem i; i.stanzaToSend = e; sendList += i; } -void BasicProtocol::sendDirect(const QString &s) +void BasicProtocol::sendDirect(const TQString &s) { SendItem i; i.stringToSend = s; @@ -196,10 +196,10 @@ void BasicProtocol::sendWhitespace() sendList += i; } -QDomElement BasicProtocol::recvStanza() +TQDomElement BasicProtocol::recvStanza() { - QDomElement e = stanzaToRecv; - stanzaToRecv = QDomElement(); + TQDomElement e = stanzaToRecv; + stanzaToRecv = TQDomElement(); return e; } @@ -208,7 +208,7 @@ void BasicProtocol::shutdown() doShutdown = true; } -void BasicProtocol::shutdownWithError(int cond, const QString &str) +void BasicProtocol::shutdownWithError(int cond, const TQString &str) { otherHost = str; delayErrorAndClose(cond); @@ -224,28 +224,28 @@ void BasicProtocol::setReady(bool b) ready = b; } -QString BasicProtocol::saslMech() const +TQString BasicProtocol::saslMech() const { return sasl_mech; } -QByteArray BasicProtocol::saslStep() const +TQByteArray BasicProtocol::saslStep() const { return sasl_step; } -void BasicProtocol::setSASLMechList(const QStringList &list) +void BasicProtocol::setSASLMechList(const TQStringList &list) { sasl_mechlist = list; } -void BasicProtocol::setSASLFirst(const QString &mech, const QByteArray &step) +void BasicProtocol::setSASLFirst(const TQString &mech, const TQByteArray &step) { sasl_mech = mech; sasl_step = step; } -void BasicProtocol::setSASLNext(const QByteArray &step) +void BasicProtocol::setSASLNext(const TQByteArray &step) { sasl_step = step; } @@ -255,7 +255,7 @@ void BasicProtocol::setSASLAuthed() sasl_authed = true; } -int BasicProtocol::stringToSASLCond(const QString &s) +int BasicProtocol::stringToSASLCond(const TQString &s) { for(int n = 0; saslCondTable[n].str; ++n) { if(s == saslCondTable[n].str) @@ -264,7 +264,7 @@ int BasicProtocol::stringToSASLCond(const QString &s) return -1; } -int BasicProtocol::stringToStreamCond(const QString &s) +int BasicProtocol::stringToStreamCond(const TQString &s) { for(int n = 0; streamCondTable[n].str; ++n) { if(s == streamCondTable[n].str) @@ -273,30 +273,30 @@ int BasicProtocol::stringToStreamCond(const QString &s) return -1; } -QString BasicProtocol::saslCondToString(int x) +TQString BasicProtocol::saslCondToString(int x) { for(int n = 0; saslCondTable[n].str; ++n) { if(x == saslCondTable[n].cond) return saslCondTable[n].str; } - return QString(); + return TQString(); } -QString BasicProtocol::streamCondToString(int x) +TQString BasicProtocol::streamCondToString(int x) { for(int n = 0; streamCondTable[n].str; ++n) { if(x == streamCondTable[n].cond) return streamCondTable[n].str; } - return QString(); + return TQString(); } -void BasicProtocol::extractStreamError(const QDomElement &e) +void BasicProtocol::extractStreamError(const TQDomElement &e) { - QString text; - QDomElement appSpec; + TQString text; + TQDomElement appSpec; - QDomElement t = firstChildElement(e); + TQDomElement t = firstChildElement(e); if(t.isNull() || t.namespaceURI() != NS_STREAMS) { // probably old-style error errCond = -1; @@ -314,9 +314,9 @@ void BasicProtocol::extractStreamError(const QDomElement &e) text = t.text(); // find first non-standard namespaced element - QDomNodeList nl = e.childNodes(); + TQDomNodeList nl = e.childNodes(); for(uint n = 0; n < nl.count(); ++n) { - QDomNode i = nl.item(n); + TQDomNode i = nl.item(n); if(i.isElement() && i.namespaceURI() != NS_STREAMS) { appSpec = i.toElement(); break; @@ -328,20 +328,20 @@ void BasicProtocol::extractStreamError(const QDomElement &e) } } -void BasicProtocol::send(const QDomElement &e, bool clip) +void BasicProtocol::send(const TQDomElement &e, bool clip) { writeElement(e, TypeElement, false, clip); } -void BasicProtocol::sendStreamError(int cond, const QString &text, const QDomElement &appSpec) +void BasicProtocol::sendStreamError(int cond, const TQString &text, const TQDomElement &appSpec) { - QDomElement se = doc.createElementNS(NS_ETHERX, "stream:error"); - QDomElement err = doc.createElementNS(NS_STREAMS, streamCondToString(cond)); + TQDomElement se = doc.createElementNS(NS_ETHERX, "stream:error"); + TQDomElement err = doc.createElementNS(NS_STREAMS, streamCondToString(cond)); if(!otherHost.isEmpty()) err.appendChild(doc.createTextNode(otherHost)); se.appendChild(err); if(!text.isEmpty()) { - QDomElement te = doc.createElementNS(NS_STREAMS, "text"); + TQDomElement te = doc.createElementNS(NS_STREAMS, "text"); te.setAttributeNS(NS_XML, "xml:lang", "en"); te.appendChild(doc.createTextNode(text)); se.appendChild(te); @@ -351,15 +351,15 @@ void BasicProtocol::sendStreamError(int cond, const QString &text, const QDomEle writeElement(se, 100, false); } -void BasicProtocol::sendStreamError(const QString &text) +void BasicProtocol::sendStreamError(const TQString &text) { - QDomElement se = doc.createElementNS(NS_ETHERX, "stream:error"); + TQDomElement se = doc.createElementNS(NS_ETHERX, "stream:error"); se.appendChild(doc.createTextNode(text)); writeElement(se, 100, false); } -bool BasicProtocol::errorAndClose(int cond, const QString &text, const QDomElement &appSpec) +bool BasicProtocol::errorAndClose(int cond, const TQString &text, const TQDomElement &appSpec) { closeError = true; errCond = cond; @@ -376,7 +376,7 @@ bool BasicProtocol::error(int code) return true; } -void BasicProtocol::delayErrorAndClose(int cond, const QString &text, const QDomElement &appSpec) +void BasicProtocol::delayErrorAndClose(int cond, const TQString &text, const TQDomElement &appSpec) { errorCode = ErrStream; errCond = cond; @@ -391,21 +391,21 @@ void BasicProtocol::delayError(int code) delayedError = true; } -QDomElement BasicProtocol::docElement() +TQDomElement BasicProtocol::docElement() { // create the root element - QDomElement e = doc.createElementNS(NS_ETHERX, "stream:stream"); + TQDomElement e = doc.createElementNS(NS_ETHERX, "stream:stream"); - QString defns = defaultNamespace(); - QStringList list = extraNamespaces(); + TQString defns = defaultNamespace(); + TQStringList list = extraNamespaces(); // HACK: using attributes seems to be the only way to get additional namespaces in here if(!defns.isEmpty()) e.setAttribute("xmlns", defns); - for(QStringList::ConstIterator it = list.begin(); it != list.end();) { - QString prefix = *(it++); - QString uri = *(it++); - e.setAttribute(QString("xmlns:") + prefix, uri); + for(TQStringList::ConstIterator it = list.begin(); it != list.end();) { + TQString prefix = *(it++); + TQString uri = *(it++); + e.setAttribute(TQString("xmlns:") + prefix, uri); } // additional attributes @@ -418,7 +418,7 @@ QDomElement BasicProtocol::docElement() if(!lang.isEmpty()) e.setAttributeNS(NS_XML, "xml:lang", lang); if(version.major > 0 || version.minor > 0) - e.setAttribute("version", QString::number(version.major) + '.' + QString::number(version.minor)); + e.setAttribute("version", TQString::number(version.major) + '.' + TQString::number(version.minor)); return e; } @@ -433,12 +433,12 @@ void BasicProtocol::handleDocOpen(const Parser::Event &pe) } if(pe.namespaceURI() == NS_ETHERX && pe.localName() == "stream") { - QXmlAttributes atts = pe.atts(); + TQXmlAttributes atts = pe.atts(); // grab the version int major = 0; int minor = 0; - QString verstr = atts.value("version"); + TQString verstr = atts.value("version"); if(!verstr.isEmpty()) { int n = verstr.find('.'); if(n != -1) { @@ -454,7 +454,7 @@ void BasicProtocol::handleDocOpen(const Parser::Event &pe) if(isIncoming()) { to = atts.value("to"); - QString peerLang = atts.value(NS_XML, "lang"); + TQString peerLang = atts.value(NS_XML, "lang"); if(!peerLang.isEmpty()) lang = peerLang; } @@ -495,7 +495,7 @@ bool BasicProtocol::handleCloseFinished() return true; } -bool BasicProtocol::doStep(const QDomElement &e) +bool BasicProtocol::doStep(const TQDomElement &e) { // handle pending error if(delayedError) { @@ -530,7 +530,7 @@ bool BasicProtocol::doStep(const QDomElement &e) if(!sendList.isEmpty()) { SendItem i; { - QValueList<SendItem>::Iterator it = sendList.begin(); + TQValueList<SendItem>::Iterator it = sendList.begin(); i = (*it); sendList.remove(it); } @@ -571,16 +571,16 @@ void BasicProtocol::itemWritten(int id, int) } } -QString BasicProtocol::defaultNamespace() +TQString BasicProtocol::defaultNamespace() { // default none - return QString(); + return TQString(); } -QStringList BasicProtocol::extraNamespaces() +TQStringList BasicProtocol::extraNamespaces() { // default none - return QStringList(); + return TQStringList(); } void BasicProtocol::handleStreamOpen(const Parser::Event &) @@ -612,7 +612,7 @@ void CoreProtocol::init() // settings jid = Jid(); - password = QString(); + password = TQString(); oldOnly = false; allowPlain = false; doTLS = true; @@ -620,8 +620,8 @@ void CoreProtocol::init() doBinding = true; // input - user = QString(); - host = QString(); + user = TQString(); + host = TQString(); // status old = false; @@ -649,14 +649,14 @@ void CoreProtocol::startClientOut(const Jid &_jid, bool _oldOnly, bool tlsActive startConnect(); } -void CoreProtocol::startServerOut(const QString &_to) +void CoreProtocol::startServerOut(const TQString &_to) { server = true; to = _to; startConnect(); } -void CoreProtocol::startDialbackOut(const QString &_to, const QString &_from) +void CoreProtocol::startDialbackOut(const TQString &_to, const TQString &_from) { server = true; dialback = true; @@ -665,7 +665,7 @@ void CoreProtocol::startDialbackOut(const QString &_to, const QString &_from) startConnect(); } -void CoreProtocol::startDialbackVerifyOut(const QString &_to, const QString &_from, const QString &id, const QString &key) +void CoreProtocol::startDialbackVerifyOut(const TQString &_to, const TQString &_from, const TQString &id, const TQString &key) { server = true; dialback = true; @@ -677,20 +677,20 @@ void CoreProtocol::startDialbackVerifyOut(const QString &_to, const QString &_fr startConnect(); } -void CoreProtocol::startClientIn(const QString &_id) +void CoreProtocol::startClientIn(const TQString &_id) { id = _id; startAccept(); } -void CoreProtocol::startServerIn(const QString &_id) +void CoreProtocol::startServerIn(const TQString &_id) { server = true; id = _id; startAccept(); } -void CoreProtocol::setLang(const QString &s) +void CoreProtocol::setLang(const TQString &s) { lang = s; } @@ -710,17 +710,17 @@ void CoreProtocol::setAllowPlain(bool b) allowPlain = b; } -void CoreProtocol::setPassword(const QString &s) +void CoreProtocol::setPassword(const TQString &s) { password = s; } -void CoreProtocol::setFrom(const QString &s) +void CoreProtocol::setFrom(const TQString &s) { from = s; } -void CoreProtocol::setDialbackKey(const QString &s) +void CoreProtocol::setDialbackKey(const TQString &s) { dialback_key = s; } @@ -734,18 +734,18 @@ bool CoreProtocol::loginComplete() return true; } -int CoreProtocol::getOldErrorCode(const QDomElement &e) +int CoreProtocol::getOldErrorCode(const TQDomElement &e) { - QDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement(); + TQDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement(); if(err.isNull() || !err.hasAttribute("code")) return -1; return err.attribute("code").toInt(); } -/*QString CoreProtocol::xmlToString(const QDomElement &e, bool clip) +/*TQString CoreProtocol::xmlToString(const TQDomElement &e, bool clip) { // determine an appropriate 'fakeNS' to use - QString ns; + TQString ns; if(e.prefix() == "stream") ns = NS_ETHERX; else if(e.prefix() == "db") @@ -781,21 +781,21 @@ bool CoreProtocol::stepRequiresElement() const return false; } -void CoreProtocol::stringSend(const QString &s) +void CoreProtocol::stringSend(const TQString &s) { #ifdef XMPP_TEST TD::outgoingTag(s); #endif } -void CoreProtocol::stringRecv(const QString &s) +void CoreProtocol::stringRecv(const TQString &s) { #ifdef XMPP_TEST TD::incomingTag(s); #endif } -QString CoreProtocol::defaultNamespace() +TQString CoreProtocol::defaultNamespace() { if(server) return NS_SERVER; @@ -803,9 +803,9 @@ QString CoreProtocol::defaultNamespace() return NS_CLIENT; } -QStringList CoreProtocol::extraNamespaces() +TQStringList CoreProtocol::extraNamespaces() { - QStringList list; + TQStringList list; if(dialback) { list += "db"; list += NS_DIALBACK; @@ -816,8 +816,8 @@ QStringList CoreProtocol::extraNamespaces() void CoreProtocol::handleStreamOpen(const Parser::Event &pe) { if(isIncoming()) { - QString ns = pe.nsprefix(); - QString db; + TQString ns = pe.nsprefix(); + TQString db; if(server) { db = pe.nsprefix("db"); if(!db.isEmpty()) @@ -846,21 +846,21 @@ void CoreProtocol::handleStreamOpen(const Parser::Event &pe) } } -void CoreProtocol::elementSend(const QDomElement &e) +void CoreProtocol::elementSend(const TQDomElement &e) { #ifdef XMPP_TEST TD::outgoingXml(e); #endif } -void CoreProtocol::elementRecv(const QDomElement &e) +void CoreProtocol::elementRecv(const TQDomElement &e) { #ifdef XMPP_TEST TD::incomingXml(e); #endif } -bool CoreProtocol::doStep2(const QDomElement &e) +bool CoreProtocol::doStep2(const TQDomElement &e) { if(dialback) return dialbackStep(e); @@ -868,9 +868,9 @@ bool CoreProtocol::doStep2(const QDomElement &e) return normalStep(e); } -bool CoreProtocol::isValidStanza(const QDomElement &e) const +bool CoreProtocol::isValidStanza(const TQDomElement &e) const { - QString s = e.tagName(); + TQString s = e.tagName(); if(e.namespaceURI() == (server ? NS_SERVER : NS_CLIENT) && (s == "message" || s == "presence" || s == "iq")) return true; else @@ -879,7 +879,7 @@ bool CoreProtocol::isValidStanza(const QDomElement &e) const bool CoreProtocol::grabPendingItem(const Jid &to, const Jid &from, int type, DBItem *item) { - for(QValueList<DBItem>::Iterator it = dbpending.begin(); it != dbpending.end(); ++it) { + for(TQValueList<DBItem>::Iterator it = dbpending.begin(); it != dbpending.end(); ++it) { const DBItem &i = *it; if(i.type == type && i.to.compare(to) && i.from.compare(from)) { const DBItem &i = (*it); @@ -891,7 +891,7 @@ bool CoreProtocol::grabPendingItem(const Jid &to, const Jid &from, int type, DBI return false; } -bool CoreProtocol::dialbackStep(const QDomElement &e) +bool CoreProtocol::dialbackStep(const TQDomElement &e) { if(step == Start) { setReady(true); @@ -904,12 +904,12 @@ bool CoreProtocol::dialbackStep(const QDomElement &e) // process a request DBItem i; { - QValueList<DBItem>::Iterator it = dbrequests.begin(); + TQValueList<DBItem>::Iterator it = dbrequests.begin(); i = (*it); dbrequests.remove(it); } - QDomElement r; + TQDomElement r; if(i.type == DBItem::ResultRequest) { r = doc.createElementNS(NS_DIALBACK, "db:result"); r.setAttribute("to", i.to.full()); @@ -959,7 +959,7 @@ bool CoreProtocol::dialbackStep(const QDomElement &e) to.set(e.attribute("to"), ""); from.set(e.attribute("from"), ""); if(isIncoming()) { - QString key = e.text(); + TQString key = e.text(); // TODO: report event } else { @@ -982,9 +982,9 @@ bool CoreProtocol::dialbackStep(const QDomElement &e) Jid to, from; to.set(e.attribute("to"), ""); from.set(e.attribute("from"), ""); - QString id = e.attribute("id"); + TQString id = e.attribute("id"); if(isIncoming()) { - QString key = e.text(); + TQString key = e.text(); // TODO: report event } else { @@ -1019,7 +1019,7 @@ bool CoreProtocol::dialbackStep(const QDomElement &e) return false; } -bool CoreProtocol::normalStep(const QDomElement &e) +bool CoreProtocol::normalStep(const TQDomElement &e) { if(step == Start) { if(isIncoming()) { @@ -1043,7 +1043,7 @@ bool CoreProtocol::normalStep(const QDomElement &e) else if(step == HandleFeatures) { // deal with TLS? if(doTLS && !tls_started && !sasl_authed && features.tls_supported) { - QDomElement e = doc.createElementNS(NS_TLS, "starttls"); + TQDomElement e = doc.createElementNS(NS_TLS, "starttls"); send(e, true); event = ESend; @@ -1084,15 +1084,15 @@ bool CoreProtocol::normalStep(const QDomElement &e) return true; } - QDomElement e = doc.createElement("iq"); + TQDomElement e = doc.createElement("iq"); e.setAttribute("type", "set"); e.setAttribute("id", "bind_1"); - QDomElement b = doc.createElementNS(NS_BIND, "bind"); + TQDomElement b = doc.createElementNS(NS_BIND, "bind"); // request specific resource? - QString resource = jid.resource(); + TQString resource = jid.resource(); if(!resource.isEmpty()) { - QDomElement r = doc.createElement("resource"); + TQDomElement r = doc.createElement("resource"); r.appendChild(doc.createTextNode(jid.resource())); b.appendChild(r); } @@ -1105,11 +1105,11 @@ bool CoreProtocol::normalStep(const QDomElement &e) return true; } else if(step == GetSASLFirst) { - QDomElement e = doc.createElementNS(NS_SASL, "auth"); + TQDomElement e = doc.createElementNS(NS_SASL, "auth"); e.setAttribute("mechanism", sasl_mech); if(!sasl_step.isEmpty()) { #ifdef XMPP_TEST - TD::msg(QString("SASL OUT: [%1]").arg(printArray(sasl_step))); + TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step))); #endif e.appendChild(doc.createTextNode(Base64::arrayToString(sasl_step))); } @@ -1122,15 +1122,15 @@ bool CoreProtocol::normalStep(const QDomElement &e) else if(step == GetSASLNext) { if(isIncoming()) { if(sasl_authed) { - QDomElement e = doc.createElementNS(NS_SASL, "success"); + TQDomElement e = doc.createElementNS(NS_SASL, "success"); writeElement(e, TypeElement, false, true); event = ESend; step = IncHandleSASLSuccess; return true; } else { - QByteArray stepData = sasl_step; - QDomElement e = doc.createElementNS(NS_SASL, "challenge"); + TQByteArray stepData = sasl_step; + TQDomElement e = doc.createElementNS(NS_SASL, "challenge"); if(!stepData.isEmpty()) e.appendChild(doc.createTextNode(Base64::arrayToString(stepData))); @@ -1141,11 +1141,11 @@ bool CoreProtocol::normalStep(const QDomElement &e) } } else { - QByteArray stepData = sasl_step; + TQByteArray stepData = sasl_step; #ifdef XMPP_TEST - TD::msg(QString("SASL OUT: [%1]").arg(printArray(sasl_step))); + TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step))); #endif - QDomElement e = doc.createElementNS(NS_SASL, "response"); + TQDomElement e = doc.createElementNS(NS_SASL, "response"); if(!stepData.isEmpty()) e.appendChild(doc.createTextNode(Base64::arrayToString(stepData))); @@ -1162,12 +1162,12 @@ bool CoreProtocol::normalStep(const QDomElement &e) return false; } else if(step == HandleAuthGet) { - QDomElement e = doc.createElement("iq"); + TQDomElement e = doc.createElement("iq"); e.setAttribute("to", to); e.setAttribute("type", "get"); e.setAttribute("id", "auth_1"); - QDomElement q = doc.createElementNS("jabber:iq:auth", "query"); - QDomElement u = doc.createElement("username"); + TQDomElement q = doc.createElementNS("jabber:iq:auth", "query"); + TQDomElement u = doc.createElement("username"); u.appendChild(doc.createTextNode(jid.node())); q.appendChild(u); e.appendChild(q); @@ -1178,22 +1178,22 @@ bool CoreProtocol::normalStep(const QDomElement &e) return true; } else if(step == HandleAuthSet) { - QDomElement e = doc.createElement("iq"); + TQDomElement e = doc.createElement("iq"); e.setAttribute("to", to); e.setAttribute("type", "set"); e.setAttribute("id", "auth_2"); - QDomElement q = doc.createElementNS("jabber:iq:auth", "query"); - QDomElement u = doc.createElement("username"); + TQDomElement q = doc.createElementNS("jabber:iq:auth", "query"); + TQDomElement u = doc.createElement("username"); u.appendChild(doc.createTextNode(jid.node())); q.appendChild(u); - QDomElement p; + TQDomElement p; if(digest) { // need SHA1 here if(!QCA::isSupported(QCA::CAP_SHA1)) QCA::insertProvider(createProviderHash()); p = doc.createElement("digest"); - QCString cs = id.utf8() + password.utf8(); + TQCString cs = id.utf8() + password.utf8(); p.appendChild(doc.createTextNode(QCA::SHA1::hashToString(cs))); } else { @@ -1201,7 +1201,7 @@ bool CoreProtocol::normalStep(const QDomElement &e) p.appendChild(doc.createTextNode(password)); } q.appendChild(p); - QDomElement r = doc.createElement("resource"); + TQDomElement r = doc.createElement("resource"); r.appendChild(doc.createTextNode(jid.resource())); q.appendChild(r); e.appendChild(q); @@ -1213,22 +1213,22 @@ bool CoreProtocol::normalStep(const QDomElement &e) } // server else if(step == SendFeatures) { - QDomElement f = doc.createElementNS(NS_ETHERX, "stream:features"); + TQDomElement f = doc.createElementNS(NS_ETHERX, "stream:features"); if(!tls_started && !sasl_authed) { // don't offer tls if we are already sasl'd - QDomElement tls = doc.createElementNS(NS_TLS, "starttls"); + TQDomElement tls = doc.createElementNS(NS_TLS, "starttls"); f.appendChild(tls); } if(sasl_authed) { if(!server) { - QDomElement bind = doc.createElementNS(NS_BIND, "bind"); + TQDomElement bind = doc.createElementNS(NS_BIND, "bind"); f.appendChild(bind); } } else { - QDomElement mechs = doc.createElementNS(NS_SASL, "mechanisms"); - for(QStringList::ConstIterator it = sasl_mechlist.begin(); it != sasl_mechlist.end(); ++it) { - QDomElement m = doc.createElement("mechanism"); + TQDomElement mechs = doc.createElementNS(NS_SASL, "mechanisms"); + for(TQStringList::ConstIterator it = sasl_mechlist.begin(); it != sasl_mechlist.end(); ++it) { + TQDomElement m = doc.createElement("mechanism"); m.appendChild(doc.createTextNode(*it)); mechs.appendChild(m); } @@ -1261,25 +1261,25 @@ bool CoreProtocol::normalStep(const QDomElement &e) if(e.namespaceURI() == NS_ETHERX && e.tagName() == "features") { // extract features StreamFeatures f; - QDomElement s = e.elementsByTagNameNS(NS_TLS, "starttls").item(0).toElement(); + TQDomElement s = e.elementsByTagNameNS(NS_TLS, "starttls").item(0).toElement(); if(!s.isNull()) { f.tls_supported = true; f.tls_required = s.elementsByTagNameNS(NS_TLS, "required").count() > 0; } - QDomElement m = e.elementsByTagNameNS(NS_SASL, "mechanisms").item(0).toElement(); + TQDomElement m = e.elementsByTagNameNS(NS_SASL, "mechanisms").item(0).toElement(); if(!m.isNull()) { f.sasl_supported = true; - QDomNodeList l = m.elementsByTagNameNS(NS_SASL, "mechanism"); + TQDomNodeList l = m.elementsByTagNameNS(NS_SASL, "mechanism"); for(uint n = 0; n < l.count(); ++n) f.sasl_mechs += l.item(n).toElement().text(); } - QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement(); + TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement(); if(!b.isNull()) f.bind_supported = true; if(f.tls_supported) { #ifdef XMPP_TEST - QString s = "STARTTLS is available"; + TQString s = "STARTTLS is available"; if(f.tls_required) s += " (required)"; TD::msg(s); @@ -1287,9 +1287,9 @@ bool CoreProtocol::normalStep(const QDomElement &e) } if(f.sasl_supported) { #ifdef XMPP_TEST - QString s = "SASL mechs:"; - for(QStringList::ConstIterator it = f.sasl_mechs.begin(); it != f.sasl_mechs.end(); ++it) - s += QString(" [%1]").arg((*it)); + TQString s = "SASL mechs:"; + for(TQStringList::ConstIterator it = f.sasl_mechs.begin(); it != f.sasl_mechs.end(); ++it) + s += TQString(" [%1]").arg((*it)); TD::msg(s); #endif } @@ -1339,9 +1339,9 @@ bool CoreProtocol::normalStep(const QDomElement &e) // waiting for sasl challenge/success/fail if(e.namespaceURI() == NS_SASL) { if(e.tagName() == "challenge") { - QByteArray a = Base64::stringToArray(e.text()); + TQByteArray a = Base64::stringToArray(e.text()); #ifdef XMPP_TEST - TD::msg(QString("SASL IN: [%1]").arg(printArray(a))); + TD::msg(TQString("SASL IN: [%1]").arg(printArray(a))); #endif sasl_step = a; need = NSASLNext; @@ -1355,7 +1355,7 @@ bool CoreProtocol::normalStep(const QDomElement &e) return true; } else if(e.tagName() == "failure") { - QDomElement t = firstChildElement(e); + TQDomElement t = firstChildElement(e); if(t.isNull() || t.namespaceURI() != NS_SASL) errCond = -1; else @@ -1374,15 +1374,15 @@ bool CoreProtocol::normalStep(const QDomElement &e) } else if(step == GetBindResponse) { if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") { - QString type(e.attribute("type")); - QString id(e.attribute("id")); + TQString type(e.attribute("type")); + TQString id(e.attribute("id")); if(id == "bind_1" && (type == "result" || type == "error")) { if(type == "result") { - QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement(); + TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement(); Jid j; if(!b.isNull()) { - QDomElement je = e.elementsByTagName("jid").item(0).toElement(); + TQDomElement je = e.elementsByTagName("jid").item(0).toElement(); j = je.text(); } if(!j.isValid()) { @@ -1396,20 +1396,20 @@ bool CoreProtocol::normalStep(const QDomElement &e) else { errCond = -1; - QDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement(); + TQDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement(); if(!err.isNull()) { // get error condition - QDomNodeList nl = err.childNodes(); - QDomElement t; + TQDomNodeList nl = err.childNodes(); + TQDomElement t; for(uint n = 0; n < nl.count(); ++n) { - QDomNode i = nl.item(n); + TQDomNode i = nl.item(n); if(i.isElement()) { t = i.toElement(); break; } } if(!t.isNull() && t.namespaceURI() == NS_STANZAS) { - QString cond = t.tagName(); + TQString cond = t.tagName(); if(cond == "not-allowed") errCond = BindNotAllowed; else if(cond == "conflict") @@ -1434,13 +1434,13 @@ bool CoreProtocol::normalStep(const QDomElement &e) // waiting for an iq if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") { Jid from(e.attribute("from")); - QString type(e.attribute("type")); - QString id(e.attribute("id")); + TQString type(e.attribute("type")); + TQString id(e.attribute("id")); bool okfrom = (from.isEmpty() || from.compare(Jid(to))); if(okfrom && id == "auth_1" && (type == "result" || type == "error")) { if(type == "result") { - QDomElement q = e.elementsByTagNameNS("jabber:iq:auth", "query").item(0).toElement(); + TQDomElement q = e.elementsByTagNameNS("jabber:iq:auth", "query").item(0).toElement(); if(q.isNull() || q.elementsByTagName("username").item(0).isNull() || q.elementsByTagName("resource").item(0).isNull()) { event = EError; errorCode = ErrProtocol; @@ -1487,8 +1487,8 @@ bool CoreProtocol::normalStep(const QDomElement &e) // waiting for an iq if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") { Jid from(e.attribute("from")); - QString type(e.attribute("type")); - QString id(e.attribute("id")); + TQString type(e.attribute("type")); + TQString id(e.attribute("id")); bool okfrom = (from.isEmpty() || from.compare(Jid(to))); if(okfrom && id == "auth_2" && (type == "result" || type == "error")) { @@ -1517,7 +1517,7 @@ bool CoreProtocol::normalStep(const QDomElement &e) if(e.namespaceURI() == NS_TLS && e.localName() == "starttls") { // TODO: don't let this be done twice - QDomElement e = doc.createElementNS(NS_TLS, "proceed"); + TQDomElement e = doc.createElementNS(NS_TLS, "proceed"); writeElement(e, TypeElement, false, true); event = ESend; step = HandleTLS; @@ -1546,16 +1546,16 @@ bool CoreProtocol::normalStep(const QDomElement &e) } } if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") { - QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement(); + TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement(); if(!b.isNull()) { - QDomElement res = b.elementsByTagName("resource").item(0).toElement(); - QString resource = res.text(); + TQDomElement res = b.elementsByTagName("resource").item(0).toElement(); + TQString resource = res.text(); - QDomElement r = doc.createElement("iq"); + TQDomElement r = doc.createElement("iq"); r.setAttribute("type", "result"); r.setAttribute("id", e.attribute("id")); - QDomElement bind = doc.createElementNS(NS_BIND, "bind"); - QDomElement jid = doc.createElement("jid"); + TQDomElement bind = doc.createElementNS(NS_BIND, "bind"); + TQDomElement jid = doc.createElement("jid"); Jid j = user + '@' + host + '/' + resource; jid.appendChild(doc.createTextNode(j.full())); bind.appendChild(jid); diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h index 6cb82472..0c735192 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h @@ -21,7 +21,7 @@ #ifndef PROTOCOL_H #define PROTOCOL_H -#include<qpair.h> +#include<tqpair.h> #include"xmlprotocol.h" #include"xmpp.h" @@ -56,7 +56,7 @@ namespace XMPP bool tls_supported, sasl_supported, bind_supported; bool tls_required; - QStringList sasl_mechs; + TQStringList sasl_mechs; }; class BasicProtocol : public XmlProtocol @@ -136,78 +136,78 @@ namespace XMPP void reset(); // for outgoing xml - QDomDocument doc; + TQDomDocument doc; // sasl-related - QString saslMech() const; - QByteArray saslStep() const; - void setSASLMechList(const QStringList &list); - void setSASLFirst(const QString &mech, const QByteArray &step); - void setSASLNext(const QByteArray &step); + TQString saslMech() const; + TQByteArray saslStep() const; + void setSASLMechList(const TQStringList &list); + void setSASLFirst(const TQString &mech, const TQByteArray &step); + void setSASLNext(const TQByteArray &step); void setSASLAuthed(); // send / recv - void sendStanza(const QDomElement &e); - void sendDirect(const QString &s); + void sendStanza(const TQDomElement &e); + void sendDirect(const TQString &s); void sendWhitespace(); - QDomElement recvStanza(); + TQDomElement recvStanza(); // shutdown void shutdown(); - void shutdownWithError(int cond, const QString &otherHost=""); + void shutdownWithError(int cond, const TQString &otherHost=""); // <stream> information - QString to, from, id, lang; + TQString to, from, id, lang; Version version; // error output int errCond; - QString errText; - QDomElement errAppSpec; - QString otherHost; + TQString errText; + TQDomElement errAppSpec; + TQString otherHost; - QByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer + TQByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer bool isReady() const; enum { TypeElement, TypeStanza, TypeDirect, TypePing }; protected: - static int stringToSASLCond(const QString &s); - static int stringToStreamCond(const QString &s); - static QString saslCondToString(int); - static QString streamCondToString(int); + static int stringToSASLCond(const TQString &s); + static int stringToStreamCond(const TQString &s); + static TQString saslCondToString(int); + static TQString streamCondToString(int); - void send(const QDomElement &e, bool clip=false); - void sendStreamError(int cond, const QString &text="", const QDomElement &appSpec=QDomElement()); - void sendStreamError(const QString &text); // old-style + void send(const TQDomElement &e, bool clip=false); + void sendStreamError(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement()); + void sendStreamError(const TQString &text); // old-style - bool errorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement()); + bool errorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement()); bool error(int code); - void delayErrorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement()); + void delayErrorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement()); void delayError(int code); // reimplemented - QDomElement docElement(); + TQDomElement docElement(); void handleDocOpen(const Parser::Event &pe); bool handleError(); bool handleCloseFinished(); - bool doStep(const QDomElement &e); + bool doStep(const TQDomElement &e); void itemWritten(int id, int size); - virtual QString defaultNamespace(); - virtual QStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...] + virtual TQString defaultNamespace(); + virtual TQStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...] virtual void handleStreamOpen(const Parser::Event &pe); - virtual bool doStep2(const QDomElement &e)=0; + virtual bool doStep2(const TQDomElement &e)=0; void setReady(bool b); - QString sasl_mech; - QStringList sasl_mechlist; - QByteArray sasl_step; + TQString sasl_mech; + TQStringList sasl_mechlist; + TQByteArray sasl_step; bool sasl_authed; - QDomElement stanzaToRecv; + TQDomElement stanzaToRecv; private: struct SASLCondEntry @@ -226,17 +226,17 @@ namespace XMPP struct SendItem { - QDomElement stanzaToSend; - QString stringToSend; + TQDomElement stanzaToSend; + TQString stringToSend; bool doWhitespace; }; - QValueList<SendItem> sendList; + TQValueList<SendItem> sendList; bool doShutdown, delayedError, closeError, ready; int stanzasPending, stanzasWritten; void init(); - void extractStreamError(const QDomElement &e); + void extractStreamError(const TQDomElement &e); }; class CoreProtocol : public BasicProtocol @@ -254,30 +254,30 @@ namespace XMPP void reset(); void startClientOut(const Jid &jid, bool oldOnly, bool tlsActive, bool doAuth); - void startServerOut(const QString &to); - void startDialbackOut(const QString &to, const QString &from); - void startDialbackVerifyOut(const QString &to, const QString &from, const QString &id, const QString &key); - void startClientIn(const QString &id); - void startServerIn(const QString &id); + void startServerOut(const TQString &to); + void startDialbackOut(const TQString &to, const TQString &from); + void startDialbackVerifyOut(const TQString &to, const TQString &from, const TQString &id, const TQString &key); + void startClientIn(const TQString &id); + void startServerIn(const TQString &id); - void setLang(const QString &s); + void setLang(const TQString &s); void setAllowTLS(bool b); void setAllowBind(bool b); void setAllowPlain(bool b); // old-mode - void setPassword(const QString &s); - void setFrom(const QString &s); - void setDialbackKey(const QString &s); + void setPassword(const TQString &s); + void setFrom(const TQString &s); + void setDialbackKey(const TQString &s); // input - QString user, host; + TQString user, host; // status bool old; StreamFeatures features; - //static QString xmlToString(const QDomElement &e, bool clip=false); + //static TQString xmlToString(const TQDomElement &e, bool clip=false); class DBItem { @@ -285,7 +285,7 @@ namespace XMPP enum { ResultRequest, ResultGrant, VerifyRequest, VerifyGrant, Validated }; int type; Jid to, from; - QString key, id; + TQString key, id; bool ok; }; @@ -312,7 +312,7 @@ namespace XMPP GetAuthSetResponse // read auth-set response }; - QValueList<DBItem> dbrequests, dbpending, dbvalidated; + TQValueList<DBItem> dbrequests, dbpending, dbvalidated; bool server, dialback, dialback_verify; int step; @@ -324,31 +324,31 @@ namespace XMPP bool oldOnly; bool allowPlain; bool doTLS, doAuth, doBinding; - QString password; + TQString password; - QString dialback_id, dialback_key; - QString self_from; + TQString dialback_id, dialback_key; + TQString self_from; void init(); - static int getOldErrorCode(const QDomElement &e); + static int getOldErrorCode(const TQDomElement &e); bool loginComplete(); - bool isValidStanza(const QDomElement &e) const; + bool isValidStanza(const TQDomElement &e) const; bool grabPendingItem(const Jid &to, const Jid &from, int type, DBItem *item); - bool normalStep(const QDomElement &e); - bool dialbackStep(const QDomElement &e); + bool normalStep(const TQDomElement &e); + bool dialbackStep(const TQDomElement &e); // reimplemented bool stepAdvancesParser() const; bool stepRequiresElement() const; - void stringSend(const QString &s); - void stringRecv(const QString &s); - QString defaultNamespace(); - QStringList extraNamespaces(); + void stringSend(const TQString &s); + void stringRecv(const TQString &s); + TQString defaultNamespace(); + TQStringList extraNamespaces(); void handleStreamOpen(const Parser::Event &pe); - bool doStep2(const QDomElement &e); - void elementSend(const QDomElement &e); - void elementRecv(const QDomElement &e); + bool doStep2(const TQDomElement &e); + void elementSend(const TQDomElement &e); + void elementRecv(const TQDomElement &e); }; } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h index e6172434..6eda17f9 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h @@ -21,11 +21,11 @@ #ifndef QCAPROVIDER_H #define QCAPROVIDER_H -#include<qglobal.h> -#include<qstring.h> -#include<qdatetime.h> -#include<qobject.h> -#include<qhostaddress.h> +#include<tqglobal.h> +#include<tqstring.h> +#include<tqdatetime.h> +#include<tqobject.h> +#include<tqhostaddress.h> #include"qca.h" #define QCA_PLUGIN_VERSION 1 @@ -50,7 +50,7 @@ public: virtual QCA_HashContext *clone()=0; virtual void reset()=0; virtual void update(const char *in, unsigned int len)=0; - virtual void final(QByteArray *out)=0; + virtual void final(TQByteArray *out)=0; }; class QCA_CipherContext @@ -66,7 +66,7 @@ public: virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0; virtual bool update(const char *in, unsigned int len)=0; - virtual bool final(QByteArray *out)=0; + virtual bool final(TQByteArray *out)=0; }; class QCA_RSAKeyContext @@ -82,17 +82,17 @@ public: virtual bool createFromPEM(const char *in, unsigned int len)=0; virtual bool createFromNative(void *in)=0; virtual bool generate(unsigned int bits)=0; - virtual bool toDER(QByteArray *out, bool publicOnly)=0; - virtual bool toPEM(QByteArray *out, bool publicOnly)=0; + virtual bool toDER(TQByteArray *out, bool publicOnly)=0; + virtual bool toPEM(TQByteArray *out, bool publicOnly)=0; - virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0; - virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0; + virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0; + virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0; }; struct QCA_CertProperty { - QString var; - QString val; + TQString var; + TQString val; }; class QCA_CertContext @@ -104,17 +104,17 @@ public: virtual bool isNull() const=0; virtual bool createFromDER(const char *in, unsigned int len)=0; virtual bool createFromPEM(const char *in, unsigned int len)=0; - virtual bool toDER(QByteArray *out)=0; - virtual bool toPEM(QByteArray *out)=0; - - virtual QString serialNumber() const=0; - virtual QString subjectString() const=0; - virtual QString issuerString() const=0; - virtual QValueList<QCA_CertProperty> subject() const=0; - virtual QValueList<QCA_CertProperty> issuer() const=0; - virtual QDateTime notBefore() const=0; - virtual QDateTime notAfter() const=0; - virtual bool matchesAddress(const QString &realHost) const=0; + virtual bool toDER(TQByteArray *out)=0; + virtual bool toPEM(TQByteArray *out)=0; + + virtual TQString serialNumber() const=0; + virtual TQString subjectString() const=0; + virtual TQString issuerString() const=0; + virtual TQValueList<QCA_CertProperty> subject() const=0; + virtual TQValueList<QCA_CertProperty> issuer() const=0; + virtual TQDateTime notBefore() const=0; + virtual TQDateTime notAfter() const=0; + virtual bool matchesAddress(const TQString &realHost) const=0; }; class QCA_TLSContext @@ -124,15 +124,15 @@ public: virtual ~QCA_TLSContext() {} virtual void reset()=0; - virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; - virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; + virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; + virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; - virtual int handshake(const QByteArray &in, QByteArray *out)=0; - virtual int shutdown(const QByteArray &in, QByteArray *out)=0; - virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0; - virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0; + virtual int handshake(const TQByteArray &in, TQByteArray *out)=0; + virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0; + virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0; + virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0; virtual bool eof() const=0; - virtual QByteArray unprocessed()=0; + virtual TQByteArray unprocessed()=0; virtual QCA_CertContext *peerCertificate() const=0; virtual int validityResult() const=0; @@ -140,7 +140,7 @@ public: struct QCA_SASLHostPort { - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; @@ -157,35 +157,35 @@ public: // common virtual void reset()=0; - virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0; - virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0; + virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0; + virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0; virtual int security() const=0; virtual int errorCond() const=0; // init / first step - virtual bool clientStart(const QStringList &mechlist)=0; + virtual bool clientStart(const TQStringList &mechlist)=0; virtual int clientFirstStep(bool allowClientSendFirst)=0; - virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0; - virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0; + virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0; + virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0; // get / set params virtual QCA_SASLNeedParams clientParamsNeeded() const=0; - virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0; - virtual QString username() const=0; - virtual QString authzid() const=0; + virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0; + virtual TQString username() const=0; + virtual TQString authzid() const=0; // continue steps - virtual int nextStep(const QByteArray &in)=0; + virtual int nextStep(const TQByteArray &in)=0; virtual int tryAgain()=0; // results - virtual QString mech() const=0; - virtual const QByteArray *clientInit() const=0; - virtual QByteArray result() const=0; + virtual TQString mech() const=0; + virtual const TQByteArray *clientInit() const=0; + virtual TQByteArray result() const=0; // security layer - virtual bool encode(const QByteArray &in, QByteArray *out)=0; - virtual bool decode(const QByteArray &in, QByteArray *out)=0; + virtual bool encode(const TQByteArray &in, TQByteArray *out)=0; + virtual bool decode(const TQByteArray &in, TQByteArray *out)=0; }; #endif diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp index 159c8058..f7d44db4 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp @@ -28,9 +28,9 @@ #include"securestream.h" -#include<qguardedptr.h> -#include<qvaluelist.h> -#include<qtimer.h> +#include<tqguardedptr.h> +#include<tqvaluelist.h> +#include<tqtimer.h> #ifdef USE_TLSHANDLER #include"xmpp.h" @@ -56,7 +56,7 @@ public: int finished(int encoded); int p; - QValueList<Item> list; + TQValueList<Item> list; }; LayerTracker::LayerTracker() @@ -90,7 +90,7 @@ void LayerTracker::specifyEncoded(int encoded, int plain) int LayerTracker::finished(int encoded) { int plain = 0; - for(QValueList<Item>::Iterator it = list.begin(); it != list.end();) { + for(TQValueList<Item>::Iterator it = list.begin(); it != list.end();) { Item &i = *it; // not enough? @@ -131,11 +131,11 @@ public: type = TLS; p.tls = t; init(); - connect(p.tls, SIGNAL(handshaken()), SLOT(tls_handshaken())); - connect(p.tls, SIGNAL(readyRead()), SLOT(tls_readyRead())); - connect(p.tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int))); - connect(p.tls, SIGNAL(closed()), SLOT(tls_closed())); - connect(p.tls, SIGNAL(error(int)), SLOT(tls_error(int))); + connect(p.tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken())); + connect(p.tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead())); + connect(p.tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int))); + connect(p.tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed())); + connect(p.tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int))); } SecureLayer(QCA::SASL *s) @@ -143,9 +143,9 @@ public: type = SASL; p.sasl = s; init(); - connect(p.sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead())); - connect(p.sasl, SIGNAL(readyReadOutgoing(int)), SLOT(sasl_readyReadOutgoing(int))); - connect(p.sasl, SIGNAL(error(int)), SLOT(sasl_error(int))); + connect(p.sasl, TQT_SIGNAL(readyRead()), TQT_SLOT(sasl_readyRead())); + connect(p.sasl, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(sasl_readyReadOutgoing(int))); + connect(p.sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int))); } #ifdef USE_TLSHANDLER @@ -154,11 +154,11 @@ public: type = TLSH; p.tlsHandler = t; init(); - connect(p.tlsHandler, SIGNAL(success()), SLOT(tlsHandler_success())); - connect(p.tlsHandler, SIGNAL(fail()), SLOT(tlsHandler_fail())); - connect(p.tlsHandler, SIGNAL(closed()), SLOT(tlsHandler_closed())); - connect(p.tlsHandler, SIGNAL(readyRead(const QByteArray &)), SLOT(tlsHandler_readyRead(const QByteArray &))); - connect(p.tlsHandler, SIGNAL(readyReadOutgoing(const QByteArray &, int)), SLOT(tlsHandler_readyReadOutgoing(const QByteArray &, int))); + connect(p.tlsHandler, TQT_SIGNAL(success()), TQT_SLOT(tlsHandler_success())); + connect(p.tlsHandler, TQT_SIGNAL(fail()), TQT_SLOT(tlsHandler_fail())); + connect(p.tlsHandler, TQT_SIGNAL(closed()), TQT_SLOT(tlsHandler_closed())); + connect(p.tlsHandler, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(tlsHandler_readyRead(const TQByteArray &))); + connect(p.tlsHandler, TQT_SIGNAL(readyReadOutgoing(const TQByteArray &, int)), TQT_SLOT(tlsHandler_readyReadOutgoing(const TQByteArray &, int))); } #endif @@ -168,7 +168,7 @@ public: prebytes = 0; } - void write(const QByteArray &a) + void write(const TQByteArray &a) { layer.addPlain(a.size()); switch(type) { @@ -180,7 +180,7 @@ public: } } - void writeIncoming(const QByteArray &a) + void writeIncoming(const TQByteArray &a) { switch(type) { case TLS: { p.tls->writeIncoming(a); break; } @@ -218,9 +218,9 @@ public: signals: void tlsHandshaken(); - void tlsClosed(const QByteArray &); - void readyRead(const QByteArray &); - void needWrite(const QByteArray &); + void tlsClosed(const TQByteArray &); + void readyRead(const TQByteArray &); + void needWrite(const TQByteArray &); void error(int); private slots: @@ -232,13 +232,13 @@ private slots: void tls_readyRead() { - QByteArray a = p.tls->read(); + TQByteArray a = p.tls->read(); readyRead(a); } void tls_readyReadOutgoing(int plainBytes) { - QByteArray a = p.tls->readOutgoing(); + TQByteArray a = p.tls->readOutgoing(); if(tls_done) layer.specifyEncoded(a.size(), plainBytes); needWrite(a); @@ -246,7 +246,7 @@ private slots: void tls_closed() { - QByteArray a = p.tls->readUnprocessed(); + TQByteArray a = p.tls->readUnprocessed(); tlsClosed(a); } @@ -257,13 +257,13 @@ private slots: void sasl_readyRead() { - QByteArray a = p.sasl->read(); + TQByteArray a = p.sasl->read(); readyRead(a); } void sasl_readyReadOutgoing(int plainBytes) { - QByteArray a = p.sasl->readOutgoing(); + TQByteArray a = p.sasl->readOutgoing(); layer.specifyEncoded(a.size(), plainBytes); needWrite(a); } @@ -287,15 +287,15 @@ private slots: void tlsHandler_closed() { - tlsClosed(QByteArray()); + tlsClosed(TQByteArray()); } - void tlsHandler_readyRead(const QByteArray &a) + void tlsHandler_readyRead(const TQByteArray &a) { readyRead(a); } - void tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes) + void tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes) { if(tls_done) layer.specifyEncoded(a.size(), plainBytes); @@ -310,7 +310,7 @@ class SecureStream::Private { public: ByteStream *bs; - QPtrList<SecureLayer> layers; + TQPtrList<SecureLayer> layers; int pending; int errorCode; bool active; @@ -318,7 +318,7 @@ public: bool haveTLS() const { - QPtrListIterator<SecureLayer> it(layers); + TQPtrListIterator<SecureLayer> it(layers); for(SecureLayer *s; (s = it.current()); ++it) { if(s->type == SecureLayer::TLS #ifdef USE_TLSHANDLER @@ -333,7 +333,7 @@ public: bool haveSASL() const { - QPtrListIterator<SecureLayer> it(layers); + TQPtrListIterator<SecureLayer> it(layers); for(SecureLayer *s; (s = it.current()); ++it) { if(s->type == SecureLayer::SASL) return true; @@ -348,8 +348,8 @@ SecureStream::SecureStream(ByteStream *s) d = new Private; d->bs = s; - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); d->layers.setAutoDelete(true); d->pending = 0; @@ -362,25 +362,25 @@ SecureStream::~SecureStream() delete d; } -void SecureStream::linkLayer(QObject *s) +void SecureStream::linkLayer(TQObject *s) { - connect(s, SIGNAL(tlsHandshaken()), SLOT(layer_tlsHandshaken())); - connect(s, SIGNAL(tlsClosed(const QByteArray &)), SLOT(layer_tlsClosed(const QByteArray &))); - connect(s, SIGNAL(readyRead(const QByteArray &)), SLOT(layer_readyRead(const QByteArray &))); - connect(s, SIGNAL(needWrite(const QByteArray &)), SLOT(layer_needWrite(const QByteArray &))); - connect(s, SIGNAL(error(int)), SLOT(layer_error(int))); + connect(s, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(layer_tlsHandshaken())); + connect(s, TQT_SIGNAL(tlsClosed(const TQByteArray &)), TQT_SLOT(layer_tlsClosed(const TQByteArray &))); + connect(s, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(layer_readyRead(const TQByteArray &))); + connect(s, TQT_SIGNAL(needWrite(const TQByteArray &)), TQT_SLOT(layer_needWrite(const TQByteArray &))); + connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(layer_error(int))); } int SecureStream::calcPrebytes() const { int x = 0; - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); for(SecureLayer *s; (s = it.current()); ++it) x += s->prebytes; return (d->pending - x); } -void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare) +void SecureStream::startTLSClient(QCA::TLS *t, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveTLS()) return; @@ -394,7 +394,7 @@ void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare) insertData(spare); } -void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare) +void SecureStream::startTLSServer(QCA::TLS *t, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveTLS()) return; @@ -408,7 +408,7 @@ void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare) insertData(spare); } -void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare) +void SecureStream::setLayerSASL(QCA::SASL *sasl, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveSASL()) return; @@ -422,7 +422,7 @@ void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare) } #ifdef USE_TLSHANDLER -void SecureStream::startTLSClient(XMPP::TLSHandler *t, const QString &server, const QByteArray &spare) +void SecureStream::startTLSClient(XMPP::TLSHandler *t, const TQString &server, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveTLS()) return; @@ -459,7 +459,7 @@ bool SecureStream::isOpen() const return d->active; } -void SecureStream::write(const QByteArray &a) +void SecureStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -481,7 +481,7 @@ int SecureStream::bytesToWrite() const void SecureStream::bs_readyRead() { - QByteArray a = d->bs->read(); + TQByteArray a = d->bs->read(); // send to the first layer SecureLayer *s = d->layers.getFirst(); @@ -493,7 +493,7 @@ void SecureStream::bs_readyRead() void SecureStream::bs_bytesWritten(int bytes) { - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); for(SecureLayer *s; (s = it.current()); ++it) bytes = s->finished(bytes); @@ -509,17 +509,17 @@ void SecureStream::layer_tlsHandshaken() tlsHandshaken(); } -void SecureStream::layer_tlsClosed(const QByteArray &) +void SecureStream::layer_tlsClosed(const TQByteArray &) { d->active = false; d->layers.clear(); tlsClosed(); } -void SecureStream::layer_readyRead(const QByteArray &a) +void SecureStream::layer_readyRead(const TQByteArray &a) { SecureLayer *s = (SecureLayer *)sender(); - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); while(it.current() != s) ++it; @@ -532,10 +532,10 @@ void SecureStream::layer_readyRead(const QByteArray &a) incomingData(a); } -void SecureStream::layer_needWrite(const QByteArray &a) +void SecureStream::layer_needWrite(const TQByteArray &a) { SecureLayer *s = (SecureLayer *)sender(); - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); while(it.current() != s) ++it; @@ -565,7 +565,7 @@ void SecureStream::layer_error(int x) #endif } -void SecureStream::insertData(const QByteArray &a) +void SecureStream::insertData(const TQByteArray &a) { if(!a.isEmpty()) { SecureLayer *s = d->layers.getLast(); @@ -576,12 +576,12 @@ void SecureStream::insertData(const QByteArray &a) } } -void SecureStream::writeRawData(const QByteArray &a) +void SecureStream::writeRawData(const TQByteArray &a) { d->bs->write(a); } -void SecureStream::incomingData(const QByteArray &a) +void SecureStream::incomingData(const TQByteArray &a) { appendRead(a); if(bytesAvailable()) diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h index 8ae9f761..844fd3d1 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h @@ -41,11 +41,11 @@ public: SecureStream(ByteStream *s); ~SecureStream(); - void startTLSClient(QCA::TLS *t, const QByteArray &spare=QByteArray()); - void startTLSServer(QCA::TLS *t, const QByteArray &spare=QByteArray()); - void setLayerSASL(QCA::SASL *s, const QByteArray &spare=QByteArray()); + void startTLSClient(QCA::TLS *t, const TQByteArray &spare=TQByteArray()); + void startTLSServer(QCA::TLS *t, const TQByteArray &spare=TQByteArray()); + void setLayerSASL(QCA::SASL *s, const TQByteArray &spare=TQByteArray()); #ifdef USE_TLSHANDLER - void startTLSClient(XMPP::TLSHandler *t, const QString &server, const QByteArray &spare=QByteArray()); + void startTLSClient(XMPP::TLSHandler *t, const TQString &server, const TQByteArray &spare=TQByteArray()); #endif void closeTLS(); @@ -53,7 +53,7 @@ public: // reimplemented bool isOpen() const; - void write(const QByteArray &); + void write(const TQByteArray &); int bytesToWrite() const; signals: @@ -65,17 +65,17 @@ private slots: void bs_bytesWritten(int); void layer_tlsHandshaken(); - void layer_tlsClosed(const QByteArray &); - void layer_readyRead(const QByteArray &); - void layer_needWrite(const QByteArray &); + void layer_tlsClosed(const TQByteArray &); + void layer_readyRead(const TQByteArray &); + void layer_needWrite(const TQByteArray &); void layer_error(int); private: - void linkLayer(QObject *); + void linkLayer(TQObject *); int calcPrebytes() const; - void insertData(const QByteArray &a); - void writeRawData(const QByteArray &a); - void incomingData(const QByteArray &a); + void insertData(const TQByteArray &a); + void writeRawData(const TQByteArray &a); + void incomingData(const TQByteArray &a); class Private; Private *d; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp index 82a7aac4..c825a2ca 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp @@ -20,10 +20,10 @@ #include"simplesasl.h" -#include<qhostaddress.h> -#include<qstringlist.h> -#include<qptrlist.h> -#include<qvaluelist.h> +#include<tqhostaddress.h> +#include<tqstringlist.h> +#include<tqptrlist.h> +#include<tqvaluelist.h> #include<qca.h> #include<stdlib.h> #include"base64.h" @@ -33,17 +33,17 @@ namespace XMPP struct Prop { - QCString var, val; + TQCString var, val; }; -class PropList : public QValueList<Prop> +class PropList : public TQValueList<Prop> { public: - PropList() : QValueList<Prop>() + PropList() : TQValueList<Prop>() { } - void set(const QCString &var, const QCString &val) + void set(const TQCString &var, const TQCString &val) { Prop p; p.var = var; @@ -51,18 +51,18 @@ public: append(p); } - QCString get(const QCString &var) + TQCString get(const TQCString &var) { for(ConstIterator it = begin(); it != end(); ++it) { if((*it).var == var) return (*it).val; } - return QCString(); + return TQCString(); } - QCString toString() const + TQCString toString() const { - QCString str; + TQCString str; bool first = true; for(ConstIterator it = begin(); it != end(); ++it) { if(!first) @@ -73,7 +73,7 @@ public: return str; } - bool fromString(const QCString &str) + bool fromString(const TQCString &str) { PropList list; int at = 0; @@ -81,7 +81,7 @@ public: int n = str.find('=', at); if(n == -1) break; - QCString var, val; + TQCString var, val; var = str.mid(at, n-at); at = n + 1; if(str[at] == '\"') { @@ -122,7 +122,7 @@ public: return true; } - int varCount(const QCString &var) + int varCount(const TQCString &var) { int n = 0; for(ConstIterator it = begin(); it != end(); ++it) { @@ -132,9 +132,9 @@ public: return n; } - QStringList getValues(const QCString &var) + TQStringList getValues(const TQCString &var) { - QStringList list; + TQStringList list; for(ConstIterator it = begin(); it != end(); ++it) { if((*it).var == var) list += (*it).val; @@ -147,19 +147,19 @@ class SimpleSASLContext : public QCA_SASLContext { public: // core props - QString service, host; + TQString service, host; // state int step; - QByteArray in_buf; - QString out_mech; - QByteArray out_buf; + TQByteArray in_buf; + TQString out_mech; + TQByteArray out_buf; bool capable; int err; QCA_SASLNeedParams need; QCA_SASLNeedParams have; - QString user, authz, pass, realm; + TQString user, authz, pass, realm; SimpleSASLContext() { @@ -179,7 +179,7 @@ public: void resetState() { - out_mech = QString(); + out_mech = TQString(); out_buf.resize(0); err = -1; } @@ -195,19 +195,19 @@ public: have.authzid = false; have.pass = false; have.realm = false; - user = QString(); - authz = QString(); - pass = QString(); - realm = QString(); + user = TQString(); + authz = TQString(); + pass = TQString(); + realm = TQString(); } - void setCoreProps(const QString &_service, const QString &_host, QCA_SASLHostPort *, QCA_SASLHostPort *) + void setCoreProps(const TQString &_service, const TQString &_host, QCA_SASLHostPort *, QCA_SASLHostPort *) { service = _service; host = _host; } - void setSecurityProps(bool, bool, bool, bool, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int, const QString &, int) + void setSecurityProps(bool, bool, bool, bool, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int, const TQString &, int) { if(reqForward || reqCreds || reqMutual || ssfMin > 0) capable = false; @@ -225,10 +225,10 @@ public: return err; } - bool clientStart(const QStringList &mechlist) + bool clientStart(const TQStringList &mechlist) { bool haveMech = false; - for(QStringList::ConstIterator it = mechlist.begin(); it != mechlist.end(); ++it) { + for(TQStringList::ConstIterator it = mechlist.begin(); it != mechlist.end(); ++it) { if((*it) == "DIGEST-MD5") { haveMech = true; break; @@ -249,12 +249,12 @@ public: return clientTryAgain(); } - bool serverStart(const QString &, QStringList *, const QString &) + bool serverStart(const TQString &, TQStringList *, const TQString &) { return false; } - int serverFirstStep(const QString &, const QByteArray *) + int serverFirstStep(const TQString &, const TQByteArray *) { return Error; } @@ -264,7 +264,7 @@ public: return need; } - void setClientParams(const QString *_user, const QString *_authzid, const QString *_pass, const QString *_realm) + void setClientParams(const TQString *_user, const TQString *_authzid, const TQString *_pass, const TQString *_realm) { if(_user) { user = *_user; @@ -288,17 +288,17 @@ public: } } - QString username() const + TQString username() const { - return QString(); + return TQString(); } - QString authzid() const + TQString authzid() const { - return QString(); + return TQString(); } - int nextStep(const QByteArray &in) + int nextStep(const TQByteArray &in) { in_buf = in.copy(); return tryAgain(); @@ -309,17 +309,17 @@ public: return clientTryAgain(); } - QString mech() const + TQString mech() const { return out_mech; } - const QByteArray *clientInit() const + const TQByteArray *clientInit() const { return 0; } - QByteArray result() const + TQByteArray result() const { return out_buf; } @@ -349,7 +349,7 @@ public: return NeedParams; // get props - QCString cs(in_buf.data(), in_buf.size()+1); + TQCString cs(in_buf.data(), in_buf.size()+1); PropList in; if(!in.fromString(cs)) { err = QCA::SASL::BadProto; @@ -357,30 +357,30 @@ public: } // make a cnonce - QByteArray a(32); + TQByteArray a(32); for(int n = 0; n < (int)a.size(); ++n) a[n] = (char)(256.0*rand()/(RAND_MAX+1.0)); - QCString cnonce = Base64::arrayToString(a).latin1(); + TQCString cnonce = Base64::arrayToString(a).latin1(); // make other variables realm = host; - QCString nonce = in.get("nonce"); - QCString nc = "00000001"; - QCString uri = service.utf8() + '/' + host.utf8(); - QCString qop = "auth"; + TQCString nonce = in.get("nonce"); + TQCString nc = "00000001"; + TQCString uri = service.utf8() + '/' + host.utf8(); + TQCString qop = "auth"; // build 'response' - QCString X = user.utf8() + ':' + realm.utf8() + ':' + pass.utf8(); - QByteArray Y = QCA::MD5::hash(X); - QCString tmp = QCString(":") + nonce + ':' + cnonce + ':' + authz.utf8(); - QByteArray A1(Y.size() + tmp.length()); + TQCString X = user.utf8() + ':' + realm.utf8() + ':' + pass.utf8(); + TQByteArray Y = QCA::MD5::hash(X); + TQCString tmp = TQCString(":") + nonce + ':' + cnonce + ':' + authz.utf8(); + TQByteArray A1(Y.size() + tmp.length()); memcpy(A1.data(), Y.data(), Y.size()); memcpy(A1.data() + Y.size(), tmp.data(), tmp.length()); - QCString A2 = "AUTHENTICATE:" + uri; - QCString HA1 = QCA::MD5::hashToString(A1).latin1(); - QCString HA2 = QCA::MD5::hashToString(A2).latin1(); - QCString KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2; - QCString Z = QCA::MD5::hashToString(KD).latin1(); + TQCString A2 = "AUTHENTICATE:" + uri; + TQCString HA1 = QCA::MD5::hashToString(A1).latin1(); + TQCString HA2 = QCA::MD5::hashToString(A2).latin1(); + TQCString KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2; + TQCString Z = QCA::MD5::hashToString(KD).latin1(); // build output PropList out; @@ -396,7 +396,7 @@ public: out.set("response", Z); out.set("charset", "utf-8"); out.set("authzid", authz.utf8()); - QCString s = out.toString(); + TQCString s = out.toString(); // done out_buf.resize(s.length()); @@ -410,13 +410,13 @@ public: } } - bool encode(const QByteArray &a, QByteArray *b) + bool encode(const TQByteArray &a, TQByteArray *b) { *b = a.copy(); return true; } - bool decode(const QByteArray &a, QByteArray *b) + bool decode(const TQByteArray &a, TQByteArray *b) { *b = a.copy(); return true; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp index 5482e2b3..d3182ffe 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp @@ -44,9 +44,9 @@ #include"xmpp.h" -#include<qtextstream.h> -#include<qguardedptr.h> -#include<qtimer.h> +#include<tqtextstream.h> +#include<tqguardedptr.h> +#include<tqtimer.h> #include<qca.h> #include<stdlib.h> #include"bytestream.h" @@ -70,15 +70,15 @@ void XMPP::setDebug(Debug *p) debug_ptr = p; } -static QByteArray randomArray(int size) +static TQByteArray randomArray(int size) { - QByteArray a(size); + TQByteArray a(size); for(int n = 0; n < size; ++n) a[n] = (char)(256.0*rand()/(RAND_MAX+1.0)); return a; } -static QString genId() +static TQString genId() { // need SHA1 here if(!QCA::isSupported(QCA::CAP_SHA1)) @@ -90,7 +90,7 @@ static QString genId() //---------------------------------------------------------------------------- // Stanza //---------------------------------------------------------------------------- -Stanza::Error::Error(int _type, int _condition, const QString &_text, const QDomElement &_appSpec) +Stanza::Error::Error(int _type, int _condition, const TQString &_text, const TQDomElement &_appSpec) { type = _type; condition = _condition; @@ -115,7 +115,7 @@ public: }; static ErrorCondEntry errorCondTable[]; - static int stringToKind(const QString &s) + static int stringToKind(const TQString &s) { if(s == "message") return Message; @@ -127,7 +127,7 @@ public: return -1; } - static QString kindToString(Kind k) + static TQString kindToString(Kind k) { if(k == Message) return "message"; @@ -137,7 +137,7 @@ public: return "iq"; } - static int stringToErrorType(const QString &s) + static int stringToErrorType(const TQString &s) { for(int n = 0; errorTypeTable[n].str; ++n) { if(s == errorTypeTable[n].str) @@ -146,16 +146,16 @@ public: return -1; } - static QString errorTypeToString(int x) + static TQString errorTypeToString(int x) { for(int n = 0; errorTypeTable[n].str; ++n) { if(x == errorTypeTable[n].type) return errorTypeTable[n].str; } - return QString(); + return TQString(); } - static int stringToErrorCond(const QString &s) + static int stringToErrorCond(const TQString &s) { for(int n = 0; errorCondTable[n].str; ++n) { if(s == errorCondTable[n].str) @@ -164,17 +164,17 @@ public: return -1; } - static QString errorCondToString(int x) + static TQString errorCondToString(int x) { for(int n = 0; errorCondTable[n].str; ++n) { if(x == errorCondTable[n].cond) return errorCondTable[n].str; } - return QString(); + return TQString(); } Stream *s; - QDomElement e; + TQDomElement e; }; Stanza::Private::ErrorTypeEntry Stanza::Private::errorTypeTable[] = @@ -215,7 +215,7 @@ Stanza::Stanza() d = 0; } -Stanza::Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QString &id) +Stanza::Stanza(Stream *s, Kind k, const Jid &to, const TQString &type, const TQString &id) { d = new Private; @@ -235,7 +235,7 @@ Stanza::Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QStr setId(id); } -Stanza::Stanza(Stream *s, const QDomElement &e) +Stanza::Stanza(Stream *s, const TQDomElement &e) { d = 0; if(e.namespaceURI() != s->baseNS()) @@ -273,59 +273,59 @@ bool Stanza::isNull() const return (d ? false: true); } -QDomElement Stanza::element() const +TQDomElement Stanza::element() const { return d->e; } -QString Stanza::toString() const +TQString Stanza::toString() const { return Stream::xmlToString(d->e); } -QDomDocument & Stanza::doc() const +TQDomDocument & Stanza::doc() const { return d->s->doc(); } -QString Stanza::baseNS() const +TQString Stanza::baseNS() const { return d->s->baseNS(); } -QString Stanza::xhtmlImNS() const +TQString Stanza::xhtmlImNS() const { return d->s->xhtmlImNS(); } -QString Stanza::xhtmlNS() const +TQString Stanza::xhtmlNS() const { return d->s->xhtmlNS(); } -QDomElement Stanza::createElement(const QString &ns, const QString &tagName) +TQDomElement Stanza::createElement(const TQString &ns, const TQString &tagName) { return d->s->doc().createElementNS(ns, tagName); } -QDomElement Stanza::createTextElement(const QString &ns, const QString &tagName, const QString &text) +TQDomElement Stanza::createTextElement(const TQString &ns, const TQString &tagName, const TQString &text) { - QDomElement e = d->s->doc().createElementNS(ns, tagName); + TQDomElement e = d->s->doc().createElementNS(ns, tagName); e.appendChild(d->s->doc().createTextNode(text)); return e; } -QDomElement Stanza::createXHTMLElement(const QString &xHTML) +TQDomElement Stanza::createXHTMLElement(const TQString &xHTML) { - QDomDocument doc; + TQDomDocument doc; doc.setContent(xHTML, true); - QDomElement root = doc.documentElement(); - //QDomElement e; + TQDomElement root = doc.documentElement(); + //TQDomElement e; return (root); } -void Stanza::appendChild(const QDomElement &e) +void Stanza::appendChild(const TQDomElement &e) { d->e.appendChild(e); } @@ -350,19 +350,19 @@ Jid Stanza::from() const return Jid(d->e.attribute("from")); } -QString Stanza::id() const +TQString Stanza::id() const { return d->e.attribute("id"); } -QString Stanza::type() const +TQString Stanza::type() const { return d->e.attribute("type"); } -QString Stanza::lang() const +TQString Stanza::lang() const { - return d->e.attributeNS(NS_XML, "lang", QString()); + return d->e.attributeNS(NS_XML, "lang", TQString()); } void Stanza::setTo(const Jid &j) @@ -375,17 +375,17 @@ void Stanza::setFrom(const Jid &j) d->e.setAttribute("from", j.full()); } -void Stanza::setId(const QString &id) +void Stanza::setId(const TQString &id) { d->e.setAttribute("id", id); } -void Stanza::setType(const QString &type) +void Stanza::setType(const TQString &type) { d->e.setAttribute("type", type); } -void Stanza::setLang(const QString &lang) +void Stanza::setLang(const TQString &lang) { d->e.setAttribute("xml:lang", lang); } @@ -393,7 +393,7 @@ void Stanza::setLang(const QString &lang) Stanza::Error Stanza::error() const { Error err; - QDomElement e = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement(); + TQDomElement e = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement(); if(e.isNull()) return err; @@ -403,11 +403,11 @@ Stanza::Error Stanza::error() const err.type = x; // condition: find first element - QDomNodeList nl = e.childNodes(); - QDomElement t; + TQDomNodeList nl = e.childNodes(); + TQDomElement t; uint n; for(n = 0; n < nl.count(); ++n) { - QDomNode i = nl.item(n); + TQDomNode i = nl.item(n); if(i.isElement()) { t = i.toElement(); break; @@ -429,7 +429,7 @@ Stanza::Error Stanza::error() const // appspec: find first non-standard namespaced element nl = e.childNodes(); for(n = 0; n < nl.count(); ++n) { - QDomNode i = nl.item(n); + TQDomNode i = nl.item(n); if(i.isElement() && i.namespaceURI() != NS_STANZAS) { err.appSpec = i.toElement(); break; @@ -441,7 +441,7 @@ Stanza::Error Stanza::error() const void Stanza::setError(const Error &err) { // create the element if necessary - QDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement(); + TQDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement(); if(errElem.isNull()) { errElem = d->e.ownerDocument().createElementNS(d->s->baseNS(), "error"); d->e.appendChild(errElem); @@ -449,13 +449,13 @@ void Stanza::setError(const Error &err) // error type/condition if(d->s->old()) { - errElem.setAttribute("code", QString::number(err.condition)); + errElem.setAttribute("code", TQString::number(err.condition)); } else { - QString stype = Private::errorTypeToString(err.type); + TQString stype = Private::errorTypeToString(err.type); if(stype.isEmpty()) return; - QString scond = Private::errorCondToString(err.condition); + TQString scond = Private::errorCondToString(err.condition); if(scond.isEmpty()) return; @@ -468,7 +468,7 @@ void Stanza::setError(const Error &err) errElem.appendChild(d->e.ownerDocument().createTextNode(err.text)); } else { - QDomElement te = d->e.ownerDocument().createElementNS(d->s->baseNS(), "text"); + TQDomElement te = d->e.ownerDocument().createElementNS(d->s->baseNS(), "text"); te.appendChild(d->e.ownerDocument().createTextNode(err.text)); errElem.appendChild(te); } @@ -479,7 +479,7 @@ void Stanza::setError(const Error &err) void Stanza::clearError() { - QDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement(); + TQDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement(); if(!errElem.isNull()) d->e.removeChild(errElem); } @@ -488,8 +488,8 @@ void Stanza::clearError() // Stream //---------------------------------------------------------------------------- static XmlProtocol *foo = 0; -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } @@ -497,17 +497,17 @@ Stream::~Stream() { } -Stanza Stream::createStanza(Stanza::Kind k, const Jid &to, const QString &type, const QString &id) +Stanza Stream::createStanza(Stanza::Kind k, const Jid &to, const TQString &type, const TQString &id) { return Stanza(this, k, to, type, id); } -Stanza Stream::createStanza(const QDomElement &e) +Stanza Stream::createStanza(const TQDomElement &e) { return Stanza(this, e); } -QString Stream::xmlToString(const QDomElement &e, bool clip) +TQString Stream::xmlToString(const TQDomElement &e, bool clip) { if(!foo) foo = new CoreProtocol; @@ -569,14 +569,14 @@ public: } Jid jid; - QString server; + TQString server; bool oldOnly; bool allowPlain, mutualAuth; bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; int minimumSSF, maximumSSF; - QString sasl_mech; + TQString sasl_mech; bool doBinding; bool in_rrsig; @@ -590,7 +590,7 @@ public: CoreProtocol client; CoreProtocol srv; - QString defRealm; + TQString defRealm; int mode; int state; @@ -600,51 +600,51 @@ public: bool tls_warned, using_tls; bool doAuth; - QStringList sasl_mechlist; + TQStringList sasl_mechlist; int errCond; - QString errText; - QDomElement errAppSpec; + TQString errText; + TQDomElement errAppSpec; - QPtrList<Stanza> in; + TQPtrList<Stanza> in; - QTimer noopTimer; + TQTimer noopTimer; int noop_time; }; -ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, QObject *parent) +ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *parent) :Stream(parent) { d = new Private; d->mode = Client; d->conn = conn; - connect(d->conn, SIGNAL(connected()), SLOT(cr_connected())); - connect(d->conn, SIGNAL(error()), SLOT(cr_error())); + connect(d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected())); + connect(d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error())); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); d->tlsHandler = tlsHandler; } -ClientStream::ClientStream(const QString &host, const QString &defRealm, ByteStream *bs, QCA::TLS *tls, QObject *parent) +ClientStream::ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls, TQObject *parent) :Stream(parent) { d = new Private; d->mode = Server; d->bs = bs; - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); - connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); d->ss = new SecureStream(d->bs); - connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead())); - connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int))); - connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken())); - connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed())); - connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int))); + connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead())); + connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int))); + connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken())); + connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed())); + connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int))); d->server = host; d->defRealm = defRealm; @@ -655,7 +655,7 @@ ClientStream::ClientStream(const QString &host, const QString &defRealm, ByteStr //d->srv.startServerIn(genId()); //d->state = Connecting; //d->jid = Jid(); - //d->server = QString(); + //d->server = TQString(); } ClientStream::~ClientStream() @@ -761,13 +761,13 @@ bool ClientStream::isAuthenticated() const return (d->state == Active) ? true: false; } -void ClientStream::setUsername(const QString &s) +void ClientStream::setUsername(const TQString &s) { if(d->sasl) d->sasl->setUsername(s); } -void ClientStream::setPassword(const QString &s) +void ClientStream::setPassword(const TQString &s) { if(d->client.old) { d->client.setPassword(s); @@ -778,7 +778,7 @@ void ClientStream::setPassword(const QString &s) } } -void ClientStream::setRealm(const QString &s) +void ClientStream::setRealm(const TQString &s) { if(d->sasl) d->sasl->setRealm(s); @@ -817,7 +817,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start(d->noop_time); } -QString ClientStream::saslMechanism() const +TQString ClientStream::saslMechanism() const { return d->client.saslMech(); } @@ -827,12 +827,12 @@ int ClientStream::saslSSF() const return d->sasl_ssf; } -void ClientStream::setSASLMechanism(const QString &s) +void ClientStream::setSASLMechanism(const TQString &s) { d->sasl_mech = s; } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -844,12 +844,12 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } -QDomElement ClientStream::errorAppSpec() const +TQDomElement ClientStream::errorAppSpec() const { return d->errAppSpec; } @@ -871,22 +871,22 @@ void ClientStream::close() } } -QDomDocument & ClientStream::doc() const +TQDomDocument & ClientStream::doc() const { return d->client.doc; } -QString ClientStream::baseNS() const +TQString ClientStream::baseNS() const { return NS_CLIENT; } -QString ClientStream::xhtmlImNS() const +TQString ClientStream::xhtmlImNS() const { return NS_XHTML_IM; } -QString ClientStream::xhtmlNS() const +TQString ClientStream::xhtmlNS() const { return NS_XHTML; } @@ -940,17 +940,17 @@ void ClientStream::write(const Stanza &s) void ClientStream::cr_connected() { d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); d->ss = new SecureStream(d->bs); - connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead())); - connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int))); - connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken())); - connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed())); - connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int))); + connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead())); + connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int))); + connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken())); + connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed())); + connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int))); //d->client.startDialbackOut("andbit.net", "im.pyxa.org"); //d->client.startServerOut(d->server); @@ -968,7 +968,7 @@ void ClientStream::cr_connected() d->client.doTLS = d->tlsHandler ? true: false; d->client.doBinding = d->doBinding;*/ - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; connected(); if(!self) return; @@ -1008,10 +1008,10 @@ void ClientStream::bs_error(int) void ClientStream::ss_readyRead() { - QByteArray a = d->ss->read(); + TQByteArray a = d->ss->read(); #ifdef XMPP_DEBUG - QCString cs(a.data(), a.size()+1); + TQCString cs(a.data(), a.size()+1); fprintf(stderr, "ClientStream: recv: %d [%s]\n", a.size(), cs.data()); #endif @@ -1044,7 +1044,7 @@ void ClientStream::ss_bytesWritten(int bytes) void ClientStream::ss_tlsHandshaken() { - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; securityLayerActivated(LayerTLS); if(!self) return; @@ -1070,17 +1070,17 @@ void ClientStream::ss_error(int x) } } -void ClientStream::sasl_clientFirstStep(const QString &mech, const QByteArray *stepData) +void ClientStream::sasl_clientFirstStep(const TQString &mech, const TQByteArray *stepData) { - d->client.setSASLFirst(mech, stepData ? *stepData : QByteArray()); + d->client.setSASLFirst(mech, stepData ? *stepData : TQByteArray()); //d->client.sasl_mech = mech; //d->client.sasl_firstStep = stepData ? true : false; - //d->client.sasl_step = stepData ? *stepData : QByteArray(); + //d->client.sasl_step = stepData ? *stepData : TQByteArray(); processNext(); } -void ClientStream::sasl_nextStep(const QByteArray &stepData) +void ClientStream::sasl_nextStep(const TQByteArray &stepData) { if(d->mode == Client) d->client.setSASLNext(stepData); @@ -1109,12 +1109,12 @@ void ClientStream::sasl_needParams(bool user, bool authzid, bool pass, bool real d->sasl->continueAfterParams(); } -void ClientStream::sasl_authCheck(const QString &user, const QString &) +void ClientStream::sasl_authCheck(const TQString &user, const TQString &) { //#ifdef XMPP_DEBUG // printf("authcheck: [%s], [%s]\n", user.latin1(), authzid.latin1()); //#endif - QString u = user; + TQString u = user; int n = u.find('@'); if(n != -1) u.truncate(n); @@ -1163,10 +1163,10 @@ void ClientStream::srvProcessNext() else if(need == CoreProtocol::NSASLMechs) { if(!d->sasl) { d->sasl = new QCA::SASL; - connect(d->sasl, SIGNAL(authCheck(const QString &, const QString &)), SLOT(sasl_authCheck(const QString &, const QString &))); - connect(d->sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &))); - connect(d->sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated())); - connect(d->sasl, SIGNAL(error(int)), SLOT(sasl_error(int))); + connect(d->sasl, TQT_SIGNAL(authCheck(const TQString &, const TQString &)), TQT_SLOT(sasl_authCheck(const TQString &, const TQString &))); + connect(d->sasl, TQT_SIGNAL(nextStep(const TQByteArray &)), TQT_SLOT(sasl_nextStep(const TQByteArray &))); + connect(d->sasl, TQT_SIGNAL(authenticated()), TQT_SLOT(sasl_authenticated())); + connect(d->sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int))); //d->sasl->setAllowAnonymous(false); //d->sasl->setRequirePassCredentials(true); @@ -1175,7 +1175,7 @@ void ClientStream::srvProcessNext() d->sasl->setMinimumSSF(0); d->sasl->setMaximumSSF(256); - QStringList list; + TQStringList list; // TODO: d->server is probably wrong here if(!d->sasl->startServer("xmpp", d->server, d->defRealm, &list)) { printf("Error initializing SASL\n"); @@ -1193,18 +1193,18 @@ void ClientStream::srvProcessNext() // TODO return; } - QByteArray a = d->srv.spare; + TQByteArray a = d->srv.spare; d->ss->startTLSServer(d->tls, a); } else if(need == CoreProtocol::NSASLFirst) { printf("Need SASL First Step\n"); - QByteArray a = d->srv.saslStep(); + TQByteArray a = d->srv.saslStep(); d->sasl->putServerFirstStep(d->srv.saslMech(), a); } else if(need == CoreProtocol::NSASLNext) { printf("Need SASL Next Step\n"); - QByteArray a = d->srv.saslStep(); - QCString cs(a.data(), a.size()+1); + TQByteArray a = d->srv.saslStep(); + TQCString cs(a.data(), a.size()+1); printf("[%s]\n", cs.data()); d->sasl->putStep(a); } @@ -1230,8 +1230,8 @@ void ClientStream::srvProcessNext() return; } case CoreProtocol::ESend: { - QByteArray a = d->srv.takeOutgoingData(); - QCString cs(a.size()+1); + TQByteArray a = d->srv.takeOutgoingData(); + TQCString cs(a.size()+1); memcpy(cs.data(), a.data(), a.size()); printf("Need Send: {%s}\n", cs.data()); d->ss->write(a); @@ -1241,7 +1241,7 @@ void ClientStream::srvProcessNext() printf("Break (RecvOpen)\n"); // calculate key - QCString str = QCA::SHA1::hashToString("secret").utf8(); + TQCString str = QCA::SHA1::hashToString("secret").utf8(); str = QCA::SHA1::hashToString(str + "im.pyxa.org").utf8(); str = QCA::SHA1::hashToString(str + d->srv.id.utf8()).utf8(); d->srv.setDialbackKey(str); @@ -1258,8 +1258,8 @@ void ClientStream::srvProcessNext() } case CoreProtocol::ESASLSuccess: { printf("Break SASL Success\n"); - disconnect(d->sasl, SIGNAL(error(int)), this, SLOT(sasl_error(int))); - QByteArray a = d->srv.spare; + disconnect(d->sasl, TQT_SIGNAL(error(int)), this, TQT_SLOT(sasl_error(int))); + TQByteArray a = d->srv.spare; d->ss->setLayerSASL(d->sasl, a); break; } @@ -1276,7 +1276,7 @@ void ClientStream::srvProcessNext() void ClientStream::doReadyRead() { - //QGuardedPtr<QObject> self = this; + //TQGuardedPtr<TQObject> self = this; readyRead(); //if(!self) // return; @@ -1290,7 +1290,7 @@ void ClientStream::processNext() return; } - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; while(1) { #ifdef XMPP_DEBUG @@ -1298,11 +1298,11 @@ void ClientStream::processNext() #endif bool ok = d->client.processStep(); // deal with send/received items - for(QValueList<XmlProtocol::TransferItem>::ConstIterator it = d->client.transferItemList.begin(); it != d->client.transferItemList.end(); ++it) { + for(TQValueList<XmlProtocol::TransferItem>::ConstIterator it = d->client.transferItemList.begin(); it != d->client.transferItemList.end(); ++it) { const XmlProtocol::TransferItem &i = *it; if(i.isExternal) continue; - QString str; + TQString str; if(i.isString) { // skip whitespace pings if(i.str.stripWhiteSpace().isEmpty()) @@ -1324,7 +1324,7 @@ void ClientStream::processNext() //if(!d->in_rrsig && !d->in.isEmpty()) { if(!d->in.isEmpty()) { //d->in_rrsig = true; - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } if(cont) @@ -1343,9 +1343,9 @@ void ClientStream::processNext() return; } case CoreProtocol::ESend: { - QByteArray a = d->client.takeOutgoingData(); + TQByteArray a = d->client.takeOutgoingData(); #ifdef XMPP_DEBUG - QCString cs(a.size()+1); + TQCString cs(a.size()+1); memcpy(cs.data(), a.data(), a.size()); printf("Need Send: {%s}\n", cs.data()); #endif @@ -1358,9 +1358,9 @@ void ClientStream::processNext() #endif #ifdef XMPP_TEST - QString s = QString("handshake success (lang=[%1]").arg(d->client.lang); + TQString s = TQString("handshake success (lang=[%1]").arg(d->client.lang); if(!d->client.from.isEmpty()) - s += QString(", from=[%1]").arg(d->client.from); + s += TQString(", from=[%1]").arg(d->client.from); s += ')'; TD::msg(s); #endif @@ -1480,11 +1480,11 @@ bool ClientStream::handleNeed() } d->sasl = new QCA::SASL; - connect(d->sasl, SIGNAL(clientFirstStep(const QString &, const QByteArray *)), SLOT(sasl_clientFirstStep(const QString &, const QByteArray *))); - connect(d->sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &))); - connect(d->sasl, SIGNAL(needParams(bool, bool, bool, bool)), SLOT(sasl_needParams(bool, bool, bool, bool))); - connect(d->sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated())); - connect(d->sasl, SIGNAL(error(int)), SLOT(sasl_error(int))); + connect(d->sasl, TQT_SIGNAL(clientFirstStep(const TQString &, const TQByteArray *)), TQT_SLOT(sasl_clientFirstStep(const TQString &, const TQByteArray *))); + connect(d->sasl, TQT_SIGNAL(nextStep(const TQByteArray &)), TQT_SLOT(sasl_nextStep(const TQByteArray &))); + connect(d->sasl, TQT_SIGNAL(needParams(bool, bool, bool, bool)), TQT_SLOT(sasl_needParams(bool, bool, bool, bool))); + connect(d->sasl, TQT_SIGNAL(authenticated()), TQT_SLOT(sasl_authenticated())); + connect(d->sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int))); if(d->haveLocalAddr) d->sasl->setLocalAddr(d->localAddr, d->localPort); @@ -1506,7 +1506,7 @@ bool ClientStream::handleNeed() d->sasl->setMinimumSSF(d->minimumSSF); d->sasl->setMaximumSSF(d->maximumSSF); - QStringList ml; + TQStringList ml; if(!d->sasl_mech.isEmpty()) ml += d->sasl_mech; else @@ -1525,16 +1525,16 @@ bool ClientStream::handleNeed() #ifdef XMPP_DEBUG printf("Need SASL Next Step\n"); #endif - QByteArray a = d->client.saslStep(); + TQByteArray a = d->client.saslStep(); d->sasl->putStep(a); return false; } case CoreProtocol::NSASLLayer: { // SecureStream will handle the errors from this point - disconnect(d->sasl, SIGNAL(error(int)), this, SLOT(sasl_error(int))); + disconnect(d->sasl, TQT_SIGNAL(error(int)), this, TQT_SLOT(sasl_error(int))); d->ss->setLayerSASL(d->sasl, d->client.spare); if(d->sasl_ssf > 0) { - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; securityLayerActivated(LayerSASL); if(!self) return false; @@ -1580,7 +1580,7 @@ void ClientStream::doNoop() } } -void ClientStream::writeDirect(const QString &s) +void ClientStream::writeDirect(const TQString &s) { if(d->state == Active) { #ifdef XMPP_DEBUG @@ -1604,8 +1604,8 @@ void ClientStream::handleError() } else if(c == CoreProtocol::ErrStream) { int x = d->client.errCond; - QString text = d->client.errText; - QDomElement appSpec = d->client.errAppSpec; + TQString text = d->client.errText; + TQDomElement appSpec = d->client.errAppSpec; int connErr = -1; int strErr = -1; @@ -1730,31 +1730,31 @@ TD::~TD() { } -void TD::msg(const QString &s) +void TD::msg(const TQString &s) { if(debug_ptr) debug_ptr->msg(s); } -void TD::outgoingTag(const QString &s) +void TD::outgoingTag(const TQString &s) { if(debug_ptr) debug_ptr->outgoingTag(s); } -void TD::incomingTag(const QString &s) +void TD::incomingTag(const TQString &s) { if(debug_ptr) debug_ptr->incomingTag(s); } -void TD::outgoingXml(const QDomElement &e) +void TD::outgoingXml(const TQDomElement &e) { if(debug_ptr) debug_ptr->outgoingXml(e); } -void TD::incomingXml(const QDomElement &e) +void TD::incomingXml(const TQDomElement &e) { if(debug_ptr) debug_ptr->incomingXml(e); diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h index b636e190..f4d560f4 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h @@ -1,7 +1,7 @@ #ifndef TESTDEBUG_H #define TESTDEBUG_H -#include<qdom.h> +#include<tqdom.h> class TD { @@ -9,11 +9,11 @@ public: TD(); ~TD(); - static void msg(const QString &); - static void outgoingTag(const QString &); - static void incomingTag(const QString &); - static void outgoingXml(const QDomElement &); - static void incomingXml(const QDomElement &); + static void msg(const TQString &); + static void outgoingTag(const TQString &); + static void incomingTag(const TQString &); + static void outgoingXml(const TQDomElement &); + static void incomingXml(const TQDomElement &); }; #endif diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp index 24d77598..313c6b6a 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp @@ -20,7 +20,7 @@ #include"xmpp.h" -#include<qtimer.h> +#include<tqtimer.h> #include"qca.h" using namespace XMPP; @@ -28,8 +28,8 @@ using namespace XMPP; //---------------------------------------------------------------------------- // TLSHandler //---------------------------------------------------------------------------- -TLSHandler::TLSHandler(QObject *parent) -:QObject(parent) +TLSHandler::TLSHandler(TQObject *parent) +:TQObject(parent) { } @@ -53,11 +53,11 @@ QCATLSHandler::QCATLSHandler(QCA::TLS *parent) { d = new Private; d->tls = parent; - connect(d->tls, SIGNAL(handshaken()), SLOT(tls_handshaken())); - connect(d->tls, SIGNAL(readyRead()), SLOT(tls_readyRead())); - connect(d->tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int))); - connect(d->tls, SIGNAL(closed()), SLOT(tls_closed())); - connect(d->tls, SIGNAL(error(int)), SLOT(tls_error(int))); + connect(d->tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken())); + connect(d->tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead())); + connect(d->tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int))); + connect(d->tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed())); + connect(d->tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int))); d->state = 0; d->err = -1; } @@ -83,20 +83,20 @@ void QCATLSHandler::reset() d->state = 0; } -void QCATLSHandler::startClient(const QString &host) +void QCATLSHandler::startClient(const TQString &host) { d->state = 0; d->err = -1; if(!d->tls->startClient(host)) - QTimer::singleShot(0, this, SIGNAL(fail())); + TQTimer::singleShot(0, this, TQT_SIGNAL(fail())); } -void QCATLSHandler::write(const QByteArray &a) +void QCATLSHandler::write(const TQByteArray &a) { d->tls->write(a); } -void QCATLSHandler::writeIncoming(const QByteArray &a) +void QCATLSHandler::writeIncoming(const TQByteArray &a) { d->tls->writeIncoming(a); } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp index 0ae15585..de321e7c 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp @@ -30,10 +30,10 @@ using namespace XMPP; // display purposes only (the element is pretty much useless for processing // after this). We do this because QXml is a bit overzealous about outputting // redundant namespaces. -static QDomElement stripExtraNS(const QDomElement &e) +static TQDomElement stripExtraNS(const TQDomElement &e) { // find closest parent with a namespace - QDomNode par = e.parentNode(); + TQDomNode par = e.parentNode(); while(!par.isNull() && par.namespaceURI().isNull()) par = par.parentNode(); bool noShowNS = false; @@ -41,13 +41,13 @@ static QDomElement stripExtraNS(const QDomElement &e) noShowNS = true; // build qName (prefix:localName) - QString qName; + TQString qName; if(!e.prefix().isEmpty()) qName = e.prefix() + ':' + e.localName(); else qName = e.tagName(); - QDomElement i; + TQDomElement i; uint x; if(noShowNS) i = e.ownerDocument().createElement(qName); @@ -55,21 +55,21 @@ static QDomElement stripExtraNS(const QDomElement &e) i = e.ownerDocument().createElementNS(e.namespaceURI(), qName); // copy attributes - QDomNamedNodeMap al = e.attributes(); + TQDomNamedNodeMap al = e.attributes(); for(x = 0; x < al.count(); ++x) { - QDomAttr a = al.item(x).cloneNode().toAttr(); + TQDomAttr a = al.item(x).cloneNode().toAttr(); // don't show xml namespace if(a.namespaceURI() == NS_XML) - i.setAttribute(QString("xml:") + a.name(), a.value()); + i.setAttribute(TQString("xml:") + a.name(), a.value()); else i.setAttributeNodeNS(a); } // copy children - QDomNodeList nl = e.childNodes(); + TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { - QDomNode n = nl.item(x); + TQDomNode n = nl.item(x); if(n.isElement()) i.appendChild(stripExtraNS(n.toElement())); else @@ -80,20 +80,20 @@ static QDomElement stripExtraNS(const QDomElement &e) // xmlToString // -// This function converts a QDomElement into a QString, using stripExtraNS +// This function converts a TQDomElement into a TQString, using stripExtraNS // to make it pretty. -static QString xmlToString(const QDomElement &e, const QString &fakeNS, const QString &fakeQName, bool clip) +static TQString xmlToString(const TQDomElement &e, const TQString &fakeNS, const TQString &fakeQName, bool clip) { - QDomElement i = e.cloneNode().toElement(); + TQDomElement i = e.cloneNode().toElement(); // It seems QDom can only have one namespace attribute at a time (see docElement 'HACK'). // Fortunately we only need one kind depending on the input, so it is specified here. - QDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeQName); + TQDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeQName); fake.appendChild(i); fake = stripExtraNS(fake); - QString out; + TQString out; { - QTextStream ts(&out, IO_WriteOnly); + TQTextStream ts(&out, IO_WriteOnly); fake.firstChild().save(ts, 0); } // 'clip' means to remove any unwanted (and unneeded) characters, such as a trailing newline @@ -112,18 +112,18 @@ static QString xmlToString(const QDomElement &e, const QString &fakeNS, const QS // text needed to open/close an XML stream, without resorting to generating // the XML ourselves. This function uses QDom to do the generation, which // ensures proper encoding and entity output. -static void createRootXmlTags(const QDomElement &root, QString *xmlHeader, QString *tagOpen, QString *tagClose) +static void createRootXmlTags(const TQDomElement &root, TQString *xmlHeader, TQString *tagOpen, TQString *tagClose) { - QDomElement e = root.cloneNode(false).toElement(); + TQDomElement e = root.cloneNode(false).toElement(); // insert a dummy element to ensure open and closing tags are generated - QDomElement dummy = e.ownerDocument().createElement("dummy"); + TQDomElement dummy = e.ownerDocument().createElement("dummy"); e.appendChild(dummy); // convert to xml->text - QString str; + TQString str; { - QTextStream ts(&str, IO_WriteOnly); + TQTextStream ts(&str, IO_WriteOnly); e.save(ts, 0); } @@ -148,7 +148,7 @@ XmlProtocol::TransferItem::TransferItem() { } -XmlProtocol::TransferItem::TransferItem(const QString &_str, bool sent, bool external) +XmlProtocol::TransferItem::TransferItem(const TQString &_str, bool sent, bool external) { isString = true; isSent = sent; @@ -156,7 +156,7 @@ XmlProtocol::TransferItem::TransferItem(const QString &_str, bool sent, bool ext str = _str; } -XmlProtocol::TransferItem::TransferItem(const QDomElement &_elem, bool sent, bool external) +XmlProtocol::TransferItem::TransferItem(const TQDomElement &_elem, bool sent, bool external) { isString = false; isSent = sent; @@ -184,30 +184,30 @@ void XmlProtocol::reset() { init(); - elem = QDomElement(); - tagOpen = QString(); - tagClose = QString(); + elem = TQDomElement(); + tagOpen = TQString(); + tagClose = TQString(); xml.reset(); outData.resize(0); trackQueue.clear(); transferItemList.clear(); } -void XmlProtocol::addIncomingData(const QByteArray &a) +void XmlProtocol::addIncomingData(const TQByteArray &a) { xml.appendData(a); } -QByteArray XmlProtocol::takeOutgoingData() +TQByteArray XmlProtocol::takeOutgoingData() { - QByteArray a = outData.copy(); + TQByteArray a = outData.copy(); outData.resize(0); return a; } void XmlProtocol::outgoingDataWritten(int bytes) { - for(QValueList<TrackItem>::Iterator it = trackQueue.begin(); it != trackQueue.end();) { + for(TQValueList<TrackItem>::Iterator it = trackQueue.begin(); it != trackQueue.end();) { TrackItem &i = *it; // enough bytes? @@ -302,21 +302,21 @@ bool XmlProtocol::processStep() return baseStep(pe); } -QString XmlProtocol::xmlEncoding() const +TQString XmlProtocol::xmlEncoding() const { return xml.encoding(); } -QString XmlProtocol::elementToString(const QDomElement &e, bool clip) +TQString XmlProtocol::elementToString(const TQDomElement &e, bool clip) { if(elem.isNull()) elem = elemDoc.importNode(docElement(), true).toElement(); // Determine the appropriate 'fakeNS' to use - QString ns; + TQString ns; // first, check root namespace - QString pre = e.prefix(); + TQString pre = e.prefix(); if(pre.isNull()) pre = ""; if(pre == elem.prefix()) { @@ -324,11 +324,11 @@ QString XmlProtocol::elementToString(const QDomElement &e, bool clip) } else { // scan the root attributes for 'xmlns' (oh joyous hacks) - QDomNamedNodeMap al = elem.attributes(); + TQDomNamedNodeMap al = elem.attributes(); uint n; for(n = 0; n < al.count(); ++n) { - QDomAttr a = al.item(n).toAttr(); - QString s = a.name(); + TQDomAttr a = al.item(n).toAttr(); + TQString s = a.name(); int x = s.find(':'); if(x != -1) s = s.mid(x+1); @@ -346,7 +346,7 @@ QString XmlProtocol::elementToString(const QDomElement &e, bool clip) } // build qName - QString qn; + TQString qn; if(!elem.prefix().isEmpty()) qn = elem.prefix() + ':'; qn += elem.localName(); @@ -366,22 +366,22 @@ void XmlProtocol::itemWritten(int, int) // default does nothing } -void XmlProtocol::stringSend(const QString &) +void XmlProtocol::stringSend(const TQString &) { // default does nothing } -void XmlProtocol::stringRecv(const QString &) +void XmlProtocol::stringRecv(const TQString &) { // default does nothing } -void XmlProtocol::elementSend(const QDomElement &) +void XmlProtocol::elementSend(const TQDomElement &) { // default does nothing } -void XmlProtocol::elementRecv(const QDomElement &) +void XmlProtocol::elementRecv(const TQDomElement &) { // default does nothing } @@ -406,24 +406,24 @@ bool XmlProtocol::close() return true; } -int XmlProtocol::writeString(const QString &s, int id, bool external) +int XmlProtocol::writeString(const TQString &s, int id, bool external) { transferItemList += TransferItem(s, true, external); return internalWriteString(s, TrackItem::Custom, id); } -int XmlProtocol::writeElement(const QDomElement &e, int id, bool external, bool clip) +int XmlProtocol::writeElement(const TQDomElement &e, int id, bool external, bool clip) { if(e.isNull()) return 0; transferItemList += TransferItem(e, true, external); //elementSend(e); - QString out = elementToString(e, clip); + TQString out = elementToString(e, clip); return internalWriteString(out, TrackItem::Custom, id); } -QByteArray XmlProtocol::resetStream() +TQByteArray XmlProtocol::resetStream() { // reset the state if(incoming) @@ -432,12 +432,12 @@ QByteArray XmlProtocol::resetStream() state = SendOpen; // grab unprocessed data before resetting - QByteArray spare = xml.unprocessed(); + TQByteArray spare = xml.unprocessed(); xml.reset(); return spare; } -int XmlProtocol::internalWriteData(const QByteArray &a, TrackItem::Type t, int id) +int XmlProtocol::internalWriteData(const TQByteArray &a, TrackItem::Type t, int id) { TrackItem i; i.type = t; @@ -449,10 +449,10 @@ int XmlProtocol::internalWriteData(const QByteArray &a, TrackItem::Type t, int i return a.size(); } -int XmlProtocol::internalWriteString(const QString &s, TrackItem::Type t, int id) +int XmlProtocol::internalWriteString(const TQString &s, TrackItem::Type t, int id) { - QCString cs = s.utf8(); - QByteArray a(cs.length()); + TQCString cs = s.utf8(); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return internalWriteData(a, t, id); } @@ -462,10 +462,10 @@ void XmlProtocol::sendTagOpen() if(elem.isNull()) elem = elemDoc.importNode(docElement(), true).toElement(); - QString xmlHeader; + TQString xmlHeader; createRootXmlTags(elem, &xmlHeader, &tagOpen, &tagClose); - QString s; + TQString s; s += xmlHeader + '\n'; s += tagOpen + '\n'; @@ -509,7 +509,7 @@ bool XmlProtocol::baseStep(const Parser::Event &pe) return true; } else if(state == Open) { - QDomElement e; + TQDomElement e; if(pe.type() == Parser::Event::Element) e = pe.element(); return doStep(e); @@ -533,7 +533,7 @@ bool XmlProtocol::baseStep(const Parser::Event &pe) void XmlProtocol::setIncomingAsExternal() { - for(QValueList<TransferItem>::Iterator it = transferItemList.begin(); it != transferItemList.end(); ++it) { + for(TQValueList<TransferItem>::Iterator it = transferItemList.begin(); it != transferItemList.end(); ++it) { TransferItem &i = *it; // look for elements received if(!i.isString && !i.isSent) diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h index 16ff8e01..e3da8a09 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h @@ -21,8 +21,8 @@ #ifndef XMLPROTOCOL_H #define XMLPROTOCOL_H -#include<qdom.h> -#include<qvaluelist.h> +#include<tqdom.h> +#include<tqvaluelist.h> #include"parser.h" #define NS_XML "http://www.w3.org/XML/1998/namespace" @@ -59,8 +59,8 @@ namespace XMPP virtual void reset(); // byte I/O for the stream - void addIncomingData(const QByteArray &); - QByteArray takeOutgoingData(); + void addIncomingData(const TQByteArray &); + TQByteArray takeOutgoingData(); void outgoingDataWritten(int); // advance the state machine @@ -70,47 +70,47 @@ namespace XMPP int need, event, errorCode, notify; inline bool isIncoming() const { return incoming; } - QString xmlEncoding() const; - QString elementToString(const QDomElement &e, bool clip=false); + TQString xmlEncoding() const; + TQString elementToString(const TQDomElement &e, bool clip=false); class TransferItem { public: TransferItem(); - TransferItem(const QString &str, bool sent, bool external=false); - TransferItem(const QDomElement &elem, bool sent, bool external=false); + TransferItem(const TQString &str, bool sent, bool external=false); + TransferItem(const TQDomElement &elem, bool sent, bool external=false); bool isSent; // else, received bool isString; // else, is element bool isExternal; // not owned by protocol - QString str; - QDomElement elem; + TQString str; + TQDomElement elem; }; - QValueList<TransferItem> transferItemList; + TQValueList<TransferItem> transferItemList; void setIncomingAsExternal(); protected: - virtual QDomElement docElement()=0; + virtual TQDomElement docElement()=0; virtual void handleDocOpen(const Parser::Event &pe)=0; virtual bool handleError()=0; virtual bool handleCloseFinished()=0; virtual bool stepAdvancesParser() const=0; virtual bool stepRequiresElement() const; - virtual bool doStep(const QDomElement &e)=0; + virtual bool doStep(const TQDomElement &e)=0; virtual void itemWritten(int id, int size); // 'debug' - virtual void stringSend(const QString &s); - virtual void stringRecv(const QString &s); - virtual void elementSend(const QDomElement &e); - virtual void elementRecv(const QDomElement &e); + virtual void stringSend(const TQString &s); + virtual void stringRecv(const TQString &s); + virtual void elementSend(const TQDomElement &e); + virtual void elementRecv(const TQDomElement &e); void startConnect(); void startAccept(); bool close(); - int writeString(const QString &s, int id, bool external); - int writeElement(const QDomElement &e, int id, bool external, bool clip=false); - QByteArray resetStream(); + int writeString(const TQString &s, int id, bool external); + int writeElement(const TQDomElement &e, int id, bool external, bool clip=false); + TQByteArray resetStream(); private: enum { SendOpen, RecvOpen, Open, Closing }; @@ -122,20 +122,20 @@ namespace XMPP }; bool incoming; - QDomDocument elemDoc; - QDomElement elem; - QString tagOpen, tagClose; + TQDomDocument elemDoc; + TQDomElement elem; + TQString tagOpen, tagClose; int state; bool peerClosed; bool closeWritten; Parser xml; - QByteArray outData; - QValueList<TrackItem> trackQueue; + TQByteArray outData; + TQValueList<TrackItem> trackQueue; void init(); - int internalWriteData(const QByteArray &a, TrackItem::Type t, int id=-1); - int internalWriteString(const QString &s, TrackItem::Type t, int id=-1); + int internalWriteData(const TQByteArray &a, TrackItem::Type t, int id=-1); + int internalWriteString(const TQString &s, TrackItem::Type t, int id=-1); void sendTagOpen(); void sendTagClose(); bool baseStep(const Parser::Event &pe); diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp index a5affaa0..c78875bc 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp @@ -36,7 +36,7 @@ //! //! The entire Task system is heavily founded on Qt. All Tasks have a parent, //! except for the root Task, and are considered QObjects. By using Qt's RTTI -//! facilities (QObject::sender(), QObject::isA(), etc), you can use a +//! facilities (TQObject::sender(), TQObject::isA(), etc), you can use a //! "fire and forget" approach with Tasks. //! //! \code @@ -50,8 +50,8 @@ //! Session::Session() //! { //! client = new Client; -//! connect(client, SIGNAL(handshaken()), SLOT(clientHandshaken())); -//! connect(client, SIGNAL(authFinished(bool, int, const QString &)), SLOT(authFinished(bool, int, const QString &))); +//! connect(client, TQT_SIGNAL(handshaken()), TQT_SLOT(clientHandshaken())); +//! connect(client, TQT_SIGNAL(authFinished(bool, int, const TQString &)), TQT_SLOT(authFinished(bool, int, const TQString &))); //! client->connectToHost("jabber.org"); //! } //! @@ -60,7 +60,7 @@ //! client->authDigest("jabtest", "12345", "Psi"); //! } //! -//! void Session::authFinished(bool success, int, const QString &err) +//! void Session::authFinished(bool success, int, const TQString &err) //! { //! if(success) //! printf("Login success!"); @@ -70,10 +70,10 @@ //! \endcode #include<stdarg.h> -#include<qmap.h> -#include<qobjectlist.h> -#include<qtimer.h> -#include<qguardedptr.h> +#include<tqmap.h> +#include<tqobjectlist.h> +#include<tqtimer.h> +#include<tqguardedptr.h> #include"xmpp_tasks.h" #include"xmpp_xmlcommon.h" #include"s5b.h" @@ -83,10 +83,10 @@ /*#include<stdio.h> #include<stdarg.h> -#include<qstring.h> -#include<qdom.h> -#include<qobjectlist.h> -#include<qtimer.h> +#include<tqstring.h> +#include<tqdom.h> +#include<tqobjectlist.h> +#include<tqtimer.h> #include"xmpp_stream.h" #include"xmpp_tasks.h" #include"xmpp_xmlcommon.h" @@ -122,13 +122,13 @@ public: ClientPrivate() {} ClientStream *stream; - QDomDocument doc; + TQDomDocument doc; int id_seed; Task *root; - QString host, user, pass, resource; - QString osname, tzname, clientName, clientVersion, capsNode, capsVersion, capsExt; + TQString host, user, pass, resource; + TQString osname, tzname, clientName, clientVersion, capsNode, capsVersion, capsExt; DiscoItem::Identity identity; - QMap<QString,Features> extension_features; + TQMap<TQString,Features> extension_features; int tzoffset; bool active; @@ -139,12 +139,12 @@ public: JidLinkManager *jlman; FileTransferManager *ftman; bool ftEnabled; - QValueList<GroupChat> groupChatList; + TQValueList<GroupChat> groupChatList; }; -Client::Client(QObject *par) -:QObject(par) +Client::Client(TQObject *par) +:TQObject(par) { d = new ClientPrivate; d->tzoffset = 0; @@ -162,10 +162,10 @@ Client::Client(QObject *par) d->stream = 0; d->s5bman = new S5BManager(this); - connect(d->s5bman, SIGNAL(incomingReady()), SLOT(s5b_incomingReady())); + connect(d->s5bman, TQT_SIGNAL(incomingReady()), TQT_SLOT(s5b_incomingReady())); d->ibbman = new IBBManager(this); - connect(d->ibbman, SIGNAL(incomingReady()), SLOT(ibb_incomingReady())); + connect(d->ibbman, TQT_SIGNAL(incomingReady()), TQT_SLOT(ibb_incomingReady())); d->jlman = new JidLinkManager(this); @@ -188,19 +188,19 @@ Client::~Client() void Client::connectToServer(ClientStream *s, const Jid &j, bool auth) { d->stream = s; - //connect(d->stream, SIGNAL(connected()), SLOT(streamConnected())); - //connect(d->stream, SIGNAL(handshaken()), SLOT(streamHandshaken())); - connect(d->stream, SIGNAL(error(int)), SLOT(streamError(int))); - //connect(d->stream, SIGNAL(sslCertificateReady(const QSSLCert &)), SLOT(streamSSLCertificateReady(const QSSLCert &))); - connect(d->stream, SIGNAL(readyRead()), SLOT(streamReadyRead())); - //connect(d->stream, SIGNAL(closeFinished()), SLOT(streamCloseFinished())); - connect(d->stream, SIGNAL(incomingXml(const QString &)), SLOT(streamIncomingXml(const QString &))); - connect(d->stream, SIGNAL(outgoingXml(const QString &)), SLOT(streamOutgoingXml(const QString &))); + //connect(d->stream, TQT_SIGNAL(connected()), TQT_SLOT(streamConnected())); + //connect(d->stream, TQT_SIGNAL(handshaken()), TQT_SLOT(streamHandshaken())); + connect(d->stream, TQT_SIGNAL(error(int)), TQT_SLOT(streamError(int))); + //connect(d->stream, TQT_SIGNAL(sslCertificateReady(const QSSLCert &)), TQT_SLOT(streamSSLCertificateReady(const QSSLCert &))); + connect(d->stream, TQT_SIGNAL(readyRead()), TQT_SLOT(streamReadyRead())); + //connect(d->stream, TQT_SIGNAL(closeFinished()), TQT_SLOT(streamCloseFinished())); + connect(d->stream, TQT_SIGNAL(incomingXml(const TQString &)), TQT_SLOT(streamIncomingXml(const TQString &))); + connect(d->stream, TQT_SIGNAL(outgoingXml(const TQString &)), TQT_SLOT(streamOutgoingXml(const TQString &))); d->stream->connectToServer(j, auth); } -void Client::start(const QString &host, const QString &user, const QString &pass, const QString &_resource) +void Client::start(const TQString &host, const TQString &user, const TQString &pass, const TQString &_resource) { // TODO d->host = host; @@ -213,14 +213,14 @@ void Client::start(const QString &host, const QString &user, const QString &pass d->resourceList += Resource(resource(), stat); JT_PushPresence *pp = new JT_PushPresence(rootTask()); - connect(pp, SIGNAL(subscription(const Jid &, const QString &)), SLOT(ppSubscription(const Jid &, const QString &))); - connect(pp, SIGNAL(presence(const Jid &, const Status &)), SLOT(ppPresence(const Jid &, const Status &))); + connect(pp, TQT_SIGNAL(subscription(const Jid &, const TQString &)), TQT_SLOT(ppSubscription(const Jid &, const TQString &))); + connect(pp, TQT_SIGNAL(presence(const Jid &, const Status &)), TQT_SLOT(ppPresence(const Jid &, const Status &))); JT_PushMessage *pm = new JT_PushMessage(rootTask()); - connect(pm, SIGNAL(message(const Message &)), SLOT(pmMessage(const Message &))); + connect(pm, TQT_SIGNAL(message(const Message &)), TQT_SLOT(pmMessage(const Message &))); JT_PushRoster *pr = new JT_PushRoster(rootTask()); - connect(pr, SIGNAL(roster(const Roster &)), SLOT(prRoster(const Roster &))); + connect(pr, TQT_SIGNAL(roster(const Roster &)), TQT_SLOT(prRoster(const Roster &))); new JT_ServInfo(rootTask()); @@ -266,10 +266,10 @@ bool Client::isActive() const return d->active; } -void Client::groupChatChangeNick(const QString &host, const QString &room, const QString &nick, const Status &_s) +void Client::groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &_s) { Jid jid(room + "@" + host + "/" + nick); - for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { + for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { GroupChat &i = *it; if(i.j.compare(jid, false)) { i.j = jid; @@ -286,10 +286,10 @@ void Client::groupChatChangeNick(const QString &host, const QString &room, const } } -bool Client::groupChatJoin(const QString &host, const QString &room, const QString &nick) +bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQString &nick) { Jid jid(room + "@" + host + "/" + nick); - for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) { + for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) { GroupChat &i = *it; if(i.j.compare(jid, false)) { // if this room is shutting down, then free it up @@ -302,7 +302,7 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri ++it; } - debug(QString("Client: Joined: [%1]\n").arg(jid.full())); + debug(TQString("Client: Joined: [%1]\n").arg(jid.full())); GroupChat i; i.j = jid; i.status = GroupChat::Connecting; @@ -315,10 +315,10 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri return true; } -bool Client::groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password) +bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQString &nick, const TQString &password) { Jid jid(room + "@" + host + "/" + nick); - for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) { + for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) { GroupChat &i = *it; if(i.j.compare(jid, false)) { // if this room is shutting down, then free it up @@ -331,7 +331,7 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri ++it; } - debug(QString("Client: Joined: [%1]\n").arg(jid.full())); + debug(TQString("Client: Joined: [%1]\n").arg(jid.full())); GroupChat i; i.j = jid; i.status = GroupChat::Connecting; @@ -344,11 +344,11 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri return true; } -void Client::groupChatSetStatus(const QString &host, const QString &room, const Status &_s) +void Client::groupChatSetStatus(const TQString &host, const TQString &room, const Status &_s) { Jid jid(room + "@" + host); bool found = false; - for(QValueList<GroupChat>::ConstIterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { + for(TQValueList<GroupChat>::ConstIterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { const GroupChat &i = *it; if(i.j.compare(jid, false)) { found = true; @@ -367,17 +367,17 @@ void Client::groupChatSetStatus(const QString &host, const QString &room, const j->go(true); } -void Client::groupChatLeave(const QString &host, const QString &room) +void Client::groupChatLeave(const TQString &host, const TQString &room) { Jid jid(room + "@" + host); - for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { + for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { GroupChat &i = *it; if(!i.j.compare(jid, false)) continue; i.status = GroupChat::Closing; - debug(QString("Client: Leaving: [%1]\n").arg(i.j.full())); + debug(TQString("Client: Leaving: [%1]\n").arg(i.j.full())); JT_Presence *j = new JT_Presence(rootTask()); Status s; @@ -404,7 +404,7 @@ void Client::close(bool) { if(d->stream) { if(d->active) { - for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { + for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { GroupChat &i = *it; i.status = GroupChat::Closing; @@ -467,17 +467,17 @@ void Client::streamCloseFinished() closeFinished(); }*/ -static QDomElement oldStyleNS(const QDomElement &e) +static TQDomElement oldStyleNS(const TQDomElement &e) { // find closest parent with a namespace - QDomNode par = e.parentNode(); + TQDomNode par = e.parentNode(); while(!par.isNull() && par.namespaceURI().isNull()) par = par.parentNode(); bool noShowNS = false; if(!par.isNull() && par.namespaceURI() == e.namespaceURI()) noShowNS = true; - QDomElement i; + TQDomElement i; uint x; //if(noShowNS) i = e.ownerDocument().createElement(e.tagName()); @@ -485,7 +485,7 @@ static QDomElement oldStyleNS(const QDomElement &e) // i = e.ownerDocument().createElementNS(e.namespaceURI(), e.tagName()); // copy attributes - QDomNamedNodeMap al = e.attributes(); + TQDomNamedNodeMap al = e.attributes(); for(x = 0; x < al.count(); ++x) i.setAttributeNode(al.item(x).cloneNode().toAttr()); @@ -493,9 +493,9 @@ static QDomElement oldStyleNS(const QDomElement &e) i.setAttribute("xmlns", e.namespaceURI()); // copy children - QDomNodeList nl = e.childNodes(); + TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { - QDomNode n = nl.item(x); + TQDomNode n = nl.item(x); if(n.isElement()) i.appendChild(oldStyleNS(n.toElement())); else @@ -507,44 +507,44 @@ static QDomElement oldStyleNS(const QDomElement &e) void Client::streamReadyRead() { // HACK HACK HACK - QGuardedPtr<ClientStream> pstream = d->stream; + TQGuardedPtr<ClientStream> pstream = d->stream; while(pstream && d->stream->stanzaAvailable()) { Stanza s = d->stream->read(); - QString out = s.toString(); - debug(QString("Client: incoming: [\n%1]\n").arg(out)); + TQString out = s.toString(); + debug(TQString("Client: incoming: [\n%1]\n").arg(out)); xmlIncoming(out); - QDomElement x = oldStyleNS(s.element()); + TQDomElement x = oldStyleNS(s.element()); distribute(x); } } -void Client::streamIncomingXml(const QString &s) +void Client::streamIncomingXml(const TQString &s) { - QString str = s; + TQString str = s; if(str.at(str.length()-1) != '\n') str += '\n'; xmlIncoming(str); } -void Client::streamOutgoingXml(const QString &s) +void Client::streamOutgoingXml(const TQString &s) { - QString str = s; + TQString str = s; if(str.at(str.length()-1) != '\n') str += '\n'; xmlOutgoing(str); } -void Client::debug(const QString &str) +void Client::debug(const TQString &str) { debugText(str); } -QString Client::genUniqueId() +TQString Client::genUniqueId() { - QString s; + TQString s; s.sprintf("a%x", d->id_seed); d->id_seed += 0x10; return s; @@ -555,12 +555,12 @@ Task *Client::rootTask() return d->root; } -QDomDocument *Client::doc() const +TQDomDocument *Client::doc() const { return &d->doc; } -void Client::distribute(const QDomElement &x) +void Client::distribute(const TQDomElement &x) { if(x.hasAttribute("from")) { Jid j(x.attribute("from")); @@ -575,41 +575,41 @@ void Client::distribute(const QDomElement &x) } } -static QDomElement addCorrectNS(const QDomElement &e) +static TQDomElement addCorrectNS(const TQDomElement &e) { uint x; // grab child nodes - /*QDomDocumentFragment frag = e.ownerDocument().createDocumentFragment(); - QDomNodeList nl = e.childNodes(); + /*TQDomDocumentFragment frag = e.ownerDocument().createDocumentFragment(); + TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) frag.appendChild(nl.item(x).cloneNode());*/ // find closest xmlns - QDomNode n = e; + TQDomNode n = e; while(!n.isNull() && !n.toElement().hasAttribute("xmlns")) n = n.parentNode(); - QString ns; + TQString ns; if(n.isNull() || !n.toElement().hasAttribute("xmlns")) ns = "jabber:client"; else ns = n.toElement().attribute("xmlns"); // make a new node - QDomElement i = e.ownerDocument().createElementNS(ns, e.tagName()); + TQDomElement i = e.ownerDocument().createElementNS(ns, e.tagName()); // copy attributes - QDomNamedNodeMap al = e.attributes(); + TQDomNamedNodeMap al = e.attributes(); for(x = 0; x < al.count(); ++x) { - QDomAttr a = al.item(x).toAttr(); + TQDomAttr a = al.item(x).toAttr(); if(a.name() != "xmlns") i.setAttributeNodeNS(a.cloneNode().toAttr()); } // copy children - QDomNodeList nl = e.childNodes(); + TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { - QDomNode n = nl.item(x); + TQDomNode n = nl.item(x); if(n.isElement()) i.appendChild(addCorrectNS(n.toElement())); else @@ -620,40 +620,40 @@ static QDomElement addCorrectNS(const QDomElement &e) return i; } -void Client::send(const QDomElement &x) +void Client::send(const TQDomElement &x) { if(!d->stream) return; - //QString out; - //QTextStream ts(&out, IO_WriteOnly); + //TQString out; + //TQTextStream ts(&out, IO_WriteOnly); //x.save(ts, 0); - //QString out = Stream::xmlToString(x); - //debug(QString("Client: outgoing: [\n%1]\n").arg(out)); + //TQString out = Stream::xmlToString(x); + //debug(TQString("Client: outgoing: [\n%1]\n").arg(out)); //xmlOutgoing(out); - QDomElement e = addCorrectNS(x); + TQDomElement e = addCorrectNS(x); Stanza s = d->stream->createStanza(e); if(s.isNull()) { //printf("bad stanza??\n"); return; } - QString out = s.toString(); - debug(QString("Client: outgoing: [\n%1]\n").arg(out)); + TQString out = s.toString(); + debug(TQString("Client: outgoing: [\n%1]\n").arg(out)); xmlOutgoing(out); //printf("x[%s] x2[%s] s[%s]\n", Stream::xmlToString(x).latin1(), Stream::xmlToString(e).latin1(), s.toString().latin1()); d->stream->write(s); } -void Client::send(const QString &str) +void Client::send(const TQString &str) { if(!d->stream) return; - debug(QString("Client: outgoing: [\n%1]\n").arg(str)); + debug(TQString("Client: outgoing: [\n%1]\n").arg(str)); xmlOutgoing(str); static_cast<ClientStream*>(d->stream)->writeDirect(str); } @@ -673,29 +673,29 @@ const ResourceList & Client::resourceList() const return d->resourceList; } -QString Client::host() const +TQString Client::host() const { return d->host; } -QString Client::user() const +TQString Client::user() const { return d->user; } -QString Client::pass() const +TQString Client::pass() const { return d->pass; } -QString Client::resource() const +TQString Client::resource() const { return d->resource; } Jid Client::jid() const { - QString s; + TQString s; if(!d->user.isEmpty()) s += d->user + '@'; s += d->host; @@ -707,7 +707,7 @@ Jid Client::jid() const return Jid(s); } -void Client::ppSubscription(const Jid &j, const QString &s) +void Client::ppSubscription(const Jid &j, const TQString &s) { subscription(j, s); } @@ -715,17 +715,17 @@ void Client::ppSubscription(const Jid &j, const QString &s) void Client::ppPresence(const Jid &j, const Status &s) { if(s.isAvailable()) - debug(QString("Client: %1 is available.\n").arg(j.full())); + debug(TQString("Client: %1 is available.\n").arg(j.full())); else - debug(QString("Client: %1 is unavailable.\n").arg(j.full())); + debug(TQString("Client: %1 is unavailable.\n").arg(j.full())); - for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { + for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { GroupChat &i = *it; if(i.j.compare(j, false)) { bool us = (i.j.resource() == j.resource() || j.resource().isEmpty()) ? true: false; - debug(QString("for groupchat i=[%1] pres=[%2], [us=%3].\n").arg(i.j.full()).arg(j.full()).arg(us)); + debug(TQString("for groupchat i=[%1] pres=[%2], [us=%3].\n").arg(i.j.full()).arg(j.full()).arg(us)); switch(i.status) { case GroupChat::Connecting: if(us && s.hasError()) { @@ -796,7 +796,7 @@ void Client::updateSelfPresence(const Jid &j, const Status &s) // unavailable? remove the resource if(!s.isAvailable()) { if(found) { - debug(QString("Client: Removing self resource: name=[%1]\n").arg(j.resource())); + debug(TQString("Client: Removing self resource: name=[%1]\n").arg(j.resource())); (*rit).setStatus(s); resourceUnavailable(j, *rit); d->resourceList.remove(rit); @@ -808,12 +808,12 @@ void Client::updateSelfPresence(const Jid &j, const Status &s) if(!found) { r = Resource(j.resource(), s); d->resourceList += r; - debug(QString("Client: Adding self resource: name=[%1]\n").arg(j.resource())); + debug(TQString("Client: Adding self resource: name=[%1]\n").arg(j.resource())); } else { (*rit).setStatus(s); r = *rit; - debug(QString("Client: Updating self resource: name=[%1]\n").arg(j.resource())); + debug(TQString("Client: Updating self resource: name=[%1]\n").arg(j.resource())); } resourceAvailable(j, r); @@ -829,7 +829,7 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s) if(!s.isAvailable()) { if(found) { (*rit).setStatus(s); - debug(QString("Client: Removing resource from [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource())); + debug(TQString("Client: Removing resource from [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource())); resourceUnavailable(j, *rit); i->resourceList().remove(rit); i->setLastUnavailableStatus(s); @@ -841,12 +841,12 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s) if(!found) { r = Resource(j.resource(), s); i->resourceList() += r; - debug(QString("Client: Adding resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource())); + debug(TQString("Client: Adding resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource())); } else { (*rit).setStatus(s); r = *rit; - debug(QString("Client: Updating resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource())); + debug(TQString("Client: Updating resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource())); } resourceAvailable(j, r); @@ -855,10 +855,10 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s) void Client::pmMessage(const Message &m) { - debug(QString("Client: Message from %1\n").arg(m.from().full())); + debug(TQString("Client: Message from %1\n").arg(m.from().full())); if(m.type() == "groupchat") { - for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { + for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { const GroupChat &i = *it; if(!i.j.compare(m.from(), false)) @@ -883,7 +883,7 @@ void Client::rosterRequest() return; JT_Roster *r = new JT_Roster(rootTask()); - connect(r, SIGNAL(finished()), SLOT(slotRosterRequestFinished())); + connect(r, TQT_SIGNAL(finished()), TQT_SLOT(slotRosterRequestFinished())); r->get(); d->roster.flagAllForDelete(); // mod_groups patch r->go(true); @@ -927,7 +927,7 @@ void Client::importRoster(const Roster &r) void Client::importRosterItem(const RosterItem &item) { - QString substr; + TQString substr; switch(item.subscription().type()) { case Subscription::Both: substr = "<-->"; break; @@ -942,10 +942,10 @@ void Client::importRosterItem(const RosterItem &item) substr = "----"; break; } - QString dstr, str; + TQString dstr, str; str.sprintf(" %s %-32s", substr.latin1(), item.jid().full().latin1()); if(!item.name().isEmpty()) - str += QString(" [") + item.name() + "]"; + str += TQString(" [") + item.name() + "]"; str += '\n'; // Remove @@ -986,7 +986,7 @@ void Client::sendMessage(const Message &m) j->go(true); } -void Client::sendSubscription(const Jid &jid, const QString &type) +void Client::sendSubscription(const Jid &jid, const TQString &type) { JT_Presence *j = new JT_Presence(rootTask()); j->sub(jid, type); @@ -1006,12 +1006,12 @@ void Client::setPresence(const Status &s) //r.setStatus(s); } -QString Client::OSName() const +TQString Client::OSName() const { return d->osname; } -QString Client::timeZone() const +TQString Client::timeZone() const { return d->tzname; } @@ -1021,58 +1021,58 @@ int Client::timeZoneOffset() const return d->tzoffset; } -QString Client::clientName() const +TQString Client::clientName() const { return d->clientName; } -QString Client::clientVersion() const +TQString Client::clientVersion() const { return d->clientVersion; } -QString Client::capsNode() const +TQString Client::capsNode() const { return d->capsNode; } -QString Client::capsVersion() const +TQString Client::capsVersion() const { return d->capsVersion; } -QString Client::capsExt() const +TQString Client::capsExt() const { return d->capsExt; } -void Client::setOSName(const QString &name) +void Client::setOSName(const TQString &name) { d->osname = name; } -void Client::setTimeZone(const QString &name, int offset) +void Client::setTimeZone(const TQString &name, int offset) { d->tzname = name; d->tzoffset = offset; } -void Client::setClientName(const QString &s) +void Client::setClientName(const TQString &s) { d->clientName = s; } -void Client::setClientVersion(const QString &s) +void Client::setClientVersion(const TQString &s) { d->clientVersion = s; } -void Client::setCapsNode(const QString &s) +void Client::setCapsNode(const TQString &s) { d->capsNode = s; } -void Client::setCapsVersion(const QString &s) +void Client::setCapsVersion(const TQString &s) { d->capsVersion = s; } @@ -1087,7 +1087,7 @@ void Client::setIdentity(DiscoItem::Identity identity) d->identity = identity; } -void Client::addExtension(const QString& ext, const Features& features) +void Client::addExtension(const TQString& ext, const Features& features) { if (!ext.isEmpty()) { d->extension_features[ext] = features; @@ -1095,7 +1095,7 @@ void Client::addExtension(const QString& ext, const Features& features) } } -void Client::removeExtension(const QString& ext) +void Client::removeExtension(const TQString& ext) { if (d->extension_features.contains(ext)) { d->extension_features.remove(ext); @@ -1103,12 +1103,12 @@ void Client::removeExtension(const QString& ext) } } -QStringList Client::extensions() const +TQStringList Client::extensions() const { return d->extension_features.keys(); } -const Features& Client::extension(const QString& ext) const +const Features& Client::extension(const TQString& ext) const { return d->extension_features[ext]; } @@ -1146,32 +1146,32 @@ class Task::TaskPrivate public: TaskPrivate() {} - QString id; + TQString id; bool success; int statusCode; - QString statusString; + TQString statusString; Client *client; bool insig, deleteme, autoDelete; bool done; }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->client = parent->client(); d->id = client()->genUniqueId(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Client *parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -1191,7 +1191,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Client *Task::client() const @@ -1199,12 +1199,12 @@ Client *Task::client() const return d->client; } -QDomDocument *Task::doc() const +TQDomDocument *Task::doc() const { return client()->doc(); } -QString Task::id() const +TQString Task::id() const { return d->id; } @@ -1219,7 +1219,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -1231,17 +1231,17 @@ void Task::go(bool autoDelete) onGo(); } -bool Task::take(const QDomElement &x) +bool Task::take(const TQDomElement &x) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the xml - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("XMPP::Task")) continue; @@ -1275,16 +1275,16 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } -void Task::send(const QDomElement &x) +void Task::send(const TQDomElement &x) { client()->send(x); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -1294,7 +1294,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(const QDomElement &e) +void Task::setError(const TQDomElement &e) { if(!d->done) { d->success = false; @@ -1303,7 +1303,7 @@ void Task::setError(const QDomElement &e) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -1338,7 +1338,7 @@ void Task::clientDisconnected() void Task::debug(const char *fmt, ...) { char *buf; - QString str; + TQString str; int size = 1024; int r; @@ -1350,7 +1350,7 @@ void Task::debug(const char *fmt, ...) va_end(ap); if(r != -1) - str = QString(buf); + str = TQString(buf); delete [] buf; @@ -1360,12 +1360,12 @@ void Task::debug(const char *fmt, ...) debug(str); } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { - client()->debug(QString("%1: ").arg(className()) + str); + client()->debug(TQString("%1: ").arg(className()) + str); } -bool Task::iqVerify(const QDomElement &x, const Jid &to, const QString &id, const QString &xmlns) +bool Task::iqVerify(const TQDomElement &x, const Jid &to, const TQString &id, const TQString &xmlns) { if(x.tagName() != "iq") return false; @@ -1485,7 +1485,7 @@ void LiveRosterItem::setFlagForDelete(bool b) // LiveRoster //--------------------------------------------------------------------------- LiveRoster::LiveRoster() -:QValueList<LiveRosterItem>() +:TQValueList<LiveRosterItem>() { } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp index 512839c3..f2fcf7c9 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp @@ -20,25 +20,25 @@ #include"im.h" #include "protocol.h" -#include<qmap.h> -#include<qapplication.h> +#include<tqmap.h> +#include<tqapplication.h> #define NS_XML "http://www.w3.org/XML/1998/namespace" -static QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content) +static TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content) { - QDomElement tag = doc->createElement(name); - QDomText text = doc->createTextNode(content); + TQDomElement tag = doc->createElement(name); + TQDomText text = doc->createTextNode(content); tag.appendChild(text); return tag; } -static QString tagContent(const QDomElement &e) +static TQString tagContent(const TQDomElement &e) { // look for some tag content - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomText i = n.toText(); + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomText i = n.toText(); if(i.isNull()) continue; return i.data(); @@ -47,10 +47,10 @@ static QString tagContent(const QDomElement &e) return ""; } -static QDateTime stamp2TS(const QString &ts) +static TQDateTime stamp2TS(const TQString &ts) { if(ts.length() != 17) - return QDateTime(); + return TQDateTime(); int year = ts.mid(0,4).toInt(); int month = ts.mid(4,2).toInt(); @@ -60,22 +60,22 @@ static QDateTime stamp2TS(const QString &ts) int min = ts.mid(12,2).toInt(); int sec = ts.mid(15,2).toInt(); - QDate xd; + TQDate xd; xd.setYMD(year, month, day); if(!xd.isValid()) - return QDateTime(); + return TQDateTime(); - QTime xt; + TQTime xt; xt.setHMS(hour, min, sec); if(!xt.isValid()) - return QDateTime(); + return TQDateTime(); - return QDateTime(xd, xt); + return TQDateTime(xd, xt); } -/*static QString TS2stamp(const QDateTime &d) +/*static TQString TS2stamp(const TQDateTime &d) { - QString str; + TQString str; str.sprintf("%04d%02d%02dT%02d:%02d:%02d", d.date().year(), @@ -97,17 +97,17 @@ namespace XMPP class Url::Private { public: - QString url; - QString desc; + TQString url; + TQString desc; }; //! \brief Construct Url object with a given URL and Description. //! //! This function will construct a Url object. -//! \param QString - url (default: empty string) -//! \param QString - description of url (default: empty string) +//! \param TQString - url (default: empty string) +//! \param TQString - description of url (default: empty string) //! \sa setUrl() setDesc() -Url::Url(const QString &url, const QString &desc) +Url::Url(const TQString &url, const TQString &desc) { d = new Private; d->url = url; @@ -140,7 +140,7 @@ Url::~Url() //! \brief Get url information. //! //! Returns url information. -QString Url::url() const +TQString Url::url() const { return d->url; } @@ -148,7 +148,7 @@ QString Url::url() const //! \brief Get Description information. //! //! Returns desction of the URL. -QString Url::desc() const +TQString Url::desc() const { return d->desc; } @@ -157,7 +157,7 @@ QString Url::desc() const //! //! Set url information. //! \param url - url string (eg: http://psi.affinix.com/) -void Url::setUrl(const QString &url) +void Url::setUrl(const TQString &url) { d->url = url; } @@ -166,7 +166,7 @@ void Url::setUrl(const QString &url) //! //! Set description of the url. //! \param desc - description of url -void Url::setDesc(const QString &desc) +void Url::setDesc(const TQString &desc) { d->desc = desc; } @@ -178,19 +178,19 @@ class Message::Private { public: Jid to, from; - QString id, type, lang; + TQString id, type, lang; StringMap subject, body, xHTMLBody; - QString thread; + TQString thread; Stanza::Error error; // extensions - QDateTime timeStamp; + TQDateTime timeStamp; UrlList urlList; - QValueList<MsgEvent> eventList; - QString eventId; - QString xencrypted, invite; + TQValueList<MsgEvent> eventList; + TQString eventId; + TQString xencrypted, invite; bool spooled, wasEncrypted; }; @@ -247,24 +247,24 @@ Jid Message::from() const return d->from; } -QString Message::id() const +TQString Message::id() const { return d->id; } //! \brief Return type information -QString Message::type() const +TQString Message::type() const { return d->type; } -QString Message::lang() const +TQString Message::lang() const { return d->lang; } //! \brief Return subject information. -QString Message::subject(const QString &lang) const +TQString Message::subject(const TQString &lang) const { return d->subject[lang]; } @@ -275,17 +275,17 @@ QString Message::subject(const QString &lang) const //! it exists. //! \param rich - Returns richtext if true and plain text if false. (default: false) //! \note Richtext is in Qt's richtext format and not in xhtml. -QString Message::body(const QString &lang) const +TQString Message::body(const TQString &lang) const { return d->body[lang]; } -QString Message::xHTMLBody(const QString &lang) const +TQString Message::xHTMLBody(const TQString &lang) const { return d->xHTMLBody[lang]; } -QString Message::thread() const +TQString Message::thread() const { return d->thread; } @@ -310,7 +310,7 @@ void Message::setFrom(const Jid &j) //d->flag = false; } -void Message::setId(const QString &s) +void Message::setId(const TQString &s) { d->id = s; } @@ -318,13 +318,13 @@ void Message::setId(const QString &s) //! \brief Set Type of message //! //! \param type - type of message your going to send -void Message::setType(const QString &s) +void Message::setType(const TQString &s) { d->type = s; //d->flag = false; } -void Message::setLang(const QString &s) +void Message::setLang(const TQString &s) { d->lang = s; } @@ -332,7 +332,7 @@ void Message::setLang(const QString &s) //! \brief Set subject //! //! \param subject - Subject information -void Message::setSubject(const QString &s, const QString &lang) +void Message::setSubject(const TQString &s, const TQString &lang) { d->subject[lang] = s; //d->flag = false; @@ -343,20 +343,20 @@ void Message::setSubject(const QString &s, const QString &lang) //! \param body - body information //! \param rich - set richtext if true and set plaintext if false. //! \note Richtext support will be implemented in the future... Sorry. -void Message::setBody(const QString &s, const QString &lang) +void Message::setBody(const TQString &s, const TQString &lang) { d->body[lang] = s; } -void Message::setXHTMLBody(const QString &s, const QString &lang, const QString &attr) +void Message::setXHTMLBody(const TQString &s, const TQString &lang, const TQString &attr) { //ugly but needed if s is not a node but a list of leaf - QString content = "<body xmlns='" + QString(NS_XHTML) + "' "+attr+" >\n" + s +"\n</body>"; + TQString content = "<body xmlns='" + TQString(NS_XHTML) + "' "+attr+" >\n" + s +"\n</body>"; d->xHTMLBody[lang] = content; } -void Message::setThread(const QString &s) +void Message::setThread(const TQString &s) { d->thread = s; } @@ -366,12 +366,12 @@ void Message::setError(const Stanza::Error &err) d->error = err; } -QDateTime Message::timeStamp() const +TQDateTime Message::timeStamp() const { return d->timeStamp; } -void Message::setTimeStamp(const QDateTime &ts) +void Message::setTimeStamp(const TQDateTime &ts) { d->timeStamp = ts; } @@ -404,12 +404,12 @@ void Message::setUrlList(const UrlList &list) d->urlList = list; } -QString Message::eventId() const +TQString Message::eventId() const { return d->eventId; } -void Message::setEventId(const QString& id) +void Message::setEventId(const TQString& id) { d->eventId = id; } @@ -433,22 +433,22 @@ void Message::addEvent(MsgEvent e) } } -QString Message::xencrypted() const +TQString Message::xencrypted() const { return d->xencrypted; } -void Message::setXEncrypted(const QString &s) +void Message::setXEncrypted(const TQString &s) { d->xencrypted = s; } -QString Message::invite() const +TQString Message::invite() const { return d->invite; } -void Message::setInvite(const QString &s) +void Message::setInvite(const TQString &s) { d->invite = s; } @@ -485,29 +485,29 @@ Stanza Message::toStanza(Stream *stream) const StringMap::ConstIterator it; for(it = d->subject.begin(); it != d->subject.end(); ++it) { - const QString &str = it.data(); + const TQString &str = it.data(); if(!str.isEmpty()) { - QDomElement e = s.createTextElement(s.baseNS(), "subject", str); + TQDomElement e = s.createTextElement(s.baseNS(), "subject", str); if(!it.key().isEmpty()) e.setAttributeNS(NS_XML, "xml:lang", it.key()); s.appendChild(e); } } for(it = d->body.begin(); it != d->body.end(); ++it) { - const QString &str = it.data(); + const TQString &str = it.data(); if(!str.isEmpty()) { - QDomElement e = s.createTextElement(s.baseNS(), "body", str); + TQDomElement e = s.createTextElement(s.baseNS(), "body", str); if(!it.key().isEmpty()) e.setAttributeNS(NS_XML, "xml:lang", it.key()); s.appendChild(e); } } if ( !d->xHTMLBody.isEmpty()) { - QDomElement parent = s.createElement(s.xhtmlImNS(), "html"); + TQDomElement parent = s.createElement(s.xhtmlImNS(), "html"); for(it = d->xHTMLBody.begin(); it != d->xHTMLBody.end(); ++it) { - const QString &str = it.data(); + const TQString &str = it.data(); if(!str.isEmpty()) { - QDomElement child = s.createXHTMLElement(str); + TQDomElement child = s.createXHTMLElement(str); if(!it.key().isEmpty()) child.setAttributeNS(NS_XML, "xml:lang", it.key()); parent.appendChild(child); @@ -520,14 +520,14 @@ Stanza Message::toStanza(Stream *stream) const // timestamp /*if(!d->timeStamp.isNull()) { - QDomElement e = s.createElement("jabber:x:delay", "x"); + TQDomElement e = s.createElement("jabber:x:delay", "x"); e.setAttribute("stamp", TS2stamp(d->timeStamp)); s.appendChild(e); }*/ // urls - for(QValueList<Url>::ConstIterator uit = d->urlList.begin(); uit != d->urlList.end(); ++uit) { - QDomElement x = s.createElement("jabber:x:oob", "x"); + for(TQValueList<Url>::ConstIterator uit = d->urlList.begin(); uit != d->urlList.end(); ++uit) { + TQDomElement x = s.createElement("jabber:x:oob", "x"); x.appendChild(s.createTextElement("jabber:x:oob", "url", (*uit).url())); if(!(*uit).desc().isEmpty()) x.appendChild(s.createTextElement("jabber:x:oob", "desc", (*uit).desc())); @@ -536,7 +536,7 @@ Stanza Message::toStanza(Stream *stream) const // events if (!d->eventList.isEmpty()) { - QDomElement x = s.createElement("jabber:x:event", "x"); + TQDomElement x = s.createElement("jabber:x:event", "x"); if (d->body.isEmpty()) { if (d->eventId.isEmpty()) @@ -548,7 +548,7 @@ Stanza Message::toStanza(Stream *stream) const s.appendChild( s.createElement(NS_CHATSTATES , "active" ) ); bool need_x_event=false; - for(QValueList<MsgEvent>::ConstIterator ev = d->eventList.begin(); ev != d->eventList.end(); ++ev) { + for(TQValueList<MsgEvent>::ConstIterator ev = d->eventList.begin(); ev != d->eventList.end(); ++ev) { switch (*ev) { case OfflineEvent: x.appendChild(s.createElement("jabber:x:event", "offline")); @@ -594,7 +594,7 @@ Stanza Message::toStanza(Stream *stream) const // invite if(!d->invite.isEmpty()) { - QDomElement e = s.createElement("jabber:x:conference", "x"); + TQDomElement e = s.createElement("jabber:x:conference", "x"); e.setAttribute("jid", d->invite); s.appendChild(e); } @@ -615,24 +615,24 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset) d->subject.clear(); d->body.clear(); - d->thread = QString(); + d->thread = TQString(); d->eventList.clear(); - QDomElement root = s.element(); + TQDomElement root = s.element(); - QDomNodeList nl = root.childNodes(); + TQDomNodeList nl = root.childNodes(); uint n; for(n = 0; n < nl.count(); ++n) { - QDomNode i = nl.item(n); + TQDomNode i = nl.item(n); if(i.isElement()) { - QDomElement e = i.toElement(); + TQDomElement e = i.toElement(); if(e.namespaceURI() == s.baseNS()) { if(e.tagName() == "subject") { - QString lang = e.attributeNS(NS_XML, "lang", ""); + TQString lang = e.attributeNS(NS_XML, "lang", ""); d->subject[lang] = e.text(); } else if(e.tagName() == "body") { - QString lang = e.attributeNS(NS_XML, "lang", ""); + TQString lang = e.attributeNS(NS_XML, "lang", ""); d->body[lang] = e.text(); } else if(e.tagName() == "thread") @@ -640,13 +640,13 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset) } else if (e.namespaceURI() == s.xhtmlImNS()) { if (e.tagName() == "html") { - QDomNodeList htmlNL= e.childNodes(); + TQDomNodeList htmlNL= e.childNodes(); for (unsigned int x = 0; x < htmlNL.count(); x++) { - QDomElement i = htmlNL.item(x).toElement(); + TQDomElement i = htmlNL.item(x).toElement(); if (i.tagName() == "body") { - QDomDocument RichText; - QString lang = i.attributeNS(NS_XML, "lang", ""); + TQDomDocument RichText; + TQString lang = i.attributeNS(NS_XML, "lang", ""); RichText.appendChild(i); d-> xHTMLBody[lang] = RichText.toString(); } @@ -690,14 +690,14 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset) d->error = s.error(); // timestamp - QDomElement t = root.elementsByTagNameNS("jabber:x:delay", "x").item(0).toElement(); + TQDomElement t = root.elementsByTagNameNS("jabber:x:delay", "x").item(0).toElement(); if(!t.isNull()) { d->timeStamp = stamp2TS(t.attribute("stamp")); d->timeStamp = d->timeStamp.addSecs(timeZoneOffset * 3600); d->spooled = true; } else { - d->timeStamp = QDateTime::currentDateTime(); + d->timeStamp = TQDateTime::currentDateTime(); d->spooled = false; } @@ -705,7 +705,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset) d->urlList.clear(); nl = root.elementsByTagNameNS("jabber:x:oob", "x"); for(n = 0; n < nl.count(); ++n) { - QDomElement t = nl.item(n).toElement(); + TQDomElement t = nl.item(n).toElement(); Url u; u.setUrl(t.elementsByTagName("url").item(0).toElement().text()); u.setDesc(t.elementsByTagName("desc").item(0).toElement().text()); @@ -717,7 +717,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset) if (nl.count()) { nl = nl.item(0).childNodes(); for(n = 0; n < nl.count(); ++n) { - QString evtag = nl.item(n).toElement().tagName(); + TQString evtag = nl.item(n).toElement().tagName(); if (evtag == "id") { d->eventId = nl.item(n).toElement().text(); } @@ -739,14 +739,14 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset) if(!t.isNull()) d->xencrypted = t.text(); else - d->xencrypted = QString(); + d->xencrypted = TQString(); // invite t = root.elementsByTagNameNS("jabber:x:conference", "x").item(0).toElement(); if(!t.isNull()) d->invite = t.attribute("jid"); else - d->invite = QString(); + d->invite = TQString(); return true; } @@ -764,7 +764,7 @@ int Subscription::type() const return value; } -QString Subscription::toString() const +TQString Subscription::toString() const { switch(value) { case Remove: @@ -781,7 +781,7 @@ QString Subscription::toString() const } } -bool Subscription::fromString(const QString &s) +bool Subscription::fromString(const TQString &s) { if(s == "remove") value = Remove; @@ -803,13 +803,13 @@ bool Subscription::fromString(const QString &s) //--------------------------------------------------------------------------- // Status //--------------------------------------------------------------------------- -Status::Status(const QString &show, const QString &status, int priority, bool available) +Status::Status(const TQString &show, const TQString &status, int priority, bool available) { v_isAvailable = available; v_show = show; v_status = status; v_priority = priority; - v_timeStamp = QDateTime::currentDateTime(); + v_timeStamp = TQDateTime::currentDateTime(); v_isInvisible = false; ecode = -1; } @@ -823,7 +823,7 @@ bool Status::hasError() const return (ecode != -1); } -void Status::setError(int code, const QString &str) +void Status::setError(int code, const TQString &str) { ecode = code; estr = str; @@ -844,47 +844,47 @@ void Status::setPriority(int x) v_priority = x; } -void Status::setShow(const QString & _show) +void Status::setShow(const TQString & _show) { v_show = _show; } -void Status::setStatus(const QString & _status) +void Status::setStatus(const TQString & _status) { v_status = _status; } -void Status::setTimeStamp(const QDateTime & _timestamp) +void Status::setTimeStamp(const TQDateTime & _timestamp) { v_timeStamp = _timestamp; } -void Status::setKeyID(const QString &key) +void Status::setKeyID(const TQString &key) { v_key = key; } -void Status::setXSigned(const QString &s) +void Status::setXSigned(const TQString &s) { v_xsigned = s; } -void Status::setSongTitle(const QString & _songtitle) +void Status::setSongTitle(const TQString & _songtitle) { v_songTitle = _songtitle; } -void Status::setCapsNode(const QString & _capsNode) +void Status::setCapsNode(const TQString & _capsNode) { v_capsNode = _capsNode; } -void Status::setCapsVersion(const QString & _capsVersion) +void Status::setCapsVersion(const TQString & _capsVersion) { v_capsVersion = _capsVersion; } -void Status::setCapsExt(const QString & _capsExt) +void Status::setCapsExt(const TQString & _capsExt) { v_capsExt = _capsExt; } @@ -912,46 +912,46 @@ int Status::priority() const return v_priority; } -const QString & Status::show() const +const TQString & Status::show() const { return v_show; } -const QString & Status::status() const +const TQString & Status::status() const { return v_status; } -QDateTime Status::timeStamp() const +TQDateTime Status::timeStamp() const { return v_timeStamp; } -const QString & Status::keyID() const +const TQString & Status::keyID() const { return v_key; } -const QString & Status::xsigned() const +const TQString & Status::xsigned() const { return v_xsigned; } -const QString & Status::songTitle() const +const TQString & Status::songTitle() const { return v_songTitle; } -const QString & Status::capsNode() const +const TQString & Status::capsNode() const { return v_capsNode; } -const QString & Status::capsVersion() const +const TQString & Status::capsVersion() const { return v_capsVersion; } -const QString & Status::capsExt() const +const TQString & Status::capsExt() const { return v_capsExt; } @@ -961,7 +961,7 @@ int Status::errorCode() const return ecode; } -const QString & Status::errorString() const +const TQString & Status::errorString() const { return estr; } @@ -970,7 +970,7 @@ const QString & Status::errorString() const //--------------------------------------------------------------------------- // Resource //--------------------------------------------------------------------------- -Resource::Resource(const QString &name, const Status &stat) +Resource::Resource(const TQString &name, const Status &stat) { v_name = name; v_status = stat; @@ -980,7 +980,7 @@ Resource::~Resource() { } -const QString & Resource::name() const +const TQString & Resource::name() const { return v_name; } @@ -995,7 +995,7 @@ const Status & Resource::status() const return v_status; } -void Resource::setName(const QString & _name) +void Resource::setName(const TQString & _name) { v_name = _name; } @@ -1010,7 +1010,7 @@ void Resource::setStatus(const Status & _status) // ResourceList //--------------------------------------------------------------------------- ResourceList::ResourceList() -:QValueList<Resource>() +:TQValueList<Resource>() { } @@ -1018,7 +1018,7 @@ ResourceList::~ResourceList() { } -ResourceList::Iterator ResourceList::find(const QString & _find) +ResourceList::Iterator ResourceList::find(const TQString & _find) { for(ResourceList::Iterator it = begin(); it != end(); ++it) { if((*it).name() == _find) @@ -1040,7 +1040,7 @@ ResourceList::Iterator ResourceList::priority() return highest; } -ResourceList::ConstIterator ResourceList::find(const QString & _find) const +ResourceList::ConstIterator ResourceList::find(const TQString & _find) const { for(ResourceList::ConstIterator it = begin(); it != end(); ++it) { if((*it).name() == _find) @@ -1080,12 +1080,12 @@ const Jid & RosterItem::jid() const return v_jid; } -const QString & RosterItem::name() const +const TQString & RosterItem::name() const { return v_name; } -const QStringList & RosterItem::groups() const +const TQStringList & RosterItem::groups() const { return v_groups; } @@ -1095,7 +1095,7 @@ const Subscription & RosterItem::subscription() const return v_subscription; } -const QString & RosterItem::ask() const +const TQString & RosterItem::ask() const { return v_ask; } @@ -1105,9 +1105,9 @@ bool RosterItem::isPush() const return v_push; } -bool RosterItem::inGroup(const QString &g) const +bool RosterItem::inGroup(const TQString &g) const { - for(QStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) { + for(TQStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) { if(*it == g) return true; } @@ -1119,12 +1119,12 @@ void RosterItem::setJid(const Jid &_jid) v_jid = _jid; } -void RosterItem::setName(const QString &_name) +void RosterItem::setName(const TQString &_name) { v_name = _name; } -void RosterItem::setGroups(const QStringList &_groups) +void RosterItem::setGroups(const TQStringList &_groups) { v_groups = _groups; } @@ -1134,7 +1134,7 @@ void RosterItem::setSubscription(const Subscription &type) v_subscription = type; } -void RosterItem::setAsk(const QString &_ask) +void RosterItem::setAsk(const TQString &_ask) { v_ask = _ask; } @@ -1144,7 +1144,7 @@ void RosterItem::setIsPush(bool b) v_push = b; } -bool RosterItem::addGroup(const QString &g) +bool RosterItem::addGroup(const TQString &g) { if(inGroup(g)) return false; @@ -1153,9 +1153,9 @@ bool RosterItem::addGroup(const QString &g) return true; } -bool RosterItem::removeGroup(const QString &g) +bool RosterItem::removeGroup(const TQString &g) { - for(QStringList::Iterator it = v_groups.begin(); it != v_groups.end(); ++it) { + for(TQStringList::Iterator it = v_groups.begin(); it != v_groups.end(); ++it) { if(*it == g) { v_groups.remove(it); return true; @@ -1165,40 +1165,40 @@ bool RosterItem::removeGroup(const QString &g) return false; } -QDomElement RosterItem::toXml(QDomDocument *doc) const +TQDomElement RosterItem::toXml(TQDomDocument *doc) const { - QDomElement item = doc->createElement("item"); + TQDomElement item = doc->createElement("item"); item.setAttribute("jid", v_jid.full()); item.setAttribute("name", v_name); item.setAttribute("subscription", v_subscription.toString()); if(!v_ask.isEmpty()) item.setAttribute("ask", v_ask); - for(QStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) + for(TQStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) item.appendChild(textTag(doc, "group", *it)); return item; } -bool RosterItem::fromXml(const QDomElement &item) +bool RosterItem::fromXml(const TQDomElement &item) { if(item.tagName() != "item") return false; Jid j(item.attribute("jid")); if(!j.isValid()) return false; - QString na = item.attribute("name"); + TQString na = item.attribute("name"); Subscription s; if(!s.fromString(item.attribute("subscription")) ) return false; - QStringList g; - for(QDomNode n = item.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + TQStringList g; + for(TQDomNode n = item.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; if(i.tagName() == "group") g += tagContent(i); } - QString a = item.attribute("ask"); + TQString a = item.attribute("ask"); v_jid = j; v_name = na; @@ -1214,7 +1214,7 @@ bool RosterItem::fromXml(const QDomElement &item) // Roster //--------------------------------------------------------------------------- Roster::Roster() -:QValueList<RosterItem>() +:TQValueList<RosterItem>() { } @@ -1246,7 +1246,7 @@ Roster::ConstIterator Roster::find(const Jid &j) const //--------------------------------------------------------------------------- // FormField //--------------------------------------------------------------------------- -FormField::FormField(const QString &type, const QString &value) +FormField::FormField(const TQString &type, const TQString &value) { v_type = misc; if(!type.isEmpty()) { @@ -1266,29 +1266,29 @@ int FormField::type() const return v_type; } -QString FormField::realName() const +TQString FormField::realName() const { return typeToTagName(v_type); } -QString FormField::fieldName() const +TQString FormField::fieldName() const { switch(v_type) { - case username: return QObject::tr("Username"); - case nick: return QObject::tr("Nickname"); - case password: return QObject::tr("Password"); - case name: return QObject::tr("Name"); - case first: return QObject::tr("First Name"); - case last: return QObject::tr("Last Name"); - case email: return QObject::tr("E-mail"); - case address: return QObject::tr("Address"); - case city: return QObject::tr("City"); - case state: return QObject::tr("State"); - case zip: return QObject::tr("Zipcode"); - case phone: return QObject::tr("Phone"); - case url: return QObject::tr("URL"); - case date: return QObject::tr("Date"); - case misc: return QObject::tr("Misc"); + case username: return TQObject::tr("Username"); + case nick: return TQObject::tr("Nickname"); + case password: return TQObject::tr("Password"); + case name: return TQObject::tr("Name"); + case first: return TQObject::tr("First Name"); + case last: return TQObject::tr("Last Name"); + case email: return TQObject::tr("E-mail"); + case address: return TQObject::tr("Address"); + case city: return TQObject::tr("City"); + case state: return TQObject::tr("State"); + case zip: return TQObject::tr("Zipcode"); + case phone: return TQObject::tr("Phone"); + case url: return TQObject::tr("URL"); + case date: return TQObject::tr("Date"); + case misc: return TQObject::tr("Misc"); default: return ""; }; } @@ -1298,7 +1298,7 @@ bool FormField::isSecret() const return (type() == password); } -const QString & FormField::value() const +const TQString & FormField::value() const { return v_value; } @@ -1308,7 +1308,7 @@ void FormField::setType(int x) v_type = x; } -bool FormField::setType(const QString &in) +bool FormField::setType(const TQString &in) { int x = tagNameToType(in); if(x == -1) @@ -1318,12 +1318,12 @@ bool FormField::setType(const QString &in) return true; } -void FormField::setValue(const QString &in) +void FormField::setValue(const TQString &in) { v_value = in; } -int FormField::tagNameToType(const QString &in) const +int FormField::tagNameToType(const TQString &in) const { if(!in.compare("username")) return username; if(!in.compare("nick")) return nick; @@ -1344,7 +1344,7 @@ int FormField::tagNameToType(const QString &in) const return -1; } -QString FormField::typeToTagName(int type) const +TQString FormField::typeToTagName(int type) const { switch(type) { case username: return "username"; @@ -1371,7 +1371,7 @@ QString FormField::typeToTagName(int type) const // Form //--------------------------------------------------------------------------- Form::Form(const Jid &j) -:QValueList<FormField>() +:TQValueList<FormField>() { setJid(j); } @@ -1385,12 +1385,12 @@ Jid Form::jid() const return v_jid; } -QString Form::instructions() const +TQString Form::instructions() const { return v_instructions; } -QString Form::key() const +TQString Form::key() const { return v_key; } @@ -1400,12 +1400,12 @@ void Form::setJid(const Jid &j) v_jid = j; } -void Form::setInstructions(const QString &s) +void Form::setInstructions(const TQString &s) { v_instructions = s; } -void Form::setKey(const QString &s) +void Form::setKey(const TQString &s) { v_key = s; } @@ -1428,22 +1428,22 @@ const Jid & SearchResult::jid() const return v_jid; } -const QString & SearchResult::nick() const +const TQString & SearchResult::nick() const { return v_nick; } -const QString & SearchResult::first() const +const TQString & SearchResult::first() const { return v_first; } -const QString & SearchResult::last() const +const TQString & SearchResult::last() const { return v_last; } -const QString & SearchResult::email() const +const TQString & SearchResult::email() const { return v_email; } @@ -1453,22 +1453,22 @@ void SearchResult::setJid(const Jid &jid) v_jid = jid; } -void SearchResult::setNick(const QString &nick) +void SearchResult::setNick(const TQString &nick) { v_nick = nick; } -void SearchResult::setFirst(const QString &first) +void SearchResult::setFirst(const TQString &first) { v_first = first; } -void SearchResult::setLast(const QString &last) +void SearchResult::setLast(const TQString &last) { v_last = last; } -void SearchResult::setEmail(const QString &email) +void SearchResult::setEmail(const TQString &email) { v_email = email; } @@ -1481,14 +1481,14 @@ Features::Features() { } -Features::Features(const QStringList &l) +Features::Features(const TQStringList &l) { setList(l); } -Features::Features(const QString &str) +Features::Features(const TQString &str) { - QStringList l; + TQStringList l; l << str; setList(l); @@ -1498,19 +1498,19 @@ Features::~Features() { } -QStringList Features::list() const +TQStringList Features::list() const { return _list; } -void Features::setList(const QStringList &l) +void Features::setList(const TQStringList &l) { _list = l; } -bool Features::test(const QStringList &ns) const +bool Features::test(const TQStringList &ns) const { - QStringList::ConstIterator it = ns.begin(); + TQStringList::ConstIterator it = ns.begin(); for ( ; it != ns.end(); ++it) if ( _list.find( *it ) != _list.end() ) return true; @@ -1521,7 +1521,7 @@ bool Features::test(const QStringList &ns) const #define FID_REGISTER "jabber:iq:register" bool Features::canRegister() const { - QStringList ns; + TQStringList ns; ns << FID_REGISTER; return test(ns); @@ -1530,7 +1530,7 @@ bool Features::canRegister() const #define FID_SEARCH "jabber:iq:search" bool Features::canSearch() const { - QStringList ns; + TQStringList ns; ns << FID_SEARCH; return test(ns); @@ -1539,7 +1539,7 @@ bool Features::canSearch() const #define FID_XHTML "http://jabber.org/protocol/xhtml-im" bool Features::canXHTML() const { - QStringList ns; + TQStringList ns; ns << FID_XHTML; @@ -1549,7 +1549,7 @@ bool Features::canXHTML() const #define FID_GROUPCHAT "jabber:iq:conference" bool Features::canGroupchat() const { - QStringList ns; + TQStringList ns; ns << "http://jabber.org/protocol/muc"; ns << FID_GROUPCHAT; @@ -1559,7 +1559,7 @@ bool Features::canGroupchat() const #define FID_VOICE "http://www.google.com/xmpp/protocol/voice/v1" bool Features::canVoice() const { - QStringList ns; + TQStringList ns; ns << FID_VOICE; return test(ns); @@ -1568,7 +1568,7 @@ bool Features::canVoice() const #define FID_GATEWAY "jabber:iq:gateway" bool Features::isGateway() const { - QStringList ns; + TQStringList ns; ns << FID_GATEWAY; return test(ns); @@ -1577,7 +1577,7 @@ bool Features::isGateway() const #define FID_DISCO "http://jabber.org/protocol/disco" bool Features::canDisco() const { - QStringList ns; + TQStringList ns; ns << FID_DISCO; ns << "http://jabber.org/protocol/disco#info"; ns << "http://jabber.org/protocol/disco#items"; @@ -1588,7 +1588,7 @@ bool Features::canDisco() const #define FID_VCARD "vcard-temp" bool Features::haveVCard() const { - QStringList ns; + TQStringList ns; ns << FID_VCARD; return test(ns); @@ -1602,7 +1602,7 @@ class Features::FeatureName : public QObject Q_OBJECT public: FeatureName() - : QObject(qApp) + : TQObject(qApp) { id2s[FID_Invalid] = tr("ERROR: Incorrect usage of Features class"); id2s[FID_None] = tr("None"); @@ -1617,7 +1617,7 @@ public: id2s[FID_Add] = tr("Add to roster"); // compute reverse map - //QMap<QString, long>::Iterator it = id2s.begin(); + //TQMap<TQString, long>::Iterator it = id2s.begin(); //for ( ; it != id2s.end(); ++it) // s2id[it.data()] = it.key(); @@ -1632,9 +1632,9 @@ public: id2f[FID_Add] = FID_ADD; } - //QMap<QString, long> s2id; - QMap<long, QString> id2s; - QMap<long, QString> id2f; + //TQMap<TQString, long> s2id; + TQMap<long, TQString> id2s; + TQMap<long, TQString> id2f; }; static Features::FeatureName *featureName = 0; @@ -1661,13 +1661,13 @@ long Features::id() const return FID_None; } -long Features::id(const QString &feature) +long Features::id(const TQString &feature) { Features f(feature); return f.id(); } -QString Features::feature(long id) +TQString Features::feature(long id) { if ( !featureName ) featureName = new FeatureName(); @@ -1675,7 +1675,7 @@ QString Features::feature(long id) return featureName->id2f[id]; } -QString Features::name(long id) +TQString Features::name(long id) { if ( !featureName ) featureName = new FeatureName(); @@ -1683,12 +1683,12 @@ QString Features::name(long id) return featureName->id2s[id]; } -QString Features::name() const +TQString Features::name() const { return name(id()); } -QString Features::name(const QString &feature) +TQString Features::name(const TQString &feature) { Features f(feature); return f.name(f.id()); @@ -1706,8 +1706,8 @@ public: } Jid jid; - QString name; - QString node; + TQString name; + TQString node; Action action; Features features; @@ -1789,22 +1789,22 @@ void DiscoItem::setJid(const Jid &j) d->jid = j; } -const QString &DiscoItem::name() const +const TQString &DiscoItem::name() const { return d->name; } -void DiscoItem::setName(const QString &n) +void DiscoItem::setName(const TQString &n) { d->name = n; } -const QString &DiscoItem::node() const +const TQString &DiscoItem::node() const { return d->node; } -void DiscoItem::setNode(const QString &n) +void DiscoItem::setNode(const TQString &n) { d->node = n; } @@ -1843,7 +1843,7 @@ void DiscoItem::setIdentities(const Identities &i) } -DiscoItem::Action DiscoItem::string2action(QString s) +DiscoItem::Action DiscoItem::string2action(TQString s) { Action a; @@ -1857,16 +1857,16 @@ DiscoItem::Action DiscoItem::string2action(QString s) return a; } -QString DiscoItem::action2string(Action a) +TQString DiscoItem::action2string(Action a) { - QString s; + TQString s; if ( a == Update ) s = "update"; else if ( a == Remove ) s = "remove"; else - s = QString::null; + s = TQString::null; return s; } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp index 4c937dd0..95f61e69 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp @@ -27,23 +27,23 @@ //#include"xmpp_types.h" #include"xmpp_vcard.h" -#include<qregexp.h> -#include<qvaluelist.h> +#include<tqregexp.h> +#include<tqvaluelist.h> using namespace XMPP; -static QString lineEncode(QString str) +static TQString lineEncode(TQString str) { - str.replace(QRegExp("\\\\"), "\\\\"); // backslash to double-backslash - str.replace(QRegExp("\\|"), "\\p"); // pipe to \p - str.replace(QRegExp("\n"), "\\n"); // newline to \n + str.replace(TQRegExp("\\\\"), "\\\\"); // backslash to double-backslash + str.replace(TQRegExp("\\|"), "\\p"); // pipe to \p + str.replace(TQRegExp("\n"), "\\n"); // newline to \n return str; } -static QString lineDecode(const QString &str) +static TQString lineDecode(const TQString &str) { - QString ret; + TQString ret; for(unsigned int n = 0; n < str.length(); ++n) { if(str.at(n) == '\\') { @@ -66,12 +66,12 @@ static QString lineDecode(const QString &str) return ret; } -static Roster xmlReadRoster(const QDomElement &q, bool push) +static Roster xmlReadRoster(const TQDomElement &q, bool push) { Roster r; - for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; @@ -115,24 +115,24 @@ JT_Register::~JT_Register() delete d; } -void JT_Register::reg(const QString &user, const QString &pass) +void JT_Register::reg(const TQString &user, const TQString &pass) { d->type = 0; to = client()->host(); iq = createIQ(doc(), "set", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:register"); iq.appendChild(query); query.appendChild(textTag(doc(), "username", user)); query.appendChild(textTag(doc(), "password", pass)); } -void JT_Register::changepw(const QString &pass) +void JT_Register::changepw(const TQString &pass) { d->type = 1; to = client()->host(); iq = createIQ(doc(), "set", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:register"); iq.appendChild(query); query.appendChild(textTag(doc(), "username", client()->user())); @@ -144,7 +144,7 @@ void JT_Register::unreg(const Jid &j) d->type = 2; to = j.isEmpty() ? client()->host() : j.full(); iq = createIQ(doc(), "set", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:register"); iq.appendChild(query); @@ -160,7 +160,7 @@ void JT_Register::getForm(const Jid &j) d->type = 3; to = j; iq = createIQ(doc(), "get", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:register"); iq.appendChild(query); } @@ -170,7 +170,7 @@ void JT_Register::setForm(const Form &form) d->type = 4; to = form.jid(); iq = createIQ(doc(), "set", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:register"); iq.appendChild(query); @@ -195,7 +195,7 @@ void JT_Register::onGo() send(iq); } -bool JT_Register::take(const QDomElement &x) +bool JT_Register::take(const TQDomElement &x) { if(!iqVerify(x, to, id())) return false; @@ -206,9 +206,9 @@ bool JT_Register::take(const QDomElement &x) d->form.clear(); d->form.setJid(from); - QDomElement q = queryTag(x); - for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + TQDomElement q = queryTag(x); + for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; @@ -270,7 +270,7 @@ void JT_UnRegister::onGo() d->jt_reg = new JT_Register(this); d->jt_reg->getForm(d->j); - connect(d->jt_reg, SIGNAL(finished()), SLOT(getFormFinished())); + connect(d->jt_reg, TQT_SIGNAL(finished()), TQT_SLOT(getFormFinished())); d->jt_reg->go(false); } @@ -279,7 +279,7 @@ void JT_UnRegister::getFormFinished() disconnect(d->jt_reg, 0, this, 0); d->jt_reg->unreg(d->j); - connect(d->jt_reg, SIGNAL(finished()), SLOT(unregFinished())); + connect(d->jt_reg, TQT_SIGNAL(finished()), TQT_SLOT(unregFinished())); d->jt_reg->go(false); } @@ -303,7 +303,7 @@ public: Private() {} Roster roster; - QValueList<QDomElement> itemList; + TQValueList<TQDomElement> itemList; }; JT_Roster::JT_Roster(Task *parent) @@ -323,20 +323,20 @@ void JT_Roster::get() type = 0; //to = client()->host(); iq = createIQ(doc(), "get", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:roster"); iq.appendChild(query); } -void JT_Roster::set(const Jid &jid, const QString &name, const QStringList &groups) +void JT_Roster::set(const Jid &jid, const TQString &name, const TQStringList &groups) { type = 1; //to = client()->host(); - QDomElement item = doc()->createElement("item"); + TQDomElement item = doc()->createElement("item"); item.setAttribute("jid", jid.full()); if(!name.isEmpty()) item.setAttribute("name", name); - for(QStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it) + for(TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it) item.appendChild(textTag(doc(), "group", *it)); d->itemList += item; } @@ -345,7 +345,7 @@ void JT_Roster::remove(const Jid &jid) { type = 1; //to = client()->host(); - QDomElement item = doc()->createElement("item"); + TQDomElement item = doc()->createElement("item"); item.setAttribute("jid", jid.full()); item.setAttribute("subscription", "remove"); d->itemList += item; @@ -358,10 +358,10 @@ void JT_Roster::onGo() else if(type == 1) { //to = client()->host(); iq = createIQ(doc(), "set", to.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:roster"); iq.appendChild(query); - for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it) + for(TQValueList<TQDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it) query.appendChild(*it); send(iq); } @@ -372,25 +372,25 @@ const Roster & JT_Roster::roster() const return d->roster; } -QString JT_Roster::toString() const +TQString JT_Roster::toString() const { if(type != 1) return ""; - QDomElement i = doc()->createElement("request"); + TQDomElement i = doc()->createElement("request"); i.setAttribute("type", "JT_Roster"); - for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it) + for(TQValueList<TQDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it) i.appendChild(*it); return lineEncode(Stream::xmlToString(i)); return ""; } -bool JT_Roster::fromString(const QString &str) +bool JT_Roster::fromString(const TQString &str) { - QDomDocument *dd = new QDomDocument; + TQDomDocument *dd = new QDomDocument; if(!dd->setContent(lineDecode(str).utf8())) return false; - QDomElement e = doc()->importNode(dd->documentElement(), true).toElement(); + TQDomElement e = doc()->importNode(dd->documentElement(), true).toElement(); delete dd; if(e.tagName() != "request" || e.attribute("type") != "JT_Roster") @@ -398,8 +398,8 @@ bool JT_Roster::fromString(const QString &str) type = 1; d->itemList.clear(); - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; d->itemList += i; @@ -408,7 +408,7 @@ bool JT_Roster::fromString(const QString &str) return true; } -bool JT_Roster::take(const QDomElement &x) +bool JT_Roster::take(const TQDomElement &x) { if(!iqVerify(x, client()->host(), id())) return false; @@ -416,7 +416,7 @@ bool JT_Roster::take(const QDomElement &x) // get if(type == 0) { if(x.attribute("type") == "result") { - QDomElement q = queryTag(x); + TQDomElement q = queryTag(x); d->roster = xmlReadRoster(q, false); setSuccess(); } @@ -457,7 +457,7 @@ JT_PushRoster::~JT_PushRoster() { } -bool JT_PushRoster::take(const QDomElement &e) +bool JT_PushRoster::take(const TQDomElement &e) { // must be an iq-set tag if(e.tagName() != "iq" || e.attribute("type") != "set") @@ -504,21 +504,21 @@ void JT_Presence::pres(const Status &s) if(!s.status().isEmpty()) tag.appendChild(textTag(doc(), "status", s.status())); - tag.appendChild( textTag(doc(), "priority", QString("%1").arg(s.priority()) ) ); + tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) ); if(!s.keyID().isEmpty()) { - QDomElement x = textTag(doc(), "x", s.keyID()); + TQDomElement x = textTag(doc(), "x", s.keyID()); x.setAttribute("xmlns", "http://jabber.org/protocol/e2e"); tag.appendChild(x); } if(!s.xsigned().isEmpty()) { - QDomElement x = textTag(doc(), "x", s.xsigned()); + TQDomElement x = textTag(doc(), "x", s.xsigned()); x.setAttribute("xmlns", "jabber:x:signed"); tag.appendChild(x); } if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) { - QDomElement c = doc()->createElement("c"); + TQDomElement c = doc()->createElement("c"); c.setAttribute("xmlns","http://jabber.org/protocol/caps"); c.setAttribute("node",s.capsNode()); c.setAttribute("ver",s.capsVersion()); @@ -535,7 +535,7 @@ void JT_Presence::pres(const Jid &to, const Status &s) tag.setAttribute("to", to.full()); } -void JT_Presence::sub(const Jid &to, const QString &subType) +void JT_Presence::sub(const Jid &to, const TQString &subType) { type = 1; @@ -563,7 +563,7 @@ JT_PushPresence::~JT_PushPresence() { } -bool JT_PushPresence::take(const QDomElement &e) +bool JT_PushPresence::take(const TQDomElement &e) { if(e.tagName() != "presence") return false; @@ -572,12 +572,12 @@ bool JT_PushPresence::take(const QDomElement &e) Status p; if(e.hasAttribute("type")) { - QString type = e.attribute("type"); + TQString type = e.attribute("type"); if(type == "unavailable") { p.setIsAvailable(false); } else if(type == "error") { - QString str = ""; + TQString str = ""; int code = 0; getErrorFromElement(e, &code, &str); p.setError(code, str); @@ -588,7 +588,7 @@ bool JT_PushPresence::take(const QDomElement &e) } } - QDomElement tag; + TQDomElement tag; bool found; tag = findSubTag(e, "status", &found); @@ -601,23 +601,23 @@ bool JT_PushPresence::take(const QDomElement &e) if(found) p.setPriority(tagContent(tag).toInt()); - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; if(i.tagName() == "x" && i.attribute("xmlns") == "jabber:x:delay") { if(i.hasAttribute("stamp")) { - QDateTime dt; + TQDateTime dt; if(stamp2TS(i.attribute("stamp"), &dt)) dt = dt.addSecs(client()->timeZoneOffset() * 3600); p.setTimeStamp(dt); } } else if(i.tagName() == "x" && i.attribute("xmlns") == "gabber:x:music:info") { - QDomElement t; + TQDomElement t; bool found; - QString title, state; + TQString title, state; t = findSubTag(i, "title", &found); if(found) @@ -651,17 +651,17 @@ bool JT_PushPresence::take(const QDomElement &e) //---------------------------------------------------------------------------- // JT_Message //---------------------------------------------------------------------------- -static QDomElement oldStyleNS(const QDomElement &e) +static TQDomElement oldStyleNS(const TQDomElement &e) { // find closest parent with a namespace - QDomNode par = e.parentNode(); + TQDomNode par = e.parentNode(); while(!par.isNull() && par.namespaceURI().isNull()) par = par.parentNode(); bool noShowNS = false; if(!par.isNull() && par.namespaceURI() == e.namespaceURI()) noShowNS = true; - QDomElement i; + TQDomElement i; uint x; //if(noShowNS) i = e.ownerDocument().createElement(e.tagName()); @@ -669,7 +669,7 @@ static QDomElement oldStyleNS(const QDomElement &e) // i = e.ownerDocument().createElementNS(e.namespaceURI(), e.tagName()); // copy attributes - QDomNamedNodeMap al = e.attributes(); + TQDomNamedNodeMap al = e.attributes(); for(x = 0; x < al.count(); ++x) i.setAttributeNode(al.item(x).cloneNode().toAttr()); @@ -677,9 +677,9 @@ static QDomElement oldStyleNS(const QDomElement &e) i.setAttribute("xmlns", e.namespaceURI()); // copy children - QDomNodeList nl = e.childNodes(); + TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { - QDomNode n = nl.item(x); + TQDomNode n = nl.item(x); if(n.isElement()) i.appendChild(oldStyleNS(n.toElement())); else @@ -702,7 +702,7 @@ JT_Message::~JT_Message() void JT_Message::onGo() { Stanza s = m.toStanza(&(client()->stream())); - QDomElement e = oldStyleNS(s.element()); + TQDomElement e = oldStyleNS(s.element()); send(e); setSuccess(); } @@ -711,41 +711,41 @@ void JT_Message::onGo() //---------------------------------------------------------------------------- // JT_PushMessage //---------------------------------------------------------------------------- -static QDomElement addCorrectNS(const QDomElement &e) +static TQDomElement addCorrectNS(const TQDomElement &e) { uint x; // grab child nodes - /*QDomDocumentFragment frag = e.ownerDocument().createDocumentFragment(); - QDomNodeList nl = e.childNodes(); + /*TQDomDocumentFragment frag = e.ownerDocument().createDocumentFragment(); + TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) frag.appendChild(nl.item(x).cloneNode());*/ // find closest xmlns - QDomNode n = e; + TQDomNode n = e; while(!n.isNull() && !n.toElement().hasAttribute("xmlns")) n = n.parentNode(); - QString ns; + TQString ns; if(n.isNull() || !n.toElement().hasAttribute("xmlns")) ns = "jabber:client"; else ns = n.toElement().attribute("xmlns"); // make a new node - QDomElement i = e.ownerDocument().createElementNS(ns, e.tagName()); + TQDomElement i = e.ownerDocument().createElementNS(ns, e.tagName()); // copy attributes - QDomNamedNodeMap al = e.attributes(); + TQDomNamedNodeMap al = e.attributes(); for(x = 0; x < al.count(); ++x) { - QDomAttr a = al.item(x).toAttr(); + TQDomAttr a = al.item(x).toAttr(); if(a.name() != "xmlns") i.setAttributeNodeNS(al.item(x).cloneNode().toAttr()); } // copy children - QDomNodeList nl = e.childNodes(); + TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { - QDomNode n = nl.item(x); + TQDomNode n = nl.item(x); if(n.isElement()) i.appendChild(addCorrectNS(n.toElement())); else @@ -765,7 +765,7 @@ JT_PushMessage::~JT_PushMessage() { } -bool JT_PushMessage::take(const QDomElement &e) +bool JT_PushMessage::take(const TQDomElement &e) { if(e.tagName() != "message") return false; @@ -796,7 +796,7 @@ public: Private() {} int seconds; - QString message; + TQString message; }; JT_GetLastActivity::JT_GetLastActivity(Task *parent) @@ -814,7 +814,7 @@ void JT_GetLastActivity::get(const Jid &j) { jid = j; iq = createIQ(doc(), "get", jid.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:last"); iq.appendChild(query); } @@ -824,7 +824,7 @@ int JT_GetLastActivity::seconds() const return d->seconds; } -const QString &JT_GetLastActivity::message() const +const TQString &JT_GetLastActivity::message() const { return d->message; } @@ -834,13 +834,13 @@ void JT_GetLastActivity::onGo() send(iq); } -bool JT_GetLastActivity::take(const QDomElement &x) +bool JT_GetLastActivity::take(const TQDomElement &x) { if(!iqVerify(x, jid, id())) return false; if(x.attribute("type") == "result") { - QDomElement q = queryTag(x); + TQDomElement q = queryTag(x); d->message = q.text(); bool ok; @@ -869,7 +869,7 @@ void JT_GetServices::get(const Jid &j) jid = j; iq = createIQ(doc(), "get", jid.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:agents"); iq.appendChild(query); } @@ -884,17 +884,17 @@ void JT_GetServices::onGo() send(iq); } -bool JT_GetServices::take(const QDomElement &x) +bool JT_GetServices::take(const TQDomElement &x) { if(!iqVerify(x, jid, id())) return false; if(x.attribute("type") == "result") { - QDomElement q = queryTag(x); + TQDomElement q = queryTag(x); // agents - for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; @@ -903,7 +903,7 @@ bool JT_GetServices::take(const QDomElement &x) a.setJid(Jid(i.attribute("jid"))); - QDomElement tag; + TQDomElement tag; bool found; tag = findSubTag(i, "name", &found); @@ -911,7 +911,7 @@ bool JT_GetServices::take(const QDomElement &x) a.setName(tagContent(tag)); // determine which namespaces does item support - QStringList ns; + TQStringList ns; tag = findSubTag(i, "register", &found); if(found) @@ -950,7 +950,7 @@ class JT_VCard::Private public: Private() {} - QDomElement iq; + TQDomElement iq; Jid jid; VCard vcard; }; @@ -972,7 +972,7 @@ void JT_VCard::get(const Jid &_jid) type = 0; d->jid = _jid; d->iq = createIQ(doc(), "get", d->jid.full(), id()); - QDomElement v = doc()->createElement("vCard"); + TQDomElement v = doc()->createElement("vCard"); v.setAttribute("xmlns", "vcard-temp"); v.setAttribute("version", "2.0"); v.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN"); @@ -1003,7 +1003,7 @@ void JT_VCard::onGo() send(d->iq); } -bool JT_VCard::take(const QDomElement &x) +bool JT_VCard::take(const TQDomElement &x) { Jid to = d->jid; if (to.userHost() == client()->jid().userHost()) @@ -1013,8 +1013,8 @@ bool JT_VCard::take(const QDomElement &x) if(x.attribute("type") == "result") { if(type == 0) { - for(QDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement q = n.toElement(); + for(TQDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement q = n.toElement(); if(q.isNull()) continue; @@ -1052,7 +1052,7 @@ public: Jid jid; Form form; - QValueList<SearchResult> resultList; + TQValueList<SearchResult> resultList; }; JT_Search::JT_Search(Task *parent) @@ -1072,7 +1072,7 @@ void JT_Search::get(const Jid &jid) type = 0; d->jid = jid; iq = createIQ(doc(), "get", d->jid.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:search"); iq.appendChild(query); } @@ -1082,7 +1082,7 @@ void JT_Search::set(const Form &form) type = 1; d->jid = form.jid(); iq = createIQ(doc(), "set", d->jid.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:search"); iq.appendChild(query); @@ -1102,7 +1102,7 @@ const Form & JT_Search::form() const return d->form; } -const QValueList<SearchResult> & JT_Search::results() const +const TQValueList<SearchResult> & JT_Search::results() const { return d->resultList; } @@ -1112,7 +1112,7 @@ void JT_Search::onGo() send(iq); } -bool JT_Search::take(const QDomElement &x) +bool JT_Search::take(const TQDomElement &x) { if(!iqVerify(x, d->jid, id())) return false; @@ -1123,9 +1123,9 @@ bool JT_Search::take(const QDomElement &x) d->form.clear(); d->form.setJid(from); - QDomElement q = queryTag(x); - for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + TQDomElement q = queryTag(x); + for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; @@ -1145,16 +1145,16 @@ bool JT_Search::take(const QDomElement &x) else { d->resultList.clear(); - QDomElement q = queryTag(x); - for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + TQDomElement q = queryTag(x); + for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; if(i.tagName() == "item") { SearchResult r(Jid(i.attribute("jid"))); - QDomElement tag; + TQDomElement tag; bool found; tag = findSubTag(i, "nick", &found); @@ -1196,7 +1196,7 @@ void JT_ClientVersion::get(const Jid &jid) { j = jid; iq = createIQ(doc(), "get", j.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:version"); iq.appendChild(query); } @@ -1206,15 +1206,15 @@ void JT_ClientVersion::onGo() send(iq); } -bool JT_ClientVersion::take(const QDomElement &x) +bool JT_ClientVersion::take(const TQDomElement &x) { if(!iqVerify(x, j, id())) return false; if(x.attribute("type") == "result") { bool found; - QDomElement q = queryTag(x); - QDomElement tag; + TQDomElement q = queryTag(x); + TQDomElement tag; tag = findSubTag(q, "name", &found); if(found) v_name = tagContent(tag); @@ -1239,17 +1239,17 @@ const Jid & JT_ClientVersion::jid() const return j; } -const QString & JT_ClientVersion::name() const +const TQString & JT_ClientVersion::name() const { return v_name; } -const QString & JT_ClientVersion::version() const +const TQString & JT_ClientVersion::version() const { return v_ver; } -const QString & JT_ClientVersion::os() const +const TQString & JT_ClientVersion::os() const { return v_os; } @@ -1263,7 +1263,7 @@ const QString & JT_ClientVersion::os() const { j = _j; iq = createIQ("get", j.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:time"); iq.appendChild(query); } @@ -1273,15 +1273,15 @@ void JT_ClientTime::go() send(iq); } -bool JT_ClientTime::take(const QDomElement &x) +bool JT_ClientTime::take(const TQDomElement &x) { if(x.attribute("id") != id()) return FALSE; if(x.attribute("type") == "result") { bool found; - QDomElement q = queryTag(x); - QDomElement tag; + TQDomElement q = queryTag(x); + TQDomElement tag; tag = findSubTag(q, "utc", &found); if(found) stamp2TS(tagContent(tag), &utc); @@ -1316,15 +1316,15 @@ JT_ServInfo::~JT_ServInfo() { } -bool JT_ServInfo::take(const QDomElement &e) +bool JT_ServInfo::take(const TQDomElement &e) { if(e.tagName() != "iq" || e.attribute("type") != "get") return false; - QString ns = queryNS(e); + TQString ns = queryNS(e); if(ns == "jabber:iq:version") { - QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id")); - QDomElement query = doc()->createElement("query"); + TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id")); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:version"); iq.appendChild(query); query.appendChild(textTag(doc(), "name", client()->clientName())); @@ -1334,29 +1334,29 @@ bool JT_ServInfo::take(const QDomElement &e) return true; } //else if(ns == "jabber:iq:time") { - // QDomElement iq = createIQ("result", e.attribute("from"), e.attribute("id")); - // QDomElement query = doc()->createElement("query"); + // TQDomElement iq = createIQ("result", e.attribute("from"), e.attribute("id")); + // TQDomElement query = doc()->createElement("query"); // query.setAttribute("xmlns", "jabber:iq:time"); // iq.appendChild(query); - // QDateTime local = QDateTime::currentDateTime(); - // QDateTime utc = local.addSecs(-getTZOffset() * 3600); - // QString str = getTZString(); + // TQDateTime local = TQDateTime::currentDateTime(); + // TQDateTime utc = local.addSecs(-getTZOffset() * 3600); + // TQString str = getTZString(); // query.appendChild(textTag("utc", TS2stamp(utc))); // query.appendChild(textTag("tz", str)); - // query.appendChild(textTag("display", QString("%1 %2").arg(local.toString()).arg(str))); + // query.appendChild(textTag("display", TQString("%1 %2").arg(local.toString()).arg(str))); // send(iq); // return TRUE; //} else if(ns == "http://jabber.org/protocol/disco#info") { // Find out the node - QString node; + TQString node; bool found; - QDomElement q = findSubTag(e, "query", &found); + TQDomElement q = findSubTag(e, "query", &found); if(found) // NOTE: Should always be true, since a NS was found above node = q.attribute("node"); - QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id")); - QDomElement query = doc()->createElement("query"); + TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id")); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info"); if (!node.isEmpty()) query.setAttribute("node", node); @@ -1364,7 +1364,7 @@ bool JT_ServInfo::take(const QDomElement &e) // Identity DiscoItem::Identity identity = client()->identity(); - QDomElement id = doc()->createElement("identity"); + TQDomElement id = doc()->createElement("identity"); if (!identity.category.isEmpty() && !identity.type.isEmpty()) { id.setAttribute("category",identity.category); id.setAttribute("type",identity.type); @@ -1379,7 +1379,7 @@ bool JT_ServInfo::take(const QDomElement &e) } query.appendChild(id); - QDomElement feature; + TQDomElement feature; if (node.isEmpty() || node == client()->capsNode() + "#" + client()->capsVersion()) { // Standard features feature = doc()->createElement("feature"); @@ -1404,10 +1404,10 @@ bool JT_ServInfo::take(const QDomElement &e) if (node.isEmpty()) { // Extended features - QStringList exts = client()->extensions(); - for (QStringList::ConstIterator i = exts.begin(); i != exts.end(); ++i) { - const QStringList& l = client()->extension(*i).list(); - for ( QStringList::ConstIterator j = l.begin(); j != l.end(); ++j ) { + TQStringList exts = client()->extensions(); + for (TQStringList::ConstIterator i = exts.begin(); i != exts.end(); ++i) { + const TQStringList& l = client()->extension(*i).list(); + for ( TQStringList::ConstIterator j = l.begin(); j != l.end(); ++j ) { feature = doc()->createElement("feature"); feature.setAttribute("var", *j); query.appendChild(feature); @@ -1416,10 +1416,10 @@ bool JT_ServInfo::take(const QDomElement &e) } } else if (node.startsWith(client()->capsNode() + "#")) { - QString ext = node.right(node.length()-client()->capsNode().length()-1); + TQString ext = node.right(node.length()-client()->capsNode().length()-1); if (client()->extensions().contains(ext)) { - const QStringList& l = client()->extension(ext).list(); - for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { + const TQStringList& l = client()->extension(ext).list(); + for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { feature = doc()->createElement("feature"); feature.setAttribute("var", *it); query.appendChild(feature); @@ -1455,18 +1455,18 @@ void JT_Gateway::get(const Jid &jid) type = 0; v_jid = jid; iq = createIQ(doc(), "get", v_jid.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:gateway"); iq.appendChild(query); } -void JT_Gateway::set(const Jid &jid, const QString &prompt) +void JT_Gateway::set(const Jid &jid, const TQString &prompt) { type = 1; v_jid = jid; v_prompt = prompt; iq = createIQ(doc(), "set", v_jid.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:gateway"); iq.appendChild(query); query.appendChild(textTag(doc(), "prompt", v_prompt)); @@ -1482,26 +1482,26 @@ Jid JT_Gateway::jid() const return v_jid; } -QString JT_Gateway::desc() const +TQString JT_Gateway::desc() const { return v_desc; } -QString JT_Gateway::prompt() const +TQString JT_Gateway::prompt() const { return v_prompt; } -bool JT_Gateway::take(const QDomElement &x) +bool JT_Gateway::take(const TQDomElement &x) { if(!iqVerify(x, v_jid, id())) return false; if(x.attribute("type") == "result") { if(type == 0) { - QDomElement query = queryTag(x); + TQDomElement query = queryTag(x); bool found; - QDomElement tag; + TQDomElement tag; tag = findSubTag(query, "desc", &found); if(found) v_desc = tagContent(tag); @@ -1510,9 +1510,9 @@ bool JT_Gateway::take(const QDomElement &x) v_prompt = tagContent(tag); } else { - QDomElement query = queryTag(x); + TQDomElement query = queryTag(x); bool found; - QDomElement tag; + TQDomElement tag; tag = findSubTag(query, "prompt", &found); if(found) v_prompt = tagContent(tag); @@ -1533,7 +1533,7 @@ bool JT_Gateway::take(const QDomElement &x) class JT_Browse::Private { public: - QDomElement iq; + TQDomElement iq; Jid jid; AgentList agentList; AgentItem root; @@ -1556,7 +1556,7 @@ void JT_Browse::get (const Jid &j) d->jid = j; d->iq = createIQ(doc(), "get", d->jid.full(), id()); - QDomElement query = doc()->createElement("item"); + TQDomElement query = doc()->createElement("item"); query.setAttribute("xmlns", "jabber:iq:browse"); d->iq.appendChild(query); } @@ -1576,7 +1576,7 @@ void JT_Browse::onGo () send(d->iq); } -AgentItem JT_Browse::browseHelper (const QDomElement &i) +AgentItem JT_Browse::browseHelper (const TQDomElement &i) { AgentItem a; @@ -1598,9 +1598,9 @@ AgentItem JT_Browse::browseHelper (const QDomElement &i) a.setType ( i.attribute("type") ); - QStringList ns; - for(QDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + TQStringList ns; + for(TQDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; @@ -1618,21 +1618,21 @@ AgentItem JT_Browse::browseHelper (const QDomElement &i) return a; } -bool JT_Browse::take(const QDomElement &x) +bool JT_Browse::take(const TQDomElement &x) { if(!iqVerify(x, d->jid, id())) return false; if(x.attribute("type") == "result") { - for(QDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + for(TQDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; d->root = browseHelper (i); - for(QDomNode nn = i.firstChild(); !nn.isNull(); nn = nn.nextSibling()) { - QDomElement e = nn.toElement(); + for(TQDomNode nn = i.firstChild(); !nn.isNull(); nn = nn.nextSibling()) { + TQDomElement e = nn.toElement(); if ( e.isNull() ) continue; if ( e.tagName() == "ns" ) @@ -1659,7 +1659,7 @@ class JT_DiscoItems::Private public: Private() { } - QDomElement iq; + TQDomElement iq; Jid jid; DiscoList items; }; @@ -1680,13 +1680,13 @@ void JT_DiscoItems::get(const DiscoItem &item) get(item.jid(), item.node()); } -void JT_DiscoItems::get (const Jid &j, const QString &node) +void JT_DiscoItems::get (const Jid &j, const TQString &node) { d->items.clear(); d->jid = j; d->iq = createIQ(doc(), "get", d->jid.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/disco#items"); if ( !node.isEmpty() ) @@ -1705,16 +1705,16 @@ void JT_DiscoItems::onGo () send(d->iq); } -bool JT_DiscoItems::take(const QDomElement &x) +bool JT_DiscoItems::take(const TQDomElement &x) { if(!iqVerify(x, d->jid, id())) return false; if(x.attribute("type") == "result") { - QDomElement q = queryTag(x); + TQDomElement q = queryTag(x); - for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement e = n.toElement(); + for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement e = n.toElement(); if( e.isNull() ) continue; @@ -1747,9 +1747,9 @@ class JT_DiscoInfo::Private public: Private() { } - QDomElement iq; + TQDomElement iq; Jid jid; - QString node; + TQString node; DiscoItem item; }; @@ -1772,21 +1772,21 @@ void JT_DiscoInfo::get(const DiscoItem &item) get(item.jid(), item.node(), id); } -void JT_DiscoInfo::get (const Jid &j, const QString &node, DiscoItem::Identity ident) +void JT_DiscoInfo::get (const Jid &j, const TQString &node, DiscoItem::Identity ident) { d->item = DiscoItem(); // clear item d->jid = j; d->node = node; d->iq = createIQ(doc(), "get", d->jid.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info"); if ( !node.isEmpty() ) query.setAttribute("node", node); if ( !ident.category.isEmpty() && !ident.type.isEmpty() ) { - QDomElement i = doc()->createElement("item"); + TQDomElement i = doc()->createElement("item"); i.setAttribute("category", ident.category); i.setAttribute("type", ident.type); @@ -1816,7 +1816,7 @@ const Jid& JT_DiscoInfo::jid() const * Is here because sometimes the responder does not include this information * in the reply. */ -const QString& JT_DiscoInfo::node() const +const TQString& JT_DiscoInfo::node() const { return d->node; } @@ -1833,24 +1833,24 @@ void JT_DiscoInfo::onGo () send(d->iq); } -bool JT_DiscoInfo::take(const QDomElement &x) +bool JT_DiscoInfo::take(const TQDomElement &x) { if(!iqVerify(x, d->jid, id())) return false; if(x.attribute("type") == "result") { - QDomElement q = queryTag(x); + TQDomElement q = queryTag(x); DiscoItem item; item.setJid( d->jid ); item.setNode( q.attribute("node") ); - QStringList features; + TQStringList features; DiscoItem::Identities identities; - for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement e = n.toElement(); + for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement e = n.toElement(); if( e.isNull() ) continue; @@ -1890,7 +1890,7 @@ class JT_DiscoPublish::Private public: Private() { } - QDomElement iq; + TQDomElement iq; Jid jid; DiscoList list; }; @@ -1912,7 +1912,7 @@ void JT_DiscoPublish::set(const Jid &j, const DiscoList &list) d->jid = j; d->iq = createIQ(doc(), "set", d->jid.full(), id()); - QDomElement query = doc()->createElement("query"); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "http://jabber.org/protocol/disco#items"); // FIXME: unsure about this @@ -1921,7 +1921,7 @@ void JT_DiscoPublish::set(const Jid &j, const DiscoList &list) DiscoList::ConstIterator it = list.begin(); for ( ; it != list.end(); ++it) { - QDomElement w = doc()->createElement("item"); + TQDomElement w = doc()->createElement("item"); w.setAttribute("jid", (*it).jid().full()); if ( !(*it).name().isEmpty() ) @@ -1941,7 +1941,7 @@ void JT_DiscoPublish::onGo () send(d->iq); } -bool JT_DiscoPublish::take(const QDomElement &x) +bool JT_DiscoPublish::take(const TQDomElement &x) { if(!iqVerify(x, d->jid, id())) return false; @@ -1988,21 +1988,21 @@ void JT_MucPresence::pres(const Status &s) if(!s.status().isEmpty()) tag.appendChild(textTag(doc(), "status", s.status())); - tag.appendChild( textTag(doc(), "priority", QString("%1").arg(s.priority()) ) ); + tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) ); if(!s.keyID().isEmpty()) { - QDomElement x = textTag(doc(), "x", s.keyID()); + TQDomElement x = textTag(doc(), "x", s.keyID()); x.setAttribute("xmlns", "http://jabber.org/protocol/e2e"); tag.appendChild(x); } if(!s.xsigned().isEmpty()) { - QDomElement x = textTag(doc(), "x", s.xsigned()); + TQDomElement x = textTag(doc(), "x", s.xsigned()); x.setAttribute("xmlns", "jabber:x:signed"); tag.appendChild(x); } if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) { - QDomElement c = doc()->createElement("c"); + TQDomElement c = doc()->createElement("c"); c.setAttribute("xmlns","http://jabber.org/protocol/caps"); c.setAttribute("node",s.capsNode()); c.setAttribute("ver",s.capsVersion()); @@ -2013,11 +2013,11 @@ void JT_MucPresence::pres(const Status &s) } } -void JT_MucPresence::pres(const Jid &to, const Status &s, const QString &password) +void JT_MucPresence::pres(const Jid &to, const Status &s, const TQString &password) { pres(s); tag.setAttribute("to", to.full()); - QDomElement x = textTag(doc(), "x", s.xsigned()); + TQDomElement x = textTag(doc(), "x", s.xsigned()); x.setAttribute("xmlns", "http://jabber.org/protocol/muc"); x.appendChild( textTag(doc(), "password", password.latin1()) ); tag.appendChild(x); @@ -2038,8 +2038,8 @@ class JT_PrivateStorage::Private public: Private() : type(-1) {} - QDomElement iq; - QDomElement elem; + TQDomElement iq; + TQDomElement elem; int type; }; @@ -2054,27 +2054,27 @@ JT_PrivateStorage::~JT_PrivateStorage() delete d; } -void JT_PrivateStorage::get(const QString& tag, const QString& xmlns) +void JT_PrivateStorage::get(const TQString& tag, const TQString& xmlns) { d->type = 0; - d->iq = createIQ(doc(), "get" , QString() , id() ); - QDomElement query = doc()->createElement("query"); + d->iq = createIQ(doc(), "get" , TQString() , id() ); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:private"); d->iq.appendChild(query); - QDomElement s = doc()->createElement(tag); + TQDomElement s = doc()->createElement(tag); if(!xmlns.isEmpty()) s.setAttribute("xmlns", xmlns); query.appendChild(s); } -void JT_PrivateStorage::set(const QDomElement& element) +void JT_PrivateStorage::set(const TQDomElement& element) { d->type = 1; d->elem=element; - QDomNode n=doc()->importNode(element,true); + TQDomNode n=doc()->importNode(element,true); - d->iq = createIQ(doc(), "set" , QString() , id() ); - QDomElement query = doc()->createElement("query"); + d->iq = createIQ(doc(), "set" , TQString() , id() ); + TQDomElement query = doc()->createElement("query"); query.setAttribute("xmlns", "jabber:iq:private"); d->iq.appendChild(query); query.appendChild(n); @@ -2085,17 +2085,17 @@ void JT_PrivateStorage::onGo() send(d->iq); } -bool JT_PrivateStorage::take(const QDomElement &x) +bool JT_PrivateStorage::take(const TQDomElement &x) { - QString to = client()->host(); + TQString to = client()->host(); if(!iqVerify(x, to, id())) return false; if(x.attribute("type") == "result") { if(d->type == 0) { - QDomElement q = queryTag(x); - for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + TQDomElement q = queryTag(x); + for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; d->elem=i; @@ -2113,7 +2113,7 @@ bool JT_PrivateStorage::take(const QDomElement &x) } -QDomElement JT_PrivateStorage::element( ) +TQDomElement JT_PrivateStorage::element( ) { return d->elem; } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h index bf1cc44d..c8085013 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h @@ -21,8 +21,8 @@ #ifndef JABBER_TASKS_H #define JABBER_TASKS_H -#include<qstring.h> -#include<qdom.h> +#include<tqstring.h> +#include<tqdom.h> #include"im.h" #include"xmpp_vcard.h" @@ -39,8 +39,8 @@ namespace XMPP JT_Register(Task *parent); ~JT_Register(); - void reg(const QString &user, const QString &pass); - void changepw(const QString &pass); + void reg(const TQString &user, const TQString &pass); + void changepw(const TQString &pass); void unreg(const Jid &j=""); const Form & form() const; @@ -48,10 +48,10 @@ namespace XMPP void setForm(const Form &); void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); private: - QDomElement iq; + TQDomElement iq; Jid to; class Private; @@ -86,20 +86,20 @@ namespace XMPP ~JT_Roster(); void get(); - void set(const Jid &, const QString &name, const QStringList &groups); + void set(const Jid &, const TQString &name, const TQStringList &groups); void remove(const Jid &); const Roster & roster() const; - QString toString() const; - bool fromString(const QString &); + TQString toString() const; + bool fromString(const TQString &); void onGo(); - bool take(const QDomElement &x); + bool take(const TQDomElement &x); private: int type; - QDomElement iq; + TQDomElement iq; Jid to; class Private; @@ -113,7 +113,7 @@ namespace XMPP JT_PushRoster(Task *parent); ~JT_PushRoster(); - bool take(const QDomElement &); + bool take(const TQDomElement &); signals: void roster(const Roster &); @@ -132,12 +132,12 @@ namespace XMPP void pres(const Status &); void pres(const Jid &, const Status &); - void sub(const Jid &, const QString &subType); + void sub(const Jid &, const TQString &subType); void onGo(); private: - QDomElement tag; + TQDomElement tag; int type; class Private; @@ -151,11 +151,11 @@ namespace XMPP JT_PushPresence(Task *parent); ~JT_PushPresence(); - bool take(const QDomElement &); + bool take(const TQDomElement &); signals: void presence(const Jid &, const Status &); - void subscription(const Jid &, const QString &); + void subscription(const Jid &, const TQString &); private: class Private; @@ -185,7 +185,7 @@ namespace XMPP JT_PushMessage(Task *parent); ~JT_PushMessage(); - bool take(const QDomElement &); + bool take(const TQDomElement &); signals: void message(const Message &); @@ -205,16 +205,16 @@ namespace XMPP void get(const Jid &); int seconds() const; - const QString &message() const; + const TQString &message() const; void onGo(); - bool take(const QDomElement &x); + bool take(const TQDomElement &x); private: class Private; Private *d; - QDomElement iq; + TQDomElement iq; Jid jid; }; @@ -229,13 +229,13 @@ namespace XMPP const AgentList & agents() const; void onGo(); - bool take(const QDomElement &x); + bool take(const TQDomElement &x); private: class Private; Private *d; - QDomElement iq; + TQDomElement iq; Jid jid; AgentList agentList; }; @@ -254,7 +254,7 @@ namespace XMPP const VCard & vcard() const; void onGo(); - bool take(const QDomElement &x); + bool take(const TQDomElement &x); private: int type; @@ -271,16 +271,16 @@ namespace XMPP ~JT_Search(); const Form & form() const; - const QValueList<SearchResult> & results() const; + const TQValueList<SearchResult> & results() const; void get(const Jid &); void set(const Form &); void onGo(); - bool take(const QDomElement &x); + bool take(const TQDomElement &x); private: - QDomElement iq; + TQDomElement iq; int type; class Private; @@ -295,18 +295,18 @@ namespace XMPP void get(const Jid &); void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); const Jid & jid() const; - const QString & name() const; - const QString & version() const; - const QString & os() const; + const TQString & name() const; + const TQString & version() const; + const TQString & os() const; private: - QDomElement iq; + TQDomElement iq; Jid j; - QString v_name, v_ver, v_os; + TQString v_name, v_ver, v_os; }; /* class JT_ClientTime : public Task @@ -316,14 +316,14 @@ namespace XMPP JT_ClientTime(Task *, const Jid &); void go(); - bool take(const QDomElement &); + bool take(const TQDomElement &); Jid j; - QDateTime utc; - QString timezone, display; + TQDateTime utc; + TQString timezone, display; private: - QDomElement iq; + TQDomElement iq; }; */ class JT_ServInfo : public Task @@ -333,7 +333,7 @@ namespace XMPP JT_ServInfo(Task *); ~JT_ServInfo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); }; class JT_Gateway : public Task @@ -343,20 +343,20 @@ namespace XMPP JT_Gateway(Task *); void get(const Jid &); - void set(const Jid &, const QString &prompt); + void set(const Jid &, const TQString &prompt); void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); Jid jid() const; - QString desc() const; - QString prompt() const; + TQString desc() const; + TQString prompt() const; private: - QDomElement iq; + TQDomElement iq; int type; Jid v_jid; - QString v_prompt, v_desc; + TQString v_prompt, v_desc; }; class JT_Browse : public Task @@ -372,13 +372,13 @@ namespace XMPP const AgentItem & root() const; void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); private: class Private; Private *d; - AgentItem browseHelper (const QDomElement &i); + AgentItem browseHelper (const TQDomElement &i); }; class JT_DiscoItems : public Task @@ -388,13 +388,13 @@ namespace XMPP JT_DiscoItems(Task *); ~JT_DiscoItems(); - void get(const Jid &, const QString &node = QString::null); + void get(const Jid &, const TQString &node = TQString::null); void get(const DiscoItem &); const DiscoList &items() const; void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); private: class Private; @@ -408,15 +408,15 @@ namespace XMPP JT_DiscoInfo(Task *); ~JT_DiscoInfo(); - void get(const Jid &, const QString &node = QString::null, const DiscoItem::Identity = DiscoItem::Identity()); + void get(const Jid &, const TQString &node = TQString::null, const DiscoItem::Identity = DiscoItem::Identity()); void get(const DiscoItem &); const DiscoItem &item() const; const Jid& jid() const; - const QString& node() const; + const TQString& node() const; void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); private: class Private; @@ -433,7 +433,7 @@ namespace XMPP void set(const Jid &, const DiscoList &); void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); private: class Private; @@ -448,12 +448,12 @@ namespace XMPP ~JT_MucPresence(); void pres(const Status &); - void pres(const Jid &, const Status &, const QString &password); + void pres(const Jid &, const Status &, const TQString &password); void onGo(); private: - QDomElement tag; + TQDomElement tag; int type; class Private; @@ -467,13 +467,13 @@ namespace XMPP JT_PrivateStorage(Task *parent); ~JT_PrivateStorage(); - void set(const QDomElement &); - void get(const QString &tag, const QString& xmlns); + void set(const TQDomElement &); + void get(const TQString &tag, const TQString& xmlns); - QDomElement element(); + TQDomElement element(); void onGo(); - bool take(const QDomElement &); + bool take(const TQDomElement &); private: class Private; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp index e79d9b9f..5f5214fd 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp @@ -22,30 +22,30 @@ #include "base64.h" -#include <qdom.h> -#include <qdatetime.h> +#include <tqdom.h> +#include <tqdatetime.h> -#include <qimage.h> // needed for image format recognition -#include <qbuffer.h> +#include <tqimage.h> // needed for image format recognition +#include <tqbuffer.h> // Justin's XML helper functions -static QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content) +static TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content) { - QDomElement tag = doc->createElement(name); - QDomText text = doc->createTextNode(content); + TQDomElement tag = doc->createElement(name); + TQDomText text = doc->createTextNode(content); tag.appendChild(text); return tag; } -static QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found) +static TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found) { if(found) *found = FALSE; - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; if(i.tagName().upper() == name.upper()) { // mblsha: ignore case when searching @@ -55,33 +55,33 @@ static QDomElement findSubTag(const QDomElement &e, const QString &name, bool *f } } - QDomElement tmp; + TQDomElement tmp; return tmp; } // mblsha's own functions -static QDomElement emptyTag(QDomDocument *doc, const QString &name) +static TQDomElement emptyTag(TQDomDocument *doc, const TQString &name) { - QDomElement tag = doc->createElement(name); + TQDomElement tag = doc->createElement(name); return tag; } -static bool hasSubTag(const QDomElement &e, const QString &name) +static bool hasSubTag(const TQDomElement &e, const TQString &name) { bool found; findSubTag(e, name, &found); return found; } -static QString subTagText(const QDomElement &e, const QString &name) +static TQString subTagText(const TQDomElement &e, const TQString &name) { bool found; - QDomElement i = findSubTag(e, name, &found); + TQDomElement i = findSubTag(e, name, &found); if ( found ) return i.text().stripWhiteSpace(); - return QString::null; + return TQString::null; } using namespace XMPP; @@ -89,11 +89,11 @@ using namespace XMPP; //---------------------------------------------------------------------------- // VCard //---------------------------------------------------------------------------- -static QString image2type(const QByteArray &ba) +static TQString image2type(const TQByteArray &ba) { - QBuffer buf(ba); + TQBuffer buf(ba); buf.open(IO_ReadOnly); - QString format = QImageIO::imageFormat( &buf ); + TQString format = TQImageIO::imageFormat( &buf ); // TODO: add more formats if ( format == "PNG" || format == "PsiPNG" ) @@ -117,9 +117,9 @@ static QString image2type(const QByteArray &ba) } // Long lines of encoded binary data SHOULD BE folded to 75 characters using the folding method defined in [MIME-DIR]. -static QString foldString(const QString &s) +static TQString foldString(const TQString &s) { - QString ret; + TQString ret; for (int i = 0; i < (int)s.length(); i++) { if ( !(i % 75) ) @@ -136,47 +136,47 @@ public: Private(); ~Private(); - QString version; - QString fullName; - QString familyName, givenName, middleName, prefixName, suffixName; - QString nickName; + TQString version; + TQString fullName; + TQString familyName, givenName, middleName, prefixName, suffixName; + TQString nickName; - QByteArray photo; - QString photoURI; + TQByteArray photo; + TQString photoURI; - QString bday; + TQString bday; AddressList addressList; LabelList labelList; PhoneList phoneList; EmailList emailList; - QString jid; - QString mailer; - QString timezone; + TQString jid; + TQString mailer; + TQString timezone; Geo geo; - QString title; - QString role; + TQString title; + TQString role; - QByteArray logo; - QString logoURI; + TQByteArray logo; + TQString logoURI; VCard *agent; - QString agentURI; + TQString agentURI; Org org; - QStringList categories; - QString note; - QString prodId; - QString rev; - QString sortString; - - QByteArray sound; - QString soundURI, soundPhonetic; - - QString uid; - QString url; - QString desc; + TQStringList categories; + TQString note; + TQString prodId; + TQString rev; + TQString sortString; + + TQByteArray sound; + TQString soundURI, soundPhonetic; + + TQString uid; + TQString url; + TQString desc; PrivacyClass privacyClass; - QByteArray key; + TQByteArray key; bool isEmpty(); }; @@ -263,9 +263,9 @@ VCard::~VCard() delete d; } -QDomElement VCard::toXml(QDomDocument *doc) const +TQDomElement VCard::toXml(TQDomDocument *doc) const { - QDomElement v = doc->createElement("vCard"); + TQDomElement v = doc->createElement("vCard"); v.setAttribute("version", "2.0"); v.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN"); v.setAttribute("xmlns", "vcard-temp"); @@ -277,7 +277,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const if ( !d->familyName.isEmpty() || !d->givenName.isEmpty() || !d->middleName.isEmpty() || !d->prefixName.isEmpty() || !d->suffixName.isEmpty() ) { - QDomElement w = doc->createElement("N"); + TQDomElement w = doc->createElement("N"); if ( !d->familyName.isEmpty() ) w.appendChild( textTag(doc, "FAMILY", d->familyName) ); @@ -297,7 +297,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const v.appendChild( textTag(doc, "NICKNAME", d->nickName) ); if ( !d->photo.isEmpty() || !d->photoURI.isEmpty() ) { - QDomElement w = doc->createElement("PHOTO"); + TQDomElement w = doc->createElement("PHOTO"); if ( !d->photo.isEmpty() ) { w.appendChild( textTag(doc, "TYPE", image2type(d->photo)) ); @@ -315,7 +315,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const if ( !d->addressList.isEmpty() ) { AddressList::Iterator it = d->addressList.begin(); for ( ; it != d->addressList.end(); ++it ) { - QDomElement w = doc->createElement("ADR"); + TQDomElement w = doc->createElement("ADR"); Address a = *it; if ( a.home ) @@ -355,7 +355,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const if ( !d->labelList.isEmpty() ) { LabelList::Iterator it = d->labelList.begin(); for ( ; it != d->labelList.end(); ++it ) { - QDomElement w = doc->createElement("LABEL"); + TQDomElement w = doc->createElement("LABEL"); Label l = *it; if ( l.home ) @@ -374,7 +374,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const w.appendChild( emptyTag(doc, "PREF") ); if ( !l.lines.isEmpty() ) { - QStringList::Iterator it = l.lines.begin(); + TQStringList::Iterator it = l.lines.begin(); for ( ; it != l.lines.end(); ++it ) w.appendChild( textTag(doc, "LINE", *it) ); } @@ -386,7 +386,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const if ( !d->phoneList.isEmpty() ) { PhoneList::Iterator it = d->phoneList.begin(); for ( ; it != d->phoneList.end(); ++it ) { - QDomElement w = doc->createElement("TEL"); + TQDomElement w = doc->createElement("TEL"); Phone p = *it; if ( p.home ) @@ -426,7 +426,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const if ( !d->emailList.isEmpty() ) { EmailList::Iterator it = d->emailList.begin(); for ( ; it != d->emailList.end(); ++it ) { - QDomElement w = doc->createElement("EMAIL"); + TQDomElement w = doc->createElement("EMAIL"); Email e = *it; if ( e.home ) @@ -453,7 +453,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const v.appendChild( textTag(doc, "TZ", d->timezone) ); if ( !d->geo.lat.isEmpty() || !d->geo.lon.isEmpty() ) { - QDomElement w = doc->createElement("GEO"); + TQDomElement w = doc->createElement("GEO"); if ( !d->geo.lat.isEmpty() ) w.appendChild( textTag(doc, "LAT", d->geo.lat) ); @@ -469,7 +469,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const v.appendChild( textTag(doc, "ROLE", d->role) ); if ( !d->logo.isEmpty() || !d->logoURI.isEmpty() ) { - QDomElement w = doc->createElement("LOGO"); + TQDomElement w = doc->createElement("LOGO"); if ( !d->logo.isEmpty() ) { w.appendChild( textTag(doc, "TYPE", image2type(d->logo)) ); @@ -482,7 +482,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const } if ( !d->agentURI.isEmpty() || (d->agent && d->agent->isEmpty()) ) { - QDomElement w = doc->createElement("AGENT"); + TQDomElement w = doc->createElement("AGENT"); if ( d->agent && !d->agent->isEmpty() ) w.appendChild( d->agent->toXml(doc) ); @@ -493,13 +493,13 @@ QDomElement VCard::toXml(QDomDocument *doc) const } if ( !d->org.name.isEmpty() || !d->org.unit.isEmpty() ) { - QDomElement w = doc->createElement("ORG"); + TQDomElement w = doc->createElement("ORG"); if ( !d->org.name.isEmpty() ) w.appendChild( textTag(doc, "ORGNAME", d->org.name) ); if ( !d->org.unit.isEmpty() ) { - QStringList::Iterator it = d->org.unit.begin(); + TQStringList::Iterator it = d->org.unit.begin(); for ( ; it != d->org.unit.end(); ++it ) w.appendChild( textTag(doc, "ORGUNIT", *it) ); } @@ -508,9 +508,9 @@ QDomElement VCard::toXml(QDomDocument *doc) const } if ( !d->categories.isEmpty() ) { - QDomElement w = doc->createElement("CATEGORIES"); + TQDomElement w = doc->createElement("CATEGORIES"); - QStringList::Iterator it = d->categories.begin(); + TQStringList::Iterator it = d->categories.begin(); for ( ; it != d->categories.end(); ++it ) w.appendChild( textTag(doc, "KEYWORD", *it) ); @@ -527,7 +527,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const v.appendChild( textTag(doc, "SORT-STRING", d->sortString) ); if ( !d->sound.isEmpty() || !d->soundURI.isEmpty() || !d->soundPhonetic.isEmpty() ) { - QDomElement w = doc->createElement("SOUND"); + TQDomElement w = doc->createElement("SOUND"); if ( !d->sound.isEmpty() ) w.appendChild( textTag(doc, "BINVAL", foldString( Base64::arrayToString(d->sound)) ) ); @@ -547,7 +547,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const v.appendChild( textTag(doc, "DESC", d->desc) ); if ( d->privacyClass != pcNone ) { - QDomElement w = doc->createElement("CLASS"); + TQDomElement w = doc->createElement("CLASS"); if ( d->privacyClass == pcPublic ) w.appendChild( emptyTag(doc, "PUBLIC") ); @@ -560,11 +560,11 @@ QDomElement VCard::toXml(QDomDocument *doc) const } if ( !d->key.isEmpty() ) { - QDomElement w = doc->createElement("KEY"); + TQDomElement w = doc->createElement("KEY"); // TODO: Justin, please check out this code w.appendChild( textTag(doc, "TYPE", "text/plain")); // FIXME - w.appendChild( textTag(doc, "CRED", QString::fromUtf8(d->key)) ); // FIXME + w.appendChild( textTag(doc, "CRED", TQString::fromUtf8(d->key)) ); // FIXME v.appendChild(w); } @@ -572,21 +572,21 @@ QDomElement VCard::toXml(QDomDocument *doc) const return v; } -bool VCard::fromXml(const QDomElement &q) +bool VCard::fromXml(const TQDomElement &q) { if ( q.tagName().upper() != "VCARD" ) return false; - QDomNode n = q.firstChild(); + TQDomNode n = q.firstChild(); for ( ; !n.isNull(); n = n.nextSibling() ) { - QDomElement i = n.toElement(); + TQDomElement i = n.toElement(); if ( i.isNull() ) continue; - QString tag = i.tagName().upper(); + TQString tag = i.tagName().upper(); bool found; - QDomElement e; + TQDomElement e; if ( tag == "VERSION" ) d->version = i.text().stripWhiteSpace(); @@ -647,9 +647,9 @@ bool VCard::fromXml(const QDomElement &q) l.intl = hasSubTag(i, "INTL"); l.pref = hasSubTag(i, "PREF"); - QDomNode nn = i.firstChild(); + TQDomNode nn = i.firstChild(); for ( ; !nn.isNull(); nn = nn.nextSibling() ) { - QDomElement ii = nn.toElement(); + TQDomElement ii = nn.toElement(); if ( ii.isNull() ) continue; @@ -734,9 +734,9 @@ bool VCard::fromXml(const QDomElement &q) else if ( tag == "ORG" ) { d->org.name = subTagText(i, "ORGNAME"); - QDomNode nn = i.firstChild(); + TQDomNode nn = i.firstChild(); for ( ; !nn.isNull(); nn = nn.nextSibling() ) { - QDomElement ii = nn.toElement(); + TQDomElement ii = nn.toElement(); if ( ii.isNull() ) continue; @@ -745,9 +745,9 @@ bool VCard::fromXml(const QDomElement &q) } } else if ( tag == "CATEGORIES") { - QDomNode nn = i.firstChild(); + TQDomNode nn = i.firstChild(); for ( ; !nn.isNull(); nn = nn.nextSibling() ) { - QDomElement ee = nn.toElement(); + TQDomElement ee = nn.toElement(); if ( ee.isNull() ) continue; @@ -785,7 +785,7 @@ bool VCard::fromXml(const QDomElement &q) else if ( tag == "KEY" ) { // TODO: Justin, please check out this code e = findSubTag(i, "TYPE", &found); - QString type = "text/plain"; + TQString type = "text/plain"; if ( found ) type = e.text().stripWhiteSpace(); @@ -838,122 +838,122 @@ VCard::Org::Org() // vCard properties... -const QString &VCard::version() const +const TQString &VCard::version() const { return d->version; } -void VCard::setVersion(const QString &v) +void VCard::setVersion(const TQString &v) { d->version = v; } -const QString &VCard::fullName() const +const TQString &VCard::fullName() const { return d->fullName; } -void VCard::setFullName(const QString &n) +void VCard::setFullName(const TQString &n) { d->fullName = n; } -const QString &VCard::familyName() const +const TQString &VCard::familyName() const { return d->familyName; } -void VCard::setFamilyName(const QString &n) +void VCard::setFamilyName(const TQString &n) { d->familyName = n; } -const QString &VCard::givenName() const +const TQString &VCard::givenName() const { return d->givenName; } -void VCard::setGivenName(const QString &n) +void VCard::setGivenName(const TQString &n) { d->givenName = n; } -const QString &VCard::middleName() const +const TQString &VCard::middleName() const { return d->middleName; } -void VCard::setMiddleName(const QString &n) +void VCard::setMiddleName(const TQString &n) { d->middleName = n; } -const QString &VCard::prefixName() const +const TQString &VCard::prefixName() const { return d->prefixName; } -void VCard::setPrefixName(const QString &p) +void VCard::setPrefixName(const TQString &p) { d->prefixName = p; } -const QString &VCard::suffixName() const +const TQString &VCard::suffixName() const { return d->suffixName; } -void VCard::setSuffixName(const QString &s) +void VCard::setSuffixName(const TQString &s) { d->suffixName = s; } -const QString &VCard::nickName() const +const TQString &VCard::nickName() const { return d->nickName; } -void VCard::setNickName(const QString &n) +void VCard::setNickName(const TQString &n) { d->nickName = n; } -const QByteArray &VCard::photo() const +const TQByteArray &VCard::photo() const { return d->photo; } -void VCard::setPhoto(const QByteArray &i) +void VCard::setPhoto(const TQByteArray &i) { d->photo = i; } -const QString &VCard::photoURI() const +const TQString &VCard::photoURI() const { return d->photoURI; } -void VCard::setPhotoURI(const QString &p) +void VCard::setPhotoURI(const TQString &p) { d->photoURI = p; } -const QDate VCard::bday() const +const TQDate VCard::bday() const { - return QDate::fromString(d->bday); + return TQDate::fromString(d->bday); } -void VCard::setBday(const QDate &date) +void VCard::setBday(const TQDate &date) { d->bday = date.toString(); } -const QString &VCard::bdayStr() const +const TQString &VCard::bdayStr() const { return d->bday; } -void VCard::setBdayStr(const QString &date) +void VCard::setBdayStr(const TQString &date) { d->bday = date; } @@ -998,32 +998,32 @@ void VCard::setEmailList(const VCard::EmailList &e) d->emailList = e; } -const QString &VCard::jid() const +const TQString &VCard::jid() const { return d->jid; } -void VCard::setJid(const QString &j) +void VCard::setJid(const TQString &j) { d->jid = j; } -const QString &VCard::mailer() const +const TQString &VCard::mailer() const { return d->mailer; } -void VCard::setMailer(const QString &m) +void VCard::setMailer(const TQString &m) { d->mailer = m; } -const QString &VCard::timezone() const +const TQString &VCard::timezone() const { return d->timezone; } -void VCard::setTimezone(const QString &t) +void VCard::setTimezone(const TQString &t) { d->timezone = t; } @@ -1038,42 +1038,42 @@ void VCard::setGeo(const VCard::Geo &g) d->geo = g; } -const QString &VCard::title() const +const TQString &VCard::title() const { return d->title; } -void VCard::setTitle(const QString &t) +void VCard::setTitle(const TQString &t) { d->title = t; } -const QString &VCard::role() const +const TQString &VCard::role() const { return d->role; } -void VCard::setRole(const QString &r) +void VCard::setRole(const TQString &r) { d->role = r; } -const QByteArray &VCard::logo() const +const TQByteArray &VCard::logo() const { return d->logo; } -void VCard::setLogo(const QByteArray &i) +void VCard::setLogo(const TQByteArray &i) { d->logo = i; } -const QString &VCard::logoURI() const +const TQString &VCard::logoURI() const { return d->logoURI; } -void VCard::setLogoURI(const QString &l) +void VCard::setLogoURI(const TQString &l) { d->logoURI = l; } @@ -1090,12 +1090,12 @@ void VCard::setAgent(const VCard &v) *(d->agent) = v; } -const QString VCard::agentURI() const +const TQString VCard::agentURI() const { return d->agentURI; } -void VCard::setAgentURI(const QString &a) +void VCard::setAgentURI(const TQString &a) { d->agentURI = a; } @@ -1110,112 +1110,112 @@ void VCard::setOrg(const VCard::Org &o) d->org = o; } -const QStringList &VCard::categories() const +const TQStringList &VCard::categories() const { return d->categories; } -void VCard::setCategories(const QStringList &c) +void VCard::setCategories(const TQStringList &c) { d->categories = c; } -const QString &VCard::note() const +const TQString &VCard::note() const { return d->note; } -void VCard::setNote(const QString &n) +void VCard::setNote(const TQString &n) { d->note = n; } -const QString &VCard::prodId() const +const TQString &VCard::prodId() const { return d->prodId; } -void VCard::setProdId(const QString &p) +void VCard::setProdId(const TQString &p) { d->prodId = p; } -const QString &VCard::rev() const +const TQString &VCard::rev() const { return d->rev; } -void VCard::setRev(const QString &r) +void VCard::setRev(const TQString &r) { d->rev = r; } -const QString &VCard::sortString() const +const TQString &VCard::sortString() const { return d->sortString; } -void VCard::setSortString(const QString &s) +void VCard::setSortString(const TQString &s) { d->sortString = s; } -const QByteArray &VCard::sound() const +const TQByteArray &VCard::sound() const { return d->sound; } -void VCard::setSound(const QByteArray &s) +void VCard::setSound(const TQByteArray &s) { d->sound = s; } -const QString &VCard::soundURI() const +const TQString &VCard::soundURI() const { return d->soundURI; } -void VCard::setSoundURI(const QString &s) +void VCard::setSoundURI(const TQString &s) { d->soundURI = s; } -const QString &VCard::soundPhonetic() const +const TQString &VCard::soundPhonetic() const { return d->soundPhonetic; } -void VCard::setSoundPhonetic(const QString &s) +void VCard::setSoundPhonetic(const TQString &s) { d->soundPhonetic = s; } -const QString &VCard::uid() const +const TQString &VCard::uid() const { return d->uid; } -void VCard::setUid(const QString &u) +void VCard::setUid(const TQString &u) { d->uid = u; } -const QString &VCard::url() const +const TQString &VCard::url() const { return d->url; } -void VCard::setUrl(const QString &u) +void VCard::setUrl(const TQString &u) { d->url = u; } -const QString &VCard::desc() const +const TQString &VCard::desc() const { return d->desc; } -void VCard::setDesc(const QString &desc) +void VCard::setDesc(const TQString &desc) { d->desc = desc; } @@ -1230,12 +1230,12 @@ void VCard::setPrivacyClass(const VCard::PrivacyClass &c) d->privacyClass = c; } -const QByteArray &VCard::key() const +const TQByteArray &VCard::key() const { return d->key; } -void VCard::setKey(const QByteArray &k) +void VCard::setKey(const TQByteArray &k) { d->key = k; } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h index 4a097251..885e08a9 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h @@ -21,12 +21,12 @@ #ifndef JABBER_VCARD_H #define JABBER_VCARD_H -#include <qstring.h> -#include <qstringlist.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqcstring.h> -#include <qvaluelist.h> -#include <qdom.h> +#include <tqvaluelist.h> +#include <tqdom.h> class QDate; @@ -40,49 +40,49 @@ namespace XMPP VCard & operator=(const VCard &); ~VCard(); - QDomElement toXml(QDomDocument *) const; - bool fromXml(const QDomElement &); + TQDomElement toXml(TQDomDocument *) const; + bool fromXml(const TQDomElement &); bool isEmpty() const; - const QString &version() const; - void setVersion(const QString &); + const TQString &version() const; + void setVersion(const TQString &); - const QString &fullName() const; - void setFullName(const QString &); + const TQString &fullName() const; + void setFullName(const TQString &); - const QString &familyName() const; - void setFamilyName(const QString &); + const TQString &familyName() const; + void setFamilyName(const TQString &); - const QString &givenName() const; - void setGivenName(const QString &); + const TQString &givenName() const; + void setGivenName(const TQString &); - const QString &middleName() const; - void setMiddleName(const QString &); + const TQString &middleName() const; + void setMiddleName(const TQString &); - const QString &prefixName() const; - void setPrefixName(const QString &); + const TQString &prefixName() const; + void setPrefixName(const TQString &); - const QString &suffixName() const; - void setSuffixName(const QString &); + const TQString &suffixName() const; + void setSuffixName(const TQString &); - const QString &nickName() const; - void setNickName(const QString &); + const TQString &nickName() const; + void setNickName(const TQString &); - const QByteArray &photo() const; - void setPhoto(const QByteArray &); + const TQByteArray &photo() const; + void setPhoto(const TQByteArray &); - const QString &photoURI() const; - void setPhotoURI(const QString &); + const TQString &photoURI() const; + void setPhotoURI(const TQString &); - const QDate bday() const; - void setBday(const QDate &); + const TQDate bday() const; + void setBday(const TQDate &); - const QString &bdayStr() const; - void setBdayStr(const QString &); + const TQString &bdayStr() const; + void setBdayStr(const TQString &); class Address { @@ -99,15 +99,15 @@ namespace XMPP bool pref; - QString pobox; - QString extaddr; - QString street; - QString locality; - QString region; - QString pcode; - QString country; + TQString pobox; + TQString extaddr; + TQString street; + TQString locality; + TQString region; + TQString pcode; + TQString country; }; - typedef QValueList<Address> AddressList; + typedef TQValueList<Address> AddressList; const AddressList &addressList() const; void setAddressList(const AddressList &); @@ -125,9 +125,9 @@ namespace XMPP bool pref; - QStringList lines; + TQStringList lines; }; - typedef QValueList<Label> LabelList; + typedef TQValueList<Label> LabelList; const LabelList &labelList() const; void setLabelList(const LabelList &); @@ -150,9 +150,9 @@ namespace XMPP bool pcs; bool pref; - QString number; + TQString number; }; - typedef QValueList<Phone> PhoneList; + typedef TQValueList<Phone> PhoneList; const PhoneList &phoneList() const; void setPhoneList(const PhoneList &); @@ -166,100 +166,100 @@ namespace XMPP bool internet; bool x400; - QString userid; + TQString userid; }; - typedef QValueList<Email> EmailList; + typedef TQValueList<Email> EmailList; const EmailList &emailList() const; void setEmailList(const EmailList &); - const QString &jid() const; - void setJid(const QString &); + const TQString &jid() const; + void setJid(const TQString &); - const QString &mailer() const; - void setMailer(const QString &); + const TQString &mailer() const; + void setMailer(const TQString &); - const QString &timezone() const; - void setTimezone(const QString &); + const TQString &timezone() const; + void setTimezone(const TQString &); class Geo { public: Geo(); - QString lat; - QString lon; + TQString lat; + TQString lon; }; const Geo &geo() const; void setGeo(const Geo &); - const QString &title() const; - void setTitle(const QString &); + const TQString &title() const; + void setTitle(const TQString &); - const QString &role() const; - void setRole(const QString &); + const TQString &role() const; + void setRole(const TQString &); - const QByteArray &logo() const; - void setLogo(const QByteArray &); + const TQByteArray &logo() const; + void setLogo(const TQByteArray &); - const QString &logoURI() const; - void setLogoURI(const QString &); + const TQString &logoURI() const; + void setLogoURI(const TQString &); const VCard *agent() const; void setAgent(const VCard &); - const QString agentURI() const; - void setAgentURI(const QString &); + const TQString agentURI() const; + void setAgentURI(const TQString &); class Org { public: Org(); - QString name; - QStringList unit; + TQString name; + TQStringList unit; }; const Org &org() const; void setOrg(const Org &); - const QStringList &categories() const; - void setCategories(const QStringList &); + const TQStringList &categories() const; + void setCategories(const TQStringList &); - const QString ¬e() const; - void setNote(const QString &); + const TQString ¬e() const; + void setNote(const TQString &); - const QString &prodId() const; // it must equal to "Psi" ;-) - void setProdId(const QString &); + const TQString &prodId() const; // it must equal to "Psi" ;-) + void setProdId(const TQString &); - const QString &rev() const; - void setRev(const QString &); + const TQString &rev() const; + void setRev(const TQString &); - const QString &sortString() const; - void setSortString(const QString &); + const TQString &sortString() const; + void setSortString(const TQString &); - const QByteArray &sound() const; - void setSound(const QByteArray &); + const TQByteArray &sound() const; + void setSound(const TQByteArray &); - const QString &soundURI() const; - void setSoundURI(const QString &); + const TQString &soundURI() const; + void setSoundURI(const TQString &); - const QString &soundPhonetic() const; - void setSoundPhonetic(const QString &); + const TQString &soundPhonetic() const; + void setSoundPhonetic(const TQString &); - const QString &uid() const; - void setUid(const QString &); + const TQString &uid() const; + void setUid(const TQString &); - const QString &url() const; - void setUrl(const QString &); + const TQString &url() const; + void setUrl(const TQString &); - const QString &desc() const; - void setDesc(const QString &); + const TQString &desc() const; + void setDesc(const TQString &); enum PrivacyClass { @@ -272,8 +272,8 @@ namespace XMPP void setPrivacyClass(const PrivacyClass &); - const QByteArray &key() const; - void setKey(const QByteArray &); + const TQByteArray &key() const; + void setKey(const TQByteArray &); private: class Private; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp index e22fc12d..d7b5c82d 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp @@ -20,17 +20,17 @@ #include"xmpp_xmlcommon.h" -#include <qstring.h> -#include <qdom.h> -#include <qdatetime.h> -#include <qsize.h> -#include <qrect.h> -#include <qstringlist.h> -#include <qcolor.h> +#include <tqstring.h> +#include <tqdom.h> +#include <tqdatetime.h> +#include <tqsize.h> +#include <tqrect.h> +#include <tqstringlist.h> +#include <tqcolor.h> #include"im.h" -bool stamp2TS(const QString &ts, QDateTime *d) +bool stamp2TS(const TQString &ts, TQDateTime *d) { if(ts.length() != 17) return false; @@ -43,12 +43,12 @@ bool stamp2TS(const QString &ts, QDateTime *d) int min = ts.mid(12,2).toInt(); int sec = ts.mid(15,2).toInt(); - QDate xd; + TQDate xd; xd.setYMD(year, month, day); if(!xd.isValid()) return false; - QTime xt; + TQTime xt; xt.setHMS(hour, min, sec); if(!xt.isValid()) return false; @@ -59,9 +59,9 @@ bool stamp2TS(const QString &ts, QDateTime *d) return true; } -QString TS2stamp(const QDateTime &d) +TQString TS2stamp(const TQDateTime &d) { - QString str; + TQString str; str.sprintf("%04d%02d%02dT%02d:%02d:%02d", d.date().year(), @@ -74,20 +74,20 @@ QString TS2stamp(const QDateTime &d) return str; } -QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content) +TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content) { - QDomElement tag = doc->createElement(name); - QDomText text = doc->createTextNode(content); + TQDomElement tag = doc->createElement(name); + TQDomText text = doc->createTextNode(content); tag.appendChild(text); return tag; } -QString tagContent(const QDomElement &e) +TQString tagContent(const TQDomElement &e) { // look for some tag content - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomText i = n.toText(); + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomText i = n.toText(); if(i.isNull()) continue; return i.data(); @@ -96,13 +96,13 @@ QString tagContent(const QDomElement &e) return ""; } -QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found) +TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found) { if(found) *found = false; - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; if(i.tagName() == name) { @@ -112,13 +112,13 @@ QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found) } } - QDomElement tmp; + TQDomElement tmp; return tmp; } -QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to, const QString &id) +TQDomElement createIQ(TQDomDocument *doc, const TQString &type, const TQString &to, const TQString &id) { - QDomElement iq = doc->createElement("iq"); + TQDomElement iq = doc->createElement("iq"); if(!type.isEmpty()) iq.setAttribute("type", type); if(!to.isEmpty()) @@ -129,27 +129,27 @@ QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to, return iq; } -QDomElement queryTag(const QDomElement &e) +TQDomElement queryTag(const TQDomElement &e) { bool found; - QDomElement q = findSubTag(e, "query", &found); + TQDomElement q = findSubTag(e, "query", &found); return q; } -QString queryNS(const QDomElement &e) +TQString queryNS(const TQDomElement &e) { bool found; - QDomElement q = findSubTag(e, "query", &found); + TQDomElement q = findSubTag(e, "query", &found); if(found) return q.attribute("xmlns"); return ""; } -void getErrorFromElement(const QDomElement &e, int *code, QString *str) +void getErrorFromElement(const TQDomElement &e, int *code, TQString *str) { bool found; - QDomElement tag = findSubTag(e, "error", &found); + TQDomElement tag = findSubTag(e, "error", &found); if(!found) return; @@ -165,94 +165,94 @@ void getErrorFromElement(const QDomElement &e, int *code, QString *str) namespace XMLHelper { -QDomElement emptyTag(QDomDocument *doc, const QString &name) +TQDomElement emptyTag(TQDomDocument *doc, const TQString &name) { - QDomElement tag = doc->createElement(name); + TQDomElement tag = doc->createElement(name); return tag; } -bool hasSubTag(const QDomElement &e, const QString &name) +bool hasSubTag(const TQDomElement &e, const TQString &name) { bool found; findSubTag(e, name, &found); return found; } -QString subTagText(const QDomElement &e, const QString &name) +TQString subTagText(const TQDomElement &e, const TQString &name) { bool found; - QDomElement i = findSubTag(e, name, &found); + TQDomElement i = findSubTag(e, name, &found); if ( found ) return i.text(); - return QString::null; + return TQString::null; } -QDomElement textTag(QDomDocument &doc, const QString &name, const QString &content) +TQDomElement textTag(TQDomDocument &doc, const TQString &name, const TQString &content) { - QDomElement tag = doc.createElement(name); - QDomText text = doc.createTextNode(content); + TQDomElement tag = doc.createElement(name); + TQDomText text = doc.createTextNode(content); tag.appendChild(text); return tag; } -QDomElement textTag(QDomDocument &doc, const QString &name, int content) +TQDomElement textTag(TQDomDocument &doc, const TQString &name, int content) { - QDomElement tag = doc.createElement(name); - QDomText text = doc.createTextNode(QString::number(content)); + TQDomElement tag = doc.createElement(name); + TQDomText text = doc.createTextNode(TQString::number(content)); tag.appendChild(text); return tag; } -QDomElement textTag(QDomDocument &doc, const QString &name, bool content) +TQDomElement textTag(TQDomDocument &doc, const TQString &name, bool content) { - QDomElement tag = doc.createElement(name); - QDomText text = doc.createTextNode(content ? "true" : "false"); + TQDomElement tag = doc.createElement(name); + TQDomText text = doc.createTextNode(content ? "true" : "false"); tag.appendChild(text); return tag; } -QDomElement textTag(QDomDocument &doc, const QString &name, QSize &s) +TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQSize &s) { - QString str; + TQString str; str.sprintf("%d,%d", s.width(), s.height()); - QDomElement tag = doc.createElement(name); - QDomText text = doc.createTextNode(str); + TQDomElement tag = doc.createElement(name); + TQDomText text = doc.createTextNode(str); tag.appendChild(text); return tag; } -QDomElement textTag(QDomDocument &doc, const QString &name, QRect &r) +TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQRect &r) { - QString str; + TQString str; str.sprintf("%d,%d,%d,%d", r.x(), r.y(), r.width(), r.height()); - QDomElement tag = doc.createElement(name); - QDomText text = doc.createTextNode(str); + TQDomElement tag = doc.createElement(name); + TQDomText text = doc.createTextNode(str); tag.appendChild(text); return tag; } -QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStringList &l) +TQDomElement stringListToXml(TQDomDocument &doc, const TQString &name, const TQStringList &l) { - QDomElement tag = doc.createElement(name); - for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) + TQDomElement tag = doc.createElement(name); + for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) tag.appendChild(textTag(doc, "item", *it)); return tag; } -/*QString tagContent(const QDomElement &e) +/*TQString tagContent(const TQDomElement &e) { // look for some tag content - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomText i = n.toText(); + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomText i = n.toText(); if(i.isNull()) continue; return i.data(); @@ -261,13 +261,13 @@ QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStrin return ""; }*/ -/*QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found) +/*TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found) { if(found) *found = FALSE; - for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; if(i.tagName() == name) { @@ -277,62 +277,62 @@ QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStrin } } - QDomElement tmp; + TQDomElement tmp; return tmp; }*/ -void readEntry(const QDomElement &e, const QString &name, QString *v) +void readEntry(const TQDomElement &e, const TQString &name, TQString *v) { bool found = FALSE; - QDomElement tag = findSubTag(e, name, &found); + TQDomElement tag = findSubTag(e, name, &found); if(!found) return; *v = tagContent(tag); } -void readNumEntry(const QDomElement &e, const QString &name, int *v) +void readNumEntry(const TQDomElement &e, const TQString &name, int *v) { bool found = FALSE; - QDomElement tag = findSubTag(e, name, &found); + TQDomElement tag = findSubTag(e, name, &found); if(!found) return; *v = tagContent(tag).toInt(); } -void readBoolEntry(const QDomElement &e, const QString &name, bool *v) +void readBoolEntry(const TQDomElement &e, const TQString &name, bool *v) { bool found = FALSE; - QDomElement tag = findSubTag(e, name, &found); + TQDomElement tag = findSubTag(e, name, &found); if(!found) return; *v = (tagContent(tag) == "true") ? TRUE: FALSE; } -void readSizeEntry(const QDomElement &e, const QString &name, QSize *v) +void readSizeEntry(const TQDomElement &e, const TQString &name, TQSize *v) { bool found = FALSE; - QDomElement tag = findSubTag(e, name, &found); + TQDomElement tag = findSubTag(e, name, &found); if(!found) return; - QStringList list = QStringList::split(',', tagContent(tag)); + TQStringList list = TQStringList::split(',', tagContent(tag)); if(list.count() != 2) return; - QSize s; + TQSize s; s.setWidth(list[0].toInt()); s.setHeight(list[1].toInt()); *v = s; } -void readRectEntry(const QDomElement &e, const QString &name, QRect *v) +void readRectEntry(const TQDomElement &e, const TQString &name, TQRect *v) { bool found = FALSE; - QDomElement tag = findSubTag(e, name, &found); + TQDomElement tag = findSubTag(e, name, &found); if(!found) return; - QStringList list = QStringList::split(',', tagContent(tag)); + TQStringList list = TQStringList::split(',', tagContent(tag)); if(list.count() != 4) return; - QRect r; + TQRect r; r.setX(list[0].toInt()); r.setY(list[1].toInt()); r.setWidth(list[2].toInt()); @@ -340,27 +340,27 @@ void readRectEntry(const QDomElement &e, const QString &name, QRect *v) *v = r; } -void readColorEntry(const QDomElement &e, const QString &name, QColor *v) +void readColorEntry(const TQDomElement &e, const TQString &name, TQColor *v) { bool found = FALSE; - QDomElement tag = findSubTag(e, name, &found); + TQDomElement tag = findSubTag(e, name, &found); if(!found) return; - QColor c; + TQColor c; c.setNamedColor(tagContent(tag)); if(c.isValid()) *v = c; } -void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v) +void xmlToStringList(const TQDomElement &e, const TQString &name, TQStringList *v) { bool found = false; - QDomElement tag = findSubTag(e, name, &found); + TQDomElement tag = findSubTag(e, name, &found); if(!found) return; - QStringList list; - for(QDomNode n = tag.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement i = n.toElement(); + TQStringList list; + for(TQDomNode n = tag.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement i = n.toElement(); if(i.isNull()) continue; if(i.tagName() == "item") @@ -369,15 +369,15 @@ void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v) *v = list; } -void setBoolAttribute(QDomElement e, const QString &name, bool b) +void setBoolAttribute(TQDomElement e, const TQString &name, bool b) { e.setAttribute(name, b ? "true" : "false"); } -void readBoolAttribute(QDomElement e, const QString &name, bool *v) +void readBoolAttribute(TQDomElement e, const TQString &name, bool *v) { if(e.hasAttribute(name)) { - QString s = e.attribute(name); + TQString s = e.attribute(name); *v = (s == "true") ? TRUE: FALSE; } } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h index c3f089c7..926395e9 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h @@ -21,7 +21,7 @@ #ifndef JABBER_XMLCOMMON_H #define JABBER_XMLCOMMON_H -#include<qdom.h> +#include<tqdom.h> class QDateTime; class QRect; @@ -29,43 +29,43 @@ class QSize; class QColor; class QStringList; -bool stamp2TS(const QString &ts, QDateTime *d); -QString TS2stamp(const QDateTime &d); -QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content); -QString tagContent(const QDomElement &e); -QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found); -QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to, const QString &id); -QDomElement queryTag(const QDomElement &e); -QString queryNS(const QDomElement &e); -void getErrorFromElement(const QDomElement &e, int *code, QString *str); +bool stamp2TS(const TQString &ts, TQDateTime *d); +TQString TS2stamp(const TQDateTime &d); +TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content); +TQString tagContent(const TQDomElement &e); +TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found); +TQDomElement createIQ(TQDomDocument *doc, const TQString &type, const TQString &to, const TQString &id); +TQDomElement queryTag(const TQDomElement &e); +TQString queryNS(const TQDomElement &e); +void getErrorFromElement(const TQDomElement &e, int *code, TQString *str); namespace XMLHelper { - //QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found); - bool hasSubTag(const QDomElement &e, const QString &name); + //TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found); + bool hasSubTag(const TQDomElement &e, const TQString &name); - QDomElement emptyTag(QDomDocument *doc, const QString &name); - QString subTagText(const QDomElement &e, const QString &name); + TQDomElement emptyTag(TQDomDocument *doc, const TQString &name); + TQString subTagText(const TQDomElement &e, const TQString &name); - QDomElement textTag(QDomDocument &doc, const QString &name, const QString &content); - QDomElement textTag(QDomDocument &doc, const QString &name, int content); - QDomElement textTag(QDomDocument &doc, const QString &name, bool content); - QDomElement textTag(QDomDocument &doc, const QString &name, QSize &s); - QDomElement textTag(QDomDocument &doc, const QString &name, QRect &r); - QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStringList &l); + TQDomElement textTag(TQDomDocument &doc, const TQString &name, const TQString &content); + TQDomElement textTag(TQDomDocument &doc, const TQString &name, int content); + TQDomElement textTag(TQDomDocument &doc, const TQString &name, bool content); + TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQSize &s); + TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQRect &r); + TQDomElement stringListToXml(TQDomDocument &doc, const TQString &name, const TQStringList &l); - void readEntry(const QDomElement &e, const QString &name, QString *v); - void readNumEntry(const QDomElement &e, const QString &name, int *v); - void readBoolEntry(const QDomElement &e, const QString &name, bool *v); - void readSizeEntry(const QDomElement &e, const QString &name, QSize *v); - void readRectEntry(const QDomElement &e, const QString &name, QRect *v); - void readColorEntry(const QDomElement &e, const QString &name, QColor *v); + void readEntry(const TQDomElement &e, const TQString &name, TQString *v); + void readNumEntry(const TQDomElement &e, const TQString &name, int *v); + void readBoolEntry(const TQDomElement &e, const TQString &name, bool *v); + void readSizeEntry(const TQDomElement &e, const TQString &name, TQSize *v); + void readRectEntry(const TQDomElement &e, const TQString &name, TQRect *v); + void readColorEntry(const TQDomElement &e, const TQString &name, TQColor *v); - void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v); + void xmlToStringList(const TQDomElement &e, const TQString &name, TQStringList *v); - void setBoolAttribute(QDomElement e, const QString &name, bool b); - void readBoolAttribute(QDomElement e, const QString &name, bool *v); + void setBoolAttribute(TQDomElement e, const TQString &name, bool b); + void readBoolAttribute(TQDomElement e, const TQString &name, bool *v); - //QString tagContent(const QDomElement &e); // obsolete; + //TQString tagContent(const TQDomElement &e); // obsolete; } #endif diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.cpp b/kopete/protocols/jabber/libiris/qca/src/qca.cpp index 51f8533b..4a197527 100644 --- a/kopete/protocols/jabber/libiris/qca/src/qca.cpp +++ b/kopete/protocols/jabber/libiris/qca/src/qca.cpp @@ -20,15 +20,15 @@ #include"qca.h" -#include<qptrlist.h> -#include<qdir.h> -#include<qfileinfo.h> -#include<qstringlist.h> -#include<qlibrary.h> -#include<qtimer.h> -#include<qhostaddress.h> -#include<qapplication.h> -#include<qguardedptr.h> +#include<tqptrlist.h> +#include<tqdir.h> +#include<tqfileinfo.h> +#include<tqstringlist.h> +#include<tqlibrary.h> +#include<tqtimer.h> +#include<tqhostaddress.h> +#include<tqapplication.h> +#include<tqguardedptr.h> #include<stdlib.h> #include"qcaprovider.h" @@ -46,11 +46,11 @@ class ProviderItem { public: QCAProvider *p; - QString fname; + TQString fname; - static ProviderItem *load(const QString &fname) + static ProviderItem *load(const TQString &fname) { - QLibrary *lib = new QLibrary(fname); + TQLibrary *lib = new TQLibrary(fname); if(!lib->load()) { delete lib; return 0; @@ -92,10 +92,10 @@ public: } private: - QLibrary *lib; + TQLibrary *lib; bool init_done; - ProviderItem(QLibrary *_lib, QCAProvider *_p) + ProviderItem(TQLibrary *_lib, QCAProvider *_p) { lib = _lib; p = _p; @@ -103,12 +103,12 @@ private: } }; -static QPtrList<ProviderItem> providerList; +static TQPtrList<ProviderItem> providerList; static bool qca_init = false; -static bool plugin_have(const QString &fname) +static bool plugin_have(const TQString &fname) { - QPtrListIterator<ProviderItem> it(providerList); + TQPtrListIterator<ProviderItem> it(providerList); for(ProviderItem *i; (i = it.current()); ++it) { if(i->fname == fname) return true; @@ -118,21 +118,21 @@ static bool plugin_have(const QString &fname) static void plugin_scan() { - QStringList dirs = QApplication::libraryPaths(); - for(QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { - QDir libpath(*it); - QDir dir(libpath.filePath("crypto")); + TQStringList dirs = TQApplication::libraryPaths(); + for(TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { + TQDir libpath(*it); + TQDir dir(libpath.filePath("crypto")); if(!dir.exists()) continue; - QStringList list = dir.entryList(); - for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - QFileInfo fi(dir.filePath(*it)); + TQStringList list = dir.entryList(); + for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + TQFileInfo fi(dir.filePath(*it)); if(fi.isDir()) continue; if(fi.extension() != PLUGIN_EXT) continue; - QString fname = fi.filePath(); + TQString fname = fi.filePath(); // don't load the same plugin again! if(plugin_have(fname)) @@ -166,26 +166,26 @@ static void plugin_unloadall() static int plugin_caps() { int caps = 0; - QPtrListIterator<ProviderItem> it(providerList); + TQPtrListIterator<ProviderItem> it(providerList); for(ProviderItem *i; (i = it.current()); ++it) caps |= i->p->capabilities(); return caps; } -QString QCA::arrayToHex(const QByteArray &a) +TQString QCA::arrayToHex(const TQByteArray &a) { - QString out; + TQString out; for(int n = 0; n < (int)a.size(); ++n) { - QString str; + TQString str; str.sprintf("%02x", (uchar)a[n]); out.append(str); } return out; } -QByteArray QCA::hexToArray(const QString &str) +TQByteArray QCA::hexToArray(const TQString &str) { - QByteArray out(str.length() / 2); + TQByteArray out(str.length() / 2); int at = 0; for(int n = 0; n + 1 < (int)str.length(); n += 2) { uchar a = str[n]; @@ -239,7 +239,7 @@ static void *getContext(int cap) if(!QCA::isSupported(cap)) return 0; - QPtrListIterator<ProviderItem> it(providerList); + TQPtrListIterator<ProviderItem> it(providerList); for(ProviderItem *i; (i = it.current()); ++it) { if(i->p->capabilities() & cap) { i->ensureInit(); @@ -303,14 +303,14 @@ void Hash::clear() d->reset(); } -void Hash::update(const QByteArray &a) +void Hash::update(const TQByteArray &a) { d->c->update(a.data(), a.size()); } -QByteArray Hash::final() +TQByteArray Hash::final() { - QByteArray buf; + TQByteArray buf; d->c->final(&buf); return buf; } @@ -343,11 +343,11 @@ public: QCA_CipherContext *c; int dir; int mode; - QByteArray key, iv; + TQByteArray key, iv; bool err; }; -Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) { d = new Private; d->c = c; @@ -377,27 +377,27 @@ Cipher::~Cipher() delete d; } -QByteArray Cipher::dyn_generateKey(int size) const +TQByteArray Cipher::dyn_generateKey(int size) const { - QByteArray buf; + TQByteArray buf; if(size != -1) buf.resize(size); else buf.resize(d->c->keySize()); if(!d->c->generateKey(buf.data(), size)) - return QByteArray(); + return TQByteArray(); return buf; } -QByteArray Cipher::dyn_generateIV() const +TQByteArray Cipher::dyn_generateIV() const { - QByteArray buf(d->c->blockSize()); + TQByteArray buf(d->c->blockSize()); if(!d->c->generateIV(buf.data())) - return QByteArray(); + return TQByteArray(); return buf; } -void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +void Cipher::reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) { d->reset(); @@ -411,7 +411,7 @@ void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &i } } -bool Cipher::update(const QByteArray &a) +bool Cipher::update(const TQByteArray &a) { if(d->err) return false; @@ -425,17 +425,17 @@ bool Cipher::update(const QByteArray &a) return true; } -QByteArray Cipher::final(bool *ok) +TQByteArray Cipher::final(bool *ok) { if(ok) *ok = false; if(d->err) - return QByteArray(); + return TQByteArray(); - QByteArray out; + TQByteArray out; if(!d->c->final(&out)) { d->err = true; - return QByteArray(); + return TQByteArray(); } if(ok) *ok = true; @@ -473,7 +473,7 @@ MD5::MD5() //---------------------------------------------------------------------------- // BlowFish //---------------------------------------------------------------------------- -BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +BlowFish::BlowFish(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_BlowFish), dir, mode, key, iv, pad) { } @@ -482,7 +482,7 @@ BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &i //---------------------------------------------------------------------------- // TripleDES //---------------------------------------------------------------------------- -TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +TripleDES::TripleDES(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_TripleDES), dir, mode, key, iv, pad) { } @@ -491,7 +491,7 @@ TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray //---------------------------------------------------------------------------- // AES128 //---------------------------------------------------------------------------- -AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +AES128::AES128(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_AES128), dir, mode, key, iv, pad) { } @@ -500,7 +500,7 @@ AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, b //---------------------------------------------------------------------------- // AES256 //---------------------------------------------------------------------------- -AES256::AES256(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +AES256::AES256(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_AES256), dir, mode, key, iv, pad) { } @@ -564,35 +564,35 @@ bool RSAKey::havePrivate() const return d->c->havePrivate(); } -QByteArray RSAKey::toDER(bool publicOnly) const +TQByteArray RSAKey::toDER(bool publicOnly) const { - QByteArray out; + TQByteArray out; if(!d->c->toDER(&out, publicOnly)) - return QByteArray(); + return TQByteArray(); return out; } -bool RSAKey::fromDER(const QByteArray &a) +bool RSAKey::fromDER(const TQByteArray &a) { return d->c->createFromDER(a.data(), a.size()); } -QString RSAKey::toPEM(bool publicOnly) const +TQString RSAKey::toPEM(bool publicOnly) const { - QByteArray out; + TQByteArray out; if(!d->c->toPEM(&out, publicOnly)) - return QByteArray(); + return TQByteArray(); - QCString cs; + TQCString cs; cs.resize(out.size()+1); memcpy(cs.data(), out.data(), out.size()); - return QString::fromLatin1(cs); + return TQString::fromLatin1(cs); } -bool RSAKey::fromPEM(const QString &str) +bool RSAKey::fromPEM(const TQString &str) { - QCString cs = str.latin1(); - QByteArray a(cs.length()); + TQCString cs = str.latin1(); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return d->c->createFromPEM(a.data(), a.size()); } @@ -602,18 +602,18 @@ bool RSAKey::fromNative(void *p) return d->c->createFromNative(p); } -bool RSAKey::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSAKey::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { - QByteArray out; + TQByteArray out; if(!d->c->encrypt(a, &out, oaep)) return false; *b = out; return true; } -bool RSAKey::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSAKey::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { - QByteArray out; + TQByteArray out; if(!d->c->decrypt(a, &out, oaep)) return false; *b = out; @@ -647,14 +647,14 @@ void RSA::setKey(const RSAKey &k) v_key = k; } -bool RSA::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSA::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { if(v_key.isNull()) return false; return v_key.encrypt(a, b, oaep); } -bool RSA::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSA::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { if(v_key.isNull()) return false; @@ -723,84 +723,84 @@ bool Cert::isNull() const return d->c->isNull(); } -QString Cert::commonName() const +TQString Cert::commonName() const { CertProperties props = subject(); return props["CN"]; } -QString Cert::serialNumber() const +TQString Cert::serialNumber() const { return d->c->serialNumber(); } -QString Cert::subjectString() const +TQString Cert::subjectString() const { return d->c->subjectString(); } -QString Cert::issuerString() const +TQString Cert::issuerString() const { return d->c->issuerString(); } CertProperties Cert::subject() const { - QValueList<QCA_CertProperty> list = d->c->subject(); + TQValueList<QCA_CertProperty> list = d->c->subject(); CertProperties props; - for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) + for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) props[(*it).var] = (*it).val; return props; } CertProperties Cert::issuer() const { - QValueList<QCA_CertProperty> list = d->c->issuer(); + TQValueList<QCA_CertProperty> list = d->c->issuer(); CertProperties props; - for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) + for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) props[(*it).var] = (*it).val; return props; } -QDateTime Cert::notBefore() const +TQDateTime Cert::notBefore() const { return d->c->notBefore(); } -QDateTime Cert::notAfter() const +TQDateTime Cert::notAfter() const { return d->c->notAfter(); } -QByteArray Cert::toDER() const +TQByteArray Cert::toDER() const { - QByteArray out; + TQByteArray out; if(!d->c->toDER(&out)) - return QByteArray(); + return TQByteArray(); return out; } -bool Cert::fromDER(const QByteArray &a) +bool Cert::fromDER(const TQByteArray &a) { return d->c->createFromDER(a.data(), a.size()); } -QString Cert::toPEM() const +TQString Cert::toPEM() const { - QByteArray out; + TQByteArray out; if(!d->c->toPEM(&out)) - return QByteArray(); + return TQByteArray(); - QCString cs; + TQCString cs; cs.resize(out.size()+1); memcpy(cs.data(), out.data(), out.size()); - return QString::fromLatin1(cs); + return TQString::fromLatin1(cs); } -bool Cert::fromPEM(const QString &str) +bool Cert::fromPEM(const TQString &str) { - QCString cs = str.latin1(); - QByteArray a(cs.length()); + TQCString cs = str.latin1(); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return d->c->createFromPEM(a.data(), a.size()); } @@ -837,7 +837,7 @@ public: tryMore = false; } - void appendArray(QByteArray *a, const QByteArray &b) + void appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -846,21 +846,21 @@ public: Cert cert; QCA_TLSContext *c; - QByteArray in, out, to_net, from_net; + TQByteArray in, out, to_net, from_net; int bytesEncoded; bool tryMore; bool handshaken; - QString host; + TQString host; bool hostMismatch; bool closing; Cert ourCert; RSAKey ourKey; - QPtrList<QCA_CertContext> store; + TQPtrList<QCA_CertContext> store; }; -TLS::TLS(QObject *parent) -:QObject(parent) +TLS::TLS(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -876,11 +876,11 @@ void TLS::setCertificate(const Cert &cert, const RSAKey &key) d->ourKey = key; } -void TLS::setCertificateStore(const QPtrList<Cert> &store) +void TLS::setCertificateStore(const TQPtrList<Cert> &store) { // convert the cert list into a context list d->store.clear(); - QPtrListIterator<Cert> it(store); + TQPtrListIterator<Cert> it(store); for(Cert *cert; (cert = it.current()); ++it) d->store.append(cert->d->c); } @@ -890,14 +890,14 @@ void TLS::reset() d->reset(); } -bool TLS::startClient(const QString &host) +bool TLS::startClient(const TQString &host) { d->reset(); d->host = host; if(!d->c->startClient(d->store, *d->ourCert.d->c, *d->ourKey.d->c)) return false; - QTimer::singleShot(0, this, SLOT(update())); + TQTimer::singleShot(0, this, TQT_SLOT(update())); return true; } @@ -907,7 +907,7 @@ bool TLS::startServer() if(!d->c->startServer(d->store, *d->ourCert.d->c, *d->ourKey.d->c)) return false; - QTimer::singleShot(0, this, SLOT(update())); + TQTimer::singleShot(0, this, TQT_SLOT(update())); return true; } @@ -917,7 +917,7 @@ void TLS::close() return; d->closing = true; - QTimer::singleShot(0, this, SLOT(update())); + TQTimer::singleShot(0, this, TQT_SLOT(update())); } bool TLS::isHandshaken() const @@ -925,35 +925,35 @@ bool TLS::isHandshaken() const return d->handshaken; } -void TLS::write(const QByteArray &a) +void TLS::write(const TQByteArray &a) { d->appendArray(&d->out, a); update(); } -QByteArray TLS::read() +TQByteArray TLS::read() { - QByteArray a = d->in.copy(); + TQByteArray a = d->in.copy(); d->in.resize(0); return a; } -void TLS::writeIncoming(const QByteArray &a) +void TLS::writeIncoming(const TQByteArray &a) { d->appendArray(&d->from_net, a); update(); } -QByteArray TLS::readOutgoing() +TQByteArray TLS::readOutgoing() { - QByteArray a = d->to_net.copy(); + TQByteArray a = d->to_net.copy(); d->to_net.resize(0); return a; } -QByteArray TLS::readUnprocessed() +TQByteArray TLS::readUnprocessed() { - QByteArray a = d->from_net.copy(); + TQByteArray a = d->from_net.copy(); d->from_net.resize(0); return a; } @@ -976,10 +976,10 @@ void TLS::update() bool force_read = false; bool eof = false; bool done = false; - QGuardedPtr<TLS> self = this; + TQGuardedPtr<TLS> self = this; if(d->closing) { - QByteArray a; + TQByteArray a; int r = d->c->shutdown(d->from_net, &a); d->from_net.resize(0); if(r == QCA_TLSContext::Error) { @@ -995,7 +995,7 @@ void TLS::update() } else { if(!d->handshaken) { - QByteArray a; + TQByteArray a; int r = d->c->handshake(d->from_net, &a); d->from_net.resize(0); if(r == QCA_TLSContext::Error) { @@ -1024,7 +1024,7 @@ void TLS::update() if(d->handshaken) { if(!d->out.isEmpty() || d->tryMore) { d->tryMore = false; - QByteArray a; + TQByteArray a; int enc; bool more = false; bool ok = d->c->encode(d->out, &a, &enc); @@ -1045,7 +1045,7 @@ void TLS::update() } } if(!d->from_net.isEmpty() || force_read) { - QByteArray a, b; + TQByteArray a, b; bool ok = d->c->decode(d->from_net, &a, &b); eof = d->c->eof(); d->from_net.resize(0); @@ -1091,7 +1091,7 @@ void TLS::update() //---------------------------------------------------------------------------- // SASL //---------------------------------------------------------------------------- -QString saslappname = "qca"; +TQString saslappname = "qca"; class SASL::Private { public: @@ -1113,22 +1113,22 @@ public: // security opts bool noPlain, noActive, noDict, noAnon, reqForward, reqCreds, reqMutual; int ssfmin, ssfmax; - QString ext_authid; + TQString ext_authid; int ext_ssf; bool tried; QCA_SASLContext *c; - QHostAddress localAddr, remoteAddr; + TQHostAddress localAddr, remoteAddr; int localPort, remotePort; - QByteArray stepData; + TQByteArray stepData; bool allowCSF; bool first, server; - QByteArray inbuf, outbuf; + TQByteArray inbuf, outbuf; }; -SASL::SASL(QObject *parent) -:QObject(parent) +SASL::SASL(TQObject *parent) +:TQObject(parent) { d = new Private; reset(); @@ -1139,7 +1139,7 @@ SASL::~SASL() delete d; } -void SASL::setAppName(const QString &name) +void SASL::setAppName(const TQString &name) { saslappname = name; } @@ -1217,7 +1217,7 @@ void SASL::setMaximumSSF(int x) d->ssfmax = x; } -void SASL::setExternalAuthID(const QString &authid) +void SASL::setExternalAuthID(const TQString &authid) { d->ext_authid = authid; } @@ -1227,19 +1227,19 @@ void SASL::setExternalSSF(int x) d->ext_ssf = x; } -void SASL::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void SASL::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->localAddr = addr; d->localPort = port; } -void SASL::setRemoteAddr(const QHostAddress &addr, Q_UINT16 port) +void SASL::setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port) { d->remoteAddr = addr; d->remotePort = port; } -bool SASL::startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst) +bool SASL::startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst) { QCA_SASLHostPort la, ra; if(d->localPort != -1) { @@ -1260,11 +1260,11 @@ bool SASL::startClient(const QString &service, const QString &host, const QStrin d->first = true; d->server = false; d->tried = false; - QTimer::singleShot(0, this, SLOT(tryAgain())); + TQTimer::singleShot(0, this, TQT_SLOT(tryAgain())); return true; } -bool SASL::startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist) +bool SASL::startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist) { QCA_SASLHostPort la, ra; if(d->localPort != -1) { @@ -1287,13 +1287,13 @@ bool SASL::startServer(const QString &service, const QString &host, const QStrin return true; } -void SASL::putServerFirstStep(const QString &mech) +void SASL::putServerFirstStep(const TQString &mech) { int r = d->c->serverFirstStep(mech, 0); handleServerFirstStep(r); } -void SASL::putServerFirstStep(const QString &mech, const QByteArray &clientInit) +void SASL::putServerFirstStep(const TQString &mech, const TQByteArray &clientInit) { int r = d->c->serverFirstStep(mech, &clientInit); handleServerFirstStep(r); @@ -1311,28 +1311,28 @@ void SASL::handleServerFirstStep(int r) error(ErrAuth); } -void SASL::putStep(const QByteArray &stepData) +void SASL::putStep(const TQByteArray &stepData) { d->stepData = stepData.copy(); tryAgain(); } -void SASL::setUsername(const QString &user) +void SASL::setUsername(const TQString &user) { d->c->setClientParams(&user, 0, 0, 0); } -void SASL::setAuthzid(const QString &authzid) +void SASL::setAuthzid(const TQString &authzid) { d->c->setClientParams(0, &authzid, 0, 0); } -void SASL::setPassword(const QString &pass) +void SASL::setPassword(const TQString &pass) { d->c->setClientParams(0, 0, &pass, 0); } -void SASL::setRealm(const QString &realm) +void SASL::setRealm(const TQString &realm) { d->c->setClientParams(0, 0, 0, &realm); } @@ -1394,8 +1394,8 @@ void SASL::tryAgain() return; } - QString mech = d->c->mech(); - const QByteArray *clientInit = d->c->clientInit(); + TQString mech = d->c->mech(); + const TQByteArray *clientInit = d->c->clientInit(); d->first = false; d->tried = false; @@ -1438,9 +1438,9 @@ int SASL::ssf() const return d->c->security(); } -void SASL::write(const QByteArray &a) +void SASL::write(const TQByteArray &a) { - QByteArray b; + TQByteArray b; if(!d->c->encode(a, &b)) { error(ErrCrypt); return; @@ -1451,16 +1451,16 @@ void SASL::write(const QByteArray &a) readyReadOutgoing(a.size()); } -QByteArray SASL::read() +TQByteArray SASL::read() { - QByteArray a = d->inbuf.copy(); + TQByteArray a = d->inbuf.copy(); d->inbuf.resize(0); return a; } -void SASL::writeIncoming(const QByteArray &a) +void SASL::writeIncoming(const TQByteArray &a) { - QByteArray b; + TQByteArray b; if(!d->c->decode(a, &b)) { error(ErrCrypt); return; @@ -1471,9 +1471,9 @@ void SASL::writeIncoming(const QByteArray &a) readyRead(); } -QByteArray SASL::readOutgoing() +TQByteArray SASL::readOutgoing() { - QByteArray a = d->outbuf.copy(); + TQByteArray a = d->outbuf.copy(); d->outbuf.resize(0); return a; } diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.h b/kopete/protocols/jabber/libiris/qca/src/qca.h index 1a52a826..46b25cc9 100644 --- a/kopete/protocols/jabber/libiris/qca/src/qca.h +++ b/kopete/protocols/jabber/libiris/qca/src/qca.h @@ -21,12 +21,12 @@ #ifndef QCA_H #define QCA_H -#include<qstring.h> -#include<qcstring.h> -#include<qdatetime.h> -#include<qmap.h> -#include<qptrlist.h> -#include<qobject.h> +#include<tqstring.h> +#include<tqcstring.h> +#include<tqdatetime.h> +#include<tqmap.h> +#include<tqptrlist.h> +#include<tqobject.h> #ifdef Q_OS_WIN32 # ifndef QCA_STATIC @@ -91,8 +91,8 @@ namespace QCA QCA_EXPORT void insertProvider(QCAProvider *); QCA_EXPORT void unloadAllPlugins(); - QCA_EXPORT QString arrayToHex(const QByteArray &); - QCA_EXPORT QByteArray hexToArray(const QString &); + QCA_EXPORT TQString arrayToHex(const TQByteArray &); + QCA_EXPORT TQByteArray hexToArray(const TQString &); class QCA_EXPORT Hash { @@ -102,8 +102,8 @@ namespace QCA ~Hash(); void clear(); - void update(const QByteArray &a); - QByteArray final(); + void update(const TQByteArray &a); + TQByteArray final(); protected: Hash(QCA_HashContext *); @@ -119,26 +119,26 @@ namespace QCA public: HashStatic<T>() {} - static QByteArray hash(const QByteArray &a) + static TQByteArray hash(const TQByteArray &a) { T obj; obj.update(a); return obj.final(); } - static QByteArray hash(const QCString &cs) + static TQByteArray hash(const TQCString &cs) { - QByteArray a(cs.length()); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return hash(a); } - static QString hashToString(const QByteArray &a) + static TQString hashToString(const TQByteArray &a) { return arrayToHex(hash(a)); } - static QString hashToString(const QCString &cs) + static TQString hashToString(const TQCString &cs) { return arrayToHex(hash(cs)); } @@ -151,14 +151,14 @@ namespace QCA Cipher & operator=(const Cipher &); ~Cipher(); - QByteArray dyn_generateKey(int size=-1) const; - QByteArray dyn_generateIV() const; - void reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad=true); - bool update(const QByteArray &a); - QByteArray final(bool *ok=0); + TQByteArray dyn_generateKey(int size=-1) const; + TQByteArray dyn_generateIV() const; + void reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad=true); + bool update(const TQByteArray &a); + TQByteArray final(bool *ok=0); protected: - Cipher(QCA_CipherContext *, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad); + Cipher(QCA_CipherContext *, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad); private: class Private; @@ -171,13 +171,13 @@ namespace QCA public: CipherStatic<T>() {} - static QByteArray generateKey(int size=-1) + static TQByteArray generateKey(int size=-1) { T obj; return obj.dyn_generateKey(size); } - static QByteArray generateIV() + static TQByteArray generateIV() { T obj; return obj.dyn_generateIV(); @@ -205,25 +205,25 @@ namespace QCA class QCA_EXPORT BlowFish : public Cipher, public CipherStatic<BlowFish> { public: - BlowFish(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + BlowFish(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class QCA_EXPORT TripleDES : public Cipher, public CipherStatic<TripleDES> { public: - TripleDES(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + TripleDES(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class QCA_EXPORT AES128 : public Cipher, public CipherStatic<AES128> { public: - AES128(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + AES128(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class QCA_EXPORT AES256 : public Cipher, public CipherStatic<AES256> { public: - AES256(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + AES256(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class RSA; @@ -239,11 +239,11 @@ namespace QCA bool havePublic() const; bool havePrivate() const; - QByteArray toDER(bool publicOnly=false) const; - bool fromDER(const QByteArray &a); + TQByteArray toDER(bool publicOnly=false) const; + bool fromDER(const TQByteArray &a); - QString toPEM(bool publicOnly=false) const; - bool fromPEM(const QString &); + TQString toPEM(bool publicOnly=false) const; + bool fromPEM(const TQString &); // only call if you know what you are doing bool fromNative(void *); @@ -254,8 +254,8 @@ namespace QCA friend class RSA; friend class TLS; - bool encrypt(const QByteArray &a, QByteArray *out, bool oaep) const; - bool decrypt(const QByteArray &a, QByteArray *out, bool oaep) const; + bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const; + bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const; bool generate(unsigned int bits); }; @@ -268,8 +268,8 @@ namespace QCA RSAKey key() const; void setKey(const RSAKey &); - bool encrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const; - bool decrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const; + bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const; + bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const; static RSAKey generateKey(unsigned int bits); @@ -277,7 +277,7 @@ namespace QCA RSAKey v_key; }; - typedef QMap<QString, QString> CertProperties; + typedef TQMap<TQString, TQString> CertProperties; class QCA_EXPORT Cert { public: @@ -288,20 +288,20 @@ namespace QCA bool isNull() const; - QString commonName() const; - QString serialNumber() const; - QString subjectString() const; - QString issuerString() const; + TQString commonName() const; + TQString serialNumber() const; + TQString subjectString() const; + TQString issuerString() const; CertProperties subject() const; CertProperties issuer() const; - QDateTime notBefore() const; - QDateTime notAfter() const; + TQDateTime notBefore() const; + TQDateTime notAfter() const; - QByteArray toDER() const; - bool fromDER(const QByteArray &a); + TQByteArray toDER() const; + bool fromDER(const TQByteArray &a); - QString toPEM() const; - bool fromPEM(const QString &); + TQString toPEM() const; + bool fromPEM(const TQString &); private: class Private; @@ -332,26 +332,26 @@ namespace QCA }; enum Error { ErrHandshake, ErrCrypt }; - TLS(QObject *parent=0); + TLS(TQObject *parent=0); ~TLS(); void setCertificate(const Cert &cert, const RSAKey &key); - void setCertificateStore(const QPtrList<Cert> &store); // note: store must persist + void setCertificateStore(const TQPtrList<Cert> &store); // note: store must persist void reset(); - bool startClient(const QString &host=""); + bool startClient(const TQString &host=""); bool startServer(); void close(); bool isHandshaken() const; // plain (application side) - void write(const QByteArray &a); - QByteArray read(); + void write(const TQByteArray &a); + TQByteArray read(); // encoded (socket side) - void writeIncoming(const QByteArray &a); - QByteArray readOutgoing(); - QByteArray readUnprocessed(); + void writeIncoming(const TQByteArray &a); + TQByteArray readOutgoing(); + TQByteArray readUnprocessed(); // cert related const Cert & peerCertificate() const; @@ -390,10 +390,10 @@ namespace QCA NoUser, RemoteUnavail }; - SASL(QObject *parent=0); + SASL(TQObject *parent=0); ~SASL(); - static void setAppName(const QString &name); + static void setAppName(const TQString &name); void reset(); int errorCondition() const; @@ -409,40 +409,40 @@ namespace QCA void setMinimumSSF(int); void setMaximumSSF(int); - void setExternalAuthID(const QString &authid); + void setExternalAuthID(const TQString &authid); void setExternalSSF(int); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); - void setRemoteAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); + void setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port); // initialize - bool startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst=true); - bool startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist); + bool startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst=true); + bool startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist); // authentication - void putStep(const QByteArray &stepData); - void putServerFirstStep(const QString &mech); - void putServerFirstStep(const QString &mech, const QByteArray &clientInit); - void setUsername(const QString &user); - void setAuthzid(const QString &auth); - void setPassword(const QString &pass); - void setRealm(const QString &realm); + void putStep(const TQByteArray &stepData); + void putServerFirstStep(const TQString &mech); + void putServerFirstStep(const TQString &mech, const TQByteArray &clientInit); + void setUsername(const TQString &user); + void setAuthzid(const TQString &auth); + void setPassword(const TQString &pass); + void setRealm(const TQString &realm); void continueAfterParams(); void continueAfterAuthCheck(); // security layer int ssf() const; - void write(const QByteArray &a); - QByteArray read(); - void writeIncoming(const QByteArray &a); - QByteArray readOutgoing(); + void write(const TQByteArray &a); + TQByteArray read(); + void writeIncoming(const TQByteArray &a); + TQByteArray readOutgoing(); signals: // for authentication - void clientFirstStep(const QString &mech, const QByteArray *clientInit); - void nextStep(const QByteArray &stepData); + void clientFirstStep(const TQString &mech, const TQByteArray *clientInit); + void nextStep(const TQByteArray &stepData); void needParams(bool user, bool authzid, bool pass, bool realm); - void authCheck(const QString &user, const QString &authzid); + void authCheck(const TQString &user, const TQString &authzid); void authenticated(); // for security layer diff --git a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h index e6172434..6eda17f9 100644 --- a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h +++ b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h @@ -21,11 +21,11 @@ #ifndef QCAPROVIDER_H #define QCAPROVIDER_H -#include<qglobal.h> -#include<qstring.h> -#include<qdatetime.h> -#include<qobject.h> -#include<qhostaddress.h> +#include<tqglobal.h> +#include<tqstring.h> +#include<tqdatetime.h> +#include<tqobject.h> +#include<tqhostaddress.h> #include"qca.h" #define QCA_PLUGIN_VERSION 1 @@ -50,7 +50,7 @@ public: virtual QCA_HashContext *clone()=0; virtual void reset()=0; virtual void update(const char *in, unsigned int len)=0; - virtual void final(QByteArray *out)=0; + virtual void final(TQByteArray *out)=0; }; class QCA_CipherContext @@ -66,7 +66,7 @@ public: virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0; virtual bool update(const char *in, unsigned int len)=0; - virtual bool final(QByteArray *out)=0; + virtual bool final(TQByteArray *out)=0; }; class QCA_RSAKeyContext @@ -82,17 +82,17 @@ public: virtual bool createFromPEM(const char *in, unsigned int len)=0; virtual bool createFromNative(void *in)=0; virtual bool generate(unsigned int bits)=0; - virtual bool toDER(QByteArray *out, bool publicOnly)=0; - virtual bool toPEM(QByteArray *out, bool publicOnly)=0; + virtual bool toDER(TQByteArray *out, bool publicOnly)=0; + virtual bool toPEM(TQByteArray *out, bool publicOnly)=0; - virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0; - virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0; + virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0; + virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0; }; struct QCA_CertProperty { - QString var; - QString val; + TQString var; + TQString val; }; class QCA_CertContext @@ -104,17 +104,17 @@ public: virtual bool isNull() const=0; virtual bool createFromDER(const char *in, unsigned int len)=0; virtual bool createFromPEM(const char *in, unsigned int len)=0; - virtual bool toDER(QByteArray *out)=0; - virtual bool toPEM(QByteArray *out)=0; - - virtual QString serialNumber() const=0; - virtual QString subjectString() const=0; - virtual QString issuerString() const=0; - virtual QValueList<QCA_CertProperty> subject() const=0; - virtual QValueList<QCA_CertProperty> issuer() const=0; - virtual QDateTime notBefore() const=0; - virtual QDateTime notAfter() const=0; - virtual bool matchesAddress(const QString &realHost) const=0; + virtual bool toDER(TQByteArray *out)=0; + virtual bool toPEM(TQByteArray *out)=0; + + virtual TQString serialNumber() const=0; + virtual TQString subjectString() const=0; + virtual TQString issuerString() const=0; + virtual TQValueList<QCA_CertProperty> subject() const=0; + virtual TQValueList<QCA_CertProperty> issuer() const=0; + virtual TQDateTime notBefore() const=0; + virtual TQDateTime notAfter() const=0; + virtual bool matchesAddress(const TQString &realHost) const=0; }; class QCA_TLSContext @@ -124,15 +124,15 @@ public: virtual ~QCA_TLSContext() {} virtual void reset()=0; - virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; - virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; + virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; + virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; - virtual int handshake(const QByteArray &in, QByteArray *out)=0; - virtual int shutdown(const QByteArray &in, QByteArray *out)=0; - virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0; - virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0; + virtual int handshake(const TQByteArray &in, TQByteArray *out)=0; + virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0; + virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0; + virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0; virtual bool eof() const=0; - virtual QByteArray unprocessed()=0; + virtual TQByteArray unprocessed()=0; virtual QCA_CertContext *peerCertificate() const=0; virtual int validityResult() const=0; @@ -140,7 +140,7 @@ public: struct QCA_SASLHostPort { - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; @@ -157,35 +157,35 @@ public: // common virtual void reset()=0; - virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0; - virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0; + virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0; + virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0; virtual int security() const=0; virtual int errorCond() const=0; // init / first step - virtual bool clientStart(const QStringList &mechlist)=0; + virtual bool clientStart(const TQStringList &mechlist)=0; virtual int clientFirstStep(bool allowClientSendFirst)=0; - virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0; - virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0; + virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0; + virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0; // get / set params virtual QCA_SASLNeedParams clientParamsNeeded() const=0; - virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0; - virtual QString username() const=0; - virtual QString authzid() const=0; + virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0; + virtual TQString username() const=0; + virtual TQString authzid() const=0; // continue steps - virtual int nextStep(const QByteArray &in)=0; + virtual int nextStep(const TQByteArray &in)=0; virtual int tryAgain()=0; // results - virtual QString mech() const=0; - virtual const QByteArray *clientInit() const=0; - virtual QByteArray result() const=0; + virtual TQString mech() const=0; + virtual const TQByteArray *clientInit() const=0; + virtual TQByteArray result() const=0; // security layer - virtual bool encode(const QByteArray &in, QByteArray *out)=0; - virtual bool decode(const QByteArray &in, QByteArray *out)=0; + virtual bool encode(const TQByteArray &in, TQByteArray *out)=0; + virtual bool decode(const TQByteArray &in, TQByteArray *out)=0; }; #endif diff --git a/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp b/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp index f8e2b4ce..be558388 100644 --- a/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp +++ b/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp @@ -17,9 +17,9 @@ ***************************************************************************/ #include <kpushbutton.h> -#include <qgroupbox.h> -#include <qtable.h> -#include <qlabel.h> +#include <tqgroupbox.h> +#include <tqtable.h> +#include <tqlabel.h> #include <kmessagebox.h> #include <klocale.h> @@ -30,7 +30,7 @@ #include "jabberformtranslator.h" #include "dlgjabberbrowse.h" -dlgJabberBrowse::dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent, const char *name):dlgBrowse (parent, name) +dlgJabberBrowse::dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent, const char *name):dlgBrowse (parent, name) { m_account = account; @@ -41,11 +41,11 @@ dlgJabberBrowse::dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, tblResults->setNumRows (0); // disable user selections - tblResults->setSelectionMode (QTable::NoSelection); + tblResults->setSelectionMode (TQTable::NoSelection); XMPP::JT_Search * task = new XMPP::JT_Search (m_account->client()->rootTask ()); - connect (task, SIGNAL (finished ()), this, SLOT (slotGotForm ())); + connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotGotForm ())); task->get (jid); task->go (true); @@ -83,7 +83,7 @@ void dlgJabberBrowse::slotGotForm () tblResults->setColumnStretchable (i, true); } - connect (btnSearch, SIGNAL (clicked ()), this, SLOT (slotSendForm ())); + connect (btnSearch, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSendForm ())); } @@ -92,7 +92,7 @@ void dlgJabberBrowse::slotSendForm () XMPP::JT_Search * task = new XMPP::JT_Search (m_account->client()->rootTask ()); - connect (task, SIGNAL (finished ()), this, SLOT (slotSentForm ())); + connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentForm ())); task->set (translator->resultData ()); task->go (true); @@ -120,7 +120,7 @@ void dlgJabberBrowse::slotSentForm () int row = 0; - for (QValueList < XMPP::SearchResult >::const_iterator it = task->results ().begin (); it != task->results ().end (); ++it) + for (TQValueList < XMPP::SearchResult >::const_iterator it = task->results ().begin (); it != task->results ().end (); ++it) { tblResults->setText (row, 0, (*it).jid ().userHost ()); tblResults->setText (row, 1, (*it).first ()); diff --git a/kopete/protocols/jabber/ui/dlgjabberbrowse.h b/kopete/protocols/jabber/ui/dlgjabberbrowse.h index 8a8b6cc1..20886005 100644 --- a/kopete/protocols/jabber/ui/dlgjabberbrowse.h +++ b/kopete/protocols/jabber/ui/dlgjabberbrowse.h @@ -19,7 +19,7 @@ #ifndef DLGJABBERBROWSE_H #define DLGJABBERBROWSE_H -#include <qwidget.h> +#include <tqwidget.h> #include "xmpp_tasks.h" @@ -37,7 +37,7 @@ class dlgJabberBrowse:public dlgBrowse Q_OBJECT public: - dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent = 0, const char *name = 0); + dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent = 0, const char *name = 0); ~dlgJabberBrowse (); private slots: diff --git a/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp b/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp index 9f6ae65d..948a594e 100644 --- a/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp +++ b/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp @@ -23,14 +23,14 @@ #include <klocale.h> #include <kpassdlg.h> #include <kmessagebox.h> -#include <qlabel.h> -#include <qlineedit.h> +#include <tqlabel.h> +#include <tqlineedit.h> #include <kopetepassword.h> #include <xmpp_tasks.h> #include "jabberaccount.h" #include "dlgchangepassword.h" -DlgJabberChangePassword::DlgJabberChangePassword ( JabberAccount *account, QWidget *parent, const char *name ) +DlgJabberChangePassword::DlgJabberChangePassword ( JabberAccount *account, TQWidget *parent, const char *name ) : KDialogBase ( parent, name, true, i18n("Change Jabber Password"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ) { @@ -80,7 +80,7 @@ void DlgJabberChangePassword::slotOk () i18n ( "Your account needs to be connected before the password can be changed. Do you want to try to connect now?" ), i18n ( "Jabber Password Change" ), i18n("Connect"), i18n("Stay Offline") ) == KMessageBox::Yes ) { - connect ( m_account, SIGNAL ( isConnectedChanged () ), this, SLOT ( slotChangePassword () ) ); + connect ( m_account, TQT_SIGNAL ( isConnectedChanged () ), this, TQT_SLOT ( slotChangePassword () ) ); m_account->connect (); } } @@ -102,7 +102,7 @@ void DlgJabberChangePassword::slotChangePassword () { XMPP::JT_Register *task = new XMPP::JT_Register ( m_account->client()->rootTask () ); - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotChangePasswordDone () ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotChangePasswordDone () ) ); task->changepw ( m_mainWidget->peNewPassword1->password () ); task->go ( true ); @@ -116,7 +116,7 @@ void DlgJabberChangePassword::slotChangePasswordDone () if ( task->success () ) { - KMessageBox::queuedMessageBox ( dynamic_cast<QWidget*>(parent()), KMessageBox::Information, + KMessageBox::queuedMessageBox ( dynamic_cast<TQWidget*>(parent()), KMessageBox::Information, i18n ( "Your password has been changed successfully. Please note that the change may not be instantaneous. If you have problems logging in with your new password, please contact the administrator." ), i18n ( "Jabber Password Change" ) ); @@ -124,7 +124,7 @@ void DlgJabberChangePassword::slotChangePasswordDone () } else { - KMessageBox::queuedMessageBox ( dynamic_cast<QWidget*>(parent()), KMessageBox::Sorry, + KMessageBox::queuedMessageBox ( dynamic_cast<TQWidget*>(parent()), KMessageBox::Sorry, i18n ( "Your password could not be changed. Either your server does not support this feature or the administrator does not allow you to change your password." ) ); } diff --git a/kopete/protocols/jabber/ui/dlgjabberchangepassword.h b/kopete/protocols/jabber/ui/dlgjabberchangepassword.h index 84e880c5..023485ec 100644 --- a/kopete/protocols/jabber/ui/dlgjabberchangepassword.h +++ b/kopete/protocols/jabber/ui/dlgjabberchangepassword.h @@ -34,7 +34,7 @@ class DlgJabberChangePassword : public KDialogBase Q_OBJECT public: - DlgJabberChangePassword ( JabberAccount *account, QWidget *parent = 0, const char *name = 0); + DlgJabberChangePassword ( JabberAccount *account, TQWidget *parent = 0, const char *name = 0); ~DlgJabberChangePassword(); private slots: diff --git a/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp b/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp index 620bff03..9d69beae 100644 --- a/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp +++ b/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp @@ -18,8 +18,8 @@ #include <kdebug.h> #include <klocale.h> -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> #include "jabberaccount.h" #include "jabberclient.h" @@ -27,7 +27,7 @@ #include "dlgjabberchatjoin.h" -dlgJabberChatJoin::dlgJabberChatJoin(JabberAccount *account, QWidget* parent, const char* name) : +dlgJabberChatJoin::dlgJabberChatJoin(JabberAccount *account, TQWidget* parent, const char* name) : dlgChatJoin(parent, name), m_account(account) { @@ -77,7 +77,7 @@ void dlgJabberChatJoin::slotBowse() void dlgJabberChatJoin::checkDefaultChatroomServer() { XMPP::JT_GetServices *serviceTask = new XMPP::JT_GetServices(m_account->client()->rootTask()); - connect(serviceTask, SIGNAL (finished()), this, SLOT (slotQueryFinished())); + connect(serviceTask, TQT_SIGNAL (finished()), this, TQT_SLOT (slotQueryFinished())); serviceTask->get(m_account->server()); serviceTask->go(true); @@ -97,7 +97,7 @@ void dlgJabberChatJoin::slotQueryFinished() for (XMPP::AgentList::const_iterator it = task->agents().begin(); it != task->agents().end(); ++it) { XMPP::JT_DiscoInfo *discoTask = new XMPP::JT_DiscoInfo(m_account->client()->rootTask()); - connect(discoTask, SIGNAL (finished()), this, SLOT (slotDiscoFinished())); + connect(discoTask, TQT_SIGNAL (finished()), this, TQT_SLOT (slotDiscoFinished())); discoTask->get((*it).jid().full()); discoTask->go(true); diff --git a/kopete/protocols/jabber/ui/dlgjabberchatjoin.h b/kopete/protocols/jabber/ui/dlgjabberchatjoin.h index fad58fcb..d68ae78e 100644 --- a/kopete/protocols/jabber/ui/dlgjabberchatjoin.h +++ b/kopete/protocols/jabber/ui/dlgjabberchatjoin.h @@ -27,7 +27,7 @@ class dlgJabberChatJoin : public dlgChatJoin Q_OBJECT public: - dlgJabberChatJoin(JabberAccount *account, QWidget* parent = 0, const char* name = 0); + dlgJabberChatJoin(JabberAccount *account, TQWidget* parent = 0, const char* name = 0); ~dlgJabberChatJoin(); /*$PUBLIC_FUNCTIONS$*/ diff --git a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp index aea2843f..1803a013 100644 --- a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp +++ b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp @@ -13,15 +13,15 @@ #include <klocale.h> #include <kdebug.h> -#include <qtable.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqtable.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqlabel.h> #include "dlgjabberchatroomslist.h" #include "jabberprotocol.h" -dlgJabberChatRoomsList::dlgJabberChatRoomsList(JabberAccount* account, const QString& server, const QString &nick, QWidget *parent, const char *name) : +dlgJabberChatRoomsList::dlgJabberChatRoomsList(JabberAccount* account, const TQString& server, const TQString &nick, TQWidget *parent, const char *name) : dlgChatRoomsList(parent, name), m_account(account) , m_selectedRow(-1) , m_nick(nick) { @@ -74,7 +74,7 @@ void dlgJabberChatRoomsList::slotQuery() tblChatRoomsList->setNumRows(0); XMPP::JT_DiscoItems *discoTask = new XMPP::JT_DiscoItems(m_account->client()->rootTask()); - connect (discoTask, SIGNAL(finished()), this, SLOT(slotQueryFinished())); + connect (discoTask, TQT_SIGNAL(finished()), this, TQT_SLOT(slotQueryFinished())); m_chatServer = leServer->text(); discoTask->get(leServer->text()); @@ -102,13 +102,13 @@ void dlgJabberChatRoomsList::slotQueryFinished() } } -void dlgJabberChatRoomsList::slotDoubleClick(int row, int /*col*/, int /*button*/, const QPoint& /*mousePos*/) +void dlgJabberChatRoomsList::slotDoubleClick(int row, int /*col*/, int /*button*/, const TQPoint& /*mousePos*/) { m_selectedRow = row; slotJoin(); } -void dlgJabberChatRoomsList::slotClick(int row, int /*col*/, int /*button*/, const QPoint& /*mousePos*/) +void dlgJabberChatRoomsList::slotClick(int row, int /*col*/, int /*button*/, const TQPoint& /*mousePos*/) { m_selectedRow = row; } diff --git a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h index 1db296d7..6b1dce7b 100644 --- a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h +++ b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h @@ -23,7 +23,7 @@ class dlgJabberChatRoomsList : public dlgChatRoomsList Q_OBJECT public: - dlgJabberChatRoomsList(JabberAccount* account, const QString& server = QString::null, const QString& nick = QString::null, QWidget* parent = 0, const char* name = 0); + dlgJabberChatRoomsList(JabberAccount* account, const TQString& server = TQString::null, const TQString& nick = TQString::null, TQWidget* parent = 0, const char* name = 0); ~dlgJabberChatRoomsList(); /*$PUBLIC_FUNCTIONS$*/ @@ -31,8 +31,8 @@ public slots: /*$PUBLIC_SLOTS$*/ virtual void slotJoin(); virtual void slotQuery(); - virtual void slotDoubleClick(int row, int col, int button, const QPoint& mousePos); - virtual void slotClick(int row, int col, int button, const QPoint& mousePos); + virtual void slotDoubleClick(int row, int col, int button, const TQPoint& mousePos); + virtual void slotClick(int row, int col, int button, const TQPoint& mousePos); protected: /*$PROTECTED_FUNCTIONS$*/ @@ -46,8 +46,8 @@ private: JabberAccount *m_account; int m_selectedRow; - QString m_chatServer; - QString m_nick; + TQString m_chatServer; + TQString m_nick; }; #endif diff --git a/kopete/protocols/jabber/ui/dlgjabberregister.cpp b/kopete/protocols/jabber/ui/dlgjabberregister.cpp index e16b5652..ff324085 100644 --- a/kopete/protocols/jabber/ui/dlgjabberregister.cpp +++ b/kopete/protocols/jabber/ui/dlgjabberregister.cpp @@ -16,7 +16,7 @@ * * ***************************************************************************/ -#include <qpushbutton.h> +#include <tqpushbutton.h> #include <kmessagebox.h> #include <klocale.h> @@ -26,13 +26,13 @@ #include "jabberclient.h" #include "dlgjabberregister.h" -dlgJabberRegister::dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent, const char *name):dlgRegister (parent, name) +dlgJabberRegister::dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent, const char *name):dlgRegister (parent, name) { m_account = account; XMPP::JT_Register * task = new XMPP::JT_Register(m_account->client()->rootTask ()); - connect (task, SIGNAL (finished ()), this, SLOT (slotGotForm ())); + connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotGotForm ())); task->getForm (jid); task->go (true); @@ -59,14 +59,14 @@ void dlgJabberRegister::slotGotForm () // translate the form and create it inside the box widget translator = new JabberFormTranslator (task->form (), grpForm); - static_cast<QBoxLayout*>(grpForm->layout())->insertWidget(1, translator); + static_cast<TQBoxLayout*>(grpForm->layout())->insertWidget(1, translator); translator->show(); resize(sizeHint()); // enable the send button btnRegister->setEnabled (true); - connect (btnRegister, SIGNAL (clicked ()), this, SLOT (slotSendForm ())); + connect (btnRegister, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSendForm ())); } @@ -76,7 +76,7 @@ void dlgJabberRegister::slotSendForm () return; XMPP::JT_Register * task = new XMPP::JT_Register (m_account->client()->rootTask ()); - connect (task, SIGNAL (finished ()), this, SLOT (slotSentForm ())); + connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentForm ())); task->setForm (translator->resultData ()); task->go (true); diff --git a/kopete/protocols/jabber/ui/dlgjabberregister.h b/kopete/protocols/jabber/ui/dlgjabberregister.h index 36bc0bab..5cb0af67 100644 --- a/kopete/protocols/jabber/ui/dlgjabberregister.h +++ b/kopete/protocols/jabber/ui/dlgjabberregister.h @@ -19,10 +19,10 @@ #ifndef DLGJABBERREGISTER_H #define DLGJABBERREGISTER_H -#include <qwidget.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> #include "im.h" #include "xmpp.h" @@ -41,7 +41,7 @@ class dlgJabberRegister:public dlgRegister Q_OBJECT public: - dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent = 0, const char *name = 0); + dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent = 0, const char *name = 0); ~dlgJabberRegister (); private slots: diff --git a/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp b/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp index 17b2d181..4b9192dc 100644 --- a/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp +++ b/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp @@ -18,20 +18,20 @@ #include "dlgjabbersendraw.h" -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qtextedit.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqtextedit.h> #include <kdebug.h> #include "jabberclient.h" -dlgJabberSendRaw::dlgJabberSendRaw ( JabberClient *client, QWidget *parent, const char *name ) +dlgJabberSendRaw::dlgJabberSendRaw ( JabberClient *client, TQWidget *parent, const char *name ) : DlgSendRaw (parent, name) { // Connect the GUI elements to things that do stuff - connect (btnSend, SIGNAL (clicked ()), this, SLOT (slotSend ())); - connect (btnClose, SIGNAL (clicked ()), this, SLOT (slotCancel ())); - connect (btnClear, SIGNAL (clicked ()), this, SLOT (slotClear ())); - connect (inputWidget, SIGNAL (activated (int)), this, SLOT (slotCreateMessage (int))); + connect (btnSend, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSend ())); + connect (btnClose, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotCancel ())); + connect (btnClear, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotClear ())); + connect (inputWidget, TQT_SIGNAL (activated (int)), this, TQT_SLOT (slotCreateMessage (int))); m_client = client; @@ -58,7 +58,7 @@ void dlgJabberSendRaw::slotCreateMessage(int index) { switch (index) { case 1: - tePacket->setText(QString("<iq type='set' to='%1'>\n<query xmlns='jabber:iq:register'><remove/>\n</query>\n</iq>") + tePacket->setText(TQString("<iq type='set' to='%1'>\n<query xmlns='jabber:iq:register'><remove/>\n</query>\n</iq>") .arg ( m_client->jid().domain () ) ); break; case 2: @@ -68,11 +68,11 @@ void dlgJabberSendRaw::slotCreateMessage(int index) tePacket->setText("<iq type='get' to='USER@DOMAIN'>\n<query xmlns='jabber:iq:last'/></iq>"); break; case 4: - tePacket->setText(QString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<body>Body text</body>\n</message>") + tePacket->setText(TQString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<body>Body text</body>\n</message>") .arg ( m_client->jid().node (), m_client->jid().domain (), m_client->jid().resource () ) ); break; case 5: - tePacket->setText(QString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<subject>Subject</subject><body>Body text</body>\n</message>") + tePacket->setText(TQString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<subject>Subject</subject><body>Body text</body>\n</message>") .arg ( m_client->jid().node (), m_client->jid().domain (), m_client->jid().resource () ) ); break; diff --git a/kopete/protocols/jabber/ui/dlgjabbersendraw.h b/kopete/protocols/jabber/ui/dlgjabbersendraw.h index 6570363b..44e1a9ad 100644 --- a/kopete/protocols/jabber/ui/dlgjabbersendraw.h +++ b/kopete/protocols/jabber/ui/dlgjabbersendraw.h @@ -19,7 +19,7 @@ #ifndef DLGJABBERSENDRAW_H #define DLGJABBERSENDRAW_H -#include <qwidget.h> +#include <tqwidget.h> #include "dlgsendraw.h" class JabberClient; @@ -27,7 +27,7 @@ class JabberClient; /** * A dialog to send raw strings to the jabber server. * - * It comes with a QComboBox to choose some "template" strings + * It comes with a TQComboBox to choose some "template" strings * like "Availability Status", "Subscription",... * * @author Till Gerken <till@tantalo.net> @@ -38,7 +38,7 @@ class dlgJabberSendRaw:public DlgSendRaw Q_OBJECT public: - dlgJabberSendRaw ( JabberClient *client, QWidget * parent = 0, const char *name = 0); + dlgJabberSendRaw ( JabberClient *client, TQWidget * parent = 0, const char *name = 0); virtual ~ dlgJabberSendRaw (); public slots: diff --git a/kopete/protocols/jabber/ui/dlgjabberservices.cpp b/kopete/protocols/jabber/ui/dlgjabberservices.cpp index 00e99f45..1bd1310c 100644 --- a/kopete/protocols/jabber/ui/dlgjabberservices.cpp +++ b/kopete/protocols/jabber/ui/dlgjabberservices.cpp @@ -20,9 +20,9 @@ #include <klocale.h> #include <kdebug.h> -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qtable.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> +#include <tqtable.h> #include "jabberaccount.h" #include "jabberclient.h" @@ -32,7 +32,7 @@ #include "dlgjabberservices.moc" -dlgJabberServices::dlgJabberServices (JabberAccount *account, QWidget *parent, const char *name):dlgServices (parent, name) +dlgJabberServices::dlgJabberServices (JabberAccount *account, TQWidget *parent, const char *name):dlgServices (parent, name) { m_account = account; @@ -57,22 +57,22 @@ dlgJabberServices::dlgJabberServices (JabberAccount *account, QWidget *parent, c //tblServices->setColumnStretchable (1, true); // disable user selections - //tblServices->setSelectionMode (QTable::NoSelection); + //tblServices->setSelectionMode (TQTable::NoSelection); // name table headers //tblServices->horizontalHeader ()->setLabel (0, i18n ("Name")); //tblServices->horizontalHeader ()->setLabel (1, i18n ("Address")); - connect (btnQuery, SIGNAL (clicked ()), this, SLOT (slotDisco ())); - //connect (tblServices, SIGNAL (clicked (int, int, int, const QPoint &)), this, SLOT (slotSetSelection (int, int, int, const QPoint &))); - connect (lvServices, SIGNAL (selectionChanged (QListViewItem *)), this, SLOT (slotSetSelection (QListViewItem *))); + connect (btnQuery, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotDisco ())); + //connect (tblServices, TQT_SIGNAL (clicked (int, int, int, const TQPoint &)), this, TQT_SLOT (slotSetSelection (int, int, int, const TQPoint &))); + connect (lvServices, TQT_SIGNAL (selectionChanged (TQListViewItem *)), this, TQT_SLOT (slotSetSelection (TQListViewItem *))); - connect (btnRegister, SIGNAL (clicked ()), this, SLOT (slotRegister ())); - connect (btnBrowse, SIGNAL (clicked ()), this, SLOT (slotBrowse ())); + connect (btnRegister, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotRegister ())); + connect (btnBrowse, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotBrowse ())); } -void dlgJabberServices::slotSetSelection (QListViewItem *it) +void dlgJabberServices::slotSetSelection (TQListViewItem *it) { dlgJabberServies_item *item=dynamic_cast<dlgJabberServies_item*>(it); if(!item) @@ -99,7 +99,7 @@ void dlgJabberServices::slotService () } XMPP::JT_GetServices *serviceTask = new XMPP::JT_GetServices (m_account->client()->rootTask ()); - connect (serviceTask, SIGNAL (finished ()), this, SLOT (slotServiceFinished ())); + connect (serviceTask, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotServiceFinished ())); /* populate server field if it is empty */ if(leServer->text().isEmpty()) @@ -121,7 +121,7 @@ void dlgJabberServices::slotServiceFinished () if (!task->success ()) { - QString error = task->statusString(); + TQString error = task->statusString(); KMessageBox::queuedMessageBox (this, KMessageBox::Error, i18n ("Unable to retrieve the list of services.\nReason: %1").arg(error), i18n ("Jabber Error")); return; } @@ -148,13 +148,13 @@ void dlgJabberServices::slotDisco() } JT_DiscoItems *jt = new JT_DiscoItems(m_account->client()->rootTask()); - connect(jt, SIGNAL(finished()), this, SLOT(slotDiscoFinished())); + connect(jt, TQT_SIGNAL(finished()), this, TQT_SLOT(slotDiscoFinished())); /* populate server field if it is empty */ if(leServer->text().isEmpty()) leServer->setText(m_account->server()); - jt->get(leServer->text() , QString()); + jt->get(leServer->text() , TQString()); jt->go(true); } @@ -168,11 +168,11 @@ void dlgJabberServices::slotDiscoFinished( ) if ( jt->success() ) { - QValueList<XMPP::DiscoItem> list = jt->items(); + TQValueList<XMPP::DiscoItem> list = jt->items(); lvServices->clear(); - for(QValueList<XMPP::DiscoItem>::ConstIterator it = list.begin(); it != list.end(); ++it) + for(TQValueList<XMPP::DiscoItem>::ConstIterator it = list.begin(); it != list.end(); ++it) { const XMPP::DiscoItem a = *it; dlgJabberServies_item *item=new dlgJabberServies_item( lvServices , (*it).jid ().userHost () , (*it).name ()); @@ -211,10 +211,10 @@ dlgJabberServices::~dlgJabberServices () { } -void dlgJabberServies_item::updateInfo( const XMPP::Jid & jid , const QString & node , JabberAccount *account ) +void dlgJabberServies_item::updateInfo( const XMPP::Jid & jid , const TQString & node , JabberAccount *account ) { XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account->client()->rootTask()); - connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished())); + connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished())); jt->get(jid, node); jt->go(true); diff --git a/kopete/protocols/jabber/ui/dlgjabberservices.h b/kopete/protocols/jabber/ui/dlgjabberservices.h index f2d4cedc..c64fb045 100644 --- a/kopete/protocols/jabber/ui/dlgjabberservices.h +++ b/kopete/protocols/jabber/ui/dlgjabberservices.h @@ -19,13 +19,13 @@ #ifndef DLGJABBERSERVICES_H #define DLGJABBERSERVICES_H -#include <qwidget.h> +#include <tqwidget.h> #include "jabberaccount.h" #include "xmpp_tasks.h" #include "dlgservices.h" -#include <qlistview.h> +#include <tqlistview.h> /** *@author Till Gerken <till@tantalo.net> @@ -36,11 +36,11 @@ class dlgJabberServices:public dlgServices Q_OBJECT public: - dlgJabberServices (JabberAccount *account, QWidget *parent = 0, const char *name = 0); + dlgJabberServices (JabberAccount *account, TQWidget *parent = 0, const char *name = 0); ~dlgJabberServices (); private slots: - void slotSetSelection (QListViewItem *); + void slotSetSelection (TQListViewItem *); void slotService (); void slotServiceFinished (); void slotRegister (); @@ -56,16 +56,16 @@ private: }; -class dlgJabberServies_item : protected QObject, public QListViewItem +class dlgJabberServies_item : protected TQObject, public TQListViewItem { Q_OBJECT public: - dlgJabberServies_item( QListView *parent , const QString &s1 , const QString &s2 ) - : QListViewItem(parent,s1,s2), can_browse(false) , can_register(false) {} + dlgJabberServies_item( TQListView *parent , const TQString &s1 , const TQString &s2 ) + : TQListViewItem(parent,s1,s2), can_browse(false) , can_register(false) {} bool can_browse, can_register; XMPP::Jid jid; - void updateInfo(const XMPP::Jid& jid, const QString &node , JabberAccount *account); + void updateInfo(const XMPP::Jid& jid, const TQString &node , JabberAccount *account); private slots: void slotDiscoFinished(); }; diff --git a/kopete/protocols/jabber/ui/dlgjabbervcard.cpp b/kopete/protocols/jabber/ui/dlgjabbervcard.cpp index b35e091a..19070798 100644 --- a/kopete/protocols/jabber/ui/dlgjabbervcard.cpp +++ b/kopete/protocols/jabber/ui/dlgjabbervcard.cpp @@ -23,10 +23,10 @@ #include "dlgjabbervcard.h" // Qt includes -#include <qtextedit.h> -#include <qwidgetstack.h> -#include <qregexp.h> -#include <qbuffer.h> +#include <tqtextedit.h> +#include <tqwidgetstack.h> +#include <tqregexp.h> +#include <tqbuffer.h> // KDE includes #include <kdebug.h> @@ -60,7 +60,7 @@ * name 'name' * */ -dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, QWidget * parent, const char *name) +dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, TQWidget * parent, const char *name) : KDialogBase (parent, name, false, i18n("Jabber vCard"), Close | User1 | User2, Close, false, i18n("&Save User Info"), i18n("&Fetch vCard") ) { @@ -70,14 +70,14 @@ dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *conta m_mainWidget = new dlgVCard(this); setMainWidget(m_mainWidget); - connect (this, SIGNAL (user1Clicked()), this, SLOT (slotSaveVCard ())); - connect (this, SIGNAL( user2Clicked()), this, SLOT (slotGetVCard ())); + connect (this, TQT_SIGNAL (user1Clicked()), this, TQT_SLOT (slotSaveVCard ())); + connect (this, TQT_SIGNAL( user2Clicked()), this, TQT_SLOT (slotGetVCard ())); - connect (m_mainWidget->btnSelectPhoto, SIGNAL (clicked()), this, SLOT (slotSelectPhoto())); - connect (m_mainWidget->btnClearPhoto, SIGNAL (clicked()), this, SLOT (slotClearPhoto())); - connect (m_mainWidget->urlHomeEmail, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &))); - connect (m_mainWidget->urlWorkEmail, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &))); - connect (m_mainWidget->urlHomepage, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &))); + connect (m_mainWidget->btnSelectPhoto, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotSelectPhoto())); + connect (m_mainWidget->btnClearPhoto, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotClearPhoto())); + connect (m_mainWidget->urlHomeEmail, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &))); + connect (m_mainWidget->urlWorkEmail, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &))); + connect (m_mainWidget->urlHomepage, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &))); assignContactProperties(); @@ -120,7 +120,7 @@ void dlgJabberVCard::assignContactProperties () m_mainWidget->leBirthday->setText (m_contact->property(m_account->protocol()->propBirthday).value().toString()); m_mainWidget->leTimezone->setText (m_contact->property(m_account->protocol()->propTimezone).value().toString()); - QString homepage = m_contact->property(m_account->protocol()->propHomepage).value().toString(); + TQString homepage = m_contact->property(m_account->protocol()->propHomepage).value().toString(); m_mainWidget->leHomepage->setText (homepage); m_mainWidget->urlHomepage->setText (homepage); m_mainWidget->urlHomepage->setURL (homepage); @@ -130,7 +130,7 @@ void dlgJabberVCard::assignContactProperties () m_photoPath = m_contact->property(m_account->protocol()->propPhoto).value().toString(); if( !m_photoPath.isEmpty() ) { - m_mainWidget->lblPhoto->setPixmap( QPixmap(m_photoPath) ); + m_mainWidget->lblPhoto->setPixmap( TQPixmap(m_photoPath) ); } // addresses @@ -152,8 +152,8 @@ void dlgJabberVCard::assignContactProperties () m_mainWidget->urlWorkEmail->setUseCursor ( false ); m_mainWidget->urlHomeEmail->setUseCursor ( false ); - QString workEmail = m_contact->property(m_account->protocol()->propWorkEmailAddress).value().toString(); - QString homeEmail = m_contact->property(m_account->protocol()->propEmailAddress).value().toString(); + TQString workEmail = m_contact->property(m_account->protocol()->propWorkEmailAddress).value().toString(); + TQString homeEmail = m_contact->property(m_account->protocol()->propEmailAddress).value().toString(); m_mainWidget->leWorkEmail->setText (workEmail); m_mainWidget->urlWorkEmail->setText (workEmail); m_mainWidget->urlWorkEmail->setURL ("mailto:" + workEmail); @@ -358,7 +358,7 @@ void dlgJabberVCard::slotSaveVCard() // work information tab XMPP::VCard::Org org; org.name = m_mainWidget->leCompany->text(); - org.unit = QStringList::split(",", m_mainWidget->leDepartment->text()); + org.unit = TQStringList::split(",", m_mainWidget->leDepartment->text()); vCard.setOrg(org); vCard.setTitle( m_mainWidget->lePosition->text() ); vCard.setRole( m_mainWidget->leRole->text() ); @@ -393,10 +393,10 @@ void dlgJabberVCard::slotSaveVCard() // Set contact photo as a binary value (if he has set a photo) if( !m_photoPath.isEmpty() ) { - QString photoPath = m_photoPath; - QImage image( photoPath ); - QByteArray ba; - QBuffer buffer( ba ); + TQString photoPath = m_photoPath; + TQImage image( photoPath ); + TQByteArray ba; + TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); image.save( &buffer, "PNG" ); vCard.setPhoto( ba ); @@ -407,7 +407,7 @@ void dlgJabberVCard::slotSaveVCard() XMPP::JT_VCard *task = new XMPP::JT_VCard( m_account->client()->rootTask() ); // signal to ourselves when the vCard data arrived - QObject::connect(task, SIGNAL(finished()), this, SLOT(slotVCardSaved())); + TQObject::connect(task, TQT_SIGNAL(finished()), this, TQT_SLOT(slotVCardSaved())); task->set(vCard); task->go(true); } @@ -438,7 +438,7 @@ void dlgJabberVCard::slotGetVCard() XMPP::JT_VCard *task = new XMPP::JT_VCard ( m_account->client()->rootTask() ); // signal to ourselves when the vCard data arrived - QObject::connect( task, SIGNAL ( finished () ), this, SLOT ( slotGotVCard () ) ); + TQObject::connect( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotVCard () ) ); task->get ( m_contact->rosterItem().jid().full() ); task->go ( true ); } @@ -467,9 +467,9 @@ void dlgJabberVCard::slotGotVCard() void dlgJabberVCard::slotSelectPhoto() { - QString path; + TQString path; bool remoteFile = false; - KURL filePath = KFileDialog::getImageOpenURL( QString::null, this, i18n( "Jabber Photo" ) ); + KURL filePath = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "Jabber Photo" ) ); if( filePath.isEmpty() ) return; @@ -485,15 +485,15 @@ void dlgJabberVCard::slotSelectPhoto() else path = filePath.path(); - QImage img( path ); - img = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(img), 96, 96, this ); + TQImage img( path ); + img = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(img), 96, 96, this ); if( !img.isNull() ) { if(img.width() > 96 || img.height() > 96) { // Scale and crop the picture. - img = img.smoothScale( 96, 96, QImage::ScaleMin ); + img = img.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(img.width() < img.height()) img = img.copy((img.width()-img.height())/2, 0, 96, 96); @@ -504,7 +504,7 @@ void dlgJabberVCard::slotSelectPhoto() else if (img.width() < 32 || img.height() < 32) { // Scale and crop the picture. - img = img.smoothScale( 32, 32, QImage::ScaleMin ); + img = img.smoothScale( 32, 32, TQImage::ScaleMin ); // crop image if not square if(img.width() < img.height()) img = img.copy((img.width()-img.height())/2, 0, 32, 32); @@ -520,14 +520,14 @@ void dlgJabberVCard::slotSelectPhoto() img = img.copy(0, (img.height()-img.width())/2, img.height(), img.height()); } - m_photoPath = locateLocal("appdata", "jabberphotos/" + m_contact->rosterItem().jid().full().lower().replace(QRegExp("[./~]"),"-") +".png"); + m_photoPath = locateLocal("appdata", "jabberphotos/" + m_contact->rosterItem().jid().full().lower().replace(TQRegExp("[./~]"),"-") +".png"); if( img.save(m_photoPath, "PNG") ) { - m_mainWidget->lblPhoto->setPixmap( QPixmap(img) ); + m_mainWidget->lblPhoto->setPixmap( TQPixmap(img) ); } else { - m_photoPath = QString::null; + m_photoPath = TQString::null; } } else @@ -541,13 +541,13 @@ void dlgJabberVCard::slotSelectPhoto() void dlgJabberVCard::slotClearPhoto() { - m_mainWidget->lblPhoto->setPixmap( QPixmap() ); - m_photoPath = QString::null; + m_mainWidget->lblPhoto->setPixmap( TQPixmap() ); + m_photoPath = TQString::null; } -void dlgJabberVCard::slotOpenURL(const QString &url) +void dlgJabberVCard::slotOpenURL(const TQString &url) { - if ( !url.isEmpty () || (url == QString::fromLatin1("mailto:") ) ) + if ( !url.isEmpty () || (url == TQString::fromLatin1("mailto:") ) ) new KRun(KURL( url ) ); } diff --git a/kopete/protocols/jabber/ui/dlgjabbervcard.h b/kopete/protocols/jabber/ui/dlgjabbervcard.h index 2bea5a2b..05a80940 100644 --- a/kopete/protocols/jabber/ui/dlgjabbervcard.h +++ b/kopete/protocols/jabber/ui/dlgjabbervcard.h @@ -55,7 +55,7 @@ public: * @param widget Parent widget. * @param name widget name. */ - dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, QWidget * parent = 0, const char *name = 0); + dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, TQWidget * parent = 0, const char *name = 0); ~dlgJabberVCard (); private slots: @@ -83,7 +83,7 @@ private slots: /** * Open a link. (ex: the homepage link or the email address) */ - void slotOpenURL(const QString &url); + void slotOpenURL(const TQString &url); /** * Retrieve vCard information for the current contact. @@ -99,7 +99,7 @@ private: JabberAccount *m_account; JabberBaseContact *m_contact; dlgVCard *m_mainWidget; - QString m_photoPath; + TQString m_photoPath; void assignContactProperties(); void setReadOnly(bool state); diff --git a/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp b/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp index 950d5680..076b92b8 100644 --- a/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp +++ b/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp @@ -20,11 +20,11 @@ #include "jabberaddcontactpage.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klineedit.h> #include <klocale.h> #include <kopeteaccount.h> -#include <qlabel.h> +#include <tqlabel.h> #include <kopetegroup.h> #include <kopetemetacontact.h> @@ -35,9 +35,9 @@ #include "jabberclient.h" #include "xmpp_tasks.h" -JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, QWidget * parent, const char *name):AddContactPage (parent, name) +JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, TQWidget * parent, const char *name):AddContactPage (parent, name) { - (new QVBoxLayout (this))->setAutoAdd (true); + (new TQVBoxLayout (this))->setAutoAdd (true); JabberTransport *transport=dynamic_cast<JabberTransport*>(owner); JabberAccount *jaccount= transport ? transport->account() : dynamic_cast<JabberAccount*>(owner); @@ -51,7 +51,7 @@ JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, QWidget * p { jabData->textLabel1->setText( i18n("Loading instruction from gateway...") ); XMPP::JT_Gateway * gatewayTask = new XMPP::JT_Gateway ( jaccount->client()->rootTask () ); - QObject::connect (gatewayTask, SIGNAL (finished ()), this, SLOT (slotPromtReceived())); + TQObject::connect (gatewayTask, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotPromtReceived())); gatewayTask->get ( transport->myself()->contactId() ); gatewayTask->go ( true ); } @@ -59,8 +59,8 @@ JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, QWidget * p } else { - noaddMsg1 = new QLabel (i18n ("You need to be connected to be able to add contacts."), this); - noaddMsg2 = new QLabel (i18n ("Connect to the Jabber network and try again."), this); + noaddMsg1 = new TQLabel (i18n ("You need to be connected to be able to add contacts."), this); + noaddMsg2 = new TQLabel (i18n ("Connect to the Jabber network and try again."), this); canadd = false; } @@ -84,26 +84,26 @@ bool JabberAddContactPage::apply ( Kopete::Account *account, Kopete::MetaContact JabberTransport *transport=dynamic_cast<JabberTransport*>(account); JabberAccount *jaccount=transport?transport->account():dynamic_cast<JabberAccount*>(account); - QString contactId = jabData->addID->text (); + TQString contactId = jabData->addID->text (); if(transport) { XMPP::JT_Gateway * gatewayTask = new XMPP::JT_Gateway ( jaccount->client()->rootTask () ); JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND *workaround = new JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( transport , parentContact , gatewayTask ); - QObject::connect (gatewayTask, SIGNAL (finished ()), workaround, SLOT (slotJidReceived())); + TQObject::connect (gatewayTask, TQT_SIGNAL (finished ()), workaround, TQT_SLOT (slotJidReceived())); gatewayTask->set ( transport->myself()->contactId() , contactId ); gatewayTask->go ( true ); return true; } - QString displayName = parentContact->displayName (); + TQString displayName = parentContact->displayName (); /* if ( displayName.isEmpty () ) displayName = contactId; */ // collect all group names - QStringList groupNames; + TQStringList groupNames; Kopete::GroupList groupList = parentContact->groups(); for(Kopete::Group *group = groupList.first(); group; group = groupList.next()) groupNames += group->displayName(); @@ -151,8 +151,8 @@ void JabberAddContactPage::slotPromtReceived( ) } } -JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport *t, Kopete::MetaContact * mc, QObject* task ) - : QObject(task) , metacontact(mc) , transport(t) +JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport *t, Kopete::MetaContact * mc, TQObject* task ) + : TQObject(task) , metacontact(mc) , transport(t) {} void JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::slotJidReceived( ) @@ -165,7 +165,7 @@ void JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::slot // maybe we should show an error message, but i don't like showing error message - Olivier } - QString contactId=task->prompt(); + TQString contactId=task->prompt(); Kopete::MetaContact* parentContact=metacontact; JabberAccount *jaccount=transport->account();; @@ -174,13 +174,13 @@ void JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::slot * this is a copy of the end of JabberAddContactPage::apply \*/ - QString displayName = parentContact->displayName (); + TQString displayName = parentContact->displayName (); /* if ( displayName.isEmpty () ) displayName = contactId; */ // collect all group names - QStringList groupNames; + TQStringList groupNames; Kopete::GroupList groupList = parentContact->groups(); for(Kopete::Group *group = groupList.first(); group; group = groupList.next()) groupNames += group->displayName(); diff --git a/kopete/protocols/jabber/ui/jabberaddcontactpage.h b/kopete/protocols/jabber/ui/jabberaddcontactpage.h index 8081d0ad..77109c3d 100644 --- a/kopete/protocols/jabber/ui/jabberaddcontactpage.h +++ b/kopete/protocols/jabber/ui/jabberaddcontactpage.h @@ -34,13 +34,13 @@ class JabberAddContactPage:public AddContactPage Q_OBJECT public: - JabberAddContactPage (Kopete::Account * owner, QWidget * parent = 0, const char *name = 0); + JabberAddContactPage (Kopete::Account * owner, TQWidget * parent = 0, const char *name = 0); ~JabberAddContactPage (); virtual bool validateData (); virtual bool apply (Kopete::Account *, Kopete::MetaContact *); dlgAddContact *jabData; - QLabel *noaddMsg1; - QLabel *noaddMsg2; + TQLabel *noaddMsg1; + TQLabel *noaddMsg2; bool canadd; public slots: void slotPromtReceived(); @@ -55,7 +55,7 @@ class JabberTransport; class JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND : public QObject { Q_OBJECT public: - JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport * , Kopete::MetaContact *mc, QObject *parent); + JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport * , Kopete::MetaContact *mc, TQObject *parent); Kopete::MetaContact *metacontact; JabberTransport *transport; public slots: diff --git a/kopete/protocols/jabber/ui/jabberchooseserver.cpp b/kopete/protocols/jabber/ui/jabberchooseserver.cpp index 66598432..63339158 100644 --- a/kopete/protocols/jabber/ui/jabberchooseserver.cpp +++ b/kopete/protocols/jabber/ui/jabberchooseserver.cpp @@ -24,8 +24,8 @@ #include <kio/global.h> #include <kio/job.h> #include <kio/jobclasses.h> -#include <qtable.h> -#include <qlabel.h> +#include <tqtable.h> +#include <tqlabel.h> #include "jabberprotocol.h" #include "dlgjabberchooseserver.h" #include "jabberregisteraccount.h" @@ -48,11 +48,11 @@ JabberChooseServer::JabberChooseServer ( JabberRegisterAccount *parent, const ch // retrieve server list mTransferJob = KIO::get ( "http://www.jabber.org/servers.xml" ); - connect ( mTransferJob, SIGNAL ( result ( KIO::Job* ) ), this, SLOT ( slotTransferResult ( KIO::Job* ) ) ); - connect ( mTransferJob, SIGNAL ( data ( KIO::Job*, const QByteArray& ) ), this, SLOT ( slotTransferData ( KIO::Job*, const QByteArray& ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( result ( KIO::Job* ) ), this, TQT_SLOT ( slotTransferResult ( KIO::Job* ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( data ( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT ( slotTransferData ( KIO::Job*, const TQByteArray& ) ) ); - connect ( mMainWidget->listServers, SIGNAL ( pressed ( int, int, int, const QPoint & ) ), this, SLOT ( slotSetSelection ( int ) ) ); - connect ( mMainWidget->listServers, SIGNAL ( doubleClicked ( int, int, int, const QPoint & ) ), this, SLOT ( slotOk () ) ); + connect ( mMainWidget->listServers, TQT_SIGNAL ( pressed ( int, int, int, const TQPoint & ) ), this, TQT_SLOT ( slotSetSelection ( int ) ) ); + connect ( mMainWidget->listServers, TQT_SIGNAL ( doubleClicked ( int, int, int, const TQPoint & ) ), this, TQT_SLOT ( slotOk () ) ); enableButtonOK ( false ); @@ -90,7 +90,7 @@ void JabberChooseServer::slotSetSelection ( int row ) } -void JabberChooseServer::slotTransferData ( KIO::Job */*job*/, const QByteArray &data ) +void JabberChooseServer::slotTransferData ( KIO::Job */*job*/, const TQByteArray &data ) { unsigned oldSize = xmlServerList.size (); @@ -119,7 +119,7 @@ void JabberChooseServer::slotTransferResult ( KIO::Job *job ) mMainWidget->lblStatus->setText ( "" ); // parse XML list - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent ( xmlServerList ) ) { @@ -127,14 +127,14 @@ void JabberChooseServer::slotTransferResult ( KIO::Job *job ) return; } - QDomElement docElement = doc.documentElement (); + TQDomElement docElement = doc.documentElement (); mMainWidget->listServers->setNumRows ( docElement.childNodes().count () ); int listIndex = 0; - for( QDomNode node = docElement.firstChild (); !node.isNull (); node = node.nextSibling (), listIndex++ ) + for( TQDomNode node = docElement.firstChild (); !node.isNull (); node = node.nextSibling (), listIndex++ ) { - QDomNamedNodeMap attributes = node.attributes (); + TQDomNamedNodeMap attributes = node.attributes (); mMainWidget->listServers->setText ( listIndex, 0, attributes.namedItem ( "jid" ).nodeValue () ); mMainWidget->listServers->setText ( listIndex, 1, attributes.namedItem ( "name" ).nodeValue () ); } diff --git a/kopete/protocols/jabber/ui/jabberchooseserver.h b/kopete/protocols/jabber/ui/jabberchooseserver.h index 0cc8045d..cc64040b 100644 --- a/kopete/protocols/jabber/ui/jabberchooseserver.h +++ b/kopete/protocols/jabber/ui/jabberchooseserver.h @@ -21,7 +21,7 @@ #define JABBERCHOOSESERVER_H #include <kdialogbase.h> -#include <qcstring.h> +#include <tqcstring.h> class JabberRegisterAccount; class DlgJabberChooseServer; @@ -48,7 +48,7 @@ public: private slots: void slotOk (); void slotCancel (); - void slotTransferData ( KIO::Job *job, const QByteArray &data ); + void slotTransferData ( KIO::Job *job, const TQByteArray &data ); void slotTransferResult ( KIO::Job *job ); void slotSetSelection ( int row ); @@ -56,7 +56,7 @@ private: DlgJabberChooseServer *mMainWidget; JabberRegisterAccount *mParentWidget; KIO::TransferJob *mTransferJob; - QByteArray xmlServerList; + TQByteArray xmlServerList; int mSelectedRow; diff --git a/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp b/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp index b0284e41..6c928ad6 100644 --- a/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp +++ b/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp @@ -18,12 +18,12 @@ ***************************************************************************/ #include <kdebug.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqcombobox.h> +#include <tqlabel.h> #include <kconfig.h> #include <kmessagebox.h> @@ -40,18 +40,18 @@ #include "jabberregisteraccount.h" #include "dlgjabberchangepassword.h" -JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, JabberAccount * ident, QWidget * parent, const char *name) +JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, JabberAccount * ident, TQWidget * parent, const char *name) : DlgJabberEditAccountWidget (parent, name), KopeteEditAccountWidget (ident) { m_protocol = proto; - connect (mID, SIGNAL (textChanged (const QString &)), this, SLOT (updateServerField ())); - connect (cbCustomServer, SIGNAL (toggled (bool)), this, SLOT (updateServerField ())); + connect (mID, TQT_SIGNAL (textChanged (const TQString &)), this, TQT_SLOT (updateServerField ())); + connect (cbCustomServer, TQT_SIGNAL (toggled (bool)), this, TQT_SLOT (updateServerField ())); - connect (cbUseSSL, SIGNAL (toggled (bool)), this, SLOT (sslToggled (bool))); + connect (cbUseSSL, TQT_SIGNAL (toggled (bool)), this, TQT_SLOT (sslToggled (bool))); - connect (btnChangePassword, SIGNAL ( clicked() ), this, SLOT ( slotChangePasswordClicked () )); + connect (btnChangePassword, TQT_SIGNAL ( clicked() ), this, TQT_SLOT ( slotChangePasswordClicked () )); if (account()) { @@ -63,7 +63,7 @@ JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, Jabber { // this is a new account btnChangePassword->setEnabled ( false ); - connect (btnRegister, SIGNAL (clicked ()), this, SLOT (registerClicked ())); + connect (btnRegister, TQT_SIGNAL (clicked ()), this, TQT_SLOT (registerClicked ())); } } @@ -88,15 +88,15 @@ void JabberEditAccountWidget::reopen () mPass->load (&account()->password ()); cbAutoConnect->setChecked (account()->excludeConnect()); - mResource->setText (account()->configGroup()->readEntry ("Resource", QString::fromLatin1("Kopete"))); + mResource->setText (account()->configGroup()->readEntry ("Resource", TQString::fromLatin1("Kopete"))); mPriority->setValue (account()->configGroup()->readNumEntry ("Priority", 5)); - mServer->setText (account()->configGroup()->readEntry ("Server", QString::null)); + mServer->setText (account()->configGroup()->readEntry ("Server", TQString::null)); cbUseSSL->setChecked (account()->configGroup()->readBoolEntry( "UseSSL", false)); mPort->setValue (account()->configGroup()->readNumEntry("Port", 5222)); - QString auth = account()->configGroup()->readEntry("AuthType", QString::null); + TQString auth = account()->configGroup()->readEntry("AuthType", TQString::null); cbCustomServer->setChecked (account()->configGroup()->readBoolEntry("CustomServer",false)); @@ -119,7 +119,7 @@ void JabberEditAccountWidget::reopen () leLocalIP->setText (KGlobal::config()->readEntry("LocalIP", "")); sbLocalPort->setValue (KGlobal::config()->readNumEntry("LocalPort", 8010)); - leProxyJID->setText (account()->configGroup()->readEntry("ProxyJID", QString::null)); + leProxyJID->setText (account()->configGroup()->readEntry("ProxyJID", TQString::null)); // Privacy cbSendEvents->setChecked( account()->configGroup()->readBoolEntry("SendEvents", true) ); @@ -173,8 +173,8 @@ void JabberEditAccountWidget::writeConfig () account()->configGroup()->writeEntry("AllowPlainTextPassword", cbAllowPlainTextPassword->isChecked()); account()->configGroup()->writeEntry("Server", mServer->text ()); account()->configGroup()->writeEntry("Resource", mResource->text ()); - account()->configGroup()->writeEntry("Priority", QString::number (mPriority->value ())); - account()->configGroup()->writeEntry("Port", QString::number (mPort->value ())); + account()->configGroup()->writeEntry("Priority", TQString::number (mPriority->value ())); + account()->configGroup()->writeEntry("Port", TQString::number (mPort->value ())); account()->setExcludeConnect(cbAutoConnect->isChecked()); @@ -217,7 +217,7 @@ void JabberEditAccountWidget::updateServerField () if(!cbCustomServer->isChecked()) { - QString newServer = mID->text().section("@", 1); + TQString newServer = mID->text().section("@", 1); mPort->setValue(5222); // check if ssl is enabled and set the port correctly sslToggled(cbUseSSL->isChecked()); @@ -258,7 +258,7 @@ void JabberEditAccountWidget::slotChangePasswordClicked () DlgJabberChangePassword *passwordDlg = new DlgJabberChangePassword ( account (), this ); - connect ( passwordDlg, SIGNAL ( destroyed () ), this, SLOT ( slotChangePasswordFinished () ) ); + connect ( passwordDlg, TQT_SIGNAL ( destroyed () ), this, TQT_SLOT ( slotChangePasswordFinished () ) ); passwordDlg->show (); diff --git a/kopete/protocols/jabber/ui/jabbereditaccountwidget.h b/kopete/protocols/jabber/ui/jabbereditaccountwidget.h index 1f3ba378..e56dcbd2 100644 --- a/kopete/protocols/jabber/ui/jabbereditaccountwidget.h +++ b/kopete/protocols/jabber/ui/jabbereditaccountwidget.h @@ -20,7 +20,7 @@ #ifndef JABBEREDITACCOUNTWIDEGET_H #define JABBEREDITACCOUNTWIDEGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <kprogress.h> #include "editaccountwidget.h" #include "jabberaccount.h" @@ -37,7 +37,7 @@ class JabberEditAccountWidget:public DlgJabberEditAccountWidget, public KopeteEd Q_OBJECT public: - JabberEditAccountWidget (JabberProtocol * proto, JabberAccount *, QWidget * parent = 0, const char *name = 0); + JabberEditAccountWidget (JabberProtocol * proto, JabberAccount *, TQWidget * parent = 0, const char *name = 0); ~JabberEditAccountWidget (); virtual bool validateData (); virtual Kopete::Account *apply (); diff --git a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp index f5142736..bb20611b 100644 --- a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp +++ b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp @@ -28,10 +28,10 @@ #include <kpassdlg.h> #include <knuminput.h> #include <kpushbutton.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qtimer.h> -#include <qregexp.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqtimer.h> +#include <tqregexp.h> #include "qca.h" #include "xmpp.h" @@ -68,9 +68,9 @@ JabberRegisterAccount::JabberRegisterAccount ( JabberEditAccountWidget *parent, // clear variables jabberClient = new JabberClient (); - connect ( jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) ); - connect ( jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) ); - connect ( jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); + connect ( jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) ); + connect ( jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) ); + connect ( jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); jidRegExp.setPattern ( "[\\w\\d.+_-]{1,}@[\\w\\d.-]{1,}" ); hintPixmap = KGlobal::iconLoader()->loadIcon ( "jabber_online", KIcon::Small ); @@ -86,16 +86,16 @@ JabberRegisterAccount::JabberRegisterAccount ( JabberEditAccountWidget *parent, mMainWidget->cbUseSSL->setChecked ( parent->cbUseSSL->isChecked () ); // connect buttons to slots, ok is already connected by default - connect ( this, SIGNAL ( cancelClicked () ), this, SLOT ( slotDeleteDialog () ) ); - connect ( mMainWidget->btnChooseServer, SIGNAL ( clicked () ), this, SLOT ( slotChooseServer () ) ); - connect ( mMainWidget->leServer, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( slotJIDInformation () ) ); - connect ( mMainWidget->leJID, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( slotJIDInformation () ) ); - connect ( mMainWidget->cbUseSSL, SIGNAL ( toggled ( bool ) ), this, SLOT ( slotSSLToggled () ) ); + connect ( this, TQT_SIGNAL ( cancelClicked () ), this, TQT_SLOT ( slotDeleteDialog () ) ); + connect ( mMainWidget->btnChooseServer, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotChooseServer () ) ); + connect ( mMainWidget->leServer, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( slotJIDInformation () ) ); + connect ( mMainWidget->leJID, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( slotJIDInformation () ) ); + connect ( mMainWidget->cbUseSSL, TQT_SIGNAL ( toggled ( bool ) ), this, TQT_SLOT ( slotSSLToggled () ) ); - connect ( mMainWidget->leServer, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) ); - connect ( mMainWidget->leJID, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) ); - connect ( mMainWidget->lePassword, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) ); - connect ( mMainWidget->lePasswordVerify, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) ); + connect ( mMainWidget->leServer, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) ); + connect ( mMainWidget->leJID, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) ); + connect ( mMainWidget->lePassword, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) ); + connect ( mMainWidget->lePasswordVerify, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) ); // display JID info now slotJIDInformation (); @@ -146,8 +146,8 @@ void JabberRegisterAccount::validateData () } if ( valid && - ( QString::fromLatin1 ( mMainWidget->lePassword->password () ).isEmpty () || - QString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ).isEmpty () ) ) + ( TQString::fromLatin1 ( mMainWidget->lePassword->password () ).isEmpty () || + TQString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ).isEmpty () ) ) { mMainWidget->lblStatusMessage->setText ( i18n ( "Please enter the same password twice." ) ); valid = false; @@ -155,8 +155,8 @@ void JabberRegisterAccount::validateData () } if ( valid && - ( QString::fromLatin1 ( mMainWidget->lePassword->password () ) != - QString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ) ) ) + ( TQString::fromLatin1 ( mMainWidget->lePassword->password () ) != + TQString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ) ) ) { mMainWidget->lblStatusMessage->setText ( i18n ( "Password entries do not match." ) ); valid = false; @@ -228,11 +228,11 @@ void JabberRegisterAccount::slotChooseServer () } -void JabberRegisterAccount::setServer ( const QString &server ) +void JabberRegisterAccount::setServer ( const TQString &server ) { mMainWidget->leServer->setText ( server ); - mMainWidget->leJID->setText ( QString ( "@%1" ).arg ( server ) ); + mMainWidget->leJID->setText ( TQString ( "@%1" ).arg ( server ) ); } @@ -259,7 +259,7 @@ void JabberRegisterAccount::slotOk () jabberClient->setOverrideHost ( true, mMainWidget->leServer->text (), mMainWidget->sbPort->value () ); // start connection, no authentication - switch ( jabberClient->connect ( XMPP::Jid ( mMainWidget->leJID->text () ), QString::null, false ) ) + switch ( jabberClient->connect ( XMPP::Jid ( mMainWidget->leJID->text () ), TQString::null, false ) ) { case JabberClient::NoTLS: // no SSL support, at the connecting stage this means the problem is client-side @@ -327,7 +327,7 @@ void JabberRegisterAccount::slotConnected () mMainWidget->lblStatusMessage->setText ( i18n ( "Connected successfully, registering new account..." ) ); XMPP::JT_Register * task = new XMPP::JT_Register (jabberClient->rootTask ()); - QObject::connect (task, SIGNAL (finished ()), this, SLOT (slotRegisterUserDone ())); + TQObject::connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotRegisterUserDone ())); task->reg (mMainWidget->leJID->text().section("@", 0, 0), mMainWidget->lePassword->password ()); task->go (true); @@ -369,7 +369,7 @@ void JabberRegisterAccount::slotRegisterUserDone () // rewire buttons enableButtonOK ( false ); setButtonCancel ( KStdGuiItem::close () ); - connect ( this, SIGNAL ( closeClicked () ), this, SLOT ( slotDeleteDialog () ) ); + connect ( this, TQT_SIGNAL ( closeClicked () ), this, TQT_SLOT ( slotDeleteDialog () ) ); } else { @@ -382,7 +382,7 @@ void JabberRegisterAccount::slotRegisterUserDone () // FIXME: this is required because Iris crashes if we try // to disconnect here. Hopefully Justin can fix this. - QTimer::singleShot(0, this, SLOT(disconnect ())); + TQTimer::singleShot(0, this, TQT_SLOT(disconnect ())); } diff --git a/kopete/protocols/jabber/ui/jabberregisteraccount.h b/kopete/protocols/jabber/ui/jabberregisteraccount.h index 40d643a7..727d61fb 100644 --- a/kopete/protocols/jabber/ui/jabberregisteraccount.h +++ b/kopete/protocols/jabber/ui/jabberregisteraccount.h @@ -21,8 +21,8 @@ #define JABBERREGISTER_H #include <kdialogbase.h> -#include <qregexp.h> -#include <qpixmap.h> +#include <tqregexp.h> +#include <tqpixmap.h> class DlgJabberRegisterAccount; class JabberProtocol; @@ -42,7 +42,7 @@ public: ~JabberRegisterAccount (); - void setServer ( const QString &server ); + void setServer ( const TQString &server ); private slots: void slotChooseServer (); @@ -64,8 +64,8 @@ private: DlgJabberRegisterAccount *mMainWidget; JabberEditAccountWidget *mParentWidget; - QRegExp jidRegExp; - QPixmap hintPixmap; + TQRegExp jidRegExp; + TQPixmap hintPixmap; JabberClient *jabberClient; diff --git a/kopete/protocols/meanwhile/meanwhileaccount.cpp b/kopete/protocols/meanwhile/meanwhileaccount.cpp index c130475b..9dba56f2 100644 --- a/kopete/protocols/meanwhile/meanwhileaccount.cpp +++ b/kopete/protocols/meanwhile/meanwhileaccount.cpp @@ -32,11 +32,11 @@ #include "kopeteaway.h" #include <kinputdialog.h> #include <kmessagebox.h> -#include <qdict.h> +#include <tqdict.h> MeanwhileAccount::MeanwhileAccount( MeanwhileProtocol *parent, - const QString &accountID, + const TQString &accountID, const char *name) : Kopete::PasswordedAccount(parent, accountID, 0, name) { @@ -62,7 +62,7 @@ void MeanwhileAccount::setPlugin(MeanwhilePlugin *plugin) } bool MeanwhileAccount::createContact( - const QString & contactId , + const TQString & contactId , Kopete::MetaContact * parentContact) { MeanwhileContact* newContact = new MeanwhileContact(contactId, @@ -78,7 +78,7 @@ bool MeanwhileAccount::createContact( return newContact != 0L; } -void MeanwhileAccount::connectWithPassword(const QString &password) +void MeanwhileAccount::connectWithPassword(const TQString &password) { if (password.isEmpty()) { disconnect(Kopete::Account::Manual); @@ -92,12 +92,12 @@ void MeanwhileAccount::connectWithPassword(const QString &password) return; } - QObject::connect(m_session, - SIGNAL(sessionStateChange(Kopete::OnlineStatus)), - this, SLOT(slotSessionStateChange(Kopete::OnlineStatus))); - QObject::connect(m_session, - SIGNAL(serverNotification(const QString &)), - this, SLOT(slotServerNotification(const QString&))); + TQObject::connect(m_session, + TQT_SIGNAL(sessionStateChange(Kopete::OnlineStatus)), + this, TQT_SLOT(slotSessionStateChange(Kopete::OnlineStatus))); + TQObject::connect(m_session, + TQT_SIGNAL(serverNotification(const TQString &)), + this, TQT_SLOT(slotServerNotification(const TQString&))); } @@ -138,15 +138,15 @@ KActionMenu * MeanwhileAccount::actionMenu() menu->popupMenu()->insertSeparator(); #if 0 - menu->insert(new KAction(i18n("&Change Status Message"), QString::null, 0, - this, SLOT(meanwhileChangeStatus()), this, + menu->insert(new KAction(i18n("&Change Status Message"), TQString::null, 0, + this, TQT_SLOT(meanwhileChangeStatus()), this, "meanwhileChangeStatus")); //infoPlugin->addCustomMenus(theMenu); #endif return menu; } -QString MeanwhileAccount::getServerName() +TQString MeanwhileAccount::getServerName() { return configGroup()->readEntry("Server"); } @@ -156,7 +156,7 @@ int MeanwhileAccount::getServerPort() return configGroup()->readNumEntry("Port"); } -void MeanwhileAccount::setServerName(const QString &server) +void MeanwhileAccount::setServerName(const TQString &server) { configGroup()->writeEntry("Server", server); } @@ -198,25 +198,25 @@ bool MeanwhileAccount::getClientIDParams(int *clientID, return custom_id; } -void MeanwhileAccount::slotServerNotification(const QString &mesg) +void MeanwhileAccount::slotServerNotification(const TQString &mesg) { KMessageBox::queuedMessageBox(0, KMessageBox::Error , mesg, i18n("Meanwhile Plugin: Message from server"), KMessageBox::Notify); } -QString MeanwhileAccount::meanwhileId() const +TQString MeanwhileAccount::meanwhileId() const { return m_meanwhileId; } -void MeanwhileAccount::setAway(bool away, const QString &reason) +void MeanwhileAccount::setAway(bool away, const TQString &reason) { MeanwhileProtocol *p = static_cast<MeanwhileProtocol *>(protocol()); setOnlineStatus(away ? p->statusIdle : p->statusOnline, reason); } void MeanwhileAccount::setOnlineStatus(const Kopete::OnlineStatus &status, - const QString &reason) + const TQString &reason) { HERE; Kopete::OnlineStatus oldstatus = myself()->onlineStatus(); diff --git a/kopete/protocols/meanwhile/meanwhileaccount.h b/kopete/protocols/meanwhile/meanwhileaccount.h index d08b07c5..ba747212 100644 --- a/kopete/protocols/meanwhile/meanwhileaccount.h +++ b/kopete/protocols/meanwhile/meanwhileaccount.h @@ -37,15 +37,15 @@ public: * @param accountID The (meanwhile) account id of this account * @param name The name of this account */ - MeanwhileAccount(MeanwhileProtocol *protocol, const QString &accountID, + MeanwhileAccount(MeanwhileProtocol *protocol, const TQString &accountID, const char *name = 0L); ~MeanwhileAccount(); - virtual bool createContact(const QString &contactId, + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); - virtual void connectWithPassword(const QString &password); + virtual void connectWithPassword(const TQString &password); virtual void disconnect(); @@ -54,11 +54,11 @@ public: virtual KActionMenu *actionMenu(); /** Get the server host name */ - QString getServerName(); + TQString getServerName(); /** Get the server port */ int getServerPort(); /** Set the server host name */ - void setServerName(const QString &server); + void setServerName(const TQString &server); /** Set the server port */ void setServerPort(int port); /** Provide an information plugin for this account */ @@ -89,7 +89,7 @@ public: * Get the meanwhile id for this account * @return The meanwhile ID for the account */ - QString meanwhileId() const; + TQString meanwhileId() const; public slots: /** @@ -100,12 +100,12 @@ public slots: /** * Called by the session when a notification message has been received */ - void slotServerNotification(const QString &mesg); + void slotServerNotification(const TQString &mesg); /** Reimplemented from Kopete::Account */ void setOnlineStatus(const Kopete::OnlineStatus& status, - const QString &reason = QString::null); - void setAway(bool away, const QString&reason = QString::null); + const TQString &reason = TQString::null); + void setAway(bool away, const TQString&reason = TQString::null); private: /** Current online status */ @@ -115,7 +115,7 @@ private: MeanwhileSession *m_session; /* The user id for this account */ - QString m_meanwhileId; + TQString m_meanwhileId; }; #endif diff --git a/kopete/protocols/meanwhile/meanwhileaddcontactpage.cpp b/kopete/protocols/meanwhile/meanwhileaddcontactpage.cpp index 8709700b..44b10bbc 100644 --- a/kopete/protocols/meanwhile/meanwhileaddcontactpage.cpp +++ b/kopete/protocols/meanwhile/meanwhileaddcontactpage.cpp @@ -15,30 +15,30 @@ ************************************************************************* */ #include "meanwhileaddcontactpage.h" -#include <qpushbutton.h> -#include <qlayout.h> +#include <tqpushbutton.h> +#include <tqlayout.h> #include <kopeteaccount.h> #include <kopetemetacontact.h> -#include <qlineedit.h> +#include <tqlineedit.h> #include "meanwhileprotocol.h" #include "meanwhileaccount.h" #include "meanwhileplugin.h" MeanwhileAddContactPage::MeanwhileAddContactPage( - QWidget* parent, + TQWidget* parent, Kopete::Account *_account) : AddContactPage(parent, 0L), theAccount(_account), theParent(parent) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); theDialog = new MeanwhileAddContactBase(this); MeanwhileAccount *account = static_cast<MeanwhileAccount *>(_account); if (account->infoPlugin->canProvideMeanwhileId()) { - QObject::connect(theDialog->btnFindUser, SIGNAL(clicked()), - SLOT(slotFindUser())); + TQObject::connect(theDialog->btnFindUser, TQT_SIGNAL(clicked()), + TQT_SLOT(slotFindUser())); } else theDialog->btnFindUser->setDisabled(true); @@ -61,7 +61,7 @@ bool MeanwhileAddContactPage::apply( Kopete::Account* a, Kopete::MetaContact* m ) { - QString displayName = theDialog->contactID->text(); + TQString displayName = theDialog->contactID->text(); MeanwhileAccount* myAccount = static_cast<MeanwhileAccount*>(a); return myAccount->addContact(displayName, m, Kopete::Account::ChangeKABC ); } diff --git a/kopete/protocols/meanwhile/meanwhileaddcontactpage.h b/kopete/protocols/meanwhile/meanwhileaddcontactpage.h index 889b2707..fdf6445c 100644 --- a/kopete/protocols/meanwhile/meanwhileaddcontactpage.h +++ b/kopete/protocols/meanwhile/meanwhileaddcontactpage.h @@ -27,7 +27,7 @@ class MeanwhileAddContactPage : public AddContactPage { Q_OBJECT public: - MeanwhileAddContactPage( QWidget* parent = 0, + MeanwhileAddContactPage( TQWidget* parent = 0, Kopete::Account *account=0); ~MeanwhileAddContactPage(); @@ -37,7 +37,7 @@ public: protected: MeanwhileAddContactBase *theDialog; Kopete::Account *theAccount; - QWidget *theParent; + TQWidget *theParent; public slots: void slotFindUser(); }; diff --git a/kopete/protocols/meanwhile/meanwhilecontact.cpp b/kopete/protocols/meanwhile/meanwhilecontact.cpp index fd30bc46..e77d470a 100644 --- a/kopete/protocols/meanwhile/meanwhilecontact.cpp +++ b/kopete/protocols/meanwhile/meanwhilecontact.cpp @@ -29,7 +29,7 @@ #include "meanwhilecontact.h" #include "meanwhileplugin.h" -MeanwhileContact::MeanwhileContact(QString userId, QString nickname, +MeanwhileContact::MeanwhileContact(TQString userId, TQString nickname, MeanwhileAccount *account, Kopete::MetaContact *parent) : Kopete::Contact(account, userId, parent) { @@ -49,8 +49,8 @@ bool MeanwhileContact::isReachable() return isOnline(); } -void MeanwhileContact::serialize(QMap<QString, QString> &serializedData, - QMap<QString, QString> &addressBookData) +void MeanwhileContact::serialize(TQMap<TQString, TQString> &serializedData, + TQMap<TQString, TQString> &addressBookData) { Kopete::Contact::serialize(serializedData, addressBookData); } @@ -70,25 +70,25 @@ Kopete::ChatSession* MeanwhileContact::manager(CanCreateFlags canCreate) if (m_msgManager != 0L || canCreate == Kopete::Contact::CannotCreate) return m_msgManager; - QPtrList<Kopete::Contact> contacts; + TQPtrList<Kopete::Contact> contacts; contacts.append(this); m_msgManager = Kopete::ChatSessionManager::self()-> create(account()->myself(), contacts, protocol()); connect(m_msgManager, - SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), - this, SLOT(sendMessage(Kopete::Message&))); + TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), + this, TQT_SLOT(sendMessage(Kopete::Message&))); - connect(m_msgManager, SIGNAL(myselfTyping(bool)), - this, SLOT(slotSendTyping(bool))); + connect(m_msgManager, TQT_SIGNAL(myselfTyping(bool)), + this, TQT_SLOT(slotSendTyping(bool))); - connect(m_msgManager, SIGNAL(destroyed()), - this, SLOT(slotChatSessionDestroyed())); + connect(m_msgManager, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(slotChatSessionDestroyed())); return m_msgManager; } -QString MeanwhileContact::meanwhileId() const +TQString MeanwhileContact::meanwhileId() const { return m_meanwhileId; } @@ -104,7 +104,7 @@ void MeanwhileContact::slotSendTyping(bool isTyping) sendTyping(this, isTyping); } -void MeanwhileContact::receivedMessage(const QString &message) +void MeanwhileContact::receivedMessage(const TQString &message) { Kopete::ContactPtrList contactList; contactList.append(account()->myself()); diff --git a/kopete/protocols/meanwhile/meanwhilecontact.h b/kopete/protocols/meanwhile/meanwhilecontact.h index eface094..048a4b0f 100644 --- a/kopete/protocols/meanwhile/meanwhilecontact.h +++ b/kopete/protocols/meanwhile/meanwhilecontact.h @@ -17,7 +17,7 @@ #ifndef MEANWHILECONTACT_H #define MEANWHILECONTACT_H -#include <qmap.h> +#include <tqmap.h> #include "kopetecontact.h" #include "kopetemessage.h" #include "meanwhileaccount.h" @@ -33,26 +33,26 @@ class MeanwhileContact : public Kopete::Contact Q_OBJECT public: - MeanwhileContact(QString userId, QString nickname, + MeanwhileContact(TQString userId, TQString nickname, MeanwhileAccount *account, Kopete::MetaContact *parent); ~MeanwhileContact(); virtual bool isReachable(); - virtual void serialize(QMap<QString, QString> &serializedData, - QMap<QString, QString> &addressBookData); + virtual void serialize(TQMap<TQString, TQString> &serializedData, + TQMap<TQString, TQString> &addressBookData); virtual Kopete::ChatSession *manager( CanCreateFlags canCreate = CanCreate); - QString meanwhileId() const; + TQString meanwhileId() const; virtual void sync(unsigned int changed = 0xff); public slots: void sendMessage( Kopete::Message &message ); - void receivedMessage( const QString &message ); + void receivedMessage( const TQString &message ); virtual void slotUserInfo(); protected slots: @@ -61,7 +61,7 @@ protected slots: void slotSendTyping(bool isTyping); private: - QString m_meanwhileId; + TQString m_meanwhileId; Kopete::ChatSession *m_msgManager; }; diff --git a/kopete/protocols/meanwhile/meanwhileeditaccountwidget.cpp b/kopete/protocols/meanwhile/meanwhileeditaccountwidget.cpp index f3d05710..edaa66f6 100644 --- a/kopete/protocols/meanwhile/meanwhileeditaccountwidget.cpp +++ b/kopete/protocols/meanwhile/meanwhileeditaccountwidget.cpp @@ -14,12 +14,12 @@ * * ************************************************************************* */ -#include <qlayout.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqcombobox.h> #include <kdebug.h> #include <kopeteaccount.h> #include <kopetepasswordwidget.h> @@ -39,8 +39,8 @@ void MeanwhileEditAccountWidget::setupClientList() int i = 0; for (id = MeanwhileSession::getClientIDs(); id->name; id++, i++) { - QString name = QString("%1 (0x%2)") - .arg(QString(id->name)) + TQString name = TQString("%1 (0x%2)") + .arg(TQString(id->name)) .arg(id->id, 0, 16); mClientID->insertItem(name, i); @@ -64,7 +64,7 @@ void MeanwhileEditAccountWidget::selectClientListItem(int selectedID) } MeanwhileEditAccountWidget::MeanwhileEditAccountWidget( - QWidget* parent, + TQWidget* parent, Kopete::Account* theAccount, MeanwhileProtocol *theProtocol) : MeanwhileEditAccountBase(parent), @@ -106,8 +106,8 @@ MeanwhileEditAccountWidget::MeanwhileEditAccountWidget( slotSetServer2Default(); } - QObject::connect(btnServerDefaults, SIGNAL(clicked()), - SLOT(slotSetServer2Default())); + TQObject::connect(btnServerDefaults, TQT_SIGNAL(clicked()), + TQT_SLOT(slotSetServer2Default())); show(); } diff --git a/kopete/protocols/meanwhile/meanwhileeditaccountwidget.h b/kopete/protocols/meanwhile/meanwhileeditaccountwidget.h index 9e05465b..e71a8bcc 100644 --- a/kopete/protocols/meanwhile/meanwhileeditaccountwidget.h +++ b/kopete/protocols/meanwhile/meanwhileeditaccountwidget.h @@ -17,7 +17,7 @@ #ifndef MEANWHILEEDITACCOUNTWIDGET_H #define MEANWHILEEDITACCOUNTWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <editaccountwidget.h> #include "meanwhileeditaccountbase.h" @@ -30,7 +30,7 @@ class MeanwhileEditAccountWidget : { Q_OBJECT public: - MeanwhileEditAccountWidget( QWidget* parent, + MeanwhileEditAccountWidget( TQWidget* parent, Kopete::Account* account, MeanwhileProtocol *protocol); diff --git a/kopete/protocols/meanwhile/meanwhileplugin.cpp b/kopete/protocols/meanwhile/meanwhileplugin.cpp index d8f617cb..4ee995dd 100644 --- a/kopete/protocols/meanwhile/meanwhileplugin.cpp +++ b/kopete/protocols/meanwhile/meanwhileplugin.cpp @@ -14,12 +14,12 @@ * * ************************************************************************* */ -#include <qwidget.h> -#include <qlineedit.h> +#include <tqwidget.h> +#include <tqlineedit.h> #include "meanwhileplugin.h" -void MeanwhilePlugin::getMeanwhileId(QWidget * /*parent*/, - QLineEdit * /*fillThis*/) +void MeanwhilePlugin::getMeanwhileId(TQWidget * /*parent*/, + TQLineEdit * /*fillThis*/) { } @@ -28,7 +28,7 @@ bool MeanwhilePlugin::canProvideMeanwhileId() return false; } -void MeanwhilePlugin::showUserInfo(const QString &/*userid*/) +void MeanwhilePlugin::showUserInfo(const TQString &/*userid*/) { } diff --git a/kopete/protocols/meanwhile/meanwhileplugin.h b/kopete/protocols/meanwhile/meanwhileplugin.h index b2ddbdcb..a5c82829 100644 --- a/kopete/protocols/meanwhile/meanwhileplugin.h +++ b/kopete/protocols/meanwhile/meanwhileplugin.h @@ -17,7 +17,7 @@ #ifndef __MEANWHILE_PLUGIN_H__ #define __MEANWHILE_PLUGIN_H__ -#include "qstring.h" +#include "tqstring.h" #include <kaction.h> class QLineEdit; @@ -29,14 +29,14 @@ public: * - like do lookups in company databases * when done fill 'fillThis' with the id of the contact */ - virtual void getMeanwhileId(QWidget *parent,QLineEdit *fillThis); + virtual void getMeanwhileId(TQWidget *parent,TQLineEdit *fillThis); /* can this plugin provide the above functionality */ virtual bool canProvideMeanwhileId(); /* show user info has been selected - the meanwhile server doesnt * seem to have any info...maybe you can find it somewhere else */ - virtual void showUserInfo(const QString &userid); + virtual void showUserInfo(const TQString &userid); /* if you want to provide more functions on the rightclick dropdown * menu...implement this diff --git a/kopete/protocols/meanwhile/meanwhileprotocol.cpp b/kopete/protocols/meanwhile/meanwhileprotocol.cpp index 434de2f3..b9915e94 100644 --- a/kopete/protocols/meanwhile/meanwhileprotocol.cpp +++ b/kopete/protocols/meanwhile/meanwhileprotocol.cpp @@ -29,17 +29,17 @@ typedef KGenericFactory<MeanwhileProtocol> MeanwhileProtocolFactory; K_EXPORT_COMPONENT_FACTORY(kopete_meanwhile, MeanwhileProtocolFactory("kopete_meanwhile")) -MeanwhileProtocol::MeanwhileProtocol(QObject* parent, const char *name, - const QStringList &/*args*/) +MeanwhileProtocol::MeanwhileProtocol(TQObject* parent, const char *name, + const TQStringList &/*args*/) : Kopete::Protocol(MeanwhileProtocolFactory::instance(), parent, name), - statusOffline(Kopete::OnlineStatus::Offline, 25, this, 0, QString::null, + statusOffline(Kopete::OnlineStatus::Offline, 25, this, 0, TQString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline, Kopete::OnlineStatusManager::DisabledIfOffline), statusOnline(Kopete::OnlineStatus::Online, 25, this, mwStatus_ACTIVE, - QString::null, i18n("Online"), i18n("Online"), + TQString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online, 0), statusAway(Kopete::OnlineStatus::Away, 20, this, mwStatus_AWAY, @@ -57,10 +57,10 @@ MeanwhileProtocol::MeanwhileProtocol(QObject* parent, const char *name, Kopete::OnlineStatusManager::Idle, 0), statusAccountOffline(Kopete::OnlineStatus::Offline, 0, this, 0, - QString::null, i18n("Account Offline")), + TQString::null, i18n("Account Offline")), - statusMessage(QString::fromLatin1("statusMessage"), - i18n("Status Message"), QString::null, false, true), + statusMessage(TQString::fromLatin1("statusMessage"), + i18n("Status Message"), TQString::null, false, true), awayMessage(Kopete::Global::Properties::self()->awayMessage()) { @@ -73,31 +73,31 @@ MeanwhileProtocol::~MeanwhileProtocol() { } -AddContactPage * MeanwhileProtocol::createAddContactWidget(QWidget *parent, +AddContactPage * MeanwhileProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account ) { return new MeanwhileAddContactPage(parent, account); } KopeteEditAccountWidget * MeanwhileProtocol::createEditAccountWidget( - Kopete::Account *account, QWidget *parent ) + Kopete::Account *account, TQWidget *parent ) { return new MeanwhileEditAccountWidget(parent, account, this); } -Kopete::Account *MeanwhileProtocol::createNewAccount(const QString &accountId) +Kopete::Account *MeanwhileProtocol::createNewAccount(const TQString &accountId) { return new MeanwhileAccount(this, accountId, accountId.ascii()); } Kopete::Contact *MeanwhileProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, - QString> &serializedData, - const QMap<QString, QString> & /* addressBookData */ ) + const TQMap<TQString, + TQString> &serializedData, + const TQMap<TQString, TQString> & /* addressBookData */ ) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; MeanwhileAccount *theAccount = static_cast<MeanwhileAccount*>( diff --git a/kopete/protocols/meanwhile/meanwhileprotocol.h b/kopete/protocols/meanwhile/meanwhileprotocol.h index aa7a9861..343d443f 100644 --- a/kopete/protocols/meanwhile/meanwhileprotocol.h +++ b/kopete/protocols/meanwhile/meanwhileprotocol.h @@ -39,23 +39,23 @@ class MeanwhileProtocol : public Kopete::Protocol { Q_OBJECT public: - MeanwhileProtocol(QObject *parent, const char *name, - const QStringList &args); + MeanwhileProtocol(TQObject *parent, const char *name, + const TQStringList &args); ~MeanwhileProtocol(); - virtual AddContactPage *createAddContactWidget(QWidget *parent, + virtual AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *account); virtual KopeteEditAccountWidget *createEditAccountWidget( - Kopete::Account *account, QWidget *parent); + Kopete::Account *account, TQWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual Kopete::Account *createNewAccount(const TQString &accountId); virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString,QString> &serializedData, - const QMap<QString, QString> &addressBookData); + const TQMap<TQString,TQString> &serializedData, + const TQMap<TQString, TQString> &addressBookData); const Kopete::OnlineStatus accountOfflineStatus(); diff --git a/kopete/protocols/meanwhile/meanwhilesession.cpp b/kopete/protocols/meanwhile/meanwhilesession.cpp index 974ca4af..c7121875 100644 --- a/kopete/protocols/meanwhile/meanwhilesession.cpp +++ b/kopete/protocols/meanwhile/meanwhilesession.cpp @@ -181,11 +181,11 @@ void MeanwhileSession::getDefaultClientIDParams(int *clientID, } /* external interface called by meanwhileaccount */ -void MeanwhileSession::connect(QString password) +void MeanwhileSession::connect(TQString password) { int port, clientID, versionMajor, versionMinor; bool useCustomID; - QString host; + TQString host; HERE; @@ -207,10 +207,10 @@ void MeanwhileSession::connect(QString password) socket = sock; /* we want to receive signals when there is data to read */ sock->enableRead(true); - QObject::connect(sock, SIGNAL(readyRead()), this, - SLOT(slotSocketDataAvailable())); - QObject::connect(sock, SIGNAL(closed(int)), this, - SLOT(slotSocketClosed(int))); + TQObject::connect(sock, TQT_SIGNAL(readyRead()), this, + TQT_SLOT(slotSocketDataAvailable())); + TQObject::connect(sock, TQT_SIGNAL(closed(int)), this, + TQT_SLOT(slotSocketClosed(int))); /* set login details */ mwSession_setProperty(session, mwSession_AUTH_USER_ID, @@ -266,13 +266,13 @@ static void free_id_block(void *data, void *p) free(id); } -void MeanwhileSession::addContacts(const QDict<Kopete::Contact>& contacts) +void MeanwhileSession::addContacts(const TQDict<Kopete::Contact>& contacts) { HERE; - QDictIterator<Kopete::Contact> it(contacts); + TQDictIterator<Kopete::Contact> it(contacts); GList *buddies = 0L; - /** Convert our QDict of kopete contact to a GList of meanwhile buddies */ + /** Convert our TQDict of kopete contact to a GList of meanwhile buddies */ for( ; it.current(); ++it) { MeanwhileContact *contact = static_cast<MeanwhileContact *>(it.current()); @@ -370,7 +370,7 @@ void MeanwhileSession::sendTyping(MeanwhileContact *contact, bool isTyping) } void MeanwhileSession::setStatus(Kopete::OnlineStatus status, - const QString msg) + const TQString msg) { HERE; mwDebug() << "setStatus: " << status.description() << "(" @@ -404,7 +404,7 @@ void MeanwhileSession::syncContactsToServer() mwSametimeGroup_DYNAMIC, "People"); mwSametimeGroup_setOpen(topstgroup, true); - QDictIterator<Kopete::Contact> it(account->contacts()); + TQDictIterator<Kopete::Contact> it(account->contacts()); for( ; it.current(); ++it ) { MeanwhileContact *contact = static_cast<MeanwhileContact *>(it.current()); @@ -498,7 +498,7 @@ void MeanwhileSession::slotSocketClosed(int reason) if (reason & KExtendedSocket::involuntary) emit serverNotification( - QString("Lost connection with Meanwhile server")); + TQString("Lost connection with Meanwhile server")); if (socket) { delete socket; @@ -545,14 +545,14 @@ void MeanwhileSession::resolveContactNickname(MeanwhileContact *contact) _handleResolveLookupResults, contact, NULL); } -QString MeanwhileSession::getNickName(struct mwLoginInfo *logininfo) +TQString MeanwhileSession::getNickName(struct mwLoginInfo *logininfo) { if (logininfo == 0L || logininfo->user_name == 0L) - return QString::null; + return TQString::null; return getNickName(logininfo->user_name); } -QString MeanwhileSession::getNickName(QString name) +TQString MeanwhileSession::getNickName(TQString name) { int index = name.find(" - "); @@ -572,13 +572,13 @@ MeanwhileContact *MeanwhileSession::conversationContact( if (target == 0L || target->user == 0L) { return 0L; } - QString user(target->user); + TQString user(target->user); MeanwhileContact *contact = static_cast<MeanwhileContact *>(account->contacts()[user]); struct mwLoginInfo *logininfo = mwConversation_getTargetInfo(conv); - QString name = getNickName(logininfo); + TQString name = getNickName(logininfo); if (!contact) { account->addContact(user, name, 0L, Kopete::Account::Temporary); @@ -625,7 +625,7 @@ void MeanwhileSession::handleSessionStateChange( if (info == INCORRECT_LOGIN) account->password().setWrong(); char *reason = mwError(info); - emit serverNotification(QString(reason)); + emit serverNotification(TQString(reason)); free(reason); } } @@ -665,14 +665,14 @@ int MeanwhileSession::handleSessionIOWrite(const guchar *buffer, void MeanwhileSession::handleSessionAdmin(const char *text) { HERE; - emit serverNotification(QString(text)); + emit serverNotification(TQString(text)); } void MeanwhileSession::handleSessionAnnounce(struct mwLoginInfo *from, gboolean /* may_reply */, const char *text) { HERE; - QString message; + TQString message; message.sprintf("Announcement from %s:\n%s", from->user_id, text); emit serverNotification(message); } @@ -694,8 +694,8 @@ void MeanwhileSession::handleSessionIOClose() if (socket == 0L) return; - QObject::disconnect(socket, SIGNAL(closed(int)), - this, SLOT(slotSocketClosed(int))); + TQObject::disconnect(socket, TQT_SIGNAL(closed(int)), + this, TQT_SLOT(slotSocketClosed(int))); socket->flush(); socket->closeNow(); @@ -748,7 +748,7 @@ void MeanwhileSession::handleAwareListAware(struct mwAwareSnapshot *snapshot) 0 : snapshot->status.time; if (idletime != 0) { contact->setStatusDescription(statusDesc + "[" + - QString::number(idletime/60)+" mins]"); + TQString::number(idletime/60)+" mins]"); } } else contact->setStatusDescription(snapshot->status.desc); @@ -775,7 +775,7 @@ struct MeanwhileSession::ConversationData cd->chat = contact->manager(Kopete::Contact::CanCreate); cd->chat->ref(); if (createQueue) - cd->queue = new QValueList<Kopete::Message>(); + cd->queue = new TQValueList<Kopete::Message>(); mwConversation_setClientData(conv, cd, 0L); @@ -800,7 +800,7 @@ void MeanwhileSession::handleImConvOpened(struct mwConversation *conv) } else if (convdata->queue && !convdata->queue->isEmpty()) { /* send any messages that were waiting for the conversation to open */ - QValueList<Kopete::Message>::iterator it; + TQValueList<Kopete::Message>::iterator it; for (it = convdata->queue->begin(); it != convdata->queue->end(); ++it) { mwConversation_send(conv, mwImSend_PLAIN, @@ -853,7 +853,7 @@ void MeanwhileSession::handleImConvReceived(struct mwConversation *conv, case mwImSend_PLAIN: { Kopete::Message message(convdata->contact, account->myself(), - QString((char *)msg), Kopete::Message::Inbound); + TQString((char *)msg), Kopete::Message::Inbound); convdata->chat->appendMessage(message); } break; @@ -948,7 +948,7 @@ MEANWHILE_HOOK_CONFERENCE(conference_invite, (conf, inviter, invite)) { HERE; - QString message; + TQString message; message.sprintf("%s has invited you to a conference called \"%s\"\n" "However, this version of the meanwhile plugin does " diff --git a/kopete/protocols/meanwhile/meanwhilesession.h b/kopete/protocols/meanwhile/meanwhilesession.h index 0e2a3558..b7d7f8c7 100644 --- a/kopete/protocols/meanwhile/meanwhilesession.h +++ b/kopete/protocols/meanwhile/meanwhilesession.h @@ -55,7 +55,7 @@ public: * the connection process is ascychronous - a loginDone() signal will be * emitted when sucessfully logged in. */ - void connect(QString password); + void connect(TQString password); /** * Disconnect from the server. @@ -70,7 +70,7 @@ public: * @param msg a custom message to use, if required */ void setStatus(Kopete::OnlineStatus status, - const QString msg = QString::null); + const TQString msg = TQString::null); /** * Add a single contact to be registered for status updates @@ -82,7 +82,7 @@ public: * Add a list of contacts to be registered for status updates * @param contact The list of contacts to register */ - void addContacts(const QDict<Kopete::Contact>& contacts); + void addContacts(const TQDict<Kopete::Contact>& contacts); /** * Send a message (with recipient specified). @@ -126,7 +126,7 @@ signals: * out-of-band data (eg, the password is incorrect). * @param mesgString A description of the notification */ - void serverNotification(const QString &mesgString); + void serverNotification(const TQString &mesgString); private: /** Main libmeanwhile session object */ @@ -174,7 +174,7 @@ private: struct ConversationData { MeanwhileContact *contact; Kopete::ChatSession *chat; - QValueList<Kopete::Message> *queue; + TQValueList<Kopete::Message> *queue; }; /** (To be) stored in the mwConference struct */ @@ -217,7 +217,7 @@ private: * @param name the extened username to parse * @return just the name part of the username info */ - QString getNickName(QString name); + TQString getNickName(TQString name); /** * Convenience method to call the above from a mwLoginInfo struct. All is @@ -225,7 +225,7 @@ private: * @param logininfo the login info for a contact * @return just the name part of the login info data */ - QString getNickName(struct mwLoginInfo *logininfo); + TQString getNickName(struct mwLoginInfo *logininfo); /** * Resolve a contact to find (and set) the display name. This requires the diff --git a/kopete/protocols/msn/config/msnpreferences.cpp b/kopete/protocols/msn/config/msnpreferences.cpp index b28c2ea3..a6f5371f 100644 --- a/kopete/protocols/msn/config/msnpreferences.cpp +++ b/kopete/protocols/msn/config/msnpreferences.cpp @@ -26,7 +26,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kopete_msn, MSNProtocolConfigFactory( "kcm_kopet class MSNPreferences : public KCAutoConfigModule { public: - MSNPreferences( QWidget *parent = 0, const char * = 0, const QStringList &args = QStringList() ) : KCAutoConfigModule( MSNProtocolConfigFactory::instance(), parent, args ) + MSNPreferences( TQWidget *parent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( MSNProtocolConfigFactory::instance(), parent, args ) { setMainWidget( new msnPrefsUI( this ) , "MSN"); } diff --git a/kopete/protocols/msn/dispatcher.cpp b/kopete/protocols/msn/dispatcher.cpp index 8b8bbed6..fb88e8bc 100644 --- a/kopete/protocols/msn/dispatcher.cpp +++ b/kopete/protocols/msn/dispatcher.cpp @@ -37,11 +37,11 @@ using P2P::OutgoingTransfer; #include <ktempfile.h> // Qt includes -#include <qdatastream.h> -#include <qfile.h> -#include <qregexp.h> -#include <qtextcodec.h> -#include <qtextstream.h> +#include <tqdatastream.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqtextcodec.h> +#include <tqtextstream.h> // Kopete includes #include <kopetechatsession.h> // Just for getting the contact @@ -50,8 +50,8 @@ using P2P::OutgoingTransfer; #include <stdlib.h> -Dispatcher::Dispatcher(QObject *parent, const QString& contact, const QStringList &ip) - : QObject(parent) , m_contact(contact) , m_callbackChannel(0l) , m_ip(ip) +Dispatcher::Dispatcher(TQObject *parent, const TQString& contact, const TQStringList &ip) + : TQObject(parent) , m_contact(contact) , m_callbackChannel(0l) , m_ip(ip) {} Dispatcher::~Dispatcher() @@ -71,12 +71,12 @@ void Dispatcher::detach(TransferContext* transfer) transfer->deleteLater(); } -QString Dispatcher::localContact() +TQString Dispatcher::localContact() { return m_contact; } -void Dispatcher::requestDisplayIcon(const QString& from, const QString& msnObject) +void Dispatcher::requestDisplayIcon(const TQString& from, const TQString& msnObject) { Q_UINT32 sessionId = rand()%0xFFFFFF00 + 4; TransferContext* current = @@ -91,13 +91,13 @@ void Dispatcher::requestDisplayIcon(const QString& from, const QString& msnObjec kdDebug(14140) << k_funcinfo << "Requesting, " << msnObject << endl; - QString context = QString::fromUtf8(KCodecs::base64Encode(msnObject.utf8())); + TQString context = TQString::fromUtf8(KCodecs::base64Encode(msnObject.utf8())); // NOTE remove the \0 character automatically - // appended to a QCString. - context.replace("=", QString::null); - QString content = + // appended to a TQCString. + context.replace("=", TQString::null); + TQString content = "EUF-GUID: {A4268EEC-FEC5-49E5-95C3-F126696BDBF6}\r\n" - "SessionID: " + QString::number(sessionId) + "\r\n" + "SessionID: " + TQString::number(sessionId) + "\r\n" "AppID: 1\r\n" "Context: " + context + "\r\n" "\r\n"; @@ -105,7 +105,7 @@ void Dispatcher::requestDisplayIcon(const QString& from, const QString& msnObjec current->sendMessage(INVITE, content); } -void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString& to) +void Dispatcher::sendFile(const TQString& path, Q_INT64 fileSize, const TQString& to) { // Create a new transfer context that will handle // the file transfer. @@ -119,14 +119,14 @@ void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString& m_sessions.insert(sessionId, current); // Set the transfer context file. - current->m_file = new QFile(path); + current->m_file = new TQFile(path); // Create the file context data. - QString context; + TQString context; - QByteArray header(638); + TQByteArray header(638); header.fill('\0'); - QDataStream writer(header, IO_WriteOnly); - writer.setByteOrder(QDataStream::LittleEndian); + TQDataStream writer(header, IO_WriteOnly); + writer.setByteOrder(TQDataStream::LittleEndian); // Write the header length to the stream. writer << (Q_INT32)638; @@ -138,8 +138,8 @@ void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString& // TODO support file preview. For now disable file preview. writer << (Q_INT32)1; // Write the file name in utf-16 to the stream. - QTextStream ts(header, IO_WriteOnly); - ts.setEncoding(QTextStream::RawUnicode); + TQTextStream ts(header, IO_WriteOnly); + ts.setEncoding(TQTextStream::RawUnicode); ts.device()->at(20); ts << path.section('/', -1); // NOTE Background Sharing base64 [540..569] @@ -151,21 +151,21 @@ void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString& writer << (Q_UINT32)0xFFFFFFFF; // Encode the file context header to base64 encoding. - context = QString::fromUtf8(KCodecs::base64Encode(header)); + context = TQString::fromUtf8(KCodecs::base64Encode(header)); // Send an INVITE message to the recipient. - QString content = "EUF-GUID: {5D3E02AB-6190-11D3-BBBB-00C04F795683}\r\n" - "SessionID: " + QString::number(sessionId) + "\r\n" + TQString content = "EUF-GUID: {5D3E02AB-6190-11D3-BBBB-00C04F795683}\r\n" + "SessionID: " + TQString::number(sessionId) + "\r\n" "AppID: 2\r\n" "Context: " + context + "\r\n" "\r\n"; current->sendMessage(INVITE, content); } -void Dispatcher::sendImage(const QString& /*fileName*/, const QString& /*to*/) +void Dispatcher::sendImage(const TQString& /*fileName*/, const TQString& /*to*/) { // TODO kdDebug(14140) << k_funcinfo << endl; -// QFile imageFile(fileName); +// TQFile imageFile(fileName); // if(!imageFile.open(IO_ReadOnly)) // { // kdDebug(14140) << k_funcinfo << "Error opening image file." @@ -180,7 +180,7 @@ void Dispatcher::sendImage(const QString& /*fileName*/, const QString& /*to*/) } #if MSN_WEBCAM -void Dispatcher::startWebcam(const QString &/*myHandle*/, const QString &msgHandle, bool wantToReceive) +void Dispatcher::startWebcam(const TQString &/*myHandle*/, const TQString &msgHandle, bool wantToReceive) { Q_UINT32 sessionId = rand()%0xFFFFFF00 + 4; Webcam::Who who= wantToReceive ? Webcam::wViewer : Webcam::wProducer; @@ -195,10 +195,10 @@ void Dispatcher::startWebcam(const QString &/*myHandle*/, const QString &msgHand // {4BD96FC0-AB17-4425-A14A-439185962DC8} <- i want to show you my webcam // {1C9AA97E-9C05-4583-A3BD-908A196F1E92} <- i want to see your webcam - QString GUID= (who==Webcam::wProducer) ? "4BD96FC0-AB17-4425-A14A-439185962DC8" : "1C9AA97E-9C05-4583-A3BD-908A196F1E92" ; + TQString GUID= (who==Webcam::wProducer) ? "4BD96FC0-AB17-4425-A14A-439185962DC8" : "1C9AA97E-9C05-4583-A3BD-908A196F1E92" ; - QString content="EUF-GUID: {"+GUID+"}\r\n" - "SessionID: "+ QString::number(sessionId)+"\r\n" + TQString content="EUF-GUID: {"+GUID+"}\r\n" + "SessionID: "+ TQString::number(sessionId)+"\r\n" "AppID: 4\r\n" "Context: ewBCADgAQgBFADcAMABEAEUALQBFADIAQwBBAC0ANAA0ADAAMAAtAEEARQAwADMALQA4ADgARgBGADgANQBCADkARgA0AEUAOAB9AA==\r\n\r\n"; @@ -210,7 +210,7 @@ void Dispatcher::startWebcam(const QString &/*myHandle*/, const QString &msgHand -void Dispatcher::slotReadMessage(const QString &from, const QByteArray& stream) +void Dispatcher::slotReadMessage(const TQString &from, const TQByteArray& stream) { P2P::Message receivedMessage = m_messageFormatter.readMessage(stream); @@ -222,7 +222,7 @@ void Dispatcher::slotReadMessage(const QString &from, const QByteArray& stream) if((receivedMessage.header.dataSize == 0)/* && ((receivedMessage.header.flag & 0x02) == 0x02)*/) { TransferContext *current = 0l; - QMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin(); + TQMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin(); for(; it != m_sessions.end(); it++) { if(receivedMessage.header.ackSessionIdentifier == it.data()->m_identifier){ @@ -250,7 +250,7 @@ void Dispatcher::slotReadMessage(const QString &from, const QByteArray& stream) if(m_messageBuffer.contains(receivedMessage.header.identifier)) { kdDebug(14140) << k_funcinfo - << QString("retrieving buffered messsage, %1").arg(receivedMessage.header.identifier) + << TQString("retrieving buffered messsage, %1").arg(receivedMessage.header.identifier) << endl; // The message was split, try to reconstruct the message @@ -288,9 +288,9 @@ void Dispatcher::dispatch(const P2P::Message& message) } else { - QString body = - QCString(message.body.data(), message.header.dataSize); - QRegExp regex("SessionID: ([0-9]*)\r\n"); + TQString body = + TQCString(message.body.data(), message.header.dataSize); + TQRegExp regex("SessionID: ([0-9]*)\r\n"); if(regex.search(body) > 0) { Q_UINT32 sessionId = regex.cap(1).toUInt(); @@ -312,12 +312,12 @@ void Dispatcher::dispatch(const P2P::Message& message) { // If the message handler still has not been found, // try to retrieve the handler based on the call id. - regex = QRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n"); + regex = TQRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n"); regex.search(body); - QString callId = regex.cap(1); + TQString callId = regex.cap(1); TransferContext *current = 0l; - QMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin(); + TQMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin(); for(; it != m_sessions.end(); it++) { current = it.data(); @@ -347,14 +347,14 @@ void Dispatcher::dispatch(const P2P::Message& message) // The entire message has not been received; // buffer the recevied portion of the original message. kdDebug(14140) << k_funcinfo - << QString("Buffering messsage, %1").arg(message.header.identifier) + << TQString("Buffering messsage, %1").arg(message.header.identifier) << endl; m_messageBuffer.insert(message.header.identifier, message); return; } - QString body = - QCString(message.body.data(), message.header.dataSize); + TQString body = + TQCString(message.body.data(), message.header.dataSize); kdDebug(14140) << k_funcinfo << "received, " << body << endl; if(body.startsWith("INVITE")) @@ -362,23 +362,23 @@ void Dispatcher::dispatch(const P2P::Message& message) // Retrieve the branch, call id, and session id. // These fields will be used later on in the p2p // transaction. - QRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n"); + TQRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n"); regex.search(body); - QString branch = regex.cap(1); - regex = QRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n"); + TQString branch = regex.cap(1); + regex = TQRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n"); regex.search(body); - QString callId = regex.cap(1); - regex = QRegExp("SessionID: ([0-9]*)\r\n"); + TQString callId = regex.cap(1); + regex = TQRegExp("SessionID: ([0-9]*)\r\n"); regex.search(body); - QString sessionId = regex.cap(1); + TQString sessionId = regex.cap(1); // Retrieve the contact that requested the session. - regex = QRegExp("From: <msnmsgr:([^>]*)>"); + regex = TQRegExp("From: <msnmsgr:([^>]*)>"); regex.search(body); - QString from = regex.cap(1); + TQString from = regex.cap(1); // Retrieve the application identifier which // is used to determine what type of session // is being requested. - regex = QRegExp("AppID: ([0-9]*)\r\n"); + regex = TQRegExp("AppID: ([0-9]*)\r\n"); regex.search(body); Q_UINT32 applicationId = regex.cap(1).toUInt(); @@ -387,9 +387,9 @@ void Dispatcher::dispatch(const P2P::Message& message) // A contact has requested a session to download // a display icon (User Display Icon or CustomEmotion). - regex = QRegExp("Context: ([0-9a-zA-Z+/=]*)"); + regex = TQRegExp("Context: ([0-9a-zA-Z+/=]*)"); regex.search(body); - QCString msnobj; + TQCString msnobj; // Decode the msn object from base64 encoding. KCodecs::base64Decode(regex.cap(1).utf8() , msnobj); @@ -407,10 +407,10 @@ void Dispatcher::dispatch(const P2P::Message& message) m_sessions.insert(sessionId.toUInt(), current); // Determine the display icon being requested. - QString fileName = objectList.contains(msnobj) + TQString fileName = objectList.contains(msnobj) ? objectList[msnobj] : m_pictureUrl; - QFile *source = new QFile(fileName); + TQFile *source = new TQFile(fileName); // Try to open the source file for reading. // If an error occurs, send an internal // error message to the recipient. @@ -427,7 +427,7 @@ void Dispatcher::dispatch(const P2P::Message& message) current->m_ackSessionIdentifier = message.header.identifier; current->m_ackUniqueIdentifier = message.header.ackSessionIdentifier; // Send a 200 OK message to the recipient. - QString content = QString("SessionID: %1\r\n\r\n").arg(sessionId); + TQString content = TQString("SessionID: %1\r\n\r\n").arg(sessionId); current->sendMessage(OK, content); } else if(applicationId == 2) @@ -447,14 +447,14 @@ void Dispatcher::dispatch(const P2P::Message& message) // Add the transfer to the list. m_sessions.insert(sessionId.toUInt(), transfer); - regex = QRegExp("Context: ([0-9a-zA-Z+/=]*)"); + regex = TQRegExp("Context: ([0-9a-zA-Z+/=]*)"); regex.search(body); - QByteArray context; + TQByteArray context; // Decode the file context from base64 encoding. KCodecs::base64Decode(regex.cap(1).utf8(), context); - QDataStream reader(context, IO_ReadOnly); - reader.setByteOrder(QDataStream::LittleEndian); + TQDataStream reader(context, IO_ReadOnly); + reader.setByteOrder(TQDataStream::LittleEndian); //Retrieve the file info from the context field. // File Size [8..15] Int64 reader.device()->at(8); @@ -468,17 +468,17 @@ void Dispatcher::dispatch(const P2P::Message& message) reader >> flag; kdDebug(14140) << flag << endl; // FileName UTF16 (Unicode) [19..539] - QByteArray bytes(520); + TQByteArray bytes(520); reader.readRawBytes(bytes.data(), bytes.size()); - QTextStream ts(bytes, IO_ReadOnly); - ts.setEncoding(QTextStream::Unicode); - QString fileName; + TQTextStream ts(bytes, IO_ReadOnly); + ts.setEncoding(TQTextStream::Unicode); + TQString fileName; fileName = ts.readLine().utf8(); emit incomingTransfer(from, fileName, fileSize); kdDebug(14140) << - QString("%1, %2 bytes.").arg(fileName, QString::number(fileSize)) + TQString("%1, %2 bytes.").arg(fileName, TQString::number(fileSize)) << endl << endl; @@ -493,11 +493,11 @@ void Dispatcher::dispatch(const P2P::Message& message) transfer->m_ackSessionIdentifier = message.header.identifier; transfer->m_ackUniqueIdentifier = message.header.ackSessionIdentifier; - QObject::connect(Kopete::TransferManager::transferManager(), SIGNAL(accepted(Kopete::Transfer*, const QString&)), transfer, SLOT(slotTransferAccepted(Kopete::Transfer*, const QString&))); - QObject::connect(Kopete::TransferManager::transferManager(), SIGNAL(refused(const Kopete::FileTransferInfo&)), transfer, SLOT(slotTransferRefused(const Kopete::FileTransferInfo&))); + TQObject::connect(Kopete::TransferManager::transferManager(), TQT_SIGNAL(accepted(Kopete::Transfer*, const TQString&)), transfer, TQT_SLOT(slotTransferAccepted(Kopete::Transfer*, const TQString&))); + TQObject::connect(Kopete::TransferManager::transferManager(), TQT_SIGNAL(refused(const Kopete::FileTransferInfo&)), transfer, TQT_SLOT(slotTransferRefused(const Kopete::FileTransferInfo&))); // Show the file transfer accept/decline dialog. - Kopete::TransferManager::transferManager()->askIncomingTransfer(contact, fileName, fileSize, QString::null, sessionId); + Kopete::TransferManager::transferManager()->askIncomingTransfer(contact, fileName, fileSize, TQString::null, sessionId); } else { @@ -512,9 +512,9 @@ void Dispatcher::dispatch(const P2P::Message& message) else if(applicationId == 4) { #if MSN_WEBCAM - regex = QRegExp("EUF-GUID: \\{([0-9a-zA-Z\\-]*)\\}"); + regex = TQRegExp("EUF-GUID: \\{([0-9a-zA-Z\\-]*)\\}"); regex.search(body); - QString GUID=regex.cap(1); + TQString GUID=regex.cap(1); kdDebug(14140) << k_funcinfo << "webcam " << GUID << endl; @@ -542,7 +542,7 @@ void Dispatcher::dispatch(const P2P::Message& message) m_sessions.insert(sessionId.toUInt(), current); // Acknowledge the session request. current->acknowledge(message); - QTimer::singleShot(0,current, SLOT(askIncommingInvitation()) ); + TQTimer::singleShot(0,current, TQT_SLOT(askIncommingInvitation()) ); #endif } } @@ -550,26 +550,26 @@ void Dispatcher::dispatch(const P2P::Message& message) { // A contact has sent an inkformat (handwriting) gif. // NOTE The entire message body is UTF16 encoded. - QString body = ""; + TQString body = ""; for (Q_UINT32 i=0; i < message.header.totalDataSize; i++){ - if (message.body[i] != QChar('\0')){ - body += QChar(message.body[i]); + if (message.body[i] != TQChar('\0')){ + body += TQChar(message.body[i]); } } - QRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)"); + TQRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)"); regex.search(body); - QString contentType = regex.cap(1); + TQString contentType = regex.cap(1); if(contentType == "image/gif") { IncomingTransfer transfer(message.source, this, message.header.sessionId); transfer.acknowledge(message); - regex = QRegExp("base64:([0-9a-zA-Z+/=]*)"); + regex = TQRegExp("base64:([0-9a-zA-Z+/=]*)"); regex.search(body); - QString base64 = regex.cap(1); - QByteArray image; + TQString base64 = regex.cap(1); + TQByteArray image; // Convert from base64 encoding to byte array. KCodecs::base64Decode(base64.utf8(), image); // Create a temporary file to store the image data. @@ -590,7 +590,7 @@ void Dispatcher::messageAcknowledged(unsigned int correlationId, bool fullReceiv if(fullReceive) { TransferContext *current = 0l; - QMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin(); + TQMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin(); for(; it != m_sessions.end(); it++) { current = it.data(); @@ -604,7 +604,7 @@ void Dispatcher::messageAcknowledged(unsigned int correlationId, bool fullReceiv } } -Kopete::Contact* Dispatcher::getContactByAccountId(const QString& accountId) +Kopete::Contact* Dispatcher::getContactByAccountId(const TQString& accountId) { Kopete::Contact *contact = 0l; if(parent()) @@ -628,7 +628,7 @@ Dispatcher::CallbackChannel::CallbackChannel(MSNSwitchBoardSocket *switchboard) Dispatcher::CallbackChannel::~CallbackChannel() {} -Q_UINT32 Dispatcher::CallbackChannel::send(const QByteArray& stream) +Q_UINT32 Dispatcher::CallbackChannel::send(const TQByteArray& stream) { return m_switchboard->sendCommand("MSG", "D", true, stream, true); } diff --git a/kopete/protocols/msn/dispatcher.h b/kopete/protocols/msn/dispatcher.h index 56bd1856..72a9cc12 100644 --- a/kopete/protocols/msn/dispatcher.h +++ b/kopete/protocols/msn/dispatcher.h @@ -17,8 +17,8 @@ #ifndef DISPATCHER_H #define DISPATCHER_H -#include <qobject.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstringlist.h> #include "kopete_export.h" @@ -41,30 +41,30 @@ namespace P2P{ class KOPETE_EXPORT Dispatcher : public QObject { Q_OBJECT public: - Dispatcher(QObject *parent, const QString& contact, const QStringList &ip); + Dispatcher(TQObject *parent, const TQString& contact, const TQStringList &ip); ~Dispatcher(); void detach(TransferContext* transfer); - QString localContact(); - void requestDisplayIcon(const QString& from, const QString& msnObject); - void sendFile(const QString& path, Q_INT64 fileSize, const QString& to); - void sendImage(const QString& fileName, const QString& to); - QString m_pictureUrl; - QMap<QString, QString> objectList; + TQString localContact(); + void requestDisplayIcon(const TQString& from, const TQString& msnObject); + void sendFile(const TQString& path, Q_INT64 fileSize, const TQString& to); + void sendImage(const TQString& fileName, const TQString& to); + TQString m_pictureUrl; + TQMap<TQString, TQString> objectList; #if MSN_WEBCAM - void startWebcam(const QString &myHandle, const QString &msgHandle, bool wantToReceive); + void startWebcam(const TQString &myHandle, const TQString &msgHandle, bool wantToReceive); #endif public slots: - void slotReadMessage(const QString &from, const QByteArray& stream); + void slotReadMessage(const TQString &from, const TQByteArray& stream); void messageAcknowledged(unsigned int correlationId, bool fullReceive); signals: - void sendCommand(const QString &cmd, const QString &args = QString::null, bool addId = true, const QByteArray &body = QByteArray(), bool binary=false); - void displayIconReceived(KTempFile* file, const QString& msnObject); - void incomingTransfer(const QString& from, const QString& fileName, Q_INT64 fileSize); + void sendCommand(const TQString &cmd, const TQString &args = TQString::null, bool addId = true, const TQByteArray &body = TQByteArray(), bool binary=false); + void displayIconReceived(KTempFile* file, const TQString& msnObject); + void incomingTransfer(const TQString& from, const TQString& fileName, Q_INT64 fileSize); private: class CallbackChannel @@ -73,7 +73,7 @@ namespace P2P{ CallbackChannel(MSNSwitchBoardSocket *switchboard); ~CallbackChannel(); - Q_UINT32 send(const QByteArray& stream); + Q_UINT32 send(const TQByteArray& stream); private: MSNSwitchBoardSocket *m_switchboard; @@ -84,19 +84,19 @@ namespace P2P{ /** * IP's of this compiter, the first one is the one seen by the server. */ - QStringList localIp() { return m_ip; } + TQStringList localIp() { return m_ip; } private: void dispatch(const P2P::Message& message); - Kopete::Contact* getContactByAccountId(const QString& accountId); + Kopete::Contact* getContactByAccountId(const TQString& accountId); P2P::MessageFormatter m_messageFormatter; - QMap<Q_UINT32, P2P::TransferContext*> m_sessions; - QMap<Q_UINT32, P2P::Message> m_messageBuffer; - QString m_contact; + TQMap<Q_UINT32, P2P::TransferContext*> m_sessions; + TQMap<Q_UINT32, P2P::Message> m_messageBuffer; + TQString m_contact; CallbackChannel *m_callbackChannel; - QStringList m_ip; + TQStringList m_ip; friend class P2P::TransferContext; friend class P2P::IncomingTransfer; diff --git a/kopete/protocols/msn/incomingtransfer.cpp b/kopete/protocols/msn/incomingtransfer.cpp index aefbdbfe..c7757219 100644 --- a/kopete/protocols/msn/incomingtransfer.cpp +++ b/kopete/protocols/msn/incomingtransfer.cpp @@ -29,13 +29,13 @@ using P2P::Message; using namespace KNetwork; // Qt includes -#include <qfile.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqregexp.h> // Kopete includes #include <kopetetransfermanager.h> -IncomingTransfer::IncomingTransfer(const QString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId) +IncomingTransfer::IncomingTransfer(const TQString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId) : TransferContext(from,dispatcher,sessionId) { m_direction = P2P::Incoming; @@ -59,19 +59,19 @@ IncomingTransfer::~IncomingTransfer() } -void IncomingTransfer::slotTransferAccepted(Kopete::Transfer* transfer, const QString& /*fileName*/) +void IncomingTransfer::slotTransferAccepted(Kopete::Transfer* transfer, const TQString& /*fileName*/) { Q_UINT32 sessionId = transfer->info().internalId().toUInt(); if(sessionId!=m_sessionId) return; - QObject::connect(transfer , SIGNAL(transferCanceled()), this, SLOT(abort())); + TQObject::connect(transfer , TQT_SIGNAL(transferCanceled()), this, TQT_SLOT(abort())); m_transfer = transfer; - QString content = QString("SessionID: %1\r\n\r\n").arg(sessionId); + TQString content = TQString("SessionID: %1\r\n\r\n").arg(sessionId); sendMessage(OK, content); - QObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l); + TQObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l); } void IncomingTransfer::slotTransferRefused(const Kopete::FileTransferInfo& info) @@ -80,12 +80,12 @@ void IncomingTransfer::slotTransferRefused(const Kopete::FileTransferInfo& info) if(sessionId!=m_sessionId) return; - QString content = QString("SessionID: %1\r\n\r\n").arg(sessionId); + TQString content = TQString("SessionID: %1\r\n\r\n").arg(sessionId); // Send the sending client a cancelation message. sendMessage(DECLINE, content); m_state=Finished; - QObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l); + TQObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l); } @@ -106,7 +106,7 @@ void IncomingTransfer::acknowledged() // should follow. Otherwise, the file transfer may start right away. if(m_transfer) { - QFile *destination = new QFile(m_transfer->destinationURL().path()); + TQFile *destination = new TQFile(m_transfer->destinationURL().path()); if(!destination->open(IO_WriteOnly)) { m_transfer->slotError(KIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Cannot open file for writing")); @@ -141,7 +141,7 @@ void IncomingTransfer::processMessage(const Message& message) { // UserDisplayIcon data or File data is in this message. // Write the recieved data to the file. - kdDebug(14140) << k_funcinfo << QString("Received, %1 bytes").arg(message.header.dataSize) << endl; + kdDebug(14140) << k_funcinfo << TQString("Received, %1 bytes").arg(message.header.dataSize) << endl; m_file->writeBlock(message.body.data(), message.header.dataSize); if(m_transfer){ @@ -178,7 +178,7 @@ void IncomingTransfer::processMessage(const Message& message) { // Data preparation message. //if (m_tempFile->name().isEmpty() == false) { - // QFile::remove(m_tempFile->name()); + // TQFile::remove(m_tempFile->name()); //} m_tempFile = new KTempFile(locateLocal("tmp", "msnpicture--"), ".png"); m_tempFile->setAutoDelete(true); @@ -189,30 +189,30 @@ void IncomingTransfer::processMessage(const Message& message) } else { - QString body = - QCString(message.body.data(), message.header.dataSize); + TQString body = + TQCString(message.body.data(), message.header.dataSize); // kdDebug(14140) << k_funcinfo << "received, " << body << endl; if(body.startsWith("INVITE")) { // Retrieve some MSNSLP headers used when // replying to this INVITE message. - QRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n"); + TQRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n"); regex.search(body); m_branch = regex.cap(1); // NOTE Call-ID never changes. - regex = QRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n"); + regex = TQRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n"); regex.search(body); m_callId = regex.cap(1); - regex = QRegExp("Bridges: ([^\r\n]*)\r\n"); + regex = TQRegExp("Bridges: ([^\r\n]*)\r\n"); regex.search(body); - QString bridges = regex.cap(1); + TQString bridges = regex.cap(1); // The NetID field is 0 if the Conn-Type is // Direct-Connect or Firewall, otherwise, it is // a randomly generated number. - regex = QRegExp("NetID: (\\-?\\d+)\r\n"); + regex = TQRegExp("NetID: (\\-?\\d+)\r\n"); regex.search(body); - QString netId = regex.cap(1); + TQString netId = regex.cap(1); kdDebug(14140) << "net id, " << netId << endl; // Connection Types // - Direct-Connect @@ -220,9 +220,9 @@ void IncomingTransfer::processMessage(const Message& message) // - IP-Restrict-NAT // - Symmetric-NAT // - Firewall - regex = QRegExp("Conn-Type: ([^\r\n]+)\r\n"); + regex = TQRegExp("Conn-Type: ([^\r\n]+)\r\n"); regex.search(body); - QString connType = regex.cap(1); + TQString connType = regex.cap(1); bool wouldListen = false; if(netId.toUInt() == 0 && connType == "Direct-Connect"){ @@ -235,7 +235,7 @@ void IncomingTransfer::processMessage(const Message& message) #if 1 wouldListen = false; // TODO Direct connection support #endif - QString content; + TQString content; if(wouldListen) { @@ -243,8 +243,8 @@ void IncomingTransfer::processMessage(const Message& message) m_listener = new KServerSocket("", ""); m_listener->setResolutionEnabled(true); // Create the callback that will try to accept incoming connections. - QObject::connect(m_listener, SIGNAL(readyAccept()), SLOT(slotAccept())); - QObject::connect(m_listener, SIGNAL(gotError(int)), this, SLOT(slotListenError(int))); + TQObject::connect(m_listener, TQT_SIGNAL(readyAccept()), TQT_SLOT(slotAccept())); + TQObject::connect(m_listener, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotListenError(int))); // Listen for incoming connections. bool isListening = m_listener->listen(1); kdDebug(14140) << k_funcinfo << (isListening ? "listening" : "not listening") << endl; @@ -254,9 +254,9 @@ void IncomingTransfer::processMessage(const Message& message) content = "Bridge: TCPv1\r\n" "Listening: true\r\n" + - QString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) + - QString("IPv4Internal-Addrs: %1\r\n").arg(m_listener->localAddress().nodeName()) + - QString("IPv4Internal-Port: %1\r\n").arg(m_listener->localAddress().serviceName()) + + TQString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) + + TQString("IPv4Internal-Addrs: %1\r\n").arg(m_listener->localAddress().nodeName()) + + TQString("IPv4Internal-Port: %1\r\n").arg(m_listener->localAddress().serviceName()) + "\r\n"; } else @@ -349,11 +349,11 @@ void IncomingTransfer::slotAccept() m_socket->enableWrite(false); // Create the callback that will try to read bytes from the accepted socket. - QObject::connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotSocketRead())); + TQObject::connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketRead())); // Create the callback that will try to handle the socket close event. - QObject::connect(m_socket, SIGNAL(closed()), this, SLOT(slotSocketClosed())); + TQObject::connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed())); // Create the callback that will try to handle the socket error event. - QObject::connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int))); + TQObject::connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int))); } void IncomingTransfer::slotSocketRead() @@ -362,10 +362,10 @@ void IncomingTransfer::slotSocketRead() kdDebug(14140) << k_funcinfo << available << ", bytes available." << endl; if(available > 0) { - QByteArray buffer(available); + TQByteArray buffer(available); m_socket->readBlock(buffer.data(), buffer.size()); - if(QString(buffer) == "foo"){ + if(TQString(buffer) == "foo"){ kdDebug(14140) << "Connection Check." << endl; } } diff --git a/kopete/protocols/msn/incomingtransfer.h b/kopete/protocols/msn/incomingtransfer.h index 23e101b3..ca879deb 100644 --- a/kopete/protocols/msn/incomingtransfer.h +++ b/kopete/protocols/msn/incomingtransfer.h @@ -31,7 +31,7 @@ namespace P2P{ class IncomingTransfer : public P2P::TransferContext { Q_OBJECT public: - IncomingTransfer(const QString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId); + IncomingTransfer(const TQString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId); virtual ~IncomingTransfer(); private slots: @@ -41,7 +41,7 @@ namespace P2P{ void slotSocketClosed(); void slotSocketError(int errorCode); - void slotTransferAccepted(Kopete::Transfer* transfer, const QString& fileName); + void slotTransferAccepted(Kopete::Transfer* transfer, const TQString& fileName); void slotTransferRefused(const Kopete::FileTransferInfo& info); diff --git a/kopete/protocols/msn/messageformatter.cpp b/kopete/protocols/msn/messageformatter.cpp index 3a698ac4..7d830ea6 100644 --- a/kopete/protocols/msn/messageformatter.cpp +++ b/kopete/protocols/msn/messageformatter.cpp @@ -17,8 +17,8 @@ #include "p2p.h" // Qt includes -#include <qdatastream.h> -#include <qregexp.h> +#include <tqdatastream.h> +#include <tqregexp.h> // Kde includes #include <kdebug.h> @@ -26,13 +26,13 @@ using P2P::MessageFormatter; using P2P::Message; -MessageFormatter::MessageFormatter(QObject *parent, const char *name) : QObject(parent, name) +MessageFormatter::MessageFormatter(TQObject *parent, const char *name) : TQObject(parent, name) {} MessageFormatter::~MessageFormatter() {} -Message MessageFormatter::readMessage(const QByteArray& stream, bool compact) +Message MessageFormatter::readMessage(const TQByteArray& stream, bool compact) { Message inbound; @@ -49,30 +49,30 @@ Message MessageFormatter::readMessage(const QByteArray& stream, bool compact) } // Retrieve the message header. - QString messageHeader = QCString(stream.data(), index); + TQString messageHeader = TQCString(stream.data(), index); // Retrieve the message mime version, content type, // and p2p destination. - QRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)"); + TQRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)"); regex.search(messageHeader); - QString contentType = regex.cap(1); + TQString contentType = regex.cap(1); if(contentType != "application/x-msnmsgrp2p") return inbound; // kdDebug(14140) << k_funcinfo << endl; - regex = QRegExp("MIME-Version: (\\d.\\d)"); + regex = TQRegExp("MIME-Version: (\\d.\\d)"); regex.search(messageHeader); inbound.mimeVersion = regex.cap(1); inbound.contentType = contentType; - regex = QRegExp("P2P-Dest: ([^\r\n]*)"); + regex = TQRegExp("P2P-Dest: ([^\r\n]*)"); regex.search(messageHeader); - QString destination = regex.cap(1); + TQString destination = regex.cap(1); } - QDataStream reader(stream, IO_ReadOnly); - reader.setByteOrder(QDataStream::LittleEndian); + TQDataStream reader(stream, IO_ReadOnly); + reader.setByteOrder(TQDataStream::LittleEndian); // Seek to the start position of the message // transport header. reader.device()->at(index); @@ -108,7 +108,7 @@ Message MessageFormatter::readMessage(const QByteArray& stream, bool compact) if(compact == false) { - reader.setByteOrder(QDataStream::BigEndian); + reader.setByteOrder(TQDataStream::BigEndian); // Read the message application identifier from the stream. reader >> inbound.applicationIdentifier; @@ -120,16 +120,16 @@ Message MessageFormatter::readMessage(const QByteArray& stream, bool compact) return inbound; } -void MessageFormatter::writeMessage(const Message& message, QByteArray& stream, bool compact) +void MessageFormatter::writeMessage(const Message& message, TQByteArray& stream, bool compact) { // kdDebug(14140) << k_funcinfo << endl; - QDataStream writer(stream, IO_WriteOnly); - writer.setByteOrder(QDataStream::LittleEndian); + TQDataStream writer(stream, IO_WriteOnly); + writer.setByteOrder(TQDataStream::LittleEndian); if(compact == false) { - const QCString messageHeader = QString("MIME-Version: 1.0\r\n" + const TQCString messageHeader = TQString("MIME-Version: 1.0\r\n" "Content-Type: application/x-msnmsgrp2p\r\n" "P2P-Dest: " + message.destination + "\r\n" "\r\n").utf8(); @@ -178,7 +178,7 @@ void MessageFormatter::writeMessage(const Message& message, QByteArray& stream, if(compact == false) { // Seek to the message application identifier section. - writer.setByteOrder(QDataStream::BigEndian); + writer.setByteOrder(TQDataStream::BigEndian); // Write the message application identifier to the stream. writer << message.applicationIdentifier; diff --git a/kopete/protocols/msn/messageformatter.h b/kopete/protocols/msn/messageformatter.h index 9eae8682..f86d679d 100644 --- a/kopete/protocols/msn/messageformatter.h +++ b/kopete/protocols/msn/messageformatter.h @@ -16,7 +16,7 @@ #ifndef MESSAGEFORMATTER_H #define MESSAGEFORMATTER_H -#include <qobject.h> +#include <tqobject.h> namespace P2P{ class Message; @@ -29,11 +29,11 @@ namespace P2P{ class MessageFormatter : public QObject { Q_OBJECT public: - MessageFormatter(QObject *parent = 0, const char *name = 0); + MessageFormatter(TQObject *parent = 0, const char *name = 0); ~MessageFormatter(); - Message readMessage(const QByteArray& stream, bool compact=false); - void writeMessage(const Message& message, QByteArray& stream, bool compact=false); + Message readMessage(const TQByteArray& stream, bool compact=false); + void writeMessage(const Message& message, TQByteArray& stream, bool compact=false); }; } diff --git a/kopete/protocols/msn/msnaccount.cpp b/kopete/protocols/msn/msnaccount.cpp index 01caec11..267cd0d7 100644 --- a/kopete/protocols/msn/msnaccount.cpp +++ b/kopete/protocols/msn/msnaccount.cpp @@ -31,10 +31,10 @@ #include <kmdcodec.h> #include <klocale.h> -#include <qfile.h> -#include <qregexp.h> -#include <qvalidator.h> -#include <qimage.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqvalidator.h> +#include <tqimage.h> #include "msncontact.h" #include "msnnotifysocket.h" @@ -61,7 +61,7 @@ #include "avdevice/videodevicepool.h" #endif -MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const char *name ) +MSNAccount::MSNAccount( MSNProtocol *parent, const TQString& AccountID, const char *name ) : Kopete::PasswordedAccount ( parent, AccountID.lower(), 0, name ) { m_notifySocket = 0L; @@ -73,16 +73,16 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha setMyself( new MSNContact( this, accountId(), Kopete::ContactList::self()->myself() ) ); //myself()->setOnlineStatus( MSNProtocol::protocol()->FLN ); - QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ), - SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) ); - QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRemoved( Kopete::Group * ) ), - SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) ); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ), + TQT_SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) ); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRemoved( Kopete::Group * ) ), + TQT_SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) ); - QObject::connect( Kopete::ContactList::self(), SIGNAL( globalIdentityChanged(const QString&, const QVariant& ) ), SLOT( slotGlobalIdentityChanged(const QString&, const QVariant& ) )); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged(const TQString&, const TQVariant& ) ), TQT_SLOT( slotGlobalIdentityChanged(const TQString&, const TQVariant& ) )); - m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, SLOT( slotOpenInbox() ), this, "m_openInboxAction" ); - m_changeDNAction = new KAction( i18n( "&Change Display Name..." ), QString::null, 0, this, SLOT( slotChangePublicName() ), this, "renameAction" ); - m_startChatAction = new KAction( i18n( "&Start Chat..." ), "mail_generic", 0, this, SLOT( slotStartChat() ), this, "startChatAction" ); + m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, TQT_SLOT( slotOpenInbox() ), this, "m_openInboxAction" ); + m_changeDNAction = new KAction( i18n( "&Change Display Name..." ), TQString::null, 0, this, TQT_SLOT( slotChangePublicName() ), this, "renameAction" ); + m_startChatAction = new KAction( i18n( "&Start Chat..." ), "mail_generic", 0, this, TQT_SLOT( slotStartChat() ), this, "startChatAction" ); KConfigGroup *config=configGroup(); @@ -92,7 +92,7 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha m_reverseList = config->readListEntry( "reverseList" ) ; // Load the avatar - m_pictureFilename = locateLocal( "appdata", "msnpicture-"+ accountId().lower().replace(QRegExp("[./~]"),"-") +".png" ); + m_pictureFilename = locateLocal( "appdata", "msnpicture-"+ accountId().lower().replace(TQRegExp("[./~]"),"-") +".png" ); resetPictureObject(true); static_cast<MSNContact *>( myself() )->setInfo( "PHH", config->readEntry("PHH") ); @@ -103,10 +103,10 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha //construct the group list //Before 2003-11-14 the MSN server allowed us to download the group list without downloading the whole contactlist, but it's not possible anymore - QPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups(); + TQPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups(); for ( Kopete::Group *g = groupList.first(); g; g = groupList.next() ) { - QString groupGuid=g->pluginData( protocol(), accountId() + " id" ); + TQString groupGuid=g->pluginData( protocol(), accountId() + " id" ); if ( !groupGuid.isEmpty() ) m_groupList.insert( groupGuid , g ); } @@ -124,7 +124,7 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha } -QString MSNAccount::serverName() +TQString MSNAccount::serverName() { return configGroup()->readEntry( "serverName" , "messenger.hotmail.com" ); } @@ -139,12 +139,12 @@ bool MSNAccount::useHttpMethod() const return configGroup()->readBoolEntry( "useHttpMethod" , false ); } -QString MSNAccount::myselfClientId() const +TQString MSNAccount::myselfClientId() const { - return QString::number(m_clientId, 10); + return TQString::number(m_clientId, 10); } -void MSNAccount::connectWithPassword( const QString &passwd ) +void MSNAccount::connectWithPassword( const TQString &passwd ) { m_newContactList=false; if ( isConnected() ) @@ -181,13 +181,13 @@ void MSNAccount::connectWithPassword( const QString &passwd ) createNotificationServer(serverName(), serverPort()); } -void MSNAccount::createNotificationServer( const QString &host, uint port ) +void MSNAccount::createNotificationServer( const TQString &host, uint port ) { if(m_notifySocket) //we are switching from one to another notifysocket. { //remove every slots to that socket, so we won't delete receive signals // from the old socket thinking they are from the new one - QObject::disconnect( m_notifySocket , 0, this, 0 ); + TQObject::disconnect( m_notifySocket , 0, this, 0 ); m_notifySocket->deleteLater(); //be sure it will be deleted m_notifySocket=0L; } @@ -200,36 +200,36 @@ void MSNAccount::createNotificationServer( const QString &host, uint port ) m_notifySocket = new MSNNotifySocket( this, accountId() , m_password); m_notifySocket->setUseHttpMethod( useHttpMethod() ); - QObject::connect( m_notifySocket, SIGNAL( groupAdded( const QString&, const QString& ) ), - SLOT( slotGroupAdded( const QString&, const QString& ) ) ); - QObject::connect( m_notifySocket, SIGNAL( groupRenamed( const QString&, const QString& ) ), - SLOT( slotGroupRenamed( const QString&, const QString& ) ) ); - QObject::connect( m_notifySocket, SIGNAL( groupListed( const QString&, const QString& ) ), - SLOT( slotGroupAdded( const QString&, const QString& ) ) ); - QObject::connect( m_notifySocket, SIGNAL( groupRemoved( const QString& ) ), - SLOT( slotGroupRemoved( const QString& ) ) ); - QObject::connect( m_notifySocket, SIGNAL( contactList(const QString&, const QString&, const QString&, uint, const QString& ) ), - SLOT( slotContactListed(const QString&, const QString&, const QString&, uint, const QString& ) ) ); - QObject::connect( m_notifySocket, SIGNAL(contactAdded(const QString&, const QString&, const QString&, const QString&, const QString& ) ), - SLOT( slotContactAdded(const QString&, const QString&, const QString&, const QString&, const QString& ) ) ); - QObject::connect( m_notifySocket, SIGNAL( contactRemoved(const QString&, const QString&, const QString&, const QString& ) ), - SLOT( slotContactRemoved(const QString&, const QString&, const QString&, const QString& ) ) ); - QObject::connect( m_notifySocket, SIGNAL( statusChanged( const Kopete::OnlineStatus & ) ), - SLOT( slotStatusChanged( const Kopete::OnlineStatus & ) ) ); - QObject::connect( m_notifySocket, SIGNAL( invitedToChat( const QString&, const QString&, const QString&, const QString&, const QString& ) ), - SLOT( slotCreateChat( const QString&, const QString&, const QString&, const QString&, const QString& ) ) ); - QObject::connect( m_notifySocket, SIGNAL( startChat( const QString&, const QString& ) ), - SLOT( slotCreateChat( const QString&, const QString& ) ) ); - QObject::connect( m_notifySocket, SIGNAL( socketClosed() ), - SLOT( slotNotifySocketClosed() ) ); - QObject::connect( m_notifySocket, SIGNAL( newContactList() ), - SLOT( slotNewContactList() ) ); - QObject::connect( m_notifySocket, SIGNAL( receivedNotificationServer(const QString&, uint ) ), - SLOT(createNotificationServer(const QString&, uint ) ) ); - QObject::connect( m_notifySocket, SIGNAL( hotmailSeted( bool ) ), - m_openInboxAction, SLOT( setEnabled( bool ) ) ); - QObject::connect( m_notifySocket, SIGNAL( errorMessage(int, const QString& ) ), - SLOT( slotErrorMessageReceived(int, const QString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( groupAdded( const TQString&, const TQString& ) ), + TQT_SLOT( slotGroupAdded( const TQString&, const TQString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( groupRenamed( const TQString&, const TQString& ) ), + TQT_SLOT( slotGroupRenamed( const TQString&, const TQString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( groupListed( const TQString&, const TQString& ) ), + TQT_SLOT( slotGroupAdded( const TQString&, const TQString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( groupRemoved( const TQString& ) ), + TQT_SLOT( slotGroupRemoved( const TQString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( contactList(const TQString&, const TQString&, const TQString&, uint, const TQString& ) ), + TQT_SLOT( slotContactListed(const TQString&, const TQString&, const TQString&, uint, const TQString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL(contactAdded(const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ), + TQT_SLOT( slotContactAdded(const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( contactRemoved(const TQString&, const TQString&, const TQString&, const TQString& ) ), + TQT_SLOT( slotContactRemoved(const TQString&, const TQString&, const TQString&, const TQString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( statusChanged( const Kopete::OnlineStatus & ) ), + TQT_SLOT( slotStatusChanged( const Kopete::OnlineStatus & ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( invitedToChat( const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ), + TQT_SLOT( slotCreateChat( const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( startChat( const TQString&, const TQString& ) ), + TQT_SLOT( slotCreateChat( const TQString&, const TQString& ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( socketClosed() ), + TQT_SLOT( slotNotifySocketClosed() ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( newContactList() ), + TQT_SLOT( slotNewContactList() ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( receivedNotificationServer(const TQString&, uint ) ), + TQT_SLOT(createNotificationServer(const TQString&, uint ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( hotmailSeted( bool ) ), + m_openInboxAction, TQT_SLOT( setEnabled( bool ) ) ); + TQObject::connect( m_notifySocket, TQT_SIGNAL( errorMessage(int, const TQString& ) ), + TQT_SLOT( slotErrorMessageReceived(int, const TQString& ) ) ); m_notifySocket->setStatus( m_connectstatus ); m_notifySocket->connect(host, port); @@ -269,7 +269,7 @@ KActionMenu * MSNAccount::actionMenu() #if !defined NDEBUG KActionMenu *debugMenu = new KActionMenu( "Debug", m_actionMenu ); debugMenu->insert( new KAction( i18n( "Send Raw C&ommand..." ), 0, - this, SLOT( slotDebugRawCommand() ), debugMenu, "m_debugRawCommand" ) ); + this, TQT_SLOT( slotDebugRawCommand() ), debugMenu, "m_debugRawCommand" ) ); m_actionMenu->popupMenu()->insertSeparator(); m_actionMenu->insert( debugMenu ); #endif @@ -283,7 +283,7 @@ MSNNotifySocket *MSNAccount::notifySocket() } -void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const QString &reason) +void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const TQString &reason) { kdDebug( 14140 ) << k_funcinfo << status.description() << endl; @@ -298,7 +298,7 @@ void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const QSt // since it's the same. if( reason.contains("[Music]") ) { - QString personalMessage = reason.section("[Music]", 1); + TQString personalMessage = reason.section("[Music]", 1); setPersonalMessage( MSNProtocol::PersonalMessageMusic, personalMessage ); // Don't send un-needed status change. @@ -329,8 +329,8 @@ void MSNAccount::slotStartChat() { bool ok; - QString handle = KInputDialog::getText( i18n( "Start Chat - MSN Plugin" ), - i18n( "Please enter the email address of the person with whom you want to chat:" ), QString::null, &ok ).lower(); + TQString handle = KInputDialog::getText( i18n( "Start Chat - MSN Plugin" ), + i18n( "Please enter the email address of the person with whom you want to chat:" ), TQString::null, &ok ).lower(); if ( ok ) { if ( MSNProtocol::validContactId( handle ) ) @@ -356,7 +356,7 @@ void MSNAccount::slotDebugRawCommand() MSNDebugRawCmdDlg *dlg = new MSNDebugRawCmdDlg( 0L ); int result = dlg->exec(); - if ( result == QDialog::Accepted && m_notifySocket ) + if ( result == TQDialog::Accepted && m_notifySocket ) { m_notifySocket->sendCommand( dlg->command(), dlg->params(), dlg->addId(), dlg->msg().replace( "\n", "\r\n" ).utf8() ); @@ -374,7 +374,7 @@ void MSNAccount::slotChangePublicName() } bool ok; - QString name = KInputDialog::getText( i18n( "Change Display Name - MSN Plugin" ), + TQString name = KInputDialog::getText( i18n( "Change Display Name - MSN Plugin" ), i18n( "Enter the new display name by which you want to be visible to your friends on MSN:" ), myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(), &ok ); @@ -416,8 +416,8 @@ void MSNAccount::slotNotifySocketClosed() if(reason == Kopete::Account::OtherClient) { //close all chat sessions, so new message will arive to the other client. - QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::Iterator it; + TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::Iterator it; for (it=sessions.begin() ; it != sessions.end() ; it++ ) { MSNChatSession *msnCS = dynamic_cast<MSNChatSession *>( *it ); @@ -449,7 +449,7 @@ void MSNAccount::slotStatusChanged( const Kopete::OnlineStatus &status ) { m_newContactList=false; - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for ( ; it.current(); ++it ) { MSNContact *c = static_cast<MSNContact *>( *it ); @@ -470,9 +470,9 @@ void MSNAccount::slotStatusChanged( const Kopete::OnlineStatus &status ) } -void MSNAccount::slotPersonalMessageChanged( const QString& personalMessage ) +void MSNAccount::slotPersonalMessageChanged( const TQString& personalMessage ) { - QString oldPersonalMessage=myself()->property(MSNProtocol::protocol()->propPersonalMessage).value().toString() ; + TQString oldPersonalMessage=myself()->property(MSNProtocol::protocol()->propPersonalMessage).value().toString() ; if ( personalMessage != oldPersonalMessage ) { myself()->setProperty( MSNProtocol::protocol()->propPersonalMessage, personalMessage ); @@ -480,15 +480,15 @@ void MSNAccount::slotPersonalMessageChanged( const QString& personalMessage ) } } -void MSNAccount::setPublicName( const QString &publicName ) +void MSNAccount::setPublicName( const TQString &publicName ) { if ( m_notifySocket ) { - m_notifySocket->changePublicName( publicName, QString::null ); + m_notifySocket->changePublicName( publicName, TQString::null ); } } -void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, const QString &personalMessage ) +void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, const TQString &personalMessage ) { if ( m_notifySocket ) { @@ -501,7 +501,7 @@ void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, cons }*/ } -void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupGuid ) +void MSNAccount::slotGroupAdded( const TQString& groupName, const TQString &groupGuid ) { if ( m_groupList.contains( groupGuid ) ) { @@ -512,11 +512,11 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG } //--------- Find the appropriate Kopete::Group, or create one ---------// - QPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups(); + TQPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups(); Kopete::Group *fallBack = 0L; //check if we have one in the old group list. if yes, update the id translate map. - for(QMap<QString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it ) + for(TQMap<TQString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it ) { Kopete::Group *g=it.data(); if (g && g->pluginData( protocol(), accountId() + " displayName" ) == groupName && @@ -543,7 +543,7 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG if ( g->pluginData( protocol(), accountId() + " id" ).toUInt() == groupNumber ) { m_groupList.insert( groupNumber, g ); - QString oldGroupName; + TQString oldGroupName; if ( g->pluginData( protocol(), accountId() + " displayName" ) != groupName ) { // The displayName of the group has been modified by another client @@ -589,14 +589,14 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG // We have pending groups that we need add a contact to if ( tmp_addToNewGroup.contains(groupName) ) { - QStringList list=tmp_addToNewGroup[groupName]; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + TQStringList list=tmp_addToNewGroup[groupName]; + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - QString contactId = *it; + TQString contactId = *it; kdDebug( 14140 ) << k_funcinfo << "Adding to new group: " << contactId << endl; MSNContact *c = static_cast<MSNContact *>(contacts()[contactId]); if(c && c->hasProperty(MSNProtocol::protocol()->propGuid.key()) ) - notifySocket()->addContact( contactId, MSNProtocol::FL, QString::null, c->guid(), groupGuid ); + notifySocket()->addContact( contactId, MSNProtocol::FL, TQString::null, c->guid(), groupGuid ); else { // If we get to here, we're currently adding a new contact, add the groupGUID to the groupList @@ -604,14 +604,14 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG if( tmp_addNewContactToGroup.contains( contactId ) ) tmp_addNewContactToGroup[contactId].append(groupGuid); else - tmp_addNewContactToGroup.insert(contactId, QStringList(groupGuid) ); + tmp_addNewContactToGroup.insert(contactId, TQStringList(groupGuid) ); } } tmp_addToNewGroup.remove(groupName); } } -void MSNAccount::slotGroupRenamed( const QString &groupGuid, const QString& groupName ) +void MSNAccount::slotGroupRenamed( const TQString &groupGuid, const TQString& groupName ) { if ( m_groupList.contains( groupGuid ) ) { @@ -625,16 +625,16 @@ void MSNAccount::slotGroupRenamed( const QString &groupGuid, const QString& grou } } -void MSNAccount::slotGroupRemoved( const QString& groupGuid ) +void MSNAccount::slotGroupRemoved( const TQString& groupGuid ) { if ( m_groupList.contains( groupGuid ) ) { - m_groupList[ groupGuid ]->setPluginData( protocol(), QMap<QString,QString>() ); + m_groupList[ groupGuid ]->setPluginData( protocol(), TQMap<TQString,TQString>() ); m_groupList.remove( groupGuid ); } } -void MSNAccount::addGroup( const QString &groupName, const QString& contactToAdd ) +void MSNAccount::addGroup( const TQString &groupName, const TQString& contactToAdd ) { if ( !contactToAdd.isNull() ) { @@ -648,7 +648,7 @@ void MSNAccount::addGroup( const QString &groupName, const QString& contactToAdd } else { - tmp_addToNewGroup.insert(groupName,QStringList(contactToAdd)); + tmp_addToNewGroup.insert(groupName,TQStringList(contactToAdd)); kdDebug( 14140 ) << k_funcinfo << "preparing to add " << groupName << " for " << contactToAdd << endl; } } @@ -682,7 +682,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g ) if ( !g->pluginData( protocol(), accountId() + " id" ).isEmpty() ) { - QString groupGuid = g->pluginData( protocol(), accountId() + " id" ); + TQString groupGuid = g->pluginData( protocol(), accountId() + " id" ); if ( !m_groupList.contains( groupGuid ) ) { // the group is maybe already removed in the server @@ -703,7 +703,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g ) Kopete::Group::topLevel()->setPluginData( protocol(), accountId() + " id", "" ); Kopete::Group::topLevel()->setPluginData( protocol(), accountId() + " displayName", g->pluginData( protocol(), accountId() + " displayName" ) ); - g->setPluginData( protocol(), accountId() + " id", QString::null ); // the group should be soon deleted, but make sure + g->setPluginData( protocol(), accountId() + " id", TQString::null ); // the group should be soon deleted, but make sure return; } @@ -712,7 +712,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g ) { bool still_have_contact=false; // if contact are contains only in the group we are removing, abort the - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for ( ; it.current(); ++it ) { MSNContact *c = static_cast<MSNContact *>( it.current() ); @@ -734,10 +734,10 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g ) void MSNAccount::slotNewContactList() { m_oldGroupList=m_groupList; - for(QMap<QString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it ) + for(TQMap<TQString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it ) { //they are about to be changed if(it.data()) - it.data()->setPluginData( protocol(), accountId() + " id", QString::null ); + it.data()->setPluginData( protocol(), accountId() + " id", TQString::null ); } m_allowList.clear(); @@ -745,13 +745,13 @@ void MSNAccount::slotNewContactList() m_reverseList.clear(); m_groupList.clear(); KConfigGroup *config=configGroup(); - config->writeEntry( "blockList" , QString::null ) ; - config->writeEntry( "allowList" , QString::null ); - config->writeEntry( "reverseList" , QString::null ); + config->writeEntry( "blockList" , TQString::null ) ; + config->writeEntry( "allowList" , TQString::null ); + config->writeEntry( "reverseList" , TQString::null ); // clear all date information which will be received. // if the information is not anymore on the server, it will not be received - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for ( ; it.current(); ++it ) { MSNContact *c = static_cast<MSNContact *>( *it ); @@ -759,15 +759,15 @@ void MSNAccount::slotNewContactList() c->setAllowed( false ); c->setReversed( false ); c->setDeleted( true ); - c->setInfo( "PHH", QString::null ); - c->setInfo( "PHW", QString::null ); - c->setInfo( "PHM", QString::null ); + c->setInfo( "PHH", TQString::null ); + c->setInfo( "PHW", TQString::null ); + c->setInfo( "PHM", TQString::null ); c->removeProperty( MSNProtocol::protocol()->propGuid ); } m_newContactList=true; } -void MSNAccount::slotContactListed( const QString& handle, const QString& publicName, const QString &contactGuid, uint lists, const QString& groups ) +void MSNAccount::slotContactListed( const TQString& handle, const TQString& publicName, const TQString &contactGuid, uint lists, const TQString& groups ) { // On empty lists handle might be empty, ignore that // ignore also the myself contact. @@ -778,7 +778,7 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public if ( lists & 1 ) // FL { - QStringList contactGroups = QStringList::split( ",", groups, false ); + TQStringList contactGroups = TQStringList::split( ",", groups, false ); if ( c ) { if( !c->metaContact() ) @@ -799,11 +799,11 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public c->removeProperty( Kopete::Global::Properties::self()->nickName() ); c->setProperty( MSNProtocol::protocol()->propGuid, contactGuid); - const QMap<QString, Kopete::Group *> oldServerGroups = c->serverGroups(); + const TQMap<TQString, Kopete::Group *> oldServerGroups = c->serverGroups(); c->clearServerGroups(); - for ( QStringList::ConstIterator it = contactGroups.begin(); it != contactGroups.end(); ++it ) + for ( TQStringList::ConstIterator it = contactGroups.begin(); it != contactGroups.end(); ++it ) { - QString newServerGroupID = *it; + TQString newServerGroupID = *it; if(m_groupList.contains(newServerGroupID)) { Kopete::Group *newServerGroup=m_groupList[ newServerGroupID ] ; @@ -816,12 +816,12 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public } } - for ( QMap<QString, Kopete::Group *>::ConstIterator it = oldServerGroups.begin(); it != oldServerGroups.end(); ++it ) + for ( TQMap<TQString, Kopete::Group *>::ConstIterator it = oldServerGroups.begin(); it != oldServerGroups.end(); ++it ) { Kopete::Group *old_group=m_oldGroupList[it.key()]; if(old_group) { - QString oldnewID=old_group->pluginData(protocol() , accountId() +" id"); + TQString oldnewID=old_group->pluginData(protocol() , accountId() +" id"); if ( !oldnewID.isEmpty() && contactGroups.contains( oldnewID ) ) continue; //ok, it's correctn no need to do anything. @@ -847,10 +847,10 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public c->removeProperty( Kopete::Global::Properties::self()->nickName() ); c->setProperty( MSNProtocol::protocol()->propGuid, contactGuid ); - for ( QStringList::Iterator it = contactGroups.begin(); + for ( TQStringList::Iterator it = contactGroups.begin(); it != contactGroups.end(); ++it ) { - QString groupGuid = *it; + TQString groupGuid = *it; if(m_groupList.contains(groupGuid)) { c->contactAddedToGroup( groupGuid, m_groupList[ groupGuid ] ); @@ -874,25 +874,25 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public } } if ( lists & 2 ) - slotContactAdded( handle, "AL", publicName, QString::null, QString::null ); + slotContactAdded( handle, "AL", publicName, TQString::null, TQString::null ); else if(c) c->setAllowed(false); if ( lists & 4 ) - slotContactAdded( handle, "BL", publicName, QString::null, QString::null ); + slotContactAdded( handle, "BL", publicName, TQString::null, TQString::null ); else if(c) c->setBlocked(false); if ( lists & 8 ) - slotContactAdded( handle, "RL", publicName, QString::null, QString::null ); + slotContactAdded( handle, "RL", publicName, TQString::null, TQString::null ); else if(c) c->setReversed(false); if ( lists & 16 ) // This contact is on the pending list. Add to the reverse list and delete from the pending list { - notifySocket()->addContact( handle, MSNProtocol::RL, QString::null, QString::null, QString::null ); - notifySocket()->removeContact( handle, MSNProtocol::PL, QString::null, QString::null ); + notifySocket()->addContact( handle, MSNProtocol::RL, TQString::null, TQString::null, TQString::null ); + notifySocket()->removeContact( handle, MSNProtocol::PL, TQString::null, TQString::null ); } } -void MSNAccount::slotContactAdded( const QString& handle, const QString& list, const QString& publicName, const QString& contactGuid, const QString &groupGuid ) +void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list, const TQString& publicName, const TQString& contactGuid, const TQString &groupGuid ) { if ( list == "FL" ) { @@ -912,17 +912,17 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c // Add the new contact to the group he belongs. if ( tmp_addNewContactToGroup.contains(handle) ) { - QStringList list = tmp_addNewContactToGroup[handle]; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + TQStringList list = tmp_addNewContactToGroup[handle]; + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - QString groupGuid = *it; + TQString groupGuid = *it; // If the group didn't exist yet (yay for async operations), don't add the contact to the group // Let slotGroupAdded do it. if( m_groupList.contains(groupGuid) ) { kdDebug( 14140 ) << k_funcinfo << "Adding " << handle << " to group: " << groupGuid << endl; - notifySocket()->addContact( handle, MSNProtocol::FL, QString::null, contactGuid, groupGuid ); + notifySocket()->addContact( handle, MSNProtocol::FL, TQString::null, contactGuid, groupGuid ); c->contactAddedToGroup( groupGuid, m_groupList[ groupGuid ] ); @@ -971,7 +971,7 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c if ( !handle.isEmpty() && !m_allowList.contains( handle ) && !m_blockList.contains( handle ) ) { kdDebug(14140) << k_funcinfo << "Trying to add contact to AL. " << endl; - notifySocket()->addContact(handle, MSNProtocol::AL, QString::null, QString::null, QString::null ); + notifySocket()->addContact(handle, MSNProtocol::AL, TQString::null, TQString::null, TQString::null ); } } else if ( list == "BL" ) @@ -1006,14 +1006,14 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c // before I declare it good :- ) if ( !m_allowList.contains( handle ) && !m_blockList.contains( handle ) ) { - QString nick; //in most case, the public name is not know + TQString nick; //in most case, the public name is not know if(publicName!=handle) // so we don't whos it if it is not know nick=publicName; Kopete::UI::ContactAddedNotifyDialog *dialog= new Kopete::UI::ContactAddedNotifyDialog( handle,nick,this, Kopete::UI::ContactAddedNotifyDialog::InfoButton ); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)), - this,SLOT(slotContactAddedNotifyDialogClosed(const QString& ))); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)), + this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& ))); dialog->show(); } } @@ -1026,7 +1026,7 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c } } -void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, const QString& contactGuid, const QString& groupGuid ) +void MSNAccount::slotContactRemoved( const TQString& handle, const TQString& list, const TQString& contactGuid, const TQString& groupGuid ) { kdDebug( 14140 ) << k_funcinfo << "handle: " << handle << " list: " << list << " contact-uid: " << contactGuid << endl; MSNContact *c=static_cast<MSNContact *>( contacts()[ handle ] ); @@ -1035,7 +1035,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, m_blockList.remove( handle ); configGroup()->writeEntry( "blockList" , m_blockList ) ; if ( !m_allowList.contains( handle ) ) - notifySocket()->addContact( handle, MSNProtocol::AL, QString::null, QString::null, QString::null ); + notifySocket()->addContact( handle, MSNProtocol::AL, TQString::null, TQString::null, TQString::null ); if(c) c->setBlocked( false ); @@ -1045,7 +1045,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, m_allowList.remove( handle ); configGroup()->writeEntry( "allowList" , m_allowList ) ; if ( !m_blockList.contains( handle ) ) - notifySocket()->addContact( handle, MSNProtocol::BL, QString::null, QString::null, QString::null ); + notifySocket()->addContact( handle, MSNProtocol::BL, TQString::null, TQString::null, TQString::null ); if(c) c->setAllowed( false ); @@ -1063,7 +1063,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, /* InfoWidget *info = new InfoWidget( 0 ); info->title->setText( "<b>" + i18n( "Contact removed!" ) +"</b>" ); - QString dummy; + TQString dummy; dummy = "<center><b>" + imContact->getPublicName() + "( " +imContact->getHandle() +" )</b></center><br>"; dummy += i18n( "has removed you from his contact list!" ) + "<br>"; dummy += i18n( "This contact is now removed from your contact list" ); @@ -1077,15 +1077,15 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, { // The FL list only use the contact GUID, use the contact referenced by the GUID. MSNContact *contactRemoved = findContactByGuid(contactGuid); - QStringList groupGuidList; + TQStringList groupGuidList; bool deleteContact = groupGuid.isEmpty() ? true : false; // Delete the contact when the group GUID is empty. // Remove the contact from the contact list for all the group he is a member. if( groupGuid.isEmpty() ) { if(contactRemoved) { - QPtrList<Kopete::Group> groupList = contactRemoved->metaContact()->groups(); - for( QPtrList<Kopete::Group>::Iterator it = groupList.begin(); it != groupList.end(); ++it ) + TQPtrList<Kopete::Group> groupList = contactRemoved->metaContact()->groups(); + for( TQPtrList<Kopete::Group>::Iterator it = groupList.begin(); it != groupList.end(); ++it ) { Kopete::Group *group = *it; if ( !group->pluginData( protocol(), accountId() + " id" ).isEmpty() ) @@ -1102,7 +1102,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, if( !groupGuidList.isEmpty() ) { - QStringList::const_iterator stringIt; + TQStringList::const_iterator stringIt; for( stringIt = groupGuidList.begin(); stringIt != groupGuidList.end(); ++stringIt ) { // Contact is removed from the FL list, remove it from the group @@ -1114,7 +1114,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, { bool still_have_contact=false; // if contact are contains only in the group we are removing, abort the - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for ( ; it.current(); ++it ) { MSNContact *c2 = static_cast<MSNContact *>( it.current() ); @@ -1137,15 +1137,15 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, } } -void MSNAccount::slotCreateChat( const QString& address, const QString& auth ) +void MSNAccount::slotCreateChat( const TQString& address, const TQString& auth ) { slotCreateChat( 0L, address, auth, m_msgHandle.first(), m_msgHandle.first() ); } -void MSNAccount::slotCreateChat( const QString& ID, const QString& address, const QString& auth, - const QString& handle_, const QString& publicName ) +void MSNAccount::slotCreateChat( const TQString& ID, const TQString& address, const TQString& auth, + const TQString& handle_, const TQString& publicName ) { - QString handle = handle_.lower(); + TQString handle = handle_.lower(); if ( handle.isEmpty() ) { @@ -1189,7 +1189,7 @@ void MSNAccount::slotCreateChat( const QString& ID, const QString& address, cons if ( !ID.isEmpty() && notifyNewChat ) { // this temporary message should open the window if they not exist - QString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() ); + TQString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() ); Kopete::Message tmpMsg = Kopete::Message( c, manager->members(), body, Kopete::Message::Internal, Kopete::Message::PlainText ); manager->appendMessage( tmpMsg ); } @@ -1200,7 +1200,7 @@ void MSNAccount::slotCreateChat( const QString& ID, const QString& address, cons m_msgHandle.pop_front(); } -void MSNAccount::slotStartChatSession( const QString& handle ) +void MSNAccount::slotStartChatSession( const TQString& handle ) { // First create a message manager, because we might get an existing // manager back, in which case we likely also have an active switchboard @@ -1218,7 +1218,7 @@ void MSNAccount::slotStartChatSession( const QString& handle ) } } -void MSNAccount::slotContactAddedNotifyDialogClosed(const QString& handle) +void MSNAccount::slotContactAddedNotifyDialogClosed(const TQString& handle) { const Kopete::UI::ContactAddedNotifyDialog *dialog = dynamic_cast<const Kopete::UI::ContactAddedNotifyDialog *>(sender()); @@ -1242,29 +1242,29 @@ void MSNAccount::slotContactAddedNotifyDialogClosed(const QString& handle) if ( !dialog->authorized() ) { if ( m_allowList.contains( handle ) ) - m_notifySocket->removeContact( handle, MSNProtocol::AL, QString::null, QString::null ); + m_notifySocket->removeContact( handle, MSNProtocol::AL, TQString::null, TQString::null ); else if ( !m_blockList.contains( handle ) ) - m_notifySocket->addContact( handle, MSNProtocol::BL, QString::null, QString::null, QString::null ); + m_notifySocket->addContact( handle, MSNProtocol::BL, TQString::null, TQString::null, TQString::null ); } else { if ( m_blockList.contains( handle ) ) - m_notifySocket->removeContact( handle, MSNProtocol::BL, QString::null, QString::null ); + m_notifySocket->removeContact( handle, MSNProtocol::BL, TQString::null, TQString::null ); else if ( !m_allowList.contains( handle ) ) - m_notifySocket->addContact( handle, MSNProtocol::AL, QString::null, QString::null, QString::null ); + m_notifySocket->addContact( handle, MSNProtocol::AL, TQString::null, TQString::null, TQString::null ); } } -void MSNAccount::slotGlobalIdentityChanged( const QString &key, const QVariant &value ) +void MSNAccount::slotGlobalIdentityChanged( const TQString &key, const TQVariant &value ) { if( !configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ) { if(key == Kopete::Global::Properties::self()->nickName().key()) { - QString oldNick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); - QString newNick = value.toString(); + TQString oldNick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString newNick = value.toString(); if(newNick != oldNick) { @@ -1280,9 +1280,9 @@ void MSNAccount::slotGlobalIdentityChanged( const QString &key, const QVariant & } } -void MSNAccount::slotErrorMessageReceived( int type, const QString &msg ) +void MSNAccount::slotErrorMessageReceived( int type, const TQString &msg ) { - QString caption = i18n( "MSN Plugin" ); + TQString caption = i18n( "MSN Plugin" ); // Use different notification type based on the error context. switch(type) @@ -1316,7 +1316,7 @@ void MSNAccount::slotErrorMessageReceived( int type, const QString &msg ) } } -bool MSNAccount::createContact( const QString &contactId, Kopete::MetaContact *metaContact ) +bool MSNAccount::createContact( const TQString &contactId, Kopete::MetaContact *metaContact ) { if ( !metaContact->isTemporary() && m_notifySocket) { @@ -1339,14 +1339,14 @@ bool MSNAccount::createContact( const QString &contactId, Kopete::MetaContact *m } -void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete::Group> groupList) +void MSNAccount::addContactServerside(const TQString &contactId, TQPtrList<Kopete::Group> groupList) { // First of all, fill the temporary group list. The contact will be moved to his group(s). // When we receive back his contact GUID(required to move a contact between groups) for( Kopete::Group *group = groupList.first(); group; group = groupList.next() ) { // TODO: It it time that libkopete generate a unique ID that contains protocols, account and contact id. - QString groupId = group->pluginData( protocol(), accountId() + " id" ); + TQString groupId = group->pluginData( protocol(), accountId() + " id" ); // If the groupId is empty, that's mean the Kopete group is not on the MSN server. if( !groupId.isEmpty() ) { @@ -1354,8 +1354,8 @@ void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete: if( !m_groupList.contains(groupId) ) { // Clear the group plugin data. - group->setPluginData( protocol() , accountId() + " id" , QString::null); - group->setPluginData( protocol() , accountId() + " displayName" , QString::null); + group->setPluginData( protocol() , accountId() + " id" , TQString::null); + group->setPluginData( protocol() , accountId() + " displayName" , TQString::null); kdDebug( 14140 ) << k_funcinfo << " Group " << group->displayName() << " marked with id #" << groupId << " does not seems to be anymore on the server" << endl; // Add the group on MSN server, will fix the corruption. @@ -1368,7 +1368,7 @@ void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete: if( tmp_addNewContactToGroup.contains( contactId ) ) tmp_addNewContactToGroup[contactId].append(groupId); else - tmp_addNewContactToGroup.insert(contactId, QStringList(groupId) ); + tmp_addNewContactToGroup.insert(contactId, TQStringList(groupId) ); } } else @@ -1383,13 +1383,13 @@ void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete: // After add the contact to the top-level, it will be moved to required groups later. kdDebug( 14140 ) << k_funcinfo << "Add the contact on the server " << endl; - m_notifySocket->addContact( contactId, MSNProtocol::FL, contactId, QString::null, QString::null ); + m_notifySocket->addContact( contactId, MSNProtocol::FL, contactId, TQString::null, TQString::null ); } -MSNContact *MSNAccount::findContactByGuid(const QString &contactGuid) +MSNContact *MSNAccount::findContactByGuid(const TQString &contactGuid) { kdDebug(14140) << k_funcinfo << "Looking for " << contactGuid << endl; - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for ( ; it.current(); ++it ) { MSNContact *c = dynamic_cast<MSNContact *>( it.current() ); @@ -1412,17 +1412,17 @@ bool MSNAccount::isHotmail() const return m_openInboxAction->isEnabled(); } -QString MSNAccount::pictureUrl() +TQString MSNAccount::pictureUrl() { return m_pictureFilename; } -void MSNAccount::setPictureUrl(const QString &url) +void MSNAccount::setPictureUrl(const TQString &url) { m_pictureFilename = url; } -QString MSNAccount::pictureObject() +TQString MSNAccount::pictureObject() { if(m_pictureObj.isNull()) resetPictureObject(true); //silent=true to keep infinite loop away @@ -1431,7 +1431,7 @@ QString MSNAccount::pictureObject() void MSNAccount::resetPictureObject(bool silent, bool force) { - QString old=m_pictureObj; + TQString old=m_pictureObj; if(!configGroup()->readBoolEntry("exportCustomPicture") && !force) { @@ -1441,7 +1441,7 @@ void MSNAccount::resetPictureObject(bool silent, bool force) else { // Check if the picture is a 96x96 image, if not scale, crop and save. - QImage picture(m_pictureFilename); + TQImage picture(m_pictureFilename); if(picture.isNull()) { m_pictureObj=""; @@ -1452,7 +1452,7 @@ void MSNAccount::resetPictureObject(bool silent, bool force) if(picture.width() != 96 || picture.height() != 96) { // Save to a new location in msnpictures. - QString newLocation( locateLocal( "appdata", "msnpictures/"+ KURL(m_pictureFilename).fileName().lower() ) ); + TQString newLocation( locateLocal( "appdata", "msnpictures/"+ KURL(m_pictureFilename).fileName().lower() ) ); // Scale and crop the picture. picture = MSNProtocol::protocol()->scalePicture(picture); @@ -1467,7 +1467,7 @@ void MSNAccount::resetPictureObject(bool silent, bool force) } } - QFile pictFile( m_pictureFilename ); + TQFile pictFile( m_pictureFilename ); if(!pictFile.open(IO_ReadOnly)) { m_pictureObj=""; @@ -1475,12 +1475,12 @@ void MSNAccount::resetPictureObject(bool silent, bool force) } else { - QByteArray ar=pictFile.readAll(); - QString sha1d= QString((KCodecs::base64Encode(SHA1::hash(ar)))); + TQByteArray ar=pictFile.readAll(); + TQString sha1d= TQString((KCodecs::base64Encode(SHA1::hash(ar)))); - QString size=QString::number( pictFile.size() ); - QString all= "Creator"+accountId()+"Size"+size+"Type3Locationkopete.tmpFriendlyAAA=SHA1D"+ sha1d; - m_pictureObj="<msnobj Creator=\"" + accountId() + "\" Size=\"" + size + "\" Type=\"3\" Location=\"kopete.tmp\" Friendly=\"AAA=\" SHA1D=\""+sha1d+"\" SHA1C=\""+ QString(KCodecs::base64Encode(SHA1::hashString(all.utf8()))) +"\"/>"; + TQString size=TQString::number( pictFile.size() ); + TQString all= "Creator"+accountId()+"Size"+size+"Type3Locationkopete.tmpFriendlyAAA=SHA1D"+ sha1d; + m_pictureObj="<msnobj Creator=\"" + accountId() + "\" Size=\"" + size + "\" Type=\"3\" Location=\"kopete.tmp\" Friendly=\"AAA=\" SHA1D=\""+sha1d+"\" SHA1C=\""+ TQString(KCodecs::base64Encode(SHA1::hashString(all.utf8()))) +"\"/>"; myself()->setProperty( Kopete::Global::Properties::self()->photo() , m_pictureFilename ); } } diff --git a/kopete/protocols/msn/msnaccount.h b/kopete/protocols/msn/msnaccount.h index 7fbee16b..5f7352e3 100644 --- a/kopete/protocols/msn/msnaccount.h +++ b/kopete/protocols/msn/msnaccount.h @@ -19,7 +19,7 @@ #ifndef MSNACCOUNT_H #define MSNACCOUNT_H -#include <qobject.h> +#include <tqobject.h> #include "kopetepasswordedaccount.h" @@ -42,7 +42,7 @@ class MSNAccount : public Kopete::PasswordedAccount Q_OBJECT public: - MSNAccount( MSNProtocol *parent, const QString &accountID, const char *name = 0L ); + MSNAccount( MSNProtocol *parent, const TQString &accountID, const char *name = 0L ); /* * return the menu for this account @@ -53,13 +53,13 @@ public: /** * change the publicName to this new name */ - void setPublicName( const QString &name ); - void setPersonalMessage(MSNProtocol::PersonalMessageType type, const QString &personalMessage ); + void setPublicName( const TQString &name ); + void setPersonalMessage(MSNProtocol::PersonalMessageType type, const TQString &personalMessage ); /** * Returns the address of the MSN server */ - QString serverName(); + TQString serverName(); /** * Returns the address of the MSN server port @@ -77,17 +77,17 @@ public: /** * Return the picture url. */ - QString pictureUrl(); + TQString pictureUrl(); /** * Set the picture url. */ - void setPictureUrl(const QString &url); + void setPictureUrl(const TQString &url); /** * return the <msnobj> tag of the display picture */ - QString pictureObject(); + TQString pictureObject(); /** * reset the <msnobj>. This method should be called if the displayimage has changed @@ -107,25 +107,25 @@ public: * Return the client ID for the myself contact of this account. * It is dynamic to see if we really have a webcam or not. */ - QString myselfClientId() const; + TQString myselfClientId() const; public slots: - virtual void connectWithPassword( const QString &password ) ; + virtual void connectWithPassword( const TQString &password ) ; virtual void disconnect() ; - virtual void setOnlineStatus( const Kopete::OnlineStatus &status , const QString &reason = QString::null); + virtual void setOnlineStatus( const Kopete::OnlineStatus &status , const TQString &reason = TQString::null); /** * Ask to the account to create a new chat session */ - void slotStartChatSession( const QString& handle ); + void slotStartChatSession( const TQString& handle ); /** * Single slot to display error message. */ - void slotErrorMessageReceived( int type, const QString &msg ); + void slotErrorMessageReceived( int type, const TQString &msg ); protected: - virtual bool createContact( const QString &contactId, Kopete::MetaContact *parentContact ); + virtual bool createContact( const TQString &contactId, Kopete::MetaContact *parentContact ); private slots: @@ -144,36 +144,36 @@ private slots: // notifySocket related void slotStatusChanged( const Kopete::OnlineStatus &status ); void slotNotifySocketClosed(); - void slotPersonalMessageChanged(const QString& personalMessage); - void slotContactRemoved(const QString& handle, const QString& list, const QString& contactGuid, const QString& groupGuid ); - void slotContactAdded(const QString& handle, const QString& list, const QString& publicName, const QString& contactGuid, const QString &groupGuid ); - void slotContactListed( const QString& handle, const QString& publicName, const QString &contactGuid, uint lists, const QString& groups ); + void slotPersonalMessageChanged(const TQString& personalMessage); + void slotContactRemoved(const TQString& handle, const TQString& list, const TQString& contactGuid, const TQString& groupGuid ); + void slotContactAdded(const TQString& handle, const TQString& list, const TQString& publicName, const TQString& contactGuid, const TQString &groupGuid ); + void slotContactListed( const TQString& handle, const TQString& publicName, const TQString &contactGuid, uint lists, const TQString& groups ); void slotNewContactList(); /** * The group has successful renamed in the server * groupName: is new new group name */ - void slotGroupRenamed(const QString &groupGuid, const QString& groupName ); + void slotGroupRenamed(const TQString &groupGuid, const TQString& groupName ); /** * A new group was created on the server (or received durring an LSG command) */ - void slotGroupAdded( const QString& groupName, const QString &groupGuid ); + void slotGroupAdded( const TQString& groupName, const TQString &groupGuid ); /** * Group was removed from the server */ - void slotGroupRemoved( const QString &groupGuid ); + void slotGroupRemoved( const TQString &groupGuid ); /** * Incoming RING command: connect to the Switchboard server and send * the startChat signal */ - void slotCreateChat( const QString& sessionID, const QString& address, const QString& auth, - const QString& handle, const QString& publicName ); + void slotCreateChat( const TQString& sessionID, const TQString& address, const TQString& auth, + const TQString& handle, const TQString& publicName ); /** * Incoming XFR command: this is an result from * slotStartChatSession(handle) * connect to the switchboard server and sen startChat signal */ - void slotCreateChat( const QString& address, const QString& auth); + void slotCreateChat( const TQString& address, const TQString& auth); // ui related @@ -190,17 +190,17 @@ private slots: /** * add contact ui */ - void slotContactAddedNotifyDialogClosed( const QString &handle); + void slotContactAddedNotifyDialogClosed( const TQString &handle); /** * When the dispatch server sends us the notification server to use. */ - void createNotificationServer( const QString &host, uint port ); + void createNotificationServer( const TQString &host, uint port ); /** * When a global identity key get changed. */ - void slotGlobalIdentityChanged( const QString &key, const QVariant &value ); + void slotGlobalIdentityChanged( const TQString &key, const TQVariant &value ); private: MSNNotifySocket *m_notifySocket; @@ -211,7 +211,7 @@ private: // status which will be using for connecting Kopete::OnlineStatus m_connectstatus; - QStringList m_msgHandle; + TQStringList m_msgHandle; bool m_newContactList; @@ -220,35 +220,35 @@ private: * Add the contact on the server in the given groups. * this is a helper function called bu createContact and slotStatusChanged */ - void addContactServerside(const QString &contactId, QPtrList<Kopete::Group> groupList); + void addContactServerside(const TQString &contactId, TQPtrList<Kopete::Group> groupList); public: //FIXME: should be private - QMap<QString, Kopete::Group*> m_groupList; + TQMap<TQString, Kopete::Group*> m_groupList; - void addGroup( const QString &groupName, const QString &contactToAdd = QString::null ); + void addGroup( const TQString &groupName, const TQString &contactToAdd = TQString::null ); /** * Find and retrive a MSNContact by its contactGuid. (Helper function) */ - MSNContact *findContactByGuid(const QString &contactGuid); + MSNContact *findContactByGuid(const TQString &contactGuid); private: // server data - QStringList m_allowList; - QStringList m_blockList; - QStringList m_reverseList; + TQStringList m_allowList; + TQStringList m_blockList; + TQStringList m_reverseList; Kopete::MetaContact *m_addWizard_metaContact; - QMap< QString, QStringList > tmp_addToNewGroup; - QMap< QString, QStringList > tmp_addNewContactToGroup; + TQMap< TQString, TQStringList > tmp_addToNewGroup; + TQMap< TQString, TQStringList > tmp_addNewContactToGroup; - QString m_pictureObj; //a cache of the <msnobj> - QString m_pictureFilename; // the picture filename. + TQString m_pictureObj; //a cache of the <msnobj> + TQString m_pictureFilename; // the picture filename. //this is the translation between old to new groups id when syncing from server. - QMap<QString, Kopete::Group*> m_oldGroupList; + TQMap<TQString, Kopete::Group*> m_oldGroupList; /** * I need the password in createNotificationServer. @@ -256,7 +256,7 @@ private: * at this place. so i'm forced to keep it here. * I would like an API to request the password WITHOUT askling it. */ - QString m_password; + TQString m_password; /** * Cliend ID is a bitfield that contains supported features for a MSN contact. diff --git a/kopete/protocols/msn/msnaddcontactpage.cpp b/kopete/protocols/msn/msnaddcontactpage.cpp index 337939e6..8bdf77a1 100644 --- a/kopete/protocols/msn/msnaddcontactpage.cpp +++ b/kopete/protocols/msn/msnaddcontactpage.cpp @@ -13,8 +13,8 @@ */ -#include <qlayout.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqlineedit.h> #include <klocale.h> #include <kmessagebox.h> @@ -25,10 +25,10 @@ #include "kopeteaccount.h" #include "kopeteuiglobal.h" -MSNAddContactPage::MSNAddContactPage(bool connected, QWidget *parent, const char *name ) +MSNAddContactPage::MSNAddContactPage(bool connected, TQWidget *parent, const char *name ) : AddContactPage(parent,name) { - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); /* if ( connected ) {*/ msndata = new msnAddUI(this); @@ -41,8 +41,8 @@ MSNAddContactPage::MSNAddContactPage(bool connected, QWidget *parent, const char /* } else { - noaddMsg1 = new QLabel( i18n( "You need to be connected to be able to add contacts." ), this ); - noaddMsg2 = new QLabel( i18n( "Please connect to the MSN network and try again." ), this ); + noaddMsg1 = new TQLabel( i18n( "You need to be connected to be able to add contacts." ), this ); + noaddMsg2 = new TQLabel( i18n( "Please connect to the MSN network and try again." ), this ); canadd = false; }*/ @@ -55,7 +55,7 @@ bool MSNAddContactPage::apply( Kopete::Account* i, Kopete::MetaContact*m ) { if ( validateData() ) { - QString userid = msndata->addID->text(); + TQString userid = msndata->addID->text(); return i->addContact( userid , m, Kopete::Account::ChangeKABC ); } return false; @@ -67,7 +67,7 @@ bool MSNAddContactPage::validateData() if(!canadd) return false; - QString userid = msndata->addID->text(); + TQString userid = msndata->addID->text(); if(MSNProtocol::validContactId(userid)) return true; diff --git a/kopete/protocols/msn/msnaddcontactpage.h b/kopete/protocols/msn/msnaddcontactpage.h index c2e3fb3b..4b51a15e 100644 --- a/kopete/protocols/msn/msnaddcontactpage.h +++ b/kopete/protocols/msn/msnaddcontactpage.h @@ -2,9 +2,9 @@ #ifndef MSNADDCONTACTPAGE_H #define MSNADDCONTACTPAGE_H -#include <qwidget.h> +#include <tqwidget.h> #include <addcontactpage.h> -#include <qlabel.h> +#include <tqlabel.h> /** *@author duncan @@ -16,11 +16,11 @@ class MSNAddContactPage : public AddContactPage { Q_OBJECT public: - MSNAddContactPage(bool connected, QWidget *parent=0, const char *name=0); + MSNAddContactPage(bool connected, TQWidget *parent=0, const char *name=0); ~MSNAddContactPage(); msnAddUI *msndata; - QLabel *noaddMsg1; - QLabel *noaddMsg2; + TQLabel *noaddMsg1; + TQLabel *noaddMsg2; bool canadd; virtual bool validateData(); virtual bool apply( Kopete::Account*, Kopete::MetaContact* ); diff --git a/kopete/protocols/msn/msnchallengehandler.cpp b/kopete/protocols/msn/msnchallengehandler.cpp index e0bcc987..46d4b8a0 100644 --- a/kopete/protocols/msn/msnchallengehandler.cpp +++ b/kopete/protocols/msn/msnchallengehandler.cpp @@ -19,12 +19,12 @@ #include "msnchallengehandler.h" -#include <qdatastream.h> +#include <tqdatastream.h> #include <kdebug.h> #include <kmdcodec.h> -MSNChallengeHandler::MSNChallengeHandler(const QString& productKey, const QString& productId) +MSNChallengeHandler::MSNChallengeHandler(const TQString& productKey, const TQString& productId) { m_productKey = productKey; m_productId = productId; @@ -36,17 +36,17 @@ MSNChallengeHandler::~MSNChallengeHandler() kdDebug(14140) << k_funcinfo << endl; } -QString MSNChallengeHandler::computeHash(const QString& challengeString) +TQString MSNChallengeHandler::computeHash(const TQString& challengeString) { // Step One: THe MD5 Hash. // Combine the received challenge string with the product key. KMD5 md5((challengeString + m_productKey).utf8()); - QCString digest = md5.hexDigest(); + TQCString digest = md5.hexDigest(); kdDebug(14140) << k_funcinfo << "md5: " << digest << endl; - QValueVector<Q_INT32> md5Integers(4); + TQValueVector<Q_INT32> md5Integers(4); for(Q_UINT32 i=0; i < md5Integers.count(); i++) { md5Integers[i] = hexSwap(digest.mid(i*8, 8)).toUInt(0, 16) & 0x7FFFFFFF; @@ -55,21 +55,21 @@ QString MSNChallengeHandler::computeHash(const QString& challengeString) // Step Two: Create the challenge string key - QString challengeKey = challengeString + m_productId; + TQString challengeKey = challengeString + m_productId; // Pad to multiple of 8. challengeKey = challengeKey.leftJustify(challengeKey.length() + (8 - challengeKey.length() % 8), '0'); kdDebug(14140) << k_funcinfo << "challenge key: " << challengeKey << endl; - QValueVector<Q_INT32> challengeIntegers(challengeKey.length() / 4); + TQValueVector<Q_INT32> challengeIntegers(challengeKey.length() / 4); for(Q_UINT32 i=0; i < challengeIntegers.count(); i++) { - QString sNum = challengeKey.mid(i*4, 4), sNumHex; + TQString sNum = challengeKey.mid(i*4, 4), sNumHex; // Go through the number string, determining the hex equivalent of each value // and add that to our new hex string for this number. for(uint j=0; j < sNum.length(); j++) { - sNumHex += QString::number((int)sNum[j].latin1(), 16); + sNumHex += TQString::number((int)sNum[j].latin1(), 16); } // swap because of the byte ordering issue. @@ -87,19 +87,19 @@ QString MSNChallengeHandler::computeHash(const QString& challengeString) // Step Four: Create the final hash key. - QString upper = QString::number(QString(digest.mid(0, 16)).toULongLong(0, 16)^key, 16); + TQString upper = TQString::number(TQString(digest.mid(0, 16)).toULongLong(0, 16)^key, 16); if(upper.length() % 16 != 0) upper = upper.rightJustify(upper.length() + (16 - upper.length() % 16), '0'); - QString lower = QString::number(QString(digest.mid(16, 16)).toULongLong(0, 16)^key, 16); + TQString lower = TQString::number(TQString(digest.mid(16, 16)).toULongLong(0, 16)^key, 16); if(lower.length() % 16 != 0) lower = lower.rightJustify(lower.length() + (16 - lower.length() % 16), '0'); return (upper + lower); } -Q_INT64 MSNChallengeHandler::createHashKey(const QValueVector<Q_INT32>& md5Integers, - const QValueVector<Q_INT32>& challengeIntegers) +Q_INT64 MSNChallengeHandler::createHashKey(const TQValueVector<Q_INT32>& md5Integers, + const TQValueVector<Q_INT32>& challengeIntegers) { kdDebug(14140) << k_funcinfo << "Creating 64-bit key." << endl; @@ -119,22 +119,22 @@ Q_INT64 MSNChallengeHandler::createHashKey(const QValueVector<Q_INT32>& md5Integ high = (high + md5Integers[1]) % 0x7FFFFFFF; low = (low + md5Integers[3]) % 0x7FFFFFFF; - QDataStream buffer(QByteArray(8), IO_ReadWrite); - buffer.setByteOrder(QDataStream::LittleEndian); + TQDataStream buffer(TQByteArray(8), IO_ReadWrite); + buffer.setByteOrder(TQDataStream::LittleEndian); buffer << (Q_INT32)high; buffer << (Q_INT32)low; buffer.device()->reset(); - buffer.setByteOrder(QDataStream::BigEndian); + buffer.setByteOrder(TQDataStream::BigEndian); Q_INT64 key; buffer >> key; return key; } -QString MSNChallengeHandler::hexSwap(const QString& in) +TQString MSNChallengeHandler::hexSwap(const TQString& in) { - QString sHex = in, swapped; + TQString sHex = in, swapped; while(sHex.length() > 0) { swapped = swapped + sHex.mid(sHex.length() - 2, 2); @@ -143,7 +143,7 @@ QString MSNChallengeHandler::hexSwap(const QString& in) return swapped; } -QString MSNChallengeHandler::productId() +TQString MSNChallengeHandler::productId() { return m_productId; } diff --git a/kopete/protocols/msn/msnchallengehandler.h b/kopete/protocols/msn/msnchallengehandler.h index 9e866560..8ae8c3aa 100644 --- a/kopete/protocols/msn/msnchallengehandler.h +++ b/kopete/protocols/msn/msnchallengehandler.h @@ -20,8 +20,8 @@ #ifndef MSNCHALLENGEHANDLER_H #define MSNCHALLENGEHANDLER_H -#include <qobject.h> -#include <qvaluevector.h> +#include <tqobject.h> +#include <tqvaluevector.h> /** * Provides a simple way to compute a msn challenge response hash key. @@ -32,33 +32,33 @@ class MSNChallengeHandler : public QObject { Q_OBJECT public: - MSNChallengeHandler(const QString& productKey, const QString& productId); + MSNChallengeHandler(const TQString& productKey, const TQString& productId); ~MSNChallengeHandler(); /** * Computes the response hash string for the specified challenge string. */ - QString computeHash(const QString& challengeString); + TQString computeHash(const TQString& challengeString); /** * Returns the product id used by the challenge handler. */ - QString productId(); + TQString productId(); private: /** * Creates a 64-bit hash key. */ - Q_INT64 createHashKey(const QValueVector<Q_INT32>& md5Integers, const QValueVector<Q_INT32>& challengeIntegers); + Q_INT64 createHashKey(const TQValueVector<Q_INT32>& md5Integers, const TQValueVector<Q_INT32>& challengeIntegers); /** * Swaps the bytes in a hex string. */ - QString hexSwap(const QString& in); + TQString hexSwap(const TQString& in); - QString m_productKey; - QString m_productId; + TQString m_productKey; + TQString m_productId; }; #endif diff --git a/kopete/protocols/msn/msnchatsession.cpp b/kopete/protocols/msn/msnchatsession.cpp index 3bf5d0c6..f799edc1 100644 --- a/kopete/protocols/msn/msnchatsession.cpp +++ b/kopete/protocols/msn/msnchatsession.cpp @@ -17,11 +17,11 @@ #include "msnchatsession.h" -#include <qlabel.h> -#include <qimage.h> -#include <qtooltip.h> -#include <qfile.h> -#include <qiconset.h> +#include <tqlabel.h> +#include <tqimage.h> +#include <tqtooltip.h> +#include <tqfile.h> +#include <tqiconset.h> #include <kconfig.h> @@ -66,43 +66,43 @@ MSNChatSession::MSNChatSession( Kopete::Protocol *protocol, const Kopete::Contac setInstance(protocol->instance()); - connect( this, SIGNAL( messageSent( Kopete::Message&, + connect( this, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), - this, SLOT( slotMessageSent( Kopete::Message&, + this, TQT_SLOT( slotMessageSent( Kopete::Message&, Kopete::ChatSession* ) ) ); - connect( this, SIGNAL( invitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* ) ) , - protocol, SIGNAL( invitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* ) ) ); + connect( this, TQT_SIGNAL( invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* ) ) , + protocol, TQT_SIGNAL( invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* ) ) ); m_actionInvite = new KActionMenu( i18n( "&Invite" ), "kontact_contacts", actionCollection(), "msnInvite" ); - connect ( m_actionInvite->popupMenu() , SIGNAL( aboutToShow() ) , this , SLOT(slotActionInviteAboutToShow() ) ) ; + connect ( m_actionInvite->popupMenu() , TQT_SIGNAL( aboutToShow() ) , this , TQT_SLOT(slotActionInviteAboutToShow() ) ) ; #if !defined NDEBUG - new KAction( i18n( "Send Raw C&ommand..." ), 0, this, SLOT( slotDebugRawCommand() ), actionCollection(), "msnDebugRawCommand" ) ; + new KAction( i18n( "Send Raw C&ommand..." ), 0, this, TQT_SLOT( slotDebugRawCommand() ), actionCollection(), "msnDebugRawCommand" ) ; #endif - m_actionNudge=new KAction( i18n( "Send Nudge" ), "bell", 0, this, SLOT(slotSendNudge() ), actionCollection(), "msnSendNudge" ) ; + m_actionNudge=new KAction( i18n( "Send Nudge" ), "bell", 0, this, TQT_SLOT(slotSendNudge() ), actionCollection(), "msnSendNudge" ) ; #if MSN_WEBCAM // Invite to receive webcam action - m_actionWebcamReceive=new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, SLOT(slotWebcamReceive()), actionCollection(), "msnWebcamReceive" ) ; + m_actionWebcamReceive=new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, TQT_SLOT(slotWebcamReceive()), actionCollection(), "msnWebcamReceive" ) ; //Send webcam action - m_actionWebcamSend=new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, SLOT(slotWebcamSend()), actionCollection(), "msnWebcamSend" ) ; + m_actionWebcamSend=new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, TQT_SLOT(slotWebcamSend()), actionCollection(), "msnWebcamSend" ) ; #endif - new KAction( i18n( "Send File" ),"attach", 0, this, SLOT( slotSendFile() ), actionCollection(), "msnSendFile" ); + new KAction( i18n( "Send File" ),"attach", 0, this, TQT_SLOT( slotSendFile() ), actionCollection(), "msnSendFile" ); MSNContact *c = static_cast<MSNContact*>( others.first() ); - (new KAction( i18n( "Request Display Picture" ), "image", 0, this, SLOT( slotRequestPicture() ), actionCollection(), "msnRequestDisplayPicture" ))->setEnabled(!c->object().isEmpty()); + (new KAction( i18n( "Request Display Picture" ), "image", 0, this, TQT_SLOT( slotRequestPicture() ), actionCollection(), "msnRequestDisplayPicture" ))->setEnabled(!c->object().isEmpty()); if ( !c->object().isEmpty() ) { - connect( c, SIGNAL( displayPictureChanged() ), this, SLOT( slotDisplayPictureChanged() ) ); - m_image = new QLabel( 0L, "kde toolbar widget" ); - new KWidgetAction( m_image, i18n( "MSN Display Picture" ), 0, this, SLOT( slotRequestPicture() ), actionCollection(), "msnDisplayPicture" ); + connect( c, TQT_SIGNAL( displayPictureChanged() ), this, TQT_SLOT( slotDisplayPictureChanged() ) ); + m_image = new TQLabel( 0L, "kde toolbar widget" ); + new KWidgetAction( m_image, i18n( "MSN Display Picture" ), 0, this, TQT_SLOT( slotRequestPicture() ), actionCollection(), "msnDisplayPicture" ); if(c->hasProperty(Kopete::Global::Properties::self()->photo().key()) ) { //if the view doesn't exist yet, we will be unable to get the size of the toolbar @@ -110,7 +110,7 @@ MSNChatSession::MSNChatSession( Kopete::Protocol *protocol, const Kopete::Contac //How to know when a our view is created? We can't. // but chances are the next created view will be for this KMM // And if it is not? never mind. the icon will just be sized 22x22 - connect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) ); //it's viewActivated and not viewCreated because the view get his mainwindow only when it is shown. } } @@ -132,7 +132,7 @@ MSNChatSession::~MSNChatSession() // if(m_chatService) // delete m_chatService; - QMap<unsigned long int, MSNInvitation*>::Iterator it; + TQMap<unsigned long int, MSNInvitation*>::Iterator it; for( it = m_invitations.begin(); it != m_invitations.end() ; it = m_invitations.begin()) { delete *it; @@ -140,8 +140,8 @@ MSNChatSession::~MSNChatSession() } } -void MSNChatSession::createChat( const QString &handle, - const QString &address, const QString &auth, const QString &ID ) +void MSNChatSession::createChat( const TQString &handle, + const TQString &address, const TQString &auth, const TQString &ID ) { /* disabled because i don't want to reopen a chatwindow if we just closed it * and the contact take much time to type his message @@ -163,46 +163,46 @@ void MSNChatSession::createChat( const QString &handle, m_chatService->setMsgHandle( handle ); m_chatService->connectToSwitchBoard( ID, address, auth ); - connect( m_chatService, SIGNAL( userJoined(const QString&,const QString&,bool)), - this, SLOT( slotUserJoined(const QString&,const QString&,bool) ) ); - connect( m_chatService, SIGNAL( userLeft(const QString&,const QString&)), - this, SLOT( slotUserLeft(const QString&,const QString&) ) ); - connect( m_chatService, SIGNAL( msgReceived( Kopete::Message & ) ), - this, SLOT( slotMessageReceived( Kopete::Message & ) ) ); - connect( m_chatService, SIGNAL( switchBoardClosed() ), - this, SLOT( slotSwitchBoardClosed() ) ); - connect( m_chatService, SIGNAL( receivedTypingMsg( const QString &, bool ) ), - this, SLOT( receivedTypingMsg( const QString &, bool ) ) ); + connect( m_chatService, TQT_SIGNAL( userJoined(const TQString&,const TQString&,bool)), + this, TQT_SLOT( slotUserJoined(const TQString&,const TQString&,bool) ) ); + connect( m_chatService, TQT_SIGNAL( userLeft(const TQString&,const TQString&)), + this, TQT_SLOT( slotUserLeft(const TQString&,const TQString&) ) ); + connect( m_chatService, TQT_SIGNAL( msgReceived( Kopete::Message & ) ), + this, TQT_SLOT( slotMessageReceived( Kopete::Message & ) ) ); + connect( m_chatService, TQT_SIGNAL( switchBoardClosed() ), + this, TQT_SLOT( slotSwitchBoardClosed() ) ); + connect( m_chatService, TQT_SIGNAL( receivedTypingMsg( const TQString &, bool ) ), + this, TQT_SLOT( receivedTypingMsg( const TQString &, bool ) ) ); KConfig *config = KGlobal::config(); config->setGroup( "MSN" ); if(config->readBoolEntry( "SendTypingNotification" , true) ) { - connect( this, SIGNAL( myselfTyping( bool ) ), - m_chatService, SLOT( sendTypingMsg( bool ) ) ); + connect( this, TQT_SIGNAL( myselfTyping( bool ) ), + m_chatService, TQT_SLOT( sendTypingMsg( bool ) ) ); } - connect( m_chatService, SIGNAL( msgAcknowledgement(unsigned int, bool) ), - this, SLOT( slotAcknowledgement(unsigned int, bool) ) ); - connect( m_chatService, SIGNAL( invitation( const QString&, const QString& ) ), - this, SLOT( slotInvitation( const QString&, const QString& ) ) ); - connect( m_chatService, SIGNAL( nudgeReceived(const QString&) ), - this, SLOT( slotNudgeReceived(const QString&) ) ); - connect( m_chatService, SIGNAL( errorMessage(int, const QString& ) ), static_cast<MSNAccount *>(myself()->account()), SLOT( slotErrorMessageReceived(int, const QString& ) ) ); + connect( m_chatService, TQT_SIGNAL( msgAcknowledgement(unsigned int, bool) ), + this, TQT_SLOT( slotAcknowledgement(unsigned int, bool) ) ); + connect( m_chatService, TQT_SIGNAL( invitation( const TQString&, const TQString& ) ), + this, TQT_SLOT( slotInvitation( const TQString&, const TQString& ) ) ); + connect( m_chatService, TQT_SIGNAL( nudgeReceived(const TQString&) ), + this, TQT_SLOT( slotNudgeReceived(const TQString&) ) ); + connect( m_chatService, TQT_SIGNAL( errorMessage(int, const TQString& ) ), static_cast<MSNAccount *>(myself()->account()), TQT_SLOT( slotErrorMessageReceived(int, const TQString& ) ) ); if(!m_timeoutTimer) { - m_timeoutTimer=new QTimer(this); - connect( m_timeoutTimer , SIGNAL(timeout()), this , SLOT(slotConnectionTimeout() ) ); + m_timeoutTimer=new TQTimer(this); + connect( m_timeoutTimer , TQT_SIGNAL(timeout()), this , TQT_SLOT(slotConnectionTimeout() ) ); } m_timeoutTimer->start(20000,true); } -void MSNChatSession::slotUserJoined( const QString &handle, const QString &publicName, bool IRO ) +void MSNChatSession::slotUserJoined( const TQString &handle, const TQString &publicName, bool IRO ) { delete m_timeoutTimer; m_timeoutTimer=0L; if( !account()->contacts()[ handle ] ) - account()->addContact( handle, QString::null, 0L, Kopete::Account::Temporary); + account()->addContact( handle, TQString::null, 0L, Kopete::Account::Temporary); MSNContact *c = static_cast<MSNContact*>( account()->contacts()[ handle ] ); @@ -229,7 +229,7 @@ void MSNChatSession::slotUserJoined( const QString &handle, const QString &publi slotRequestPicture(); } -void MSNChatSession::slotUserLeft( const QString &handle, const QString& reason ) +void MSNChatSession::slotUserLeft( const TQString &handle, const TQString& reason ) { MSNContact *c = static_cast<MSNContact*>( myself()->account()->contacts()[ handle ] ); if(c) @@ -274,7 +274,7 @@ void MSNChatSession::slotMessageSent(Kopete::Message &message,Kopete::ChatSessio else { m_messagesSent.insert( id, message ); - message.setBg(QColor()); // clear the bgColor + message.setBg(TQColor()); // clear the bgColor message.setBody(message.plainBody() , Kopete::Message::PlainText ); //clear every custom tag which are not sent appendMessage(message); // send the own msg to chat window } @@ -294,8 +294,8 @@ void MSNChatSession::slotMessageReceived( Kopete::Message &msg ) if( msg.plainBody().startsWith( "AutoMessage: " ) ) { //FIXME: HardCodded color are not so good - msg.setFg( QColor( "SlateGray3" ) ); - QFont f; + msg.setFg( TQColor( "SlateGray3" ) ); + TQFont f; f.setItalic( true ); msg.setFont( f ); } @@ -313,18 +313,18 @@ void MSNChatSession::slotActionInviteAboutToShow() m_actionInvite->popupMenu()->clear(); - QDictIterator<Kopete::Contact> it( account()->contacts() ); + TQDictIterator<Kopete::Contact> it( account()->contacts() ); for( ; it.current(); ++it ) { if( !members().contains( it.current() ) && it.current()->isOnline() && it.current() != myself() ) { KAction *a=new KopeteContactAction( it.current(), this, - SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite ); + TQT_SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite ); m_actionInvite->insert( a ); m_inviteactions.append( a ) ; } } - KAction *b=new KAction( i18n ("Other..."), 0, this, SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" ); + KAction *b=new KAction( i18n ("Other..."), 0, this, TQT_SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" ); m_actionInvite->insert( b ); m_inviteactions.append( b ) ; } @@ -342,7 +342,7 @@ void MSNChatSession::slotInviteContact( Kopete::Contact *contact ) inviteContact( contact->contactId() ); } -void MSNChatSession::inviteContact(const QString &contactId) +void MSNChatSession::inviteContact(const TQString &contactId) { if( m_chatService ) m_chatService->slotInviteContact( contactId ); @@ -353,9 +353,9 @@ void MSNChatSession::inviteContact(const QString &contactId) void MSNChatSession::slotInviteOtherContact() { bool ok; - QString handle = KInputDialog::getText(i18n( "MSN Plugin" ), + TQString handle = KInputDialog::getText(i18n( "MSN Plugin" ), i18n( "Please enter the email address of the person you want to invite:" ), - QString::null, &ok ); + TQString::null, &ok ); if( !ok ) return; @@ -378,7 +378,7 @@ void MSNChatSession::sendMessageQueue() return; } // kdDebug(14140) << "MSNChatSession::sendMessageQueue: " << m_messagesQueue.count() <<endl; - for ( QValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() ) + for ( TQValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() ) { //m_chatService->sendMsg( *it) ; slotMessageSent(*it , this); @@ -386,7 +386,7 @@ void MSNChatSession::sendMessageQueue() } - QMap<unsigned long int, MSNInvitation*>::Iterator it; + TQMap<unsigned long int, MSNInvitation*>::Iterator it; for( it = m_invitations.begin(); it != m_invitations.end() ; ++it) { if(! (*it)->incoming() && (*it)->state()<MSNInvitation::Invited) @@ -408,7 +408,7 @@ void MSNChatSession::slotAcknowledgement(unsigned int id, bool ack) if ( !ack ) { Kopete::Message m = m_messagesSent[ id ]; - QString body = i18n( "The following message has not been sent correctly:\n%1" ).arg( m.plainBody() ); + TQString body = i18n( "The following message has not been sent correctly:\n%1" ).arg( m.plainBody() ); Kopete::Message msg = Kopete::Message( m.to().first(), members(), body, Kopete::Message::Internal, Kopete::Message::PlainText ); appendMessage( msg ); //stop the stupid animation @@ -422,14 +422,14 @@ void MSNChatSession::slotAcknowledgement(unsigned int id, bool ack) m_messagesSent.remove( id ); } -void MSNChatSession::slotInvitation(const QString &handle, const QString &msg) +void MSNChatSession::slotInvitation(const TQString &handle, const TQString &msg) { //FIXME! a contact from another account can send a file MSNContact *c = static_cast<MSNContact*>( myself()->account()->contacts()[ handle ] ); if(!c) return; - QRegExp rx("Invitation-Cookie: ([0-9]*)"); + TQRegExp rx("Invitation-Cookie: ([0-9]*)"); rx.search(msg); long unsigned int cookie=rx.cap(1).toUInt(); @@ -443,7 +443,7 @@ void MSNChatSession::slotInvitation(const QString &handle, const QString &msg) if( msg.contains(MSNFileTransferSocket::applicationID()) ) { MSNFileTransferSocket *MFTS=new MSNFileTransferSocket(myself()->account()->accountId(),c,true,this); - connect(MFTS, SIGNAL( done(MSNInvitation*) ) , this , SLOT( invitationDone(MSNInvitation*) )); + connect(MFTS, TQT_SIGNAL( done(MSNInvitation*) ) , this , TQT_SLOT( invitationDone(MSNInvitation*) )); m_invitations.insert( cookie , MFTS); MFTS->parseInvitation(msg); setCanBeDeleted(false); @@ -460,11 +460,11 @@ void MSNChatSession::slotInvitation(const QString &handle, const QString &msg) } else { - rx=QRegExp("Application-Name: ([^\\r\\n]*)"); + rx=TQRegExp("Application-Name: ([^\\r\\n]*)"); rx.search(msg); - QString inviteName = rx.cap( 1 ); + TQString inviteName = rx.cap( 1 ); - QString body = i18n( + TQString body = i18n( "%1 has sent an unimplemented invitation, the invitation was rejected.\n" "The invitation was: %2" ) .arg( c->property( Kopete::Global::Properties::self()->nickName()).value().toString(), inviteName ); @@ -487,7 +487,7 @@ void MSNChatSession::invitationDone(MSNInvitation* MFTS) setCanBeDeleted(true); } -void MSNChatSession::sendFile(const QString &fileLocation, const QString &/*fileName*/, +void MSNChatSession::sendFile(const TQString &fileLocation, const TQString &/*fileName*/, long unsigned int fileSize) { // TODO create a switchboard to send the file is one is not available. @@ -499,7 +499,7 @@ void MSNChatSession::sendFile(const QString &fileLocation, const QString &/*file void MSNChatSession::initInvitation(MSNInvitation* invitation) { - connect(invitation->object(), SIGNAL( done(MSNInvitation*) ) , this , SLOT( invitationDone(MSNInvitation*) )); + connect(invitation->object(), TQT_SIGNAL( done(MSNInvitation*) ) , this , TQT_SLOT( invitationDone(MSNInvitation*) )); m_invitations.insert( invitation->cookie() , invitation); if(m_chatService) @@ -515,7 +515,7 @@ void MSNChatSession::initInvitation(MSNInvitation* invitation) void MSNChatSession::slotRequestPicture() { - QPtrList<Kopete::Contact> mb=members(); + TQPtrList<Kopete::Contact> mb=members(); MSNContact *c = static_cast<MSNContact*>( mb.first() ); if(!c) return; @@ -539,7 +539,7 @@ void MSNChatSession::slotRequestPicture() void MSNChatSession::slotDisplayPictureChanged() { - QPtrList<Kopete::Contact> mb=members(); + TQPtrList<Kopete::Contact> mb=members(); MSNContact *c = static_cast<MSNContact *>( mb.first() ); if ( c && m_image ) { @@ -552,9 +552,9 @@ void MSNChatSession::slotDisplayPictureChanged() if(w) { //We connected that in the constructor. we don't need to keep this slot active. - disconnect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) ); + disconnect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) ); - QPtrListIterator<KToolBar> it=w->toolBarIterator() ; + TQPtrListIterator<KToolBar> it=w->toolBarIterator() ; KAction *imgAction=actionCollection()->action("msnDisplayPicture"); if(imgAction) while(it) { @@ -563,15 +563,15 @@ void MSNChatSession::slotDisplayPictureChanged() { sz=tb->iconSize(); //ipdate if the size of the toolbar change. - disconnect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged())); - connect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged())); + disconnect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged())); + connect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged())); break; } ++it; } } - QString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString(); - QImage scaledImg = QPixmap( imgURL ).convertToImage().smoothScale( sz, sz ); + TQString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString(); + TQImage scaledImg = TQPixmap( imgURL ).convertToImage().smoothScale( sz, sz ); if(!scaledImg.isNull()) m_image->setPixmap( scaledImg ); else @@ -579,7 +579,7 @@ void MSNChatSession::slotDisplayPictureChanged() c->removeProperty(Kopete::Global::Properties::self()->photo()); //slotDisplayPictureChanged(); //don't do that or we might end in a infinite loop } - QToolTip::add( m_image, "<qt><img src=\"" + imgURL + "\"></qt>" ); + TQToolTip::add( m_image, "<qt><img src=\"" + imgURL + "\"></qt>" ); } else @@ -600,7 +600,7 @@ void MSNChatSession::slotDebugRawCommand() MSNDebugRawCmdDlg *dlg = new MSNDebugRawCmdDlg( 0L ); int result = dlg->exec(); - if( result == QDialog::Accepted && m_chatService ) + if( result == TQDialog::Accepted && m_chatService ) { m_chatService->sendCommand( dlg->command(), dlg->params(), dlg->addId(), dlg->msg().replace("\n","\r\n").utf8() ); @@ -610,7 +610,7 @@ void MSNChatSession::slotDebugRawCommand() } -void MSNChatSession::receivedTypingMsg( const QString &contactId, bool b ) +void MSNChatSession::receivedTypingMsg( const TQString &contactId, bool b ) { MSNContact *c = dynamic_cast<MSNContact *>( account()->contacts()[ contactId ] ); if(c && m_newSession && !view(false)) @@ -621,7 +621,7 @@ void MSNChatSession::receivedTypingMsg( const QString &contactId, bool b ) if ( notifyNewChat ) { // this internal message should open the window if they not exist - QString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() ); + TQString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() ); Kopete::Message tmpMsg = Kopete::Message( c, members(), body, Kopete::Message::Internal, Kopete::Message::PlainText ); appendMessage( tmpMsg ); } @@ -637,20 +637,20 @@ void MSNChatSession::slotSendNudge() { m_chatService->sendNudge(); Kopete::Message msg = Kopete::Message( myself(), members() , i18n ( "has sent a nudge" ), Kopete::Message::Outbound, - Kopete::Message::PlainText, QString(), Kopete::Message::TypeAction ); + Kopete::Message::PlainText, TQString(), Kopete::Message::TypeAction ); appendMessage( msg ); } } -void MSNChatSession::slotNudgeReceived(const QString& handle) +void MSNChatSession::slotNudgeReceived(const TQString& handle) { Kopete::Contact *c = account()->contacts()[ handle ] ; if(!c) c=members().getFirst(); Kopete::Message msg = Kopete::Message(c, myself(), i18n ( "has sent you a nudge" ), Kopete::Message::Inbound, - Kopete::Message::PlainText, QString(), Kopete::Message::TypeAction ); + Kopete::Message::PlainText, TQString(), Kopete::Message::TypeAction ); appendMessage( msg ); // Emit the nudge/buzz notification (configured by user). emitNudgeNotification(); @@ -681,25 +681,25 @@ void MSNChatSession::slotWebcamSend() void MSNChatSession::slotSendFile() { - QPtrList<Kopete::Contact>contacts = members(); + TQPtrList<Kopete::Contact>contacts = members(); static_cast<MSNContact *>(contacts.first())->sendFile(); } void MSNChatSession::startChatSession() { - QPtrList<Kopete::Contact> mb=members(); + TQPtrList<Kopete::Contact> mb=members(); static_cast<MSNAccount*>( account() )->slotStartChatSession( mb.first()->contactId() ); if(!m_timeoutTimer) { - m_timeoutTimer=new QTimer(this); - connect( m_timeoutTimer , SIGNAL(timeout()), this , SLOT(slotConnectionTimeout() ) ); + m_timeoutTimer=new TQTimer(this); + connect( m_timeoutTimer , TQT_SIGNAL(timeout()), this , TQT_SLOT(slotConnectionTimeout() ) ); } m_timeoutTimer->start(20000, true); } -void MSNChatSession::cleanMessageQueue( const QString & reason ) +void MSNChatSession::cleanMessageQueue( const TQString & reason ) { delete m_timeoutTimer; m_timeoutTimer=0L; @@ -715,21 +715,21 @@ void MSNChatSession::cleanMessageQueue( const QString & reason ) else m=m_messagesSent.begin().data(); - QString body=i18n("The following message has not been sent correctly (%1): \n%2").arg(reason, m.plainBody()); + TQString body=i18n("The following message has not been sent correctly (%1): \n%2").arg(reason, m.plainBody()); Kopete::Message msg = Kopete::Message(m.to().first() , members() , body , Kopete::Message::Internal, Kopete::Message::PlainText); appendMessage(msg); } else { Kopete::Message m; - QString body=i18n("These messages have not been sent correctly (%1): <br /><ul>").arg(reason); - for ( QMap<unsigned int , Kopete::Message>::iterator it = m_messagesSent.begin(); it!=m_messagesSent.end(); it = m_messagesSent.begin() ) + TQString body=i18n("These messages have not been sent correctly (%1): <br /><ul>").arg(reason); + for ( TQMap<unsigned int , Kopete::Message>::iterator it = m_messagesSent.begin(); it!=m_messagesSent.end(); it = m_messagesSent.begin() ) { m=it.data(); body+= "<li>"+m.escapedBody()+"</li>"; m_messagesSent.remove(it); } - for ( QValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() ) + for ( TQValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() ) { m=(*it); body+= "<li>"+m.escapedBody()+"</li>"; diff --git a/kopete/protocols/msn/msnchatsession.h b/kopete/protocols/msn/msnchatsession.h index 8011574e..702fac8a 100644 --- a/kopete/protocols/msn/msnchatsession.h +++ b/kopete/protocols/msn/msnchatsession.h @@ -39,11 +39,11 @@ public: MSNChatSession( Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name = 0 ); ~MSNChatSession(); - void createChat( const QString &handle, const QString &address, const QString &auth, const QString &ID = QString::null ); + void createChat( const TQString &handle, const TQString &address, const TQString &auth, const TQString &ID = TQString::null ); MSNSwitchBoardSocket *service() { return m_chatService; }; - void sendFile( const QString &fileLocation, const QString &fileName, + void sendFile( const TQString &fileLocation, const TQString &fileName, long unsigned int fileSize ); /** @@ -51,7 +51,7 @@ public: */ void initInvitation(MSNInvitation* invitation); - virtual void inviteContact(const QString& ); + virtual void inviteContact(const TQString& ); public slots: void slotCloseSession(); @@ -65,7 +65,7 @@ public slots: * this is a reimplementation of ChatSesstion slot. * the original slot is not virtual, but that's not a problem because it's a slot. */ - virtual void receivedTypingMsg( const QString &, bool ); + virtual void receivedTypingMsg( const TQString &, bool ); void slotConnectionTimeout(); @@ -73,12 +73,12 @@ private slots: void slotMessageSent( Kopete::Message &message, Kopete::ChatSession *kmm ); void slotMessageReceived( Kopete::Message &message ); - void slotUserJoined( const QString &handle, const QString &publicName, bool IRO ); - void slotUserLeft( const QString &handle, const QString &reason ); + void slotUserJoined( const TQString &handle, const TQString &publicName, bool IRO ); + void slotUserLeft( const TQString &handle, const TQString &reason ); void slotSwitchBoardClosed(); void slotInviteContact( Kopete::Contact *contact ); void slotAcknowledgement( unsigned int id, bool ack ); - void slotInvitation( const QString &handle, const QString &msg ); + void slotInvitation( const TQString &handle, const TQString &msg ); void slotActionInviteAboutToShow(); @@ -94,27 +94,27 @@ private slots: void slotWebcamSend(); void slotSendFile(); - void slotNudgeReceived(const QString& handle); + void slotNudgeReceived(const TQString& handle); private: MSNSwitchBoardSocket *m_chatService; - QString otherString; + TQString otherString; KActionMenu *m_actionInvite; - QPtrList<KAction> m_inviteactions; + TQPtrList<KAction> m_inviteactions; KAction *m_actionNudge; KAction *m_actionWebcamReceive; KAction *m_actionWebcamSend; //Messages sent before the ending of the connection are queued - QValueList<Kopete::Message> m_messagesQueue; + TQValueList<Kopete::Message> m_messagesQueue; void sendMessageQueue(); - void cleanMessageQueue( const QString &reason); + void cleanMessageQueue( const TQString &reason); void startChatSession(); - QMap<unsigned int, Kopete::Message> m_messagesSent; + TQMap<unsigned int, Kopete::Message> m_messagesSent; - QMap<long unsigned int, MSNInvitation*> m_invitations; + TQMap<long unsigned int, MSNInvitation*> m_invitations; /** @@ -122,8 +122,8 @@ private: */ bool m_newSession; - QLabel *m_image; - QTimer *m_timeoutTimer; + TQLabel *m_image; + TQTimer *m_timeoutTimer; uint m_connectionTry; @@ -131,7 +131,7 @@ signals: /* * This signal is relayed to the protocol and after, to plugins */ - void invitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c ); + void invitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c ); }; #endif diff --git a/kopete/protocols/msn/msncontact.cpp b/kopete/protocols/msn/msncontact.cpp index 8a490a1b..c6ef14f8 100644 --- a/kopete/protocols/msn/msncontact.cpp +++ b/kopete/protocols/msn/msncontact.cpp @@ -21,7 +21,7 @@ #include "msncontact.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #undef KDE_NO_COMPAT #include <kaction.h> @@ -35,7 +35,7 @@ #include <ktempfile.h> #include <kconfig.h> #include <kglobal.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kio/job.h> #include "kopetecontactlist.h" @@ -50,7 +50,7 @@ #include "msnnotifysocket.h" #include "msnaccount.h" -MSNContact::MSNContact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent ) +MSNContact::MSNContact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent ) : Kopete::Contact( account, id, parent ) { m_deleted = false; @@ -125,30 +125,30 @@ Kopete::ChatSession *MSNContact::manager( Kopete::Contact::CanCreateFlags canCre return manager; } -QPtrList<KAction> *MSNContact::customContextMenuActions() +TQPtrList<KAction> *MSNContact::customContextMenuActions() { - QPtrList<KAction> *m_actionCollection = new QPtrList<KAction>; + TQPtrList<KAction> *m_actionCollection = new TQPtrList<KAction>; // Block/unblock Contact - QString label = isBlocked() ? i18n( "Unblock User" ) : i18n( "Block User" ); + TQString label = isBlocked() ? i18n( "Unblock User" ) : i18n( "Block User" ); if( !actionBlock ) { - actionBlock = new KAction( label, "msn_blocked",0, this, SLOT( slotBlockUser() ), + actionBlock = new KAction( label, "msn_blocked",0, this, TQT_SLOT( slotBlockUser() ), this, "actionBlock" ); //show profile - actionShowProfile = new KAction( i18n("Show Profile") , 0, this, SLOT( slotShowProfile() ), + actionShowProfile = new KAction( i18n("Show Profile") , 0, this, TQT_SLOT( slotShowProfile() ), this, "actionShowProfile" ); // Send mail (only available if it is an hotmail account) - actionSendMail = new KAction( i18n("Send Email...") , "mail_generic",0, this, SLOT( slotSendMail() ), + actionSendMail = new KAction( i18n("Send Email...") , "mail_generic",0, this, TQT_SLOT( slotSendMail() ), this, "actionSendMail" ); // Invite to receive webcam - actionWebcamReceive = new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, SLOT(slotWebcamReceive() ), this, "msnWebcamReceive" ) ; + actionWebcamReceive = new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, TQT_SLOT(slotWebcamReceive() ), this, "msnWebcamReceive" ) ; //Send webcam action - actionWebcamSend = new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, SLOT(slotWebcamSend() ), this, "msnWebcamSend" ) ; + actionWebcamSend = new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, TQT_SLOT(slotWebcamSend() ), this, "msnWebcamSend" ) ; } else actionBlock->setText( label ); @@ -178,22 +178,22 @@ void MSNContact::slotBlockUser() if( m_blocked ) { - notify->removeContact( contactId(), MSNProtocol::BL, QString::null, QString::null ); + notify->removeContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null ); } else { if(m_allowed) - notify->removeContact( contactId(), MSNProtocol::AL, QString::null, QString::null ); + notify->removeContact( contactId(), MSNProtocol::AL, TQString::null, TQString::null ); else - notify->addContact( contactId(), MSNProtocol::BL, QString::null, QString::null, QString::null ); + notify->addContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null, TQString::null ); } } void MSNContact::slotUserInfo() { - KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, QString::null, KDialogBase::Close , KDialogBase::Close, false ); - QString nick=property( Kopete::Global::Properties::self()->nickName()).value().toString(); - QString personalMessage=property( MSNProtocol::protocol()->propPersonalMessage).value().toString(); + KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, TQString::null, KDialogBase::Close , KDialogBase::Close, false ); + TQString nick=property( Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString personalMessage=property( MSNProtocol::protocol()->propPersonalMessage).value().toString(); MSNInfo *info=new MSNInfo ( infoDialog,"info"); info->m_id->setText( contactId() ); info->m_displayName->setText(nick); @@ -203,7 +203,7 @@ void MSNContact::slotUserInfo() info->m_phm->setText(m_phoneMobile); info->m_reversed->setChecked(m_reversed); - connect( info->m_reversed, SIGNAL(toggled(bool)) , this, SLOT(slotUserInfoDialogReversedToggled())); + connect( info->m_reversed, TQT_SIGNAL(toggled(bool)) , this, TQT_SLOT(slotUserInfoDialogReversedToggled())); infoDialog->setMainWidget(info); infoDialog->setCaption(nick); @@ -213,9 +213,9 @@ void MSNContact::slotUserInfo() void MSNContact::slotUserInfoDialogReversedToggled() { //workaround to make this checkboxe readonly - const QCheckBox *cb=dynamic_cast<const QCheckBox*>(sender()); + const TQCheckBox *cb=dynamic_cast<const TQCheckBox*>(sender()); if(cb && cb->isChecked()!=m_reversed) - const_cast<QCheckBox*>(cb)->setChecked(m_reversed); + const_cast<TQCheckBox*>(cb)->setChecked(m_reversed); } void MSNContact::deleteContact() @@ -228,7 +228,7 @@ void MSNContact::deleteContact() if( hasProperty(MSNProtocol::protocol()->propGuid.key()) ) { // Remove from all groups he belongs (if applicable) - for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it ) + for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it ) { kdDebug(14140) << k_funcinfo << "Removing contact from group \"" << it.key() << "\"" << endl; notify->removeContact( contactId(), MSNProtocol::FL, guid(), it.key() ); @@ -237,7 +237,7 @@ void MSNContact::deleteContact() // Then trully remove it from server contact list, // because only removing the contact from his groups isn't sufficent from MSNP11. kdDebug( 14140 ) << k_funcinfo << "Removing contact from top-level." << endl; - notify->removeContact( contactId(), MSNProtocol::FL, guid(), QString::null); + notify->removeContact( contactId(), MSNProtocol::FL, guid(), TQString::null); } else { @@ -325,7 +325,7 @@ void MSNContact::setClientFlags( uint flags ) m_clientFlags=flags; } -void MSNContact::setInfo(const QString &type,const QString &data ) +void MSNContact::setInfo(const TQString &type,const TQString &data ) { if( type == "PHH" ) { @@ -362,12 +362,12 @@ void MSNContact::setInfo(const QString &type,const QString &data ) } -void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> & /* addressBookData */ ) +void MSNContact::serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> & /* addressBookData */ ) { // Contact id and display name are already set for us, only add the rest - QString groups; + TQString groups; bool firstEntry = true; - for( QMap<QString, Kopete::Group *>::ConstIterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it ) + for( TQMap<TQString, Kopete::Group *>::ConstIterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it ) { if( !firstEntry ) { @@ -377,7 +377,7 @@ void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString groups += it.key(); } - QString lists="C"; + TQString lists="C"; if(m_blocked) lists +="B"; if(m_allowed) @@ -395,14 +395,14 @@ void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString } -QString MSNContact::guid(){ return property(MSNProtocol::protocol()->propGuid).value().toString(); } +TQString MSNContact::guid(){ return property(MSNProtocol::protocol()->propGuid).value().toString(); } -QString MSNContact::phoneHome(){ return m_phoneHome ;} -QString MSNContact::phoneWork(){ return m_phoneWork ;} -QString MSNContact::phoneMobile(){ return m_phoneMobile ;} +TQString MSNContact::phoneHome(){ return m_phoneHome ;} +TQString MSNContact::phoneWork(){ return m_phoneWork ;} +TQString MSNContact::phoneMobile(){ return m_phoneMobile ;} -const QMap<QString, Kopete::Group*> MSNContact::serverGroups() const +const TQMap<TQString, Kopete::Group*> MSNContact::serverGroups() const { return m_serverGroups; } @@ -451,21 +451,21 @@ void MSNContact::sync( unsigned int changed ) return; //STEP ONE : add the contact to every kopetegroups where the MC is - QPtrList<Kopete::Group> groupList = metaContact()->groups(); + TQPtrList<Kopete::Group> groupList = metaContact()->groups(); for ( Kopete::Group *group = groupList.first(); group; group = groupList.next() ) { //For each group, ensure it is on the MSN server if( !group->pluginData( protocol() , account()->accountId() + " id" ).isEmpty() ) { - QString Gid=group->pluginData( protocol(), account()->accountId() + " id" ); + TQString Gid=group->pluginData( protocol(), account()->accountId() + " id" ); if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(Gid) ) { // ohoh! something is corrupted on the contactlist.xml // anyway, we never should add a contact to an unexisting group on the server. // This shouln't be possible anymore 2004-06-10 -Olivier //repair the problem - group->setPluginData( protocol() , account()->accountId() + " id" , QString::null); - group->setPluginData( protocol() , account()->accountId() + " displayName" , QString::null); + group->setPluginData( protocol() , account()->accountId() + " id" , TQString::null); + group->setPluginData( protocol() , account()->accountId() + " displayName" , TQString::null); kdWarning( 14140 ) << k_funcinfo << " Group " << group->displayName() << " marked with id #" <<Gid << " does not seems to be anymore on the server" << endl; if(!group->displayName().isEmpty() && group->type() == Kopete::Group::Normal) //not the top-level @@ -479,7 +479,7 @@ void MSNContact::sync( unsigned int changed ) else if( !m_serverGroups.contains(Gid) ) { //Add the contact to the group on the server - notify->addContact( contactId(), MSNProtocol::FL, QString::null, guid(), Gid ); + notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), Gid ); count++; m_moving=true; } @@ -502,9 +502,9 @@ void MSNContact::sync( unsigned int changed ) //STEP TWO : remove the contact from groups where the MC is not, but let it at least in one group //contact is not in that group. on the server. we will remove them dirrectly after the loop - QValueList<QString> removinglist; + TQValueList<TQString> removinglist; - for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it ) + for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it ) { if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(it.key()) ) { // ohoh! something is corrupted on the contactlist.xml @@ -531,7 +531,7 @@ void MSNContact::sync( unsigned int changed ) } } - for(QValueList<QString>::Iterator it= removinglist.begin() ; it != removinglist.end() ; ++it ) + for(TQValueList<TQString>::Iterator it= removinglist.begin() ; it != removinglist.end() ; ++it ) contactRemovedFromGroup(*it); //FINAL TEST: is the contact at least in a group.. @@ -539,17 +539,17 @@ void MSNContact::sync( unsigned int changed ) // we add the contact to the group #0 (the default one) /*if(count==0) { -// notify->addContact( contactId(), MSNProtocol::FL, QString::null, guid(), "0"); +// notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), "0"); }*/ } -void MSNContact::contactAddedToGroup( const QString& groupId, Kopete::Group *group ) +void MSNContact::contactAddedToGroup( const TQString& groupId, Kopete::Group *group ) { m_serverGroups.insert( groupId, group ); m_moving=false; } -void MSNContact::contactRemovedFromGroup( const QString& groupId ) +void MSNContact::contactRemovedFromGroup( const TQString& groupId ) { m_serverGroups.remove( groupId ); if(m_serverGroups.isEmpty() && !m_moving) @@ -560,7 +560,7 @@ void MSNContact::contactRemovedFromGroup( const QString& groupId ) } -void MSNContact::rename( const QString &newName ) +void MSNContact::rename( const TQString &newName ) { //kdDebug( 14140 ) << k_funcinfo << "From: " << displayName() << ", to: " << newName << endl; @@ -577,20 +577,20 @@ void MSNContact::rename( const QString &newName ) void MSNContact::slotShowProfile() { - KRun::runURL( KURL( QString::fromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" ); + KRun::runURL( KURL( TQString::fromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" ); } /** * FIXME: Make this a standard KMM API call */ -void MSNContact::sendFile( const KURL &sourceURL, const QString &altFileName, uint /*fileSize*/ ) +void MSNContact::sendFile( const KURL &sourceURL, const TQString &altFileName, uint /*fileSize*/ ) { - QString filePath; + TQString filePath; //If the file location is null, then get it from a file open dialog if( !sourceURL.isValid() ) - filePath = KFileDialog::getOpenFileName( QString::null ,"*", 0l , i18n( "Kopete File Transfer" )); + filePath = KFileDialog::getOpenFileName( TQString::null ,"*", 0l , i18n( "Kopete File Transfer" )); else filePath = sourceURL.path(-1); @@ -598,7 +598,7 @@ void MSNContact::sendFile( const KURL &sourceURL, const QString &altFileName, ui if ( !filePath.isEmpty() ) { - Q_UINT32 fileSize = QFileInfo(filePath).size(); + Q_UINT32 fileSize = TQFileInfo(filePath).size(); //Send the file static_cast<MSNChatSession*>( manager(Kopete::Contact::CanCreate) )->sendFile( filePath, altFileName, fileSize ); @@ -614,7 +614,7 @@ void MSNContact::setOnlineStatus(const Kopete::OnlineStatus& status) (status.weight()==0) ? 0 : (status.weight() -1) , protocol() , status.internalStatus()+15 , - status.overlayIcons() + QStringList("msn_blocked") , + status.overlayIcons() + TQStringList("msn_blocked") , i18n("%1|Blocked").arg( status.description() ) ) ); } else if(!isBlocked() && status.internalStatus() >= 15) @@ -672,7 +672,7 @@ void MSNContact::setDisplayPicture(KTempFile *f) //copy the temp file somewere else. // in a better world, the file could be dirrectly wrote at the correct location. // but the custom emoticon code is to deeply merged in the display picture code while it could be separated. - QString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ; + TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; KIO::Job *j=KIO::file_move( KURL::fromPathOrURL( f->name() ) , KURL::fromPathOrURL( newlocation ) , -1, true /*overwrite*/ , false /*resume*/ , false /*showProgressInfo*/ ); @@ -680,17 +680,17 @@ void MSNContact::setDisplayPicture(KTempFile *f) delete f; //let the time to KIO to copy the file - connect(j, SIGNAL(result(KIO::Job *)) , this, SLOT(slotEmitDisplayPictureChanged() )); + connect(j, TQT_SIGNAL(result(KIO::Job *)) , this, TQT_SLOT(slotEmitDisplayPictureChanged() )); } void MSNContact::slotEmitDisplayPictureChanged() { - QString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ; + TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; setProperty( Kopete::Global::Properties::self()->photo() , newlocation ); emit displayPictureChanged(); } -void MSNContact::setObject(const QString &obj) +void MSNContact::setObject(const TQString &obj) { if(m_obj==obj && (obj.isEmpty() || hasProperty(Kopete::Global::Properties::self()->photo().key()))) return; diff --git a/kopete/protocols/msn/msncontact.h b/kopete/protocols/msn/msncontact.h index bcd6cc68..8b38d678 100644 --- a/kopete/protocols/msn/msncontact.h +++ b/kopete/protocols/msn/msncontact.h @@ -46,7 +46,7 @@ class MSNContact : public Kopete::Contact Q_OBJECT public: - MSNContact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent ); + MSNContact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent ); ~MSNContact(); /** @@ -77,12 +77,12 @@ public: /** * set one phone number */ - void setInfo(const QString &type, const QString &data); + void setInfo(const TQString &type, const TQString &data); /** * The groups in which the user is located on the server. */ - const QMap<QString, Kopete::Group *> serverGroups() const; + const TQMap<TQString, Kopete::Group *> serverGroups() const; /** * clear that map */ @@ -96,20 +96,20 @@ public: virtual bool isReachable(); - virtual QPtrList<KAction> *customContextMenuActions(); + virtual TQPtrList<KAction> *customContextMenuActions(); /** * update the server group map */ - void contactRemovedFromGroup( const QString& groupId ); - void contactAddedToGroup(const QString& groupId, Kopete::Group *group ); + void contactRemovedFromGroup( const TQString& groupId ); + void contactAddedToGroup(const TQString& groupId, Kopete::Group *group ); - virtual void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData ); + virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData ); /** * Rename contact on server */ - virtual void rename( const QString &newName ) KDE_DEPRECATED; + virtual void rename( const TQString &newName ) KDE_DEPRECATED; /** * Returns the MSN Message Manager associated with this contact @@ -122,19 +122,19 @@ public: */ void setOnlineStatus(const Kopete::OnlineStatus&); - QString guid(); - QString phoneHome(); - QString phoneWork(); - QString phoneMobile(); + TQString guid(); + TQString phoneHome(); + TQString phoneWork(); + TQString phoneMobile(); - void setObject(const QString &obj); - QString object() const { return m_obj; } + void setObject(const TQString &obj); + TQString object() const { return m_obj; } public slots: virtual void slotUserInfo(); virtual void deleteContact(); virtual void sendFile( const KURL &sourceURL = KURL(), - const QString &fileName = QString::null, uint fileSize = 0L ); + const TQString &fileName = TQString::null, uint fileSize = 0L ); /** * Every time the kopete's contactlist is modified, we sync the serverlist with it @@ -159,7 +159,7 @@ private slots: void slotUserInfoDialogReversedToggled(); private: - QMap<QString, Kopete::Group *> m_serverGroups; + TQMap<TQString, Kopete::Group *> m_serverGroups; bool m_blocked; bool m_allowed; @@ -170,9 +170,9 @@ private: uint m_clientFlags; - QString m_phoneHome; - QString m_phoneWork; - QString m_phoneMobile; + TQString m_phoneHome; + TQString m_phoneWork; + TQString m_phoneMobile; KAction *actionBlock; @@ -181,7 +181,7 @@ private: KAction *actionWebcamReceive; KAction *actionWebcamSend; - QString m_obj; //the MSNObject + TQString m_obj; //the MSNObject /** * keep the current status here. (it's normally already in Kopete::Contact::d->onlineStatus) diff --git a/kopete/protocols/msn/msndebugrawcmddlg.cpp b/kopete/protocols/msn/msndebugrawcmddlg.cpp index 341c6808..48c4050e 100644 --- a/kopete/protocols/msn/msndebugrawcmddlg.cpp +++ b/kopete/protocols/msn/msndebugrawcmddlg.cpp @@ -21,18 +21,18 @@ #include "ui/msndebugrawcommand_base.h" -#include <qcheckbox.h> -#include <qlineedit.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> #include <ktextedit.h> #include <klocale.h> -MSNDebugRawCmdDlg::MSNDebugRawCmdDlg( QWidget *parent ) +MSNDebugRawCmdDlg::MSNDebugRawCmdDlg( TQWidget *parent ) : KDialogBase( parent, 0L, true, i18n( "DEBUG: Send Raw Command - MSN Plugin" ), Ok | Cancel, Ok, true ) { - setInitialSize( QSize( 350, 200 ) ); + setInitialSize( TQSize( 350, 200 ) ); m_main = new MSNDebugRawCommand_base( this ); setMainWidget( m_main ); @@ -42,12 +42,12 @@ MSNDebugRawCmdDlg::~MSNDebugRawCmdDlg() { } -QString MSNDebugRawCmdDlg::command() +TQString MSNDebugRawCmdDlg::command() { return m_main->m_command->text(); } -QString MSNDebugRawCmdDlg::params() +TQString MSNDebugRawCmdDlg::params() { return m_main->m_params->text(); } @@ -62,7 +62,7 @@ bool MSNDebugRawCmdDlg::addId() return m_main->m_addId->isChecked(); } -QString MSNDebugRawCmdDlg::msg() +TQString MSNDebugRawCmdDlg::msg() { return m_main->m_msg->text(); } diff --git a/kopete/protocols/msn/msndebugrawcmddlg.h b/kopete/protocols/msn/msndebugrawcmddlg.h index 3721daae..7f9741e8 100644 --- a/kopete/protocols/msn/msndebugrawcmddlg.h +++ b/kopete/protocols/msn/msndebugrawcmddlg.h @@ -34,14 +34,14 @@ class MSNDebugRawCmdDlg : public KDialogBase Q_OBJECT public: - MSNDebugRawCmdDlg( QWidget *parent ); + MSNDebugRawCmdDlg( TQWidget *parent ); ~MSNDebugRawCmdDlg(); - QString command(); - QString params(); + TQString command(); + TQString params(); bool addNewline(); bool addId(); - QString msg(); + TQString msg(); private: MSNDebugRawCommand_base *m_main; diff --git a/kopete/protocols/msn/msnfiletransfersocket.cpp b/kopete/protocols/msn/msnfiletransfersocket.cpp index 54a09e4a..c07fad06 100644 --- a/kopete/protocols/msn/msnfiletransfersocket.cpp +++ b/kopete/protocols/msn/msnfiletransfersocket.cpp @@ -21,7 +21,7 @@ #include <math.h> //qt -#include <qtimer.h> +#include <tqtimer.h> // kde #include <kdebug.h> @@ -40,7 +40,7 @@ using namespace KNetwork; -MSNFileTransferSocket::MSNFileTransferSocket(const QString &handle, Kopete::Contact *c,bool incoming, QObject* parent) +MSNFileTransferSocket::MSNFileTransferSocket(const TQString &handle, Kopete::Contact *c,bool incoming, TQObject* parent) : MSNSocket(parent) , MSNInvitation(incoming, MSNFileTransferSocket::applicationID() , i18n("File Transfer - MSN Plugin")) { m_handle=handle; @@ -50,8 +50,8 @@ MSNFileTransferSocket::MSNFileTransferSocket(const QString &handle, Kopete::Cont m_contact=c; ready=true; - QObject::connect( this, SIGNAL( socketClosed() ), this, SLOT( slotSocketClosed() ) ); - QObject::connect( this, SIGNAL( blockRead( const QByteArray & ) ), this, SLOT(slotReadBlock( const QByteArray & ) ) ); + TQObject::connect( this, TQT_SIGNAL( socketClosed() ), this, TQT_SLOT( slotSocketClosed() ) ); + TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ), this, TQT_SLOT(slotReadBlock( const TQByteArray & ) ) ); } MSNFileTransferSocket::~MSNFileTransferSocket() @@ -61,7 +61,7 @@ MSNFileTransferSocket::~MSNFileTransferSocket() kdDebug(14140) << "MSNFileTransferSocket::~MSNFileTransferSocket" <<endl; } -void MSNFileTransferSocket::parseCommand(const QString & cmd, uint id, const QString & data) +void MSNFileTransferSocket::parseCommand(const TQString & cmd, uint id, const TQString & data) { if( cmd == "VER" ) { @@ -83,7 +83,7 @@ void MSNFileTransferSocket::parseCommand(const QString & cmd, uint id, const QSt m_size=id; //data.toUInt(); //BUG: the size is take as id bye MSNSocket because it is a number m_downsize=0; - m_file=new QFile(m_fileName); + m_file=new TQFile(m_fileName); if( m_file->open( IO_WriteOnly )) sendCommand( "TFR" ,NULL,false); @@ -106,13 +106,13 @@ void MSNFileTransferSocket::parseCommand(const QString & cmd, uint id, const QSt disconnect(); } else - sendCommand("FIL" , QString::number(size()) , false); + sendCommand("FIL" , TQString::number(size()) , false); } else if( cmd == "TFR" ) { m_downsize=0; ready=true; - QTimer::singleShot( 0, this, SLOT(slotSendFile()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotSendFile()) ); } else if( cmd == "CCL" ) { @@ -131,12 +131,12 @@ void MSNFileTransferSocket::doneConnect() MSNSocket::doneConnect(); } -void MSNFileTransferSocket::bytesReceived(const QByteArray & head) +void MSNFileTransferSocket::bytesReceived(const TQByteArray & head) { if(head[0]!='\0') { kdDebug(14140) << "MSNFileTransferSocket::bytesReceived: transfer aborted" <<endl; - QTimer::singleShot(0,this,SLOT(disconnect())); + TQTimer::singleShot(0,this,TQT_SLOT(disconnect())); } unsigned int sz=(int)((unsigned char)head.data()[2])*256+(int)((unsigned char)head.data()[1]); // kdDebug(14140) << "MSNFileTransferSocket::bytesReceived: " << sz <<endl; @@ -162,7 +162,7 @@ void MSNFileTransferSocket::slotSocketClosed() emit done(this); } -void MSNFileTransferSocket::slotReadBlock(const QByteArray &block) +void MSNFileTransferSocket::slotReadBlock(const TQByteArray &block) { m_file->writeBlock( block.data(), block.size() ); // write to file @@ -175,7 +175,7 @@ void MSNFileTransferSocket::slotReadBlock(const QByteArray &block) //the transfer seems to be finished. sendCommand( "BYE" ,"16777989",false); // if we are not already disconected in 30 seconds, do it. - QTimer::singleShot( 30000 , this, SLOT(disconnect() ) ); + TQTimer::singleShot( 30000 , this, TQT_SLOT(disconnect() ) ); } } @@ -185,8 +185,8 @@ void MSNFileTransferSocket::setKopeteTransfer(Kopete::Transfer *kt) m_kopeteTransfer=kt; if(kt) { - QObject::connect(kt , SIGNAL(transferCanceled()), this, SLOT(abort())); - QObject::connect(kt, SIGNAL(destroyed()) , this , SLOT(slotKopeteTransferDestroyed())); + TQObject::connect(kt , TQT_SIGNAL(transferCanceled()), this, TQT_SLOT(abort())); + TQObject::connect(kt, TQT_SIGNAL(destroyed()) , this , TQT_SLOT(slotKopeteTransferDestroyed())); } } @@ -194,13 +194,13 @@ void MSNFileTransferSocket::listen(int port) { m_server = new KServerSocket(); - QObject::connect( m_server, SIGNAL(readyAccept()), this, SLOT(slotAcceptConnection())); - m_server->setAddress(QString::number(port)); + TQObject::connect( m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotAcceptConnection())); + m_server->setAddress(TQString::number(port)); kdDebug(14140) << "MSNFileTransferSocket::listen: about to listen"<<endl; bool listenResult = m_server->listen(1); kdDebug(14140) << "MSNFileTransferSocket::listen: result: "<< listenResult <<endl; - QTimer::singleShot( 60000, this, SLOT(slotTimer()) ); + TQTimer::singleShot( 60000, this, TQT_SLOT(slotTimer()) ); kdDebug(14140) << "MSNFileTransferSocket::listen done" <<endl; } @@ -240,7 +240,7 @@ void MSNFileTransferSocket::abort() } else { - QByteArray bytes(3); + TQByteArray bytes(3); bytes[0]='\1'; bytes[1]='\0'; bytes[2]='\0'; @@ -249,11 +249,11 @@ void MSNFileTransferSocket::abort() } //the timer wait one second, the time to send the CCL or the binary header //retarding the disconnection keep away from a crash. (in KIO::Job::emitResult when `delete this`) - QTimer::singleShot( 1000, this, SLOT(disconnect()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(disconnect()) ); ready=false; } -void MSNFileTransferSocket::setFile( const QString &fn, long unsigned int fileSize ) +void MSNFileTransferSocket::setFile( const TQString &fn, long unsigned int fileSize ) { m_fileName=fn; if(!m_incoming) @@ -263,7 +263,7 @@ void MSNFileTransferSocket::setFile( const QString &fn, long unsigned int fileSi kdDebug(14140) << "MSNFileTransferSocket::setFileName: WARNING m_file already exists" << endl; delete m_file; } - m_file = new QFile( fn ); + m_file = new TQFile( fn ); if(!m_file->open(IO_ReadOnly)) { //FIXME: abort transfer here @@ -286,7 +286,7 @@ void MSNFileTransferSocket::slotSendFile() { //the transfer seems to be finished. // if we are not already disconected in 30 seconds, do it. - QTimer::singleShot( 30000 , this, SLOT(disconnect() ) ); + TQTimer::singleShot( 30000 , this, TQT_SLOT(disconnect() ) ); return; } @@ -295,7 +295,7 @@ void MSNFileTransferSocket::slotSendFile() char data[2046]; int bytesRead = m_file->readBlock( data, 2045 ); - QByteArray block(bytesRead+3); + TQByteArray block(bytesRead+3); // char i1= (char)fmod( bytesRead, 256 ) ; // char i2= (char)floor( bytesRead / 256 ) ; // kdDebug(14140) << "MSNFileTransferSocket::slotSendFile: " << (int)i1 <<" + 256* "<< (int)i2 <<" = " << bytesRead <<endl; @@ -317,7 +317,7 @@ void MSNFileTransferSocket::slotSendFile() } ready=false; - QTimer::singleShot( 10, this, SLOT(slotSendFile()) ); + TQTimer::singleShot( 10, this, TQT_SLOT(slotSendFile()) ); } void MSNFileTransferSocket::slotReadyWrite() @@ -326,50 +326,50 @@ void MSNFileTransferSocket::slotReadyWrite() MSNSocket::slotReadyWrite(); } -QString MSNFileTransferSocket::invitationHead() +TQString MSNFileTransferSocket::invitationHead() { - QTimer::singleShot( 10 * 60000, this, SLOT(slotTimer()) ); //the user has 10 mins to accept or refuse or initiate the transfer + TQTimer::singleShot( 10 * 60000, this, TQT_SLOT(slotTimer()) ); //the user has 10 mins to accept or refuse or initiate the transfer - return QString( MSNInvitation::invitationHead()+ + return TQString( MSNInvitation::invitationHead()+ "Application-File: "+ m_fileName.right( m_fileName.length() - m_fileName.findRev( '/' ) - 1 ) +"\r\n" - "Application-FileSize: "+ QString::number(size()) +"\r\n\r\n").utf8(); + "Application-FileSize: "+ TQString::number(size()) +"\r\n\r\n").utf8(); } -void MSNFileTransferSocket::parseInvitation(const QString& msg) +void MSNFileTransferSocket::parseInvitation(const TQString& msg) { - QRegExp rx("Invitation-Command: ([A-Z]*)"); + TQRegExp rx("Invitation-Command: ([A-Z]*)"); rx.search(msg); - QString command=rx.cap(1); + TQString command=rx.cap(1); if( msg.contains("Invitation-Command: INVITE") ) { - rx=QRegExp("Application-File: ([^\\r\\n]*)"); + rx=TQRegExp("Application-File: ([^\\r\\n]*)"); rx.search(msg); - QString filename = rx.cap(1); - rx=QRegExp("Application-FileSize: ([0-9]*)"); + TQString filename = rx.cap(1); + rx=TQRegExp("Application-FileSize: ([0-9]*)"); rx.search(msg); unsigned long int filesize= rx.cap(1).toUInt(); MSNInvitation::parseInvitation(msg); //for the cookie - Kopete::TransferManager::transferManager()->askIncomingTransfer( m_contact , filename, filesize, QString::null, QString::number( cookie() ) ); + Kopete::TransferManager::transferManager()->askIncomingTransfer( m_contact , filename, filesize, TQString::null, TQString::number( cookie() ) ); - QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ),this, SLOT( slotFileTransferAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( refused( const Kopete::FileTransferInfo & ) ), this, SLOT( slotFileTransferRefused( const Kopete::FileTransferInfo & ) ) ); + TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ),this, TQT_SLOT( slotFileTransferAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused( const Kopete::FileTransferInfo & ) ), this, TQT_SLOT( slotFileTransferRefused( const Kopete::FileTransferInfo & ) ) ); } else if( msg.contains("Invitation-Command: ACCEPT") ) { if(incoming()) { - rx=QRegExp("IP-Address: ([0-9\\.]*)"); + rx=TQRegExp("IP-Address: ([0-9\\.]*)"); rx.search(msg); - QString ip_address = rx.cap(1); - rx=QRegExp("AuthCookie: ([0-9]*)"); + TQString ip_address = rx.cap(1); + rx=TQRegExp("AuthCookie: ([0-9]*)"); rx.search(msg); - QString authcook = rx.cap(1); - rx=QRegExp("Port: ([0-9]*)"); + TQString authcook = rx.cap(1); + rx=TQRegExp("Port: ([0-9]*)"); rx.search(msg); - QString port = rx.cap(1); + TQString port = rx.cap(1); setAuthCookie(authcook); connect(ip_address, port.toUInt()); @@ -377,7 +377,7 @@ void MSNFileTransferSocket::parseInvitation(const QString& msg) else { unsigned long int auth = (rand()%(999999))+1; - setAuthCookie(QString::number(auth)); + setAuthCookie(TQString::number(auth)); setKopeteTransfer(Kopete::TransferManager::transferManager()->addTransfer(m_contact, fileName(), size(), m_contact->metaContact() ? m_contact->metaContact()->displayName() : m_contact->contactId() , Kopete::FileTransferInfo::Outgoing)); @@ -387,15 +387,15 @@ void MSNFileTransferSocket::parseInvitation(const QString& msg) MSNNotifySocket *notify=static_cast<MSNAccount*>(manager->account())->notifySocket(); if(notify){ - QCString message=QString( + TQCString message=TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" "\r\n" "Invitation-Command: ACCEPT\r\n" - "Invitation-Cookie: " + QString::number(cookie()) + "\r\n" + "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n" "IP-Address: " + notify->localIP() + "\r\n" "Port: 6891\r\n" - "AuthCookie: "+QString::number(auth)+"\r\n" + "AuthCookie: "+TQString::number(auth)+"\r\n" "Launch-Application: FALSE\r\n" "Request-Data: IP-Address:\r\n\r\n").utf8(); @@ -416,7 +416,7 @@ void MSNFileTransferSocket::parseInvitation(const QString& msg) } } -void MSNFileTransferSocket::slotFileTransferAccepted(Kopete::Transfer *trans, const QString& fileName) +void MSNFileTransferSocket::slotFileTransferAccepted(Kopete::Transfer *trans, const TQString& fileName) { if(trans->info().internalId().toULong() != cookie()) return; @@ -432,17 +432,17 @@ void MSNFileTransferSocket::slotFileTransferAccepted(Kopete::Transfer *trans, co { setFile(fileName); - QCString message=QString( + TQCString message=TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" "\r\n" "Invitation-Command: ACCEPT\r\n" - "Invitation-Cookie: " + QString::number(cookie()) + "\r\n" + "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n" "Launch-Application: FALSE\r\n" "Request-Data: IP-Address:\r\n" ).utf8(); manager->service()->sendCommand( "MSG" , "N", true, message ); - QTimer::singleShot( 3 * 60000, this, SLOT(slotTimer()) ); //if after 3 minutes the transfer has not begin, delete this + TQTimer::singleShot( 3 * 60000, this, TQT_SLOT(slotTimer()) ); //if after 3 minutes the transfer has not begin, delete this } else { diff --git a/kopete/protocols/msn/msnfiletransfersocket.h b/kopete/protocols/msn/msnfiletransfersocket.h index 82ae0662..bf4a07a7 100644 --- a/kopete/protocols/msn/msnfiletransfersocket.h +++ b/kopete/protocols/msn/msnfiletransfersocket.h @@ -18,7 +18,7 @@ #ifndef MSNFILETRANSFERSOCKET_H #define MSNFILETRANSFERSOCKET_H -#include <qwidget.h> +#include <tqwidget.h> #include "msnsocket.h" #include "msninvitation.h" @@ -42,24 +42,24 @@ class MSNFileTransferSocket : public MSNSocket , public MSNInvitation Q_OBJECT public: - MSNFileTransferSocket(const QString &myID,Kopete::Contact* c, bool incoming, QObject* parent = 0L ); + MSNFileTransferSocket(const TQString &myID,Kopete::Contact* c, bool incoming, TQObject* parent = 0L ); ~MSNFileTransferSocket(); - static QString applicationID() { return "5D3E02AB-6190-11d3-BBBB-00C04F795683"; } - QString invitationHead(); + static TQString applicationID() { return "5D3E02AB-6190-11d3-BBBB-00C04F795683"; } + TQString invitationHead(); void setKopeteTransfer( Kopete::Transfer *kt ); Kopete::Transfer* kopeteTransfer() { return m_kopeteTransfer; } - void setFile( const QString &fn, long unsigned int fileSize = 0L ); - void setAuthCookie( const QString &c ) { m_authcook = c; } - QString fileName() { return m_fileName;} + void setFile( const TQString &fn, long unsigned int fileSize = 0L ); + void setAuthCookie( const TQString &c ) { m_authcook = c; } + TQString fileName() { return m_fileName;} long unsigned int size() { return m_size;} void listen( int port ); - virtual void parseInvitation(const QString& invitation); + virtual void parseInvitation(const TQString& invitation); - virtual QObject* object() { return this; } + virtual TQObject* object() { return this; } public slots: void abort(); @@ -78,35 +78,35 @@ protected: /** * Handle an MSN command response line. */ - virtual void parseCommand(const QString & cmd, uint id, const QString & data); - virtual void bytesReceived(const QByteArray & data); + virtual void parseCommand(const TQString & cmd, uint id, const TQString & data); + virtual void bytesReceived(const TQByteArray & data); protected slots: virtual void slotReadyWrite(); private slots: void slotSocketClosed(); - void slotReadBlock(const QByteArray &); + void slotReadBlock(const TQByteArray &); void slotAcceptConnection(); void slotTimer(); void slotSendFile(); void slotFileTransferRefused( const Kopete::FileTransferInfo &info ); - void slotFileTransferAccepted( Kopete::Transfer *trans, const QString& fileName ); + void slotFileTransferAccepted( Kopete::Transfer *trans, const TQString& fileName ); /* the Kopete::Transfer has been deleted */ void slotKopeteTransferDestroyed(); private: - QString m_handle; + TQString m_handle; Kopete::Contact *m_contact; long unsigned int m_size; long unsigned int m_downsize; - QString m_authcook; - QString m_fileName; + TQString m_authcook; + TQString m_fileName; Kopete::Transfer* m_kopeteTransfer; - QFile *m_file ; + TQFile *m_file ; KNetwork::KServerSocket *m_server; bool ready; diff --git a/kopete/protocols/msn/msninvitation.cpp b/kopete/protocols/msn/msninvitation.cpp index ddc8136a..8a64aa93 100644 --- a/kopete/protocols/msn/msninvitation.cpp +++ b/kopete/protocols/msn/msninvitation.cpp @@ -16,9 +16,9 @@ */ #include "msninvitation.h" #include <stdlib.h> -#include <qregexp.h> +#include <tqregexp.h> -MSNInvitation::MSNInvitation(bool incoming, const QString &applicationID , const QString &applicationName) +MSNInvitation::MSNInvitation(bool incoming, const TQString &applicationID , const TQString &applicationName) { m_incoming=incoming; m_applicationId=applicationID; @@ -32,57 +32,57 @@ MSNInvitation::~MSNInvitation() { } -QCString MSNInvitation::unimplemented(long unsigned int cookie) +TQCString MSNInvitation::unimplemented(long unsigned int cookie) { - return QString( "MIME-Version: 1.0\r\n" + return TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" "\r\n" "Invitation-Command: CANCEL\r\n" "Cancel-Code: REJECT_NOT_INSTALLED\r\n" - "Invitation-Cookie: " + QString::number(cookie) + "\r\n" + "Invitation-Cookie: " + TQString::number(cookie) + "\r\n" "Session-ID: {120019D9-C3F5-4F94-978D-CB33534C3309}\r\n\r\n").utf8(); //FIXME: i don't know at all what Seession-ID is } -QString MSNInvitation::invitationHead() +TQString MSNInvitation::invitationHead() { setState(Invited); - return QString( "MIME-Version: 1.0\r\n" + return TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" "\r\n" "Application-Name: " + m_applicationName + "\r\n" "Application-GUID: {" + m_applicationId + "}\r\n" "Invitation-Command: INVITE\r\n" - "Invitation-Cookie: " +QString::number(m_cookie) +"\r\n"); + "Invitation-Cookie: " +TQString::number(m_cookie) +"\r\n"); } -QCString MSNInvitation::rejectMessage(const QString & rejectcode) +TQCString MSNInvitation::rejectMessage(const TQString & rejectcode) { - return QString( "MIME-Version: 1.0\r\n" + return TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" "\r\n" "Invitation-Command: CANCEL\r\n" - "Invitation-Cookie: " + QString::number(cookie()) + "\r\n" + "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n" "Cancel-Code: "+ rejectcode +"\r\n").utf8(); } -void MSNInvitation::parseInvitation(const QString& msg) +void MSNInvitation::parseInvitation(const TQString& msg) { - QRegExp rx("Invitation-Command: ([A-Z]*)"); + TQRegExp rx("Invitation-Command: ([A-Z]*)"); rx.search(msg); - QString command=rx.cap(1); + TQString command=rx.cap(1); if(command=="INVITE") { - rx=QRegExp("Invitation-Cookie: ([0-9]*)"); + rx=TQRegExp("Invitation-Cookie: ([0-9]*)"); rx.search(msg); m_cookie=rx.cap(1).toUInt(); } else if(command=="CANCEL") { - /*rx=QRegExp("Cancel-Code: ([0-9]*)"); + /*rx=TQRegExp("Cancel-Code: ([0-9]*)"); rx.search(msg); - QString code=rx.cap(1).toUInt(); + TQString code=rx.cap(1).toUInt(); //TODO: parse the code*/ } // else if(command=="ACCEPT") diff --git a/kopete/protocols/msn/msninvitation.h b/kopete/protocols/msn/msninvitation.h index 90010dc3..d8b48116 100644 --- a/kopete/protocols/msn/msninvitation.h +++ b/kopete/protocols/msn/msninvitation.h @@ -17,7 +17,7 @@ #ifndef MSNINVITATION_H #define MSNINVITATION_H -#include <qstring.h> +#include <tqstring.h> #include "kopete_export.h" @@ -27,7 +27,7 @@ class QObject; * @author Olivier Goffart * * The invitation is the base class which handle an MSN invitation. - * The implemented class must to herits from QObject too. + * The implemented class must to herits from TQObject too. * You can accept the invitation by catching @ref MSNProtocol::invitation() signals * or create one and insert it to a kmm with @ref MSNChatSession::initInvitation() * you can add action with @ref Kopete::Plugin::customChatActions() @@ -41,14 +41,14 @@ public: * @param applicationID is the exadecimal id of the invitation * @param applicationName is a i18n'ed string of the name of the application */ - MSNInvitation(bool incoming,const QString &applicationID , const QString &applicationName); + MSNInvitation(bool incoming,const TQString &applicationID , const TQString &applicationName); virtual ~MSNInvitation(); /** * @internal * it is a reject invitation because the invitation is not implemented */ - static QCString unimplemented(long unsigned int cookie); + static TQCString unimplemented(long unsigned int cookie); /** * you can set manualy the cookie. note that a cookie is automatically generated when a new @@ -71,24 +71,24 @@ public: * the default implementation return the common begin. * You can also set the state to Invited (the default implementation do that) */ - virtual QString invitationHead(); + virtual TQString invitationHead(); /** * This is the reject invitation string * @param rejectcode is the code, it can be "REJECT" or "TIMEOUT" */ - QCString rejectMessage(const QString & rejectcode = "REJECT"); + TQCString rejectMessage(const TQString & rejectcode = "REJECT"); /** * reimplement this method. it is called when an invitation message with the invitation's cookie is received * the default implementation parse the cookie, or the reject message */ - virtual void parseInvitation(const QString& invitation); + virtual void parseInvitation(const TQString& invitation); /** * return the qobject (this) */ - virtual QObject* object()=0; + virtual TQObject* object()=0; //signals: /** * reimplement this as a signal, and emit it when the invitation has to be destroyed. @@ -116,8 +116,8 @@ public: protected: bool m_incoming; long unsigned int m_cookie; - QString m_applicationId; - QString m_applicationName; + TQString m_applicationId; + TQString m_applicationName; State m_state; diff --git a/kopete/protocols/msn/msnnotifysocket.cpp b/kopete/protocols/msn/msnnotifysocket.cpp index e31e0257..3b3fc531 100644 --- a/kopete/protocols/msn/msnnotifysocket.cpp +++ b/kopete/protocols/msn/msnnotifysocket.cpp @@ -28,9 +28,9 @@ #include "msnsecureloginhandler.h" #include "msnchallengehandler.h" -#include <qdatetime.h> -#include <qregexp.h> -#include <qdom.h> +#include <tqdatetime.h> +#include <tqregexp.h> +#include <tqdom.h> #include <kdebug.h> #include <kdeversion.h> @@ -41,7 +41,7 @@ #include <ktempfile.h> #include <krun.h> #include <kio/job.h> -#include <qfile.h> +#include <tqfile.h> #include <kconfig.h> #include <knotification.h> @@ -51,7 +51,7 @@ #include <ctime> -MSNNotifySocket::MSNNotifySocket( MSNAccount *account, const QString& /*msnId*/, const QString &password ) +MSNNotifySocket::MSNNotifySocket( MSNAccount *account, const TQString& /*msnId*/, const TQString &password ) : MSNSocket( account ) { m_newstatus = MSNProtocol::protocol()->NLN; @@ -64,8 +64,8 @@ MSNNotifySocket::MSNNotifySocket( MSNAccount *account, const QString& /*msnId*/, m_account = account; m_password=password; - QObject::connect( this, SIGNAL( blockRead( const QByteArray & ) ), - this, SLOT( slotReadMessage( const QByteArray & ) ) ); + TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ), + this, TQT_SLOT( slotReadMessage( const TQByteArray & ) ) ); m_keepaliveTimer = 0L; m_isLogged = false; } @@ -91,7 +91,7 @@ void MSNNotifySocket::disconnect() if( m_disconnectReason==Kopete::Account::Unknown ) m_disconnectReason=Kopete::Account::Manual; if( onlineStatus() == Connected ) - sendCommand( "OUT", QString::null, false ); + sendCommand( "OUT", TQString::null, false ); if( m_keepaliveTimer ) m_keepaliveTimer->stop(); @@ -107,11 +107,11 @@ void MSNNotifySocket::handleError( uint code, uint id ) { kdDebug(14140) << k_funcinfo << endl; - QString handle; + TQString handle; if(m_tmpHandles.contains(id)) handle=m_tmpHandles[id]; - QString msg; + TQString msg; MSNSocket::ErrorType type; // See http://www.hypothetic.org/docs/msn/basics.php for a // description of all possible error codes. @@ -148,7 +148,7 @@ void MSNNotifySocket::handleError( uint code, uint id ) } /*else { - QString msg = i18n( "You are trying to change the display name of a user who has not " + TQString msg = i18n( "You are trying to change the display name of a user who has not " "confirmed his or her email address;\n" "the contact was not renamed on the server." ); KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Error, msg, i18n( "MSN Plugin" ) ); @@ -218,7 +218,7 @@ void MSNNotifySocket::handleError( uint code, uint id ) { /* //if(handlev==m_account->accountId()) - QString msg = i18n( "Your email address has not been verified with the MSN server.\n" + TQString msg = i18n( "Your email address has not been verified with the MSN server.\n" "You should have received a mail with a link to confirm your email address.\n" "Some functions will be restricted if you do not confirm your email address." ); KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, msg, i18n( "MSN Plugin" ) );//TODO don't show again @@ -230,7 +230,7 @@ void MSNNotifySocket::handleError( uint code, uint id ) //This happen when too much commends are sent to the server. //the command will not be executed, too bad. // ignore it for now, as we don't really know what command it was. - /* QString msg = i18#n( "You are trying to change your status, or your display name too rapidly.\n" + /* TQString msg = i18#n( "You are trying to change your status, or your display name too rapidly.\n" "This might happen if you added yourself to your own contact list." ); KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, msg, i18n( "MSN Plugin" ) ); //FIXME: try to fix this problem*/ @@ -262,7 +262,7 @@ void MSNNotifySocket::handleError( uint code, uint id ) emit errorMessage( type, msg ); } -void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &data ) +void MSNNotifySocket::parseCommand( const TQString &cmd, uint id, const TQString &data ) { //kdDebug(14140) << "MSNNotifySocket::parseCommand: Command: " << cmd << endl; @@ -288,9 +288,9 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & { m_secureLoginHandler = new MSNSecureLoginHandler(m_account->accountId(), m_password, data.section( ' ' , 2 , 2 )); - QObject::connect(m_secureLoginHandler, SIGNAL(loginFailed()), this, SLOT(sslLoginFailed())); - QObject::connect(m_secureLoginHandler, SIGNAL(loginBadPassword()), this, SLOT(sslLoginIncorrect())); - QObject::connect(m_secureLoginHandler, SIGNAL(loginSuccesful(QString )), this, SLOT(sslLoginSucceeded(QString ))); + TQObject::connect(m_secureLoginHandler, TQT_SIGNAL(loginFailed()), this, TQT_SLOT(sslLoginFailed())); + TQObject::connect(m_secureLoginHandler, TQT_SIGNAL(loginBadPassword()), this, TQT_SLOT(sslLoginIncorrect())); + TQObject::connect(m_secureLoginHandler, TQT_SIGNAL(loginSuccesful(TQString )), this, TQT_SLOT(sslLoginSucceeded(TQString ))); m_secureLoginHandler->login(); } @@ -300,7 +300,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & m_disconnectReason=Kopete::Account::Unknown; // Synchronize with the server. - QString lastSyncTime, lastChange; + TQString lastSyncTime, lastChange; if(m_account->contacts().count() > 1) { @@ -331,10 +331,10 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & // LST N=passport@hotmail.com F=Display%20Name C=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 13 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // But can be // LST N=passport@hotmail.com 10 - QString publicName, contactGuid, groups; + TQString publicName, contactGuid, groups; uint lists; - QRegExp regex("N=([^ ]+)(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))? (\\d+)\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$"); + TQRegExp regex("N=([^ ]+)(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))? (\\d+)\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$"); regex.search(data); // Capture passport email. @@ -368,12 +368,12 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & MSNContact *c = static_cast<MSNContact*>( m_account->contacts()[ data.section( ' ', 1, 1 ) ] ); if( c && c->contactId() != m_account->accountId() ) { - QString publicName=unescape( data.section( ' ', 2, 2 ) ); + TQString publicName=unescape( data.section( ' ', 2, 2 ) ); if ( (publicName!=c->contactId() || c->hasProperty(Kopete::Global::Properties::self()->nickName().key()) ) && publicName!=c->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) changePublicName(publicName,c->contactId()); - QString obj=unescape(data.section( ' ', 4, 4 )); + TQString obj=unescape(data.section( ' ', 4, 4 )); c->setObject( obj ); c->setOnlineStatus( convertOnlineStatus( data.section( ' ', 0, 0 ) ) ); c->setClientFlags(data.section( ' ', 3, 3 ).toUInt()); @@ -391,7 +391,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & { // UUX is sended to acknowledge that the server has received and processed the personal Message. // if the result is 0, set the myself() contact personalMessage. - if( data.section(' ', 0, 0) == QString::fromUtf8("0") ) + if( data.section(' ', 0, 0) == TQString::fromUtf8("0") ) m_account->myself()->setProperty(MSNProtocol::protocol()->propPersonalMessage, m_propertyPersonalMessage); } else if( cmd == "FLN" ) @@ -405,7 +405,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & } else if( cmd == "XFR" ) { - QString stype=data.section( ' ', 0, 0 ); + TQString stype=data.section( ' ', 0, 0 ); if( stype=="SB" ) //switchboard connection (chat) { // Address, AuthInfo @@ -413,8 +413,8 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & } else if( stype=="NS" ) //notifysocket ; Got our notification server { //we are connecting and we receive the initial NS, or the msn server encounter a problem, and we are switching to another switchboard - QString host = data.section( ' ', 1, 1 ); - QString server = host.section( ':', 0, 0 ); + TQString host = data.section( ' ', 1, 1 ); + TQString server = host.section( ':', 0, 0 ); uint port = host.section( ':', 1, 1 ).toUInt(); setOnlineStatus( Connected ); emit receivedNotificationServer( server, port ); @@ -425,12 +425,12 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & else if( cmd == "RNG" ) { // SessionID, Address, AuthInfo, handle, publicName - emit invitedToChat( QString::number( id ), data.section( ' ', 0, 0 ), data.section( ' ', 2, 2 ), + emit invitedToChat( TQString::number( id ), data.section( ' ', 0, 0 ), data.section( ' ', 2, 2 ), data.section( ' ', 3, 3 ), unescape( data.section( ' ', 4, 4 ) ) ); } else if( cmd == "ADC" ) { - QString msnId, list, publicName, contactGuid, groupGuid; + TQString msnId, list, publicName, contactGuid, groupGuid; // Retrieve the list parameter (FL/AL/BL/RL) list = data.section( ' ', 0, 0 ); @@ -441,7 +441,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & // ADC TrID RL N=example@passport.com F=friednly%20name // ADC TrID FL N=ex@pas.com F=My%20Name C=contactGuid // Thanks Gregg for that complex RegExp. - QRegExp regex("(?:N=([^ ]+))?(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))?\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$"); + TQRegExp regex("(?:N=([^ ]+))?(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))?\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$"); regex.search( data.section( ' ', 1 ) ); // Capture passport email. @@ -460,7 +460,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & } else if( cmd == "REM" ) // someone is removed from a list { - QString handle, list, contactGuid, groupGuid; + TQString handle, list, contactGuid, groupGuid; list = data.section( ' ', 0, 0 ); if( list == "FL" ) { @@ -495,13 +495,13 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & } else if( cmd == "CHG" ) { - QString status = data.section( ' ', 0, 0 ); + TQString status = data.section( ' ', 0, 0 ); setOnlineStatus( Connected ); emit statusChanged( convertOnlineStatus( status ) ); } else if( cmd == "SBP" ) { - QString contactGuid, type, publicName; + TQString contactGuid, type, publicName; contactGuid = data.section( ' ', 0, 0 ); type = data.section( ' ', 1, 1 ); if(type == "MFN" ) @@ -540,7 +540,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & { m_challengeHandler = new MSNChallengeHandler("CFHUR$52U_{VIX5T", "PROD0101{0RM?UBW"); // Compute the challenge response hash, and send the response. - QString chlResponse = m_challengeHandler->computeHash(data.section(' ', 0, 0)); + TQString chlResponse = m_challengeHandler->computeHash(data.section(' ', 0, 0)); sendCommand("QRY", m_challengeHandler->productId(), true, chlResponse.utf8()); // Dispose of the challenge handler. m_challengeHandler->deleteLater(); @@ -549,8 +549,8 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & else if( cmd == "SYN" ) { // Retrieve the last synchronization timestamp known to the server. - QString lastSyncTime = data.section( ' ', 1, 1 ); - QString lastChange = data.section( ' ', 0, 0 ); + TQString lastSyncTime = data.section( ' ', 1, 1 ); + TQString lastChange = data.section( ' ', 0, 0 ); if( lastSyncTime != m_account->configGroup()->readEntry("lastsynctime") || lastChange != m_account->configGroup()->readEntry("lastchange") ) { @@ -576,8 +576,8 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & MSNContact *c = static_cast<MSNContact*>( m_account->myself() ); if( c ) { - QString type = data.section( ' ', 0, 0 ); - QString prpData = unescape( data.section( ' ', 1, 1 ) ); //SECURITY???????? + TQString type = data.section( ' ', 0, 0 ); + TQString prpData = unescape( data.section( ' ', 1, 1 ) ); //SECURITY???????? c->setInfo( type, prpData ); m_account->configGroup()->writeEntry( type, prpData ); } @@ -610,21 +610,21 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & { // URL 6 /cgi-bin/HoTMaiL https://loginnet.passport.com/ppsecure/md5auth.srf?lc=1033 2 //example of reply: URL 10 /cgi-bin/HoTMaiL https://msnialogin.passport.com/ppsecure/md5auth.srf?lc=1036 3 - QString from_action_url = data.section( ' ', 1, 1 ); - QString rru = data.section( ' ', 0, 0 ); - QString id = data.section( ' ', 2, 2 ); + TQString from_action_url = data.section( ' ', 1, 1 ); + TQString rru = data.section( ' ', 0, 0 ); + TQString id = data.section( ' ', 2, 2 ); //write the tmp file - QString UserID=m_account->accountId(); + TQString UserID=m_account->accountId(); time_t actualTime; time(&actualTime); - QString sl = QString::number( ( unsigned long ) actualTime - m_loginTime.toULong() ); + TQString sl = TQString::number( ( unsigned long ) actualTime - m_loginTime.toULong() ); - QString md5this( m_MSPAuth + sl + m_password ); + TQString md5this( m_MSPAuth + sl + m_password ); KMD5 md5( md5this.utf8() ); - QString hotmailRequest = "<html>\n" + TQString hotmailRequest = "<html>\n" "<head>\n" "<noscript>\n" "<meta http-equiv=Refresh content=\"0; url=http://www.hotmail.com\">\n" @@ -641,7 +641,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString & "<input type=\"hidden\" name=\"sl\" value=\"" + sl +"\">\n" "<input type=\"hidden\" name=\"rru\" value=\"" + rru + "\">\n" "<input type=\"hidden\" name=\"auth\" value=\"" + m_MSPAuth + "\">\n" - "<input type=\"hidden\" name=\"creds\" value=\"" + QString::fromLatin1( md5.hexDigest() ) + "\">\n" + "<input type=\"hidden\" name=\"creds\" value=\"" + TQString::fromLatin1( md5.hexDigest() ) + "\">\n" "<input type=\"hidden\" name=\"svc\" value=\"mail\">\n" "<input type=\"hidden\" name=\"js\" value=\"yes\">\n" "</form></body>\n</html>\n"; @@ -679,7 +679,7 @@ void MSNNotifySocket::sslLoginIncorrect() disconnect(); } -void MSNNotifySocket::sslLoginSucceeded(QString ticket) +void MSNNotifySocket::sslLoginSucceeded(TQString ticket) { sendCommand("USR" , "TWN S " + ticket); @@ -706,9 +706,9 @@ void MSNNotifySocket::slotOpenInbox() sendCommand("URL", "INBOX" ); } -void MSNNotifySocket::sendMail(const QString &email) +void MSNNotifySocket::sendMail(const TQString &email) { - sendCommand("URL", QString("COMPOSE " + email).utf8() ); + sendCommand("URL", TQString("COMPOSE " + email).utf8() ); } bool MSNNotifySocket::setUseHttpMethod(bool useHttp) @@ -723,17 +723,17 @@ bool MSNNotifySocket::setUseHttpMethod(bool useHttp) } else { if( !m_keepaliveTimer ) { - m_keepaliveTimer = new QTimer( this, "m_keepaliveTimer" ); - QObject::connect( m_keepaliveTimer, SIGNAL( timeout() ), SLOT( slotSendKeepAlive() ) ); + m_keepaliveTimer = new TQTimer( this, "m_keepaliveTimer" ); + TQObject::connect( m_keepaliveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotSendKeepAlive() ) ); } } return ret; } -void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) +void MSNNotifySocket::slotReadMessage( const TQByteArray &bytes ) { - QString msg = QString::fromUtf8(bytes, bytes.size()); + TQString msg = TQString::fromUtf8(bytes, bytes.size()); if(msg.contains("text/x-msmsgsinitialmdatanotification")) { @@ -744,7 +744,7 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) // IU - initial unread // O - other mail // OU - other unread. - QRegExp regex("<MD><E><I>(\\d+)?</I>(?:<IU>(\\d+)?</IU>)<O>(\\d+)?</O><OU>(\\d+)?</OU></E><Q>.*</Q></MD>"); + TQRegExp regex("<MD><E><I>(\\d+)?</I>(?:<IU>(\\d+)?</IU>)<O>(\\d+)?</O><OU>(\\d+)?</OU></E><Q>.*</Q></MD>"); regex.search(msg); bool unread; @@ -753,56 +753,56 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) if(unread && mailCount > 0) { // If there are new email message available, raise the unread email event. - QObject::connect(KNotification::event( "msn_mail", i18n( "You have one unread message in your MSN inbox.", + TQObject::connect(KNotification::event( "msn_mail", i18n( "You have one unread message in your MSN inbox.", "You have %n unread messages in your MSN inbox.", mailCount ), 0 , 0 , i18n( "Open Inbox..." ) ), - SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) ); + TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) ); } } else if(msg.contains("text/x-msmsgsactivemailnotification")) { //this sends the server if mails are deleted - QString m = msg.right(msg.length() - msg.find("Message-Delta:") ); + TQString m = msg.right(msg.length() - msg.find("Message-Delta:") ); m = m.left(msg.find("\r\n")); mailCount = mailCount - m.right(m.length() -m.find(" ")-1).toUInt(); } else if(msg.contains("text/x-msmsgsemailnotification")) { //this sends the server if a new mail has arrived - QRegExp rx("From-Addr: ([A-Za-z0-9@._\\-]*)"); + TQRegExp rx("From-Addr: ([A-Za-z0-9@._\\-]*)"); rx.search(msg); - QString m=rx.cap(1); + TQString m=rx.cap(1); mailCount++; //TODO: it is also possible to get the subject (but warning about the encoding) - QObject::connect(KNotification::event( "msn_mail",i18n( "You have one new email from %1 in your MSN inbox." ).arg(m), + TQObject::connect(KNotification::event( "msn_mail",i18n( "You have one new email from %1 in your MSN inbox." ).arg(m), 0 , 0 , i18n( "Open Inbox..." ) ), - SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) ); + TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) ); } else if(msg.contains("text/x-msmsgsprofile")) { //Hotmail profile if(msg.contains("MSPAuth:")) { - QRegExp rx("MSPAuth: ([A-Za-z0-9$!*]*)"); + TQRegExp rx("MSPAuth: ([A-Za-z0-9$!*]*)"); rx.search(msg); m_MSPAuth=rx.cap(1); } if(msg.contains("sid:")) { - QRegExp rx("sid: ([0-9]*)"); + TQRegExp rx("sid: ([0-9]*)"); rx.search(msg); m_sid=rx.cap(1); } if(msg.contains("kv:")) { - QRegExp rx("kv: ([0-9]*)"); + TQRegExp rx("kv: ([0-9]*)"); rx.search(msg); m_kv=rx.cap(1); } if(msg.contains("LoginTime:")) { - QRegExp rx("LoginTime: ([0-9]*)"); + TQRegExp rx("LoginTime: ([0-9]*)"); rx.search(msg); m_loginTime=rx.cap(1); } @@ -810,18 +810,18 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) { time_t actualTime; time(&actualTime); - m_loginTime=QString::number((unsigned long)actualTime); + m_loginTime=TQString::number((unsigned long)actualTime); } if(msg.contains("EmailEnabled:")) { - QRegExp rx("EmailEnabled: ([0-9]*)"); + TQRegExp rx("EmailEnabled: ([0-9]*)"); rx.search(msg); m_isHotmailAccount = (rx.cap(1).toUInt() == 1); emit hotmailSeted(m_isHotmailAccount); } if(msg.contains("ClientIP:")) { - QRegExp rx("ClientIP: ([0-9.]*)"); + TQRegExp rx("ClientIP: ([0-9.]*)"); rx.search(msg); m_localIP = rx.cap(1); } @@ -846,29 +846,29 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) // </NOTIFICATION> // MSN sends out badly formed XML .. fix it for them (thanks MS!) - QString notificationDOMAsString(msg); + TQString notificationDOMAsString(msg); - QRegExp rx( "&(?!amp;)" ); // match ampersands but not & + TQRegExp rx( "&(?!amp;)" ); // match ampersands but not & notificationDOMAsString.replace(rx, "&"); - QDomDocument alertDOM; + TQDomDocument alertDOM; alertDOM.setContent(notificationDOMAsString); - QDomNodeList msgElements = alertDOM.elementsByTagName("MSG"); + TQDomNodeList msgElements = alertDOM.elementsByTagName("MSG"); for (uint i = 0 ; i < msgElements.count() ; i++) { - QString subscString; - QString actionString; - QString textString; + TQString subscString; + TQString actionString; + TQString textString; - QDomNode msgDOM = msgElements.item(i); + TQDomNode msgDOM = msgElements.item(i); - QDomNodeList msgChildren = msgDOM.childNodes(); + TQDomNodeList msgChildren = msgDOM.childNodes(); for (uint i = 0 ; i < msgChildren.length() ; i++) { - QDomNode child = msgChildren.item(i); - QDomElement element = child.toElement(); + TQDomNode child = msgChildren.item(i); + TQDomElement element = child.toElement(); if (element.tagName() == "SUBSCR") { - QDomAttr subscElementURLAttribute; + TQDomAttr subscElementURLAttribute; if (element.hasAttribute("url")) { subscElementURLAttribute = element.attributeNode("url"); @@ -878,7 +878,7 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) else if (element.tagName() == "ACTION") { // process ACTION node to pull out URL the alert is tied to - QDomAttr actionElementURLAttribute; + TQDomAttr actionElementURLAttribute; if (element.hasAttribute("url")) { actionElementURLAttribute = element.attributeNode("url"); @@ -888,10 +888,10 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) else if (element.tagName() == "BODY") { // process BODY node to get the text of the alert - QDomNodeList textElements = element.elementsByTagName("TEXT"); + TQDomNodeList textElements = element.elementsByTagName("TEXT"); if (textElements.count() >= 1) { - QDomElement textElement = textElements.item(0).toElement(); + TQDomElement textElement = textElements.item(0).toElement(); textString = textElement.text(); } } @@ -901,7 +901,7 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) // kdDebug( 14140 ) << "subscString " << subscString << " actionString " << actionString << " textString " << textString << endl; // build an internal list of actions ... we'll need to index into this list when we receive an event - QStringList actions; + TQStringList actions; actions.append(i18n("More Information")); m_msnAlertURLs.append(actionString); @@ -909,11 +909,11 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) m_msnAlertURLs.append(subscString); // Don't do any MSN alerts notification for new blog updates - if( subscString != QString::fromLatin1("s.htm") && actionString != QString::fromLatin1("a.htm") ) + if( subscString != TQString::fromLatin1("s.htm") && actionString != TQString::fromLatin1("a.htm") ) { KNotification* notification = KNotification::event("msn_alert", textString, 0L, 0L, actions); - QObject::connect(notification, SIGNAL(activated(unsigned int)), this, SLOT(slotMSNAlertLink(unsigned int))); - QObject::connect(notification, SIGNAL(closed()), this, SLOT(slotMSNAlertUnwanted())); + TQObject::connect(notification, TQT_SIGNAL(activated(unsigned int)), this, TQT_SLOT(slotMSNAlertLink(unsigned int))); + TQObject::connect(notification, TQT_SIGNAL(closed()), this, TQT_SLOT(slotMSNAlertUnwanted())); } } // end for each MSG tag } @@ -925,21 +925,21 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) if(!m_tmpLastHandle.isNull()) { - QString personalMessage, currentMedia; - QDomDocument psm; + TQString personalMessage, currentMedia; + TQDomDocument psm; if( psm.setContent(msg) ) { // Get the first child of the xml "document"; - QDomElement psmElement = psm.documentElement().firstChild().toElement(); + TQDomElement psmElement = psm.documentElement().firstChild().toElement(); while( !psmElement.isNull() ) { - if(psmElement.tagName() == QString::fromUtf8("PSM")) + if(psmElement.tagName() == TQString::fromUtf8("PSM")) { personalMessage = psmElement.text(); kdDebug(14140) << k_funcinfo << "Personnal Message received: " << personalMessage << endl; } - else if(psmElement.tagName() == QString::fromUtf8("CurrentMedia")) + else if(psmElement.tagName() == TQString::fromUtf8("CurrentMedia")) { if( !psmElement.text().isEmpty() ) { @@ -956,11 +956,11 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes ) contact->setProperty(MSNProtocol::protocol()->propPersonalMessage, currentMedia.isEmpty() ? personalMessage : currentMedia); } } - m_tmpLastHandle = QString::null; + m_tmpLastHandle = TQString::null; } } -QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement ) +TQString MSNNotifySocket::processCurrentMedia( const TQString &mediaXmlElement ) { /* The value of the CurrentMedia tag you can think of like an array @@ -985,10 +985,10 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement ) From http://msnpiki.msnfanatic.com/index.php/MSNP11:Changes */ - QString application, type, format, currentMedia; + TQString application, type, format, currentMedia; bool enabled=false, test; // \0 is textual, it's the "array" separator. - QStringList argumentLists = QStringList::split(QString::fromUtf8("\\0"), mediaXmlElement, true); + TQStringList argumentLists = TQStringList::split(TQString::fromUtf8("\\0"), mediaXmlElement, true); // Retrive the "stable" array elements. application = argumentLists[0]; @@ -997,8 +997,8 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement ) format = argumentLists[3]; // Get the formatter strings - QStringList formatterStrings; - QStringList::ConstIterator it; + TQStringList formatterStrings; + TQStringList::ConstIterator it; for( it = argumentLists.at(4); it != argumentLists.end(); ++it ) { formatterStrings.append( *it ); @@ -1008,10 +1008,10 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement ) currentMedia = format; for(uint i=0; i<formatterStrings.size(); i++) { - currentMedia = currentMedia.replace(QString("{%1}").arg(i), formatterStrings[i]); + currentMedia = currentMedia.replace(TQString("{%1}").arg(i), formatterStrings[i]); } - if( type == QString::fromUtf8("Music") ) + if( type == TQString::fromUtf8("Music") ) { // the "♫" is encoded in utf8 (and should be in utf8) currentMedia = i18n("Now Listening: ♫ %1 ♫").arg(currentMedia); @@ -1022,26 +1022,26 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement ) return currentMedia; } -void MSNNotifySocket::addGroup(const QString& groupName) +void MSNNotifySocket::addGroup(const TQString& groupName) { // escape spaces sendCommand( "ADG", escape( groupName ) ); } -void MSNNotifySocket::renameGroup( const QString& groupName, const QString& groupGuid ) +void MSNNotifySocket::renameGroup( const TQString& groupName, const TQString& groupGuid ) { // escape spaces sendCommand( "REG", groupGuid + " " + escape( groupName ) ); } -void MSNNotifySocket::removeGroup( const QString& groupGuid ) +void MSNNotifySocket::removeGroup( const TQString& groupGuid ) { sendCommand( "RMG", groupGuid ); } -void MSNNotifySocket::addContact( const QString &handle, int list, const QString& publicName, const QString& contactGuid, const QString& groupGuid ) +void MSNNotifySocket::addContact( const TQString &handle, int list, const TQString& publicName, const TQString& contactGuid, const TQString& groupGuid ) { - QString args; + TQString args; switch( list ) { case MSNProtocol::FL: @@ -1049,25 +1049,25 @@ void MSNNotifySocket::addContact( const QString &handle, int list, const QString // Adding the contact to a group if( !contactGuid.isEmpty() ) { - args = QString("FL C=%1 %2").arg( contactGuid ).arg( groupGuid ); + args = TQString("FL C=%1 %2").arg( contactGuid ).arg( groupGuid ); kdDebug(14140) << k_funcinfo << "In adding contact to a group" << endl; } // Adding a new contact else { - args = QString("FL N=%1 F=%2").arg( handle ).arg( escape( publicName ) ); + args = TQString("FL N=%1 F=%2").arg( handle ).arg( escape( publicName ) ); kdDebug(14140) << k_funcinfo << "In adding contact to a new contact" << endl; } break; } case MSNProtocol::AL: - args = QString("AL N=%1").arg( handle ); + args = TQString("AL N=%1").arg( handle ); break; case MSNProtocol::BL: - args = QString("BL N=%1").arg( handle ); + args = TQString("BL N=%1").arg( handle ); break; case MSNProtocol::RL: - args = QString("RL N=%1").arg( handle ); + args = TQString("RL N=%1").arg( handle ); break; default: kdDebug(14140) << k_funcinfo <<"WARNING! Unknown list " << list << "!" << endl; @@ -1077,9 +1077,9 @@ void MSNNotifySocket::addContact( const QString &handle, int list, const QString m_tmpHandles[id]=handle; } -void MSNNotifySocket::removeContact( const QString &handle, int list, const QString& contactGuid, const QString& groupGuid ) +void MSNNotifySocket::removeContact( const TQString &handle, int list, const TQString& contactGuid, const TQString& groupGuid ) { - QString args; + TQString args; switch( list ) { case MSNProtocol::FL: @@ -1115,9 +1115,9 @@ void MSNNotifySocket::setStatus( const Kopete::OnlineStatus &status ) sendCommand( "CHG", statusToString( status ) + " " + m_account->myselfClientId() + " " + escape(m_account->pictureObject()) ); } -void MSNNotifySocket::changePublicName( const QString &publicName, const QString &handle ) +void MSNNotifySocket::changePublicName( const TQString &publicName, const TQString &handle ) { - QString tempPublicName = publicName; + TQString tempPublicName = publicName; //The maximum length is 387. but with utf8 or encodage, each character may be triple // 387/3 = 129 so we make sure the lenght is not logner than 129 char, even if @@ -1144,10 +1144,10 @@ void MSNNotifySocket::changePublicName( const QString &publicName, const QString } } -void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType type, const QString &personalMessage ) +void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType type, const TQString &personalMessage ) { - QString tempPersonalMessage; - QString xmlCurrentMedia; + TQString tempPersonalMessage; + TQString xmlCurrentMedia; // Only espace and cut the personalMessage is the type is normal. if(type == MSNProtocol::PersonalMessageNormal) @@ -1161,14 +1161,14 @@ void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType ty } } - QDomDocument xmlMessage; + TQDomDocument xmlMessage; xmlMessage.appendChild( xmlMessage.createElement( "Data" ) ); - QDomElement psm = xmlMessage.createElement("PSM"); + TQDomElement psm = xmlMessage.createElement("PSM"); psm.appendChild( xmlMessage.createTextNode( tempPersonalMessage ) ); xmlMessage.documentElement().appendChild( psm ); - QDomElement currentMedia = xmlMessage.createElement("CurrentMedia"); + TQDomElement currentMedia = xmlMessage.createElement("CurrentMedia"); /* Example of currentMedia xml tag: <CurrentMedia>\0Music\01\0{0} - {1}\0 Song Title\0Song Artist\0Song Album\0\0</CurrentMedia> @@ -1180,22 +1180,22 @@ void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType ty case MSNProtocol::PersonalMessageMusic: { xmlCurrentMedia = "\\0Music\\01\\0"; - QStringList mediaList = QStringList::split(";", personalMessage); - QString formatterArguments; + TQStringList mediaList = TQStringList::split(";", personalMessage); + TQString formatterArguments; if( !mediaList[0].isEmpty() ) // Current Track { xmlCurrentMedia += "{0}"; - formatterArguments += QString("%1\\0").arg(mediaList[0]); + formatterArguments += TQString("%1\\0").arg(mediaList[0]); } if( !mediaList[1].isEmpty() ) // Current Artist { xmlCurrentMedia += " - {1}"; - formatterArguments += QString("%1\\0").arg(mediaList[1]); + formatterArguments += TQString("%1\\0").arg(mediaList[1]); } if( !mediaList[2].isEmpty() ) // Current Album { xmlCurrentMedia += " ({2})"; - formatterArguments += QString("%1\\0").arg(mediaList[2]); + formatterArguments += TQString("%1\\0").arg(mediaList[2]); } xmlCurrentMedia += "\\0" + formatterArguments + "\\0"; break; @@ -1216,7 +1216,7 @@ void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType ty } -void MSNNotifySocket::changePhoneNumber( const QString &key, const QString &data ) +void MSNNotifySocket::changePhoneNumber( const TQString &key, const TQString &data ) { sendCommand( "PRP", key + " " + escape ( data ) ); } @@ -1227,7 +1227,7 @@ void MSNNotifySocket::createChatSession() sendCommand( "XFR", "SB" ); } -QString MSNNotifySocket::statusToString( const Kopete::OnlineStatus &status ) const +TQString MSNNotifySocket::statusToString( const Kopete::OnlineStatus &status ) const { if( status == MSNProtocol::protocol()->NLN ) return "NLN"; @@ -1269,7 +1269,7 @@ void MSNNotifySocket::slotSendKeepAlive() { // Send a dummy command to fake activity. This makes sure MSN doesn't // disconnect you when the notify socket is idle. - sendCommand( "PNG" , QString::null , false ); + sendCommand( "PNG" , TQString::null , false ); m_ping=true; } @@ -1278,7 +1278,7 @@ void MSNNotifySocket::slotSendKeepAlive() m_tmpHandles.clear(); } -Kopete::OnlineStatus MSNNotifySocket::convertOnlineStatus( const QString &status ) +Kopete::OnlineStatus MSNNotifySocket::convertOnlineStatus( const TQString &status ) { if( status == "NLN" ) return MSNProtocol::protocol()->NLN; diff --git a/kopete/protocols/msn/msnnotifysocket.h b/kopete/protocols/msn/msnnotifysocket.h index 7f915410..e8c22158 100644 --- a/kopete/protocols/msn/msnnotifysocket.h +++ b/kopete/protocols/msn/msnnotifysocket.h @@ -44,34 +44,34 @@ class MSNNotifySocket : public MSNSocket Q_OBJECT public: - MSNNotifySocket( MSNAccount* account, const QString &msnId, const QString &password ); + MSNNotifySocket( MSNAccount* account, const TQString &msnId, const TQString &password ); ~MSNNotifySocket(); virtual void disconnect(); void setStatus( const Kopete::OnlineStatus &status ); - void addContact( const QString &handle, int list, const QString& publicName, const QString& contactGuid, const QString& groupGuid ); - void removeContact( const QString &handle, int list, const QString &contactGuid, const QString &groupGuid ); + void addContact( const TQString &handle, int list, const TQString& publicName, const TQString& contactGuid, const TQString& groupGuid ); + void removeContact( const TQString &handle, int list, const TQString &contactGuid, const TQString &groupGuid ); - void addGroup( const QString& groupName ); - void removeGroup( const QString& group ); - void renameGroup( const QString& groupName, const QString& groupGuid ); + void addGroup( const TQString& groupName ); + void removeGroup( const TQString& group ); + void renameGroup( const TQString& groupName, const TQString& groupGuid ); - void changePublicName( const QString& publicName , const QString &handle=QString::null ); - void changePersonalMessage( MSNProtocol::PersonalMessageType type , const QString& personalMessage ); + void changePublicName( const TQString& publicName , const TQString &handle=TQString::null ); + void changePersonalMessage( MSNProtocol::PersonalMessageType type , const TQString& personalMessage ); - void changePhoneNumber( const QString &key, const QString &data ); + void changePhoneNumber( const TQString &key, const TQString &data ); void createChatSession(); - void sendMail(const QString &email); + void sendMail(const TQString &email); /** * this should return a Kopete::Account::DisconnectReason value */ int disconnectReason() { return m_disconnectReason; } - QString localIP() { return m_localIP; } + TQString localIP() { return m_localIP; } bool setUseHttpMethod( bool useHttpMethod ); @@ -84,19 +84,19 @@ public slots: signals: void newContactList(); - void contactList(const QString& handle, const QString& publicName, const QString &contactGuid, uint lists, const QString& groups); - void contactStatus(const QString&, const QString&, const QString& ); - void contactAdded(const QString& handle, const QString& list, const QString& publicName, const QString& contactGuid, const QString& groupGuid); - //void contactRemoved(const QString&, const QString&, uint); - void contactRemoved(const QString& handle, const QString& list, const QString& contactGuid, const QString& groupGuid); + void contactList(const TQString& handle, const TQString& publicName, const TQString &contactGuid, uint lists, const TQString& groups); + void contactStatus(const TQString&, const TQString&, const TQString& ); + void contactAdded(const TQString& handle, const TQString& list, const TQString& publicName, const TQString& contactGuid, const TQString& groupGuid); + //void contactRemoved(const TQString&, const TQString&, uint); + void contactRemoved(const TQString& handle, const TQString& list, const TQString& contactGuid, const TQString& groupGuid); - void groupListed(const QString&, const QString&); - void groupAdded( const QString&, const QString&); - void groupRenamed( const QString&, const QString& ); - void groupRemoved( const QString& ); + void groupListed(const TQString&, const TQString&); + void groupAdded( const TQString&, const TQString&); + void groupRenamed( const TQString&, const TQString& ); + void groupRemoved( const TQString& ); - void invitedToChat(const QString&, const QString&, const QString&, const QString&, const QString& ); - void startChat( const QString&, const QString& ); + void invitedToChat(const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ); + void startChat( const TQString&, const TQString& ); void statusChanged( const Kopete::OnlineStatus &newStatus ); @@ -107,15 +107,15 @@ signals: * When the dispatch server sends us the notification server to use, this * signal is emitted. After this the socket is automatically closed. */ - void receivedNotificationServer( const QString &host, uint port ); + void receivedNotificationServer( const TQString &host, uint port ); protected: /** * Handle an MSN command response line. */ - virtual void parseCommand( const QString &cmd, uint id, - const QString &data ); + virtual void parseCommand( const TQString &cmd, uint id, + const TQString &data ); /** * Handle an MSN error condition. @@ -136,7 +136,7 @@ private slots: * We received a message from the server, which is sent as raw data, * instead of cr/lf line-based text. */ - void slotReadMessage( const QByteArray &bytes ); + void slotReadMessage( const TQByteArray &bytes ); /** * Send a keepalive to the server to avoid idle connections to cause @@ -146,18 +146,18 @@ private slots: void sslLoginFailed(); void sslLoginIncorrect(); - void sslLoginSucceeded(QString ticket); + void sslLoginSucceeded(TQString ticket); private: /** * Convert the MSN status strings to a Kopete::OnlineStatus */ - Kopete::OnlineStatus convertOnlineStatus( const QString &statusString ); + Kopete::OnlineStatus convertOnlineStatus( const TQString &statusString ); MSNAccount *m_account; - QString m_password; - QStringList m_msnAlertURLs; + TQString m_password; + TQStringList m_msnAlertURLs; unsigned int mailCount; @@ -166,30 +166,30 @@ private: /** * Convert an entry of the Status enum back to a string */ - QString statusToString( const Kopete::OnlineStatus &status ) const; + TQString statusToString( const Kopete::OnlineStatus &status ) const; /** * Process the CurrentMedia XML element. * @param mediaXmlElement the source XML element as text. */ - QString processCurrentMedia( const QString &mediaXmlElement ); + TQString processCurrentMedia( const TQString &mediaXmlElement ); //know the last handle used - QString m_tmpLastHandle; - QMap <unsigned int,QString> m_tmpHandles; - QString m_configFile; + TQString m_tmpLastHandle; + TQMap <unsigned int,TQString> m_tmpHandles; + TQString m_configFile; //for hotmail inbox opening bool m_isHotmailAccount; - QString m_MSPAuth; - QString m_kv; - QString m_sid; - QString m_loginTime; - QString m_localIP; + TQString m_MSPAuth; + TQString m_kv; + TQString m_sid; + TQString m_loginTime; + TQString m_localIP; MSNSecureLoginHandler *m_secureLoginHandler; MSNChallengeHandler *m_challengeHandler; - QTimer *m_keepaliveTimer; + TQTimer *m_keepaliveTimer; bool m_ping; @@ -199,7 +199,7 @@ private: * Used to set the myself() personalMessage when the acknowledge(UUX) command is received. * The personalMessage is built into @ref changePersonalMessage */ - QString m_propertyPersonalMessage; + TQString m_propertyPersonalMessage; /** * Used to tell when we are logged in to MSN Messeger service. diff --git a/kopete/protocols/msn/msnprotocol.cpp b/kopete/protocols/msn/msnprotocol.cpp index 2a5b4319..9c0007fc 100644 --- a/kopete/protocols/msn/msnprotocol.cpp +++ b/kopete/protocols/msn/msnprotocol.cpp @@ -18,7 +18,7 @@ ************************************************************************* */ -#include <qimage.h> +#include <tqimage.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -47,15 +47,15 @@ K_EXPORT_COMPONENT_FACTORY( libkopete_msn_shared, MSNProtocolFactory( "kopete_ms MSNProtocol *MSNProtocol::s_protocol = 0L; -MSNProtocol::MSNProtocol( QObject *parent, const char *name, const QStringList & /* args */ ) +MSNProtocol::MSNProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Protocol( MSNProtocolFactory::instance(), parent, name ), - NLN( Kopete::OnlineStatus::Online, 25, this, 1, QString::null, i18n( "Online" ) , i18n( "O&nline" ), Kopete::OnlineStatusManager::Online,Kopete::OnlineStatusManager::HasAwayMessage ), + NLN( Kopete::OnlineStatus::Online, 25, this, 1, TQString::null, i18n( "Online" ) , i18n( "O&nline" ), Kopete::OnlineStatusManager::Online,Kopete::OnlineStatusManager::HasAwayMessage ), BSY( Kopete::OnlineStatus::Away, 20, this, 2, "msn_busy", i18n( "Busy" ) , i18n( "&Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ), BRB( Kopete::OnlineStatus::Away, 22, this, 3, "msn_brb", i18n( "Be Right Back" ), i18n( "Be &Right Back" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ), AWY( Kopete::OnlineStatus::Away, 18, this, 4, "contact_away_overlay", i18n( "Away From Computer" ),i18n( "&Away" ), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage ), PHN( Kopete::OnlineStatus::Away, 12, this, 5, "contact_phone_overlay", i18n( "On the Phone" ) , i18n( "On The &Phone" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ), LUN( Kopete::OnlineStatus::Away, 15, this, 6, "contact_food_overlay", i18n( "Out to Lunch" ) , i18n( "Out To &Lunch" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ), - FLN( Kopete::OnlineStatus::Offline, 0, this, 7, QString::null, i18n( "Offline" ) , i18n( "&Offline" ), Kopete::OnlineStatusManager::Offline,Kopete::OnlineStatusManager::DisabledIfOffline ), + FLN( Kopete::OnlineStatus::Offline, 0, this, 7, TQString::null, i18n( "Offline" ) , i18n( "&Offline" ), Kopete::OnlineStatusManager::Offline,Kopete::OnlineStatusManager::DisabledIfOffline ), HDN( Kopete::OnlineStatus::Invisible, 3, this, 8, "contact_invisible_overlay", i18n( "Invisible" ) , i18n( "&Invisible" ), Kopete::OnlineStatusManager::Invisible ), IDL( Kopete::OnlineStatus::Away, 10, this, 9, "contact_away_overlay", i18n( "Idle" ) , i18n( "&Idle" ), Kopete::OnlineStatusManager::Idle , Kopete::OnlineStatusManager::HideFromMenu ), UNK( Kopete::OnlineStatus::Unknown, 25, this, 0, "status_unknown", i18n( "Status not available" ) ), @@ -77,16 +77,16 @@ MSNProtocol::MSNProtocol( QObject *parent, const char *name, const QStringList & // m_status = m_unknownStatus = UNK; } -Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData, - const QMap<QString, QString> & /* addressBookData */ ) +Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> & /* addressBookData */ ) { - QString contactId = serializedData[ "contactId" ] ; - QString accountId = serializedData[ "accountId" ] ; - QString lists = serializedData[ "lists" ]; - QStringList groups = QStringList::split( ",", serializedData[ "groups" ] ); - QString contactGuid = serializedData[ "contactGuid" ] ; + TQString contactId = serializedData[ "contactId" ] ; + TQString accountId = serializedData[ "accountId" ] ; + TQString lists = serializedData[ "lists" ]; + TQStringList groups = TQStringList::split( ",", serializedData[ "groups" ] ); + TQString contactGuid = serializedData[ "contactGuid" ] ; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[ accountId ]; if( !account ) @@ -95,7 +95,7 @@ Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaConta // Create MSN contact MSNContact *c = new MSNContact( account, contactId, metaContact ); - for( QStringList::Iterator it = groups.begin() ; it != groups.end(); ++it ) + for( TQStringList::Iterator it = groups.begin() ; it != groups.end(); ++it ) c->contactAddedToGroup( *it, 0L /* FIXME - m_groupList[ ( *it ).toUInt() ]*/ ); c->m_obj= serializedData[ "obj" ]; @@ -111,17 +111,17 @@ Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaConta return c; } -AddContactPage *MSNProtocol::createAddContactWidget(QWidget *parent , Kopete::Account *i) +AddContactPage *MSNProtocol::createAddContactWidget(TQWidget *parent , Kopete::Account *i) { return (new MSNAddContactPage(i->isConnected(),parent)); } -KopeteEditAccountWidget *MSNProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *MSNProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new MSNEditAccountWidget(this,account,parent); } -Kopete::Account *MSNProtocol::createNewAccount(const QString &accountId) +Kopete::Account *MSNProtocol::createNewAccount(const TQString &accountId) { return new MSNAccount(this, accountId); } @@ -135,12 +135,12 @@ void MSNProtocol::slotSyncContactList() return; } // First, delete D marked contacts - QStringList localcontacts; + TQStringList localcontacts; contactsFile->setGroup("Default"); contactsFile->readListEntry("Contacts",localcontacts); - QString tmpUin; + TQString tmpUin; tmpUin.sprintf("%d",uin); tmp.append(tmpUin); cnt=contactsFile->readNumEntry("Count",0); @@ -152,15 +152,15 @@ MSNProtocol* MSNProtocol::protocol() return s_protocol; } -bool MSNProtocol::validContactId(const QString& userid) +bool MSNProtocol::validContactId(const TQString& userid) { return ( userid.contains('@') ==1 && userid.contains('.') >=1 && userid.contains(' ') == 0); } -QImage MSNProtocol::scalePicture(const QImage &picture) +TQImage MSNProtocol::scalePicture(const TQImage &picture) { - QImage img(picture); - img = img.smoothScale( 96, 96, QImage::ScaleMin ); + TQImage img(picture); + img = img.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(img.width() < img.height()) { diff --git a/kopete/protocols/msn/msnprotocol.h b/kopete/protocols/msn/msnprotocol.h index 7017fd90..77e3d171 100644 --- a/kopete/protocols/msn/msnprotocol.h +++ b/kopete/protocols/msn/msnprotocol.h @@ -21,8 +21,8 @@ #ifndef __msnprotocol_h__ #define __msnprotocol_h__ -#include <qmap.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqstringlist.h> #include "kopeteprotocol.h" #include "kopeteonlinestatus.h" @@ -58,7 +58,7 @@ class KOPETE_EXPORT MSNProtocol : public Kopete::Protocol Q_OBJECT public: - MSNProtocol( QObject *parent, const char *name, const QStringList &args ); + MSNProtocol( TQObject *parent, const char *name, const TQStringList &args ); /** * SyncMode indicates whether settings differing between client and @@ -150,15 +150,15 @@ public: }; virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, const QMap<QString, QString> &addressBookData ); + const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> &addressBookData ); - virtual AddContactPage *createAddContactWidget( QWidget *parent , Kopete::Account *i); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget( TQWidget *parent , Kopete::Account *i); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); static MSNProtocol* protocol(); - static bool validContactId(const QString&); - QImage scalePicture(const QImage &picture); + static bool validContactId(const TQString&); + TQImage scalePicture(const TQImage &picture); private slots: void slotSyncContactList(); @@ -178,7 +178,7 @@ signals: * @param msnMM is the message manager * @param c is the contact */ - void invitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c ); + void invitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c ); }; #endif diff --git a/kopete/protocols/msn/msnsecureloginhandler.cpp b/kopete/protocols/msn/msnsecureloginhandler.cpp index 00f862fe..a795b43a 100644 --- a/kopete/protocols/msn/msnsecureloginhandler.cpp +++ b/kopete/protocols/msn/msnsecureloginhandler.cpp @@ -17,14 +17,14 @@ #include "msnsecureloginhandler.h" // Qt includes -#include <qregexp.h> +#include <tqregexp.h> // KDE includes #include <kio/job.h> #include <kurl.h> #include <kdebug.h> -MSNSecureLoginHandler::MSNSecureLoginHandler(const QString &accountId, const QString &password, const QString &authParameters) +MSNSecureLoginHandler::MSNSecureLoginHandler(const TQString &accountId, const TQString &password, const TQString &authParameters) : m_password(password), m_accountId(accountId), m_authentification(authParameters) { @@ -45,7 +45,7 @@ void MSNSecureLoginHandler::login() getLoginServer->addMetaData("cache", "reload"); getLoginServer->addMetaData("PropagateHttpHeader", "true"); - connect(getLoginServer, SIGNAL(result(KIO::Job *)), this, SLOT(slotLoginServerReceived(KIO::Job* ))); + connect(getLoginServer, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotLoginServerReceived(KIO::Job* ))); } void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob) @@ -53,24 +53,24 @@ void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob) if(!loginJob->error()) { // Retrive the HTTP header - QString httpHeaders = loginJob->queryMetaData("HTTP-Headers"); + TQString httpHeaders = loginJob->queryMetaData("HTTP-Headers"); // Get the login URL using QRegExp - QRegExp rx("PassportURLs: DARealm=(.*),DALogin=(.*),DAReg="); + TQRegExp rx("PassportURLs: DARealm=(.*),DALogin=(.*),DAReg="); rx.search(httpHeaders); // Set the loginUrl and loginServer - QString loginUrl = rx.cap(2); - QString loginServer = loginUrl.section('/', 0, 0); + TQString loginUrl = rx.cap(2); + TQString loginServer = loginUrl.section('/', 0, 0); kdDebug(14140) << k_funcinfo << loginServer << endl; - QString authURL = "https://" + loginUrl; + TQString authURL = "https://" + loginUrl; KIO::Job *authJob = KIO::get(KURL(authURL), true, false); authJob->addMetaData("cookies", "manual"); - QString authRequest = "Authorization: Passport1.4 " + TQString authRequest = "Authorization: Passport1.4 " "OrgVerb=GET," "OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom," "sign-in=" + KURL::encode_string(m_accountId) + @@ -86,7 +86,7 @@ void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob) authJob->addMetaData("cookies", "manual"); authJob->addMetaData("cache", "reload"); - connect(authJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotTweenerReceived(KIO::Job* ))); + connect(authJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotTweenerReceived(KIO::Job* ))); } else { @@ -100,21 +100,21 @@ void MSNSecureLoginHandler::slotTweenerReceived(KIO::Job *authJob) { if(!authJob->error()) { - QString httpHeaders = authJob->queryMetaData("HTTP-Headers"); + TQString httpHeaders = authJob->queryMetaData("HTTP-Headers"); // kdDebug(14140) << k_funcinfo << "HTTP headers: " << httpHeaders << endl; // Check if we get "401 Unauthorized", thats means it's a bad password. - if(httpHeaders.contains(QString::fromUtf8("401 Unauthorized"))) + if(httpHeaders.contains(TQString::fromUtf8("401 Unauthorized"))) { // kdDebug(14140) << k_funcinfo << "MSN Login Bad password." << endl; emit loginBadPassword(); } else { - QRegExp rx("from-PP='(.*)'"); + TQRegExp rx("from-PP='(.*)'"); rx.search(httpHeaders); - QString ticket = rx.cap(1); + TQString ticket = rx.cap(1); // kdDebug(14140) << k_funcinfo << "Received ticket: " << ticket << endl; diff --git a/kopete/protocols/msn/msnsecureloginhandler.h b/kopete/protocols/msn/msnsecureloginhandler.h index 8e4dc466..8f913fc7 100644 --- a/kopete/protocols/msn/msnsecureloginhandler.h +++ b/kopete/protocols/msn/msnsecureloginhandler.h @@ -17,7 +17,7 @@ #ifndef MSNSECURELOGINHANDLER_H #define MSNSECURELOGINHANDLER_H -#include <qobject.h> +#include <tqobject.h> namespace KIO { @@ -35,7 +35,7 @@ class MSNSecureLoginHandler : public QObject { Q_OBJECT public: - MSNSecureLoginHandler(const QString &accountId, const QString &password, const QString &authParameters); + MSNSecureLoginHandler(const TQString &accountId, const TQString &password, const TQString &authParameters); ~MSNSecureLoginHandler(); @@ -43,9 +43,9 @@ public: signals: /** - * TODO: return to const QString & + * TODO: return to const TQString & */ - void loginSuccesful(QString ticket); + void loginSuccesful(TQString ticket); void loginBadPassword(); void loginFailed(); @@ -60,15 +60,15 @@ private: /** * Store the password. */ - QString m_password; + TQString m_password; /** * Store the accountId. */ - QString m_accountId; + TQString m_accountId; /** * Store the authentification parameters */ - QString m_authentification; + TQString m_authentification; void displayMetaData(KIO::MetaData data); }; diff --git a/kopete/protocols/msn/msnsocket.cpp b/kopete/protocols/msn/msnsocket.cpp index a650cd83..0aaad25c 100644 --- a/kopete/protocols/msn/msnsocket.cpp +++ b/kopete/protocols/msn/msnsocket.cpp @@ -23,8 +23,8 @@ #include "msnsocket.h" //#include "msnprotocol.h" -#include <qregexp.h> -#include <qtimer.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kdebug.h> #include <kconfig.h> @@ -42,19 +42,19 @@ using namespace KNetwork; class MimeMessage { public: - MimeMessage(const QString &msg) : message(msg) {} + MimeMessage(const TQString &msg) : message(msg) {} - QString getValue(const QString &key) + TQString getValue(const TQString &key) { - QRegExp rx(key+": ([^\r\n]+)"); + TQRegExp rx(key+": ([^\r\n]+)"); rx.search(message); return rx.cap(1); } private: - QString message; + TQString message; }; -MSNSocket::MSNSocket(QObject* parent) : QObject (parent) +MSNSocket::MSNSocket(TQObject* parent) : TQObject (parent) { m_onlineStatus = Disconnected; m_socket = 0L; @@ -73,7 +73,7 @@ MSNSocket::~MSNSocket() m_socket->deleteLater(); } -void MSNSocket::connect( const QString &server, uint port ) +void MSNSocket::connect( const TQString &server, uint port ) { if ( m_onlineStatus == Connected || m_onlineStatus == Connecting ) { @@ -101,7 +101,7 @@ void MSNSocket::connect( const QString &server, uint port ) m_port = port; if(!m_useHttp) - m_socket = new KBufferedSocket( server, QString::number(port) ); + m_socket = new KBufferedSocket( server, TQString::number(port) ); else { m_socket = new KBufferedSocket( m_gateway, "80" ); } @@ -112,20 +112,20 @@ void MSNSocket::connect( const QString &server, uint port ) // non-empty, so disable it until we have actual data in the queue m_socket->enableWrite( false ); - QObject::connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotDataReceived() ) ); - QObject::connect( m_socket, SIGNAL( readyWrite() ), this, SLOT( slotReadyWrite() ) ); - QObject::connect( m_socket, SIGNAL( hostFound() ), this, SLOT( slotHostFound() ) ); - QObject::connect( m_socket, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotConnectionSuccess() ) ); - QObject::connect( m_socket, SIGNAL( gotError( int ) ), this, SLOT( slotSocketError( int ) ) ); - QObject::connect( m_socket, SIGNAL( closed( ) ), this, SLOT( slotSocketClosed( ) ) ); + TQObject::connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotDataReceived() ) ); + TQObject::connect( m_socket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( slotReadyWrite() ) ); + TQObject::connect( m_socket, TQT_SIGNAL( hostFound() ), this, TQT_SLOT( slotHostFound() ) ); + TQObject::connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotConnectionSuccess() ) ); + TQObject::connect( m_socket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotSocketError( int ) ) ); + TQObject::connect( m_socket, TQT_SIGNAL( closed( ) ), this, TQT_SLOT( slotSocketClosed( ) ) ); if(m_useHttp) { if(m_timer == 0L) { - m_timer = new QTimer(this, "Http poll timer"); + m_timer = new TQTimer(this, "Http poll timer"); // Connect the slot HttpPoll with the timer timeout signal. - QObject::connect(m_timer, SIGNAL(timeout()), this, SLOT(slotHttpPoll())); + TQObject::connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotHttpPoll())); } } @@ -181,7 +181,7 @@ void MSNSocket::slotSocketError( int error ) return; //we only care about fatal error - QString errormsg = i18n( "There was an error while connecting to the MSN server.\nError message:\n" ); + TQString errormsg = i18n( "There was an error while connecting to the MSN server.\nError message:\n" ); if ( error == KSocketBase::LookupFailure ) errormsg += i18n( "Unable to lookup %1" ).arg( m_socket->peerResolver().nodeName() ); else @@ -212,7 +212,7 @@ void MSNSocket::slotDataReceived() } // incoming data, plus an extra char where we pretend a NUL is so the conversion - // to QCString doesn't go over the end of the allocated memory. + // to TQCString doesn't go over the end of the allocated memory. char *buffer = new char[ avail + 1 ]; int ret = m_socket->readBlock( buffer, avail ); @@ -240,16 +240,16 @@ void MSNSocket::slotDataReceived() } - QString rawData; + TQString rawData; if(m_useHttp) { bool error = false; - QByteArray bytes; + TQByteArray bytes; // Check if all data has arrived. - rawData = QString(QCString(buffer, avail + 1)); - bool headers = (rawData.find(QRegExp("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)")) != -1); + rawData = TQString(TQCString(buffer, avail + 1)); + bool headers = (rawData.find(TQRegExp("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)")) != -1); if(headers) { @@ -258,7 +258,7 @@ void MSNSocket::slotDataReceived() if((endOfHeaders + 4) == avail) { // Only the response headers data is included. - QRegExp re("Content-Length: ([^\r\n]+)"); + TQRegExp re("Content-Length: ([^\r\n]+)"); if(re.search(rawData) != -1) { bool valid; @@ -312,9 +312,9 @@ void MSNSocket::slotDataReceived() { // If we received a valid response, read the required headers. // Retrieve the X-MSN-Messenger header. - QString header = response.getHeaders()->getValue("X-MSN-Messenger"); + TQString header = response.getHeaders()->getValue("X-MSN-Messenger"); - QStringList parts = QStringList::split(";", header.replace(" ", "")); + TQStringList parts = TQStringList::split(";", header.replace(" ", "")); if(!header.isNull() && (parts.count() >= 2)) { if(parts[0].find("SessionID", 0) != -1) @@ -361,7 +361,7 @@ void MSNSocket::slotDataReceived() if(valid && (length > 0)) { // Otherwise, if the content length is greater than zero, get the web response stream. - QDataStream *stream = response.getResponseStream(); + TQDataStream *stream = response.getResponseStream(); buffer = new char[length]; // Read the web response content. stream->readRawBytes(buffer, length); @@ -390,8 +390,8 @@ void MSNSocket::slotDataReceived() // all MSN commands start with one or more uppercase characters. // For now just check the first three chars, let's see how accurate it is. // Additionally, if we receive an MSN-P2P packet, strip off anything after the P2P header. - rawData = QString( QCString( buffer, ((!m_useHttp)? avail : ret) + 1 ) ).stripWhiteSpace().replace( - QRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" ); + rawData = TQString( TQCString( buffer, ((!m_useHttp)? avail : ret) + 1 ) ).stripWhiteSpace().replace( + TQRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" ); bool isBinary = false; for ( uint i = 0; i < 3 ; ++i ) @@ -429,7 +429,7 @@ void MSNSocket::slotReadLine() if ( m_buffer.size() >= 3 && ( m_buffer.data()[ 0 ] == '\0' || m_buffer.data()[ 0 ]== '\1' ) ) { bytesReceived( m_buffer.take( 3 ) ); - QTimer::singleShot( 0, this, SLOT( slotReadLine() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotReadLine() ) ); return; } @@ -445,13 +445,13 @@ void MSNSocket::slotReadLine() if ( index != -1 ) { - QString command = QString::fromUtf8( m_buffer.take( index + 2 ), index ); + TQString command = TQString::fromUtf8( m_buffer.take( index + 2 ), index ); command.replace( "\r\n", "" ); //kdDebug( 14141 ) << k_funcinfo << command << endl; // Don't block the GUI while parsing data, only do a single line! // (Done before parseLine() to prevent a potential crash) - QTimer::singleShot( 0, this, SLOT( slotReadLine() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotReadLine() ) ); parseLine( command ); // WARNING: At this point 'this' can be deleted (when disconnecting) @@ -489,7 +489,7 @@ bool MSNSocket::pollReadBlock() return true; } - QByteArray block = m_buffer.take( m_waitBlockSize ); + TQByteArray block = m_buffer.take( m_waitBlockSize ); //kdDebug( 14140 ) << k_funcinfo << "Successfully read block of size " << m_waitBlockSize << endl; @@ -499,10 +499,10 @@ bool MSNSocket::pollReadBlock() return false; } -void MSNSocket::parseLine( const QString &str ) +void MSNSocket::parseLine( const TQString &str ) { - QString cmd = str.section( ' ', 0, 0 ); - QString data = str.section( ' ', 2 ).replace( "\r\n" , "" ); + TQString cmd = str.section( ' ', 0, 0 ); + TQString data = str.section( ' ', 2 ).replace( "\r\n" , "" ); bool isNum; uint id = str.section( ' ', 1, 1 ).toUInt( &isNum ); @@ -529,7 +529,7 @@ void MSNSocket::parseLine( const QString &str ) void MSNSocket::handleError( uint code, uint /* id */ ) { kdDebug(14140) << k_funcinfo << endl; - QString msg; + TQString msg; ErrorType type = ErrorServerError; switch ( code ) { @@ -605,7 +605,7 @@ void MSNSocket::handleError( uint code, uint /* id */ ) return; } -int MSNSocket::sendCommand( const QString &cmd, const QString &args, bool addId, const QByteArray &body, bool binary ) +int MSNSocket::sendCommand( const TQString &cmd, const TQString &args, bool addId, const TQByteArray &body, bool binary ) { if ( !m_socket ) { @@ -613,22 +613,22 @@ int MSNSocket::sendCommand( const QString &cmd, const QString &args, bool addId, return -1; } - QCString data = cmd.utf8(); + TQCString data = cmd.utf8(); if ( addId ) - data += " " + QString::number( m_id ).utf8(); + data += " " + TQString::number( m_id ).utf8(); if ( !args.isEmpty() ) data += " " + args.utf8(); // Add length in bytes, not characters if ( !body.isEmpty() ) - data += " " + QString::number( body.size() - (binary ? 0 : 1 ) ).utf8(); + data += " " + TQString::number( body.size() - (binary ? 0 : 1 ) ).utf8(); data += "\r\n"; // the command will be sent in slotReadyWrite - QByteArray bytes; + TQByteArray bytes; const uint length = data.length(); bytes.duplicate(data.data(), length); if(!body.isEmpty()) @@ -657,7 +657,7 @@ void MSNSocket::slotReadyWrite() if ( !m_sendQueue.isEmpty() ) { // If the command queue is not empty, retrieve the first command. - QValueList<QByteArray>::Iterator it = m_sendQueue.begin(); + TQValueList<TQByteArray>::Iterator it = m_sendQueue.begin(); if(m_useHttp) { @@ -668,8 +668,8 @@ void MSNSocket::slotReadyWrite() // Temporarily disable http polling. m_bCanPoll = false; // Set the host to the msn gateway by default. - QString host = m_gateway; - QString query; // Web request query string. + TQString host = m_gateway; + TQString query; // Web request query string. if(m_bIsFirstInTransaction) { @@ -689,11 +689,11 @@ void MSNSocket::slotReadyWrite() } // Create the web request headers. - QString s = makeHttpRequestString(host, query, (*it).size()); + TQString s = makeHttpRequestString(host, query, (*it).size()); uint length = s.length(); // Create the web request bytes. - QByteArray bytes(length + (*it).size()); + TQByteArray bytes(length + (*it).size()); // Copy the request headers into the request bytes. for(uint i=0; i < length; i++) @@ -702,7 +702,7 @@ void MSNSocket::slotReadyWrite() for(uint i=0; i < (*it).size(); i++) bytes[length + i] = (*it)[i]; - kdDebug( 14141 ) << k_funcinfo << "Sending http command: " << QString(*it).stripWhiteSpace() << endl; + kdDebug( 14141 ) << k_funcinfo << "Sending http command: " << TQString(*it).stripWhiteSpace() << endl; // Write the request bytes to the socket. m_socket->writeBlock(bytes.data(), bytes.size()); @@ -725,8 +725,8 @@ void MSNSocket::slotReadyWrite() // Simple check to avoid dumping the binary data from the icons and emoticons to kdDebug: // When sending an MSN-P2P packet, strip off anything after the P2P header. - QString debugData = QString( *it ).stripWhiteSpace().replace( - QRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" ); + TQString debugData = TQString( *it ).stripWhiteSpace().replace( + TQRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" ); kdDebug( 14141 ) << k_funcinfo << "Sending command: " << debugData << endl; m_socket->writeBlock( *it, ( *it ).size() ); @@ -750,14 +750,14 @@ void MSNSocket::slotReadyWrite() } } -QString MSNSocket::escape( const QString &str ) +TQString MSNSocket::escape( const TQString &str ) { //return ( KURL::encode_string( str, 106 ) ); //It's not needed to encode everything. The official msn client only encode spaces and % //If we encode more, the size can be longer than excepted. int old_length= str.length(); - QChar *new_segment = new QChar[ old_length * 3 + 1 ]; + TQChar *new_segment = new QChar[ old_length * 3 + 1 ]; int new_length = 0; for ( int i = 0; i < old_length; i++ ) @@ -780,20 +780,20 @@ QString MSNSocket::escape( const QString &str ) new_segment[ new_length++ ] = str[i]; } - QString result = QString(new_segment, new_length); + TQString result = TQString(new_segment, new_length); delete [] new_segment; return result; } -QString MSNSocket::unescape( const QString &str ) +TQString MSNSocket::unescape( const TQString &str ) { - QString str2 = KURL::decode_string( str, 106 ); + TQString str2 = KURL::decode_string( str, 106 ); //remove msn+ colors code - str2 = str2.replace( QRegExp("[\\x1-\\x8]"), "" ); // old msn+ colors + str2 = str2.replace( TQRegExp("[\\x1-\\x8]"), "" ); // old msn+ colors // added by kaoul <erwin.kwolek at gmail.com> - str2 = str2.replace( QRegExp("\\xB7[&@\'#0]"),""); // dot ... - str2 = str2.replace( QRegExp("\\xB7\\$,?\\d{1,2}"),""); // dot dollar (comma)? 0-99 + str2 = str2.replace( TQRegExp("\\xB7[&@\'#0]"),""); // dot ... + str2 = str2.replace( TQRegExp("\\xB7\\$,?\\d{1,2}"),""); // dot dollar (comma)? 0-99 return str2; } @@ -847,7 +847,7 @@ void MSNSocket::slotHttpPoll() } // Create the http request headers. - const QCString headers = makeHttpRequestString(m_gwip, "Action=poll&SessionID=" + m_sessionId, 0).utf8(); + const TQCString headers = makeHttpRequestString(m_gwip, "Action=poll&SessionID=" + m_sessionId, 0).utf8(); m_socket->writeBlock(headers, headers.length()); // Wait for the response. m_pending = true; @@ -856,12 +856,12 @@ void MSNSocket::slotHttpPoll() // Used in MSNFileTransferSocket // FIXME: Why is this here if it's only used for file transfer? - Martijn -void MSNSocket::bytesReceived( const QByteArray & /* data */ ) +void MSNSocket::bytesReceived( const TQByteArray & /* data */ ) { kdWarning( 14140 ) << k_funcinfo << "Unknown bytes were received" << endl; } -void MSNSocket::sendBytes( const QByteArray &data ) +void MSNSocket::sendBytes( const TQByteArray &data ) { if ( !m_socket ) { @@ -879,13 +879,13 @@ bool MSNSocket::setUseHttpMethod( bool useHttp ) return true; if( useHttp ) { - QString s = QString( this->className() ).lower(); + TQString s = TQString( this->className() ).lower(); if( s == "msnnotifysocket" ) m_type = "NS"; else if( s == "msnswitchboardsocket" ) m_type = "SB"; else - m_type = QString::null; + m_type = TQString::null; if( m_type.isNull() ) return false; @@ -938,23 +938,23 @@ bool MSNSocket::accept( KServerSocket *server ) m_socket->enableRead( true ); m_socket->enableWrite( true ); - QObject::connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotDataReceived() ) ); - QObject::connect( m_socket, SIGNAL( readyWrite() ), this, SLOT( slotReadyWrite() ) ); - QObject::connect( m_socket, SIGNAL( closed() ), this, SLOT( slotSocketClosed() ) ); - QObject::connect( m_socket, SIGNAL( gotError( int ) ), this, SLOT( slotSocketError( int ) ) ); + TQObject::connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotDataReceived() ) ); + TQObject::connect( m_socket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( slotReadyWrite() ) ); + TQObject::connect( m_socket, TQT_SIGNAL( closed() ), this, TQT_SLOT( slotSocketClosed() ) ); + TQObject::connect( m_socket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotSocketError( int ) ) ); doneConnect(); return true; } -QString MSNSocket::getLocalIP() +TQString MSNSocket::getLocalIP() { if ( !m_socket ) - return QString::null; + return TQString::null; const KSocketAddress address = m_socket->localAddress(); - QString ip = address.nodeName(); + TQString ip = address.nodeName(); kdDebug( 14140 ) << k_funcinfo << "IP: " << ip <<endl; //delete address; @@ -962,7 +962,7 @@ QString MSNSocket::getLocalIP() } MSNSocket::Buffer::Buffer( unsigned int sz ) -: QByteArray( sz ) +: TQByteArray( sz ) { } @@ -982,15 +982,15 @@ void MSNSocket::Buffer::add( char *str, unsigned int sz ) delete[] b; } -QByteArray MSNSocket::Buffer::take( unsigned blockSize ) +TQByteArray MSNSocket::Buffer::take( unsigned blockSize ) { if ( size() < blockSize ) { kdWarning( 14140 ) << k_funcinfo << "Buffer size " << size() << " < asked size " << blockSize << "!" << endl; - return QByteArray(); + return TQByteArray(); } - QByteArray rep( blockSize ); + TQByteArray rep( blockSize ); for( uint i = 0; i < blockSize; i++ ) rep[ i ] = data()[ i ]; @@ -1003,9 +1003,9 @@ QByteArray MSNSocket::Buffer::take( unsigned blockSize ) return rep; } -QString MSNSocket::makeHttpRequestString(const QString& host, const QString& query, uint contentLength) +TQString MSNSocket::makeHttpRequestString(const TQString& host, const TQString& query, uint contentLength) { - QString s( + TQString s( "POST http://" + host + "/gateway/gateway.dll?" + query + " HTTP/1.1\r\n" + "Accept: */*\r\n" + "Accept-Language: en-us\r\n" + @@ -1015,22 +1015,22 @@ QString MSNSocket::makeHttpRequestString(const QString& host, const QString& que "Connection: Keep-Alive\r\n" + "Pragma: no-cache\r\n" + "Content-Type: application/x-msn-messenger\r\n" + - "Content-Length: " + QString::number(contentLength) + "\r\n" + + "Content-Length: " + TQString::number(contentLength) + "\r\n" + "\r\n"); return s; } -MSNSocket::WebResponse::WebResponse(const QByteArray& bytes) +MSNSocket::WebResponse::WebResponse(const TQByteArray& bytes) { m_statusCode = 0; m_stream = 0; int headerEnd; - QString header; - QString data(QCString(bytes, bytes.size() + 1)); + TQString header; + TQString data(TQCString(bytes, bytes.size() + 1)); // Parse the HTTP status header - QRegExp re("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)"); + TQRegExp re("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)"); headerEnd = data.find("\r\n"); header = data.left( (headerEnd == -1) ? 20 : headerEnd ); @@ -1055,11 +1055,11 @@ MSNSocket::WebResponse::WebResponse(const QByteArray& bytes) // copy the web response content bytes. int offset = bytes.size() - length; - QByteArray content(length); + TQByteArray content(length); for(int i=0; i < length; i++) content[i] = bytes[offset + i]; // Create the web response stream from the response content bytes. - m_stream = new QDataStream(content, IO_ReadOnly); + m_stream = new TQDataStream(content, IO_ReadOnly); } } } @@ -1077,7 +1077,7 @@ MimeMessage* MSNSocket::WebResponse::getHeaders() return m_headers; } -QDataStream* MSNSocket::WebResponse::getResponseStream() +TQDataStream* MSNSocket::WebResponse::getResponseStream() { return m_stream; } @@ -1087,7 +1087,7 @@ int MSNSocket::WebResponse::getStatusCode() return m_statusCode; } -QString MSNSocket::WebResponse::getStatusDescription() +TQString MSNSocket::WebResponse::getStatusDescription() { return m_statusDescription; } diff --git a/kopete/protocols/msn/msnsocket.h b/kopete/protocols/msn/msnsocket.h index 85df08c7..96bfd0cb 100644 --- a/kopete/protocols/msn/msnsocket.h +++ b/kopete/protocols/msn/msnsocket.h @@ -22,11 +22,11 @@ #ifndef MSNSOCKET_H #define MSNSOCKET_H -#include <qobject.h> -#include <qdatastream.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqdatastream.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqvaluelist.h> #include "kopete_export.h" @@ -49,7 +49,7 @@ class KOPETE_EXPORT MSNSocket : public QObject Q_OBJECT public: - MSNSocket(QObject* parent=0l); + MSNSocket(TQObject* parent=0l); ~MSNSocket(); /** @@ -85,7 +85,7 @@ public: * return the local ip. * Used for filetransfer */ - QString getLocalIP(); + TQString getLocalIP(); //BEGIN Http @@ -95,7 +95,7 @@ public: //END public slots: - void connect( const QString &server, uint port ); + void connect( const TQString &server, uint port ); virtual void disconnect(); @@ -113,15 +113,15 @@ public slots: * * return the id */ - int sendCommand( const QString &cmd, const QString &args = QString::null, - bool addId = true, const QByteArray &body = QByteArray() , bool binary=false ); + int sendCommand( const TQString &cmd, const TQString &args = TQString::null, + bool addId = true, const TQByteArray &body = TQByteArray() , bool binary=false ); signals: /** * A block read is ready. * After this the normal line-based reads go on again */ - void blockRead( const QByteArray &block ); + void blockRead( const TQByteArray &block ); /** * The online status has changed @@ -141,19 +141,19 @@ signals: /** * A error has occured. Handle the display of the message. */ - void errorMessage( int type, const QString &msg ); + void errorMessage( int type, const TQString &msg ); protected: /** * Convenience method: escape spaces with '%20' for use in the protocol. * Doesn't escape any other sequence. */ - QString escape( const QString &str ); + TQString escape( const TQString &str ); /** * And the other way round... */ - QString unescape( const QString &str ); + TQString unescape( const TQString &str ); /** * Set the online status. Emits onlineStatusChanged. @@ -193,17 +193,17 @@ protected: * This method is pure virtual and *must* be overridden in derived * classes. */ - virtual void parseCommand( const QString &cmd, uint id, - const QString &data ) = 0; + virtual void parseCommand( const TQString &cmd, uint id, + const TQString &data ) = 0; /** * Used in MSNFileTransferSocket */ - virtual void bytesReceived( const QByteArray & ); + virtual void bytesReceived( const TQByteArray & ); bool accept( KNetwork::KServerSocket * ); - void sendBytes( const QByteArray &data ); + void sendBytes( const TQByteArray &data ); - const QString &server() { return m_server; } + const TQString &server() { return m_server; } uint port() { return m_port; } /** @@ -268,19 +268,19 @@ private: * Queue of pending commands (should be mostly empty, but is needed to * send more than one command to the server) */ - QValueList<QByteArray> m_sendQueue; + TQValueList<TQByteArray> m_sendQueue; /** * Parse a single line of data. * Will call either parseCommand or handleError depending on the type of * data received. */ - void parseLine( const QString &str ); + void parseLine( const TQString &str ); KNetwork::KBufferedSocket *m_socket; OnlineStatus m_onlineStatus; - QString m_server; + TQString m_server; uint m_port; /** @@ -294,7 +294,7 @@ private: Buffer( unsigned size = 0 ); ~Buffer(); void add( char *str, unsigned size ); - QByteArray take( unsigned size ); + TQByteArray take( unsigned size ); }; Buffer m_buffer; @@ -305,18 +305,18 @@ private: * Makes a http request headers string using the specified, host, query, and content length. * return: The string containing the http request headers. */ - QString makeHttpRequestString(const QString& host, const QString& query, uint contentLength); + TQString makeHttpRequestString(const TQString& host, const TQString& query, uint contentLength); bool m_useHttp; // Indicates whether to use the msn http gateway to connect to the msn service. bool m_bCanPoll; // Indicates whether polling of the http server is allowed. bool m_bIsFirstInTransaction; // Indicates whether pending message to be sent is the first in the transaction. // If so, the gateway is used. // Use the gateway only for initial connected state; Otherwise, use the host. - QString m_gateway; // Msn http gateway domain name. - QString m_gwip; // The ip address of the msn gateway. - QString m_sessionId; // session id. - QTimer *m_timer; // Msn http poll timer. - QString m_type; // Indicates the type of socket being used. NS or SB + TQString m_gateway; // Msn http gateway domain name. + TQString m_gwip; // The ip address of the msn gateway. + TQString m_sessionId; // session id. + TQTimer *m_timer; // Msn http poll timer. + TQString m_type; // Indicates the type of socket being used. NS or SB bool m_pending; // Indicates whether a http response is pending. int m_remaining; // Indicates how many bytes of content data remain // to be received if the content bytes are sent in @@ -328,7 +328,7 @@ private: class WebResponse { public: - WebResponse(const QByteArray& bytes); + WebResponse(const TQByteArray& bytes); ~WebResponse(); /** @@ -338,7 +338,7 @@ private: /** * Gets the data stream used to read the body of the response from the server. */ - QDataStream* getResponseStream(); + TQDataStream* getResponseStream(); /** * Gets the status code of the response. */ @@ -346,13 +346,13 @@ private: /** * Gets the status description returned with the response. */ - QString getStatusDescription(); + TQString getStatusDescription(); private: MimeMessage *m_headers; - QDataStream *m_stream; + TQDataStream *m_stream; int m_statusCode; - QString m_statusDescription; + TQString m_statusDescription; }; //END diff --git a/kopete/protocols/msn/msnswitchboardsocket.cpp b/kopete/protocols/msn/msnswitchboardsocket.cpp index ae09a93c..7754c448 100644 --- a/kopete/protocols/msn/msnswitchboardsocket.cpp +++ b/kopete/protocols/msn/msnswitchboardsocket.cpp @@ -26,12 +26,12 @@ #include <cmath> // qt -#include <qstylesheet.h> -#include <qregexp.h> -#include <qimage.h> -#include <qtimer.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqstylesheet.h> +#include <tqregexp.h> +#include <tqimage.h> +#include <tqtimer.h> +#include <tqfile.h> +#include <tqfileinfo.h> // kde #include <kdebug.h> @@ -63,7 +63,7 @@ #include "dispatcher.h" using P2P::Dispatcher; -MSNSwitchBoardSocket::MSNSwitchBoardSocket( MSNAccount *account , QObject *parent ) +MSNSwitchBoardSocket::MSNSwitchBoardSocket( MSNAccount *account , TQObject *parent ) : MSNSocket( parent ) { m_account = account; @@ -80,30 +80,30 @@ MSNSwitchBoardSocket::~MSNSwitchBoardSocket() { kdDebug(14140) << k_funcinfo << endl; - QMap<QString , QPair<QString , KTempFile*> >::Iterator it; + TQMap<TQString , QPair<TQString , KTempFile*> >::Iterator it; for ( it = m_emoticons.begin(); it != m_emoticons.end(); ++it ) { delete it.data().second; } } -void MSNSwitchBoardSocket::connectToSwitchBoard(QString ID, QString address, QString auth) +void MSNSwitchBoardSocket::connectToSwitchBoard(TQString ID, TQString address, TQString auth) { // we need these for the handshake later on (when we're connected) m_ID = ID; m_auth = auth; - QString server = address.left( address.find( ":" ) ); + TQString server = address.left( address.find( ":" ) ); uint port = address.right( address.length() - address.findRev( ":" ) - 1 ).toUInt(); - QObject::connect( this, SIGNAL( blockRead( const QByteArray & ) ), - this, SLOT(slotReadMessage( const QByteArray & ) ) ); + TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ), + this, TQT_SLOT(slotReadMessage( const TQByteArray & ) ) ); - QObject::connect( this, SIGNAL( onlineStatusChanged( MSNSocket::OnlineStatus ) ), - this, SLOT( slotOnlineStatusChanged( MSNSocket::OnlineStatus ) ) ); + TQObject::connect( this, TQT_SIGNAL( onlineStatusChanged( MSNSocket::OnlineStatus ) ), + this, TQT_SLOT( slotOnlineStatusChanged( MSNSocket::OnlineStatus ) ) ); - QObject::connect( this, SIGNAL( socketClosed( ) ), - this, SLOT( slotSocketClosed( ) ) ); + TQObject::connect( this, TQT_SIGNAL( socketClosed( ) ), + this, TQT_SLOT( slotSocketClosed( ) ) ); connect( server, port ); } @@ -112,7 +112,7 @@ void MSNSwitchBoardSocket::handleError( uint code, uint id ) { kdDebug(14140) << k_funcinfo << endl; - QString msg; + TQString msg; MSNSocket::ErrorType type; switch( code ) @@ -153,7 +153,7 @@ void MSNSwitchBoardSocket::handleError( uint code, uint id ) } case 713: { - QString msg = i18n( "You are trying to invite too many contacts to this chat at the same time" ).arg( m_msgHandle ); + TQString msg = i18n( "You are trying to invite too many contacts to this chat at the same time" ).arg( m_msgHandle ); type = MSNSocket::ErrorInformation; userLeftChat(m_msgHandle, i18n("user blocked you")); @@ -175,8 +175,8 @@ void MSNSwitchBoardSocket::handleError( uint code, uint id ) emit errorMessage( type, msg ); } -void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id , - const QString &data ) +void MSNSwitchBoardSocket::parseCommand( const TQString &cmd, uint id , + const TQString &data ) { if( cmd == "NAK" ) { @@ -189,8 +189,8 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id , else if( cmd == "JOI" ) { // new user joins the chat, update user in chat list - QString handle = data.section( ' ', 0, 0 ); - QString screenname = unescape(data.section( ' ', 1, 1 )); + TQString handle = data.section( ' ', 0, 0 ); + TQString screenname = unescape(data.section( ' ', 1, 1 )); if( !m_chatMembers.contains( handle ) ) m_chatMembers.append( handle ); emit userJoined( handle, screenname, false ); @@ -198,11 +198,11 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id , else if( cmd == "IRO" ) { // we have joined a multi chat session- this are the users in this chat - QString handle = data.section( ' ', 2, 2 ); + TQString handle = data.section( ' ', 2, 2 ); if( !m_chatMembers.contains( handle ) ) m_chatMembers.append( handle ); - QString screenname = unescape(data.section( ' ', 3, 3)); + TQString screenname = unescape(data.section( ' ', 3, 3)); emit userJoined( handle, screenname, true ); } else if( cmd == "USR" ) @@ -214,12 +214,12 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id , // some has disconnect from chat, update user in chat list cleanQueue(); //in case some message are waiting their emoticons, never mind, send them - QString handle = data.section( ' ', 0, 0 ).replace( "\r\n" , "" ); - userLeftChat( handle, (data.section( ' ', 1, 1 ) == "1" ) ? i18n("timeout") : QString::null ); + TQString handle = data.section( ' ', 0, 0 ).replace( "\r\n" , "" ); + userLeftChat( handle, (data.section( ' ', 1, 1 ) == "1" ) ? i18n("timeout") : TQString::null ); } else if( cmd == "MSG" ) { - QString len = data.section( ' ', 2, 2 ); + TQString len = data.section( ' ', 2, 2 ); // we need to know who's sending is the block... m_msgHandle = data.section( ' ', 0, 0 ); @@ -229,7 +229,7 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id , //that's why the official client does not uptade alaws the nickname immediately. if(m_account->contacts()[ m_msgHandle ]) { - QString displayName=data.section( ' ', 1, 1 ); + TQString displayName=data.section( ' ', 1, 1 ); if(m_account->contacts()[ m_msgHandle ]->displayName() != displayName) m_account->contacts()[ m_msgHandle ]->rename(displayName); }*/ @@ -238,17 +238,17 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id , } } -void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) +void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes ) { - QString msg = QString::fromUtf8(bytes, bytes.size()); + TQString msg = TQString::fromUtf8(bytes, bytes.size()); - QRegExp rx("Content-Type: ([A-Za-z0-9/\\-]*)"); + TQRegExp rx("Content-Type: ([A-Za-z0-9/\\-]*)"); rx.search(msg); - QString type=rx.cap(1); + TQString type=rx.cap(1); - rx=QRegExp("User-Agent: ([A-Za-z0-9./\\-]*)"); + rx=TQRegExp("User-Agent: ([A-Za-z0-9./\\-]*)"); rx.search(msg); - QString clientStr=rx.cap(1); + TQString clientStr=rx.cap(1); if( !clientStr.isNull() && !m_msgHandle.isNull()) { @@ -264,7 +264,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) } else if( type== "text/x-msmsgscontrol" ) { - QString message; + TQString message; message = msg.right( msg.length() - msg.findRev( " " ) - 1 ); message = message.replace( "\r\n" ,"" ); emit receivedTypingMsg( message.lower(), true ); @@ -273,7 +273,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) { if(msg.contains("ID:")) { - QRegExp rx("ID: ([0-9]*)"); + TQRegExp rx("ID: ([0-9]*)"); rx.search(msg); uint dataCastId = rx.cap(1).toUInt(); if( dataCastId == 1 ) @@ -290,16 +290,16 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) // sending a text message. So if it's not supplied, we'll just // assume its that. - QColor fontColor; - QFont font; + TQColor fontColor; + TQFont font; if ( msg.contains( "X-MMS-IM-Format" ) ) { - QString fontName; - QString fontInfo; - QString color; + TQString fontName; + TQString fontInfo; + TQString color; - rx=QRegExp("X-MMS-IM-Format: ([^\r\n]*)"); + rx=TQRegExp("X-MMS-IM-Format: ([^\r\n]*)"); rx.search(msg); fontInfo =rx.cap(1); @@ -339,27 +339,27 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) // Handle 'MS Serif' and 'MS Sans Serif' as an empty font name if( !fontName.isEmpty() && fontName != "MS Serif" && fontName != "MS Sans Serif" ) { - QString ef=parseFontAttr( fontInfo, "EF" ); + TQString ef=parseFontAttr( fontInfo, "EF" ); - font = QFont( fontName, + font = TQFont( fontName, parseFontAttr( fontInfo, "PF" ).toInt(), // font size - ef.contains( 'B' ) ? QFont::Bold : QFont::Normal, + ef.contains( 'B' ) ? TQFont::Bold : TQFont::Normal, ef.contains( 'I' ) ); font.setUnderline(ef.contains( 'U' )); font.setStrikeOut(ef.contains( 'S' )); } } - QPtrList<Kopete::Contact> others; + TQPtrList<Kopete::Contact> others; others.append( m_account->myself() ); - QStringList::iterator it2; + TQStringList::iterator it2; for( it2 = m_chatMembers.begin(); it2 != m_chatMembers.end(); ++it2 ) { if( *it2 != m_msgHandle ) others.append( m_account->contacts()[ *it2 ] ); } - QString message=msg.right( msg.length() - msg.find("\r\n\r\n") - 4 ); + TQString message=msg.right( msg.length() - msg.find("\r\n\r\n") - 4 ); //Stupid MSN PLUS colors code. message with incorrect charactere are not showed correctly in the chatwindow. //TODO: parse theses one to show the color too in Kopete @@ -381,16 +381,16 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) kmsg.setFg( fontColor ); kmsg.setFont( font ); - rx=QRegExp("Chunks: ([0-9]*)"); + rx=TQRegExp("Chunks: ([0-9]*)"); rx.search(msg); unsigned int chunks=rx.cap(1).toUInt(); - rx=QRegExp("Chunk: ([0-9]*)"); + rx=TQRegExp("Chunk: ([0-9]*)"); rx.search(msg); unsigned int chunk=rx.cap(1).toUInt(); if(chunk != 0 && !m_msgQueue.isEmpty()) { - QString msg=m_msgQueue.last().plainBody(); + TQString msg=m_msgQueue.last().plainBody(); m_msgQueue.pop_back(); //removes the last item kmsg.setBody( msg+ message, Kopete::Message::PlainText ); } @@ -407,8 +407,8 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) m_msgQueue.append( kmsg ); if(!m_emoticonTimer) //to be sure no message will be lost, we will appends message to { // the queue in 15 secondes even if we have not received emoticons - m_emoticonTimer=new QTimer(this); - QObject::connect(m_emoticonTimer , SIGNAL(timeout()) , this, SLOT(cleanQueue())); + m_emoticonTimer=new TQTimer(this); + TQObject::connect(m_emoticonTimer , TQT_SIGNAL(timeout()) , this, TQT_SLOT(cleanQueue())); m_emoticonTimer->start( 15000 , true ); } } @@ -423,13 +423,13 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) config->setGroup( "MSN" ); if ( config->readBoolEntry( "useCustomEmoticons", true ) ) { - QRegExp rx("([^\\s]*)[\\s]*(<msnobj [^>]*>)"); + TQRegExp rx("([^\\s]*)[\\s]*(<msnobj [^>]*>)"); rx.setMinimal(true); int pos = rx.search(msg); while( pos != -1) { - QString msnobj=rx.cap(2); - QString txt=rx.cap(1); + TQString msnobj=rx.cap(2); + TQString txt=rx.cap(1); kdDebug(14140) << k_funcinfo << "emoticon: " << txt << " msnobj: " << msnobj<< endl; if( !m_emoticons.contains(msnobj) || !m_emoticons[msnobj].second ) @@ -453,7 +453,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) } else if( type == "text/x-clientcaps" ) { - rx=QRegExp("Client-Name: ([A-Za-z0-9.$!*/% \\-]*)"); + rx=TQRegExp("Client-Name: ([A-Za-z0-9.$!*/% \\-]*)"); rx.search(msg); clientStr=unescape( rx.cap(1) ); @@ -469,7 +469,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) KConfig *config = KGlobal::config(); config->setGroup( "MSN" ); - QString JabberID; + TQString JabberID; if(config->readBoolEntry("SendJabber", true)) JabberID=config->readEntry("JabberAccount"); @@ -479,13 +479,13 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) if( config->readBoolEntry("SendClientInfo", true) || !JabberID.isEmpty()) { - QCString message = QString( "MIME-Version: 1.0\r\n" + TQCString message = TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-clientcaps\r\n" "Client-Name: Kopete/"+escape(kapp->aboutData()->version())+"\r\n" +JabberID+ "\r\n" ).utf8(); - QString args = "U"; + TQString args = "U"; sendCommand( "MSG", args, true, message ); } m_clientcapsSent=true; @@ -496,15 +496,15 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) else if(type == "image/gif" || msg.contains("Message-ID:")) { // Incoming inkformatgif. - QRegExp regex("Message-ID: \\{([0-9A-F\\-]*)\\}"); + TQRegExp regex("Message-ID: \\{([0-9A-F\\-]*)\\}"); regex.search(msg); - QString messageId = regex.cap(1); - regex = QRegExp("Chunks: (\\d+)"); + TQString messageId = regex.cap(1); + regex = TQRegExp("Chunks: (\\d+)"); regex.search(msg); - QString chunks = regex.cap(1); - regex = QRegExp("Chunk: (\\d+)"); + TQString chunks = regex.cap(1); + regex = TQRegExp("Chunk: (\\d+)"); regex.search(msg); - QString chunk = regex.cap(1); + TQString chunk = regex.cap(1); if(!messageId.isNull()) { @@ -513,10 +513,10 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) Q_UINT32 numberOfChunks = chunks.toUInt(&valid); if(valid && (numberOfChunks > 1)) { - regex = QRegExp("base64:([0-9a-zA-Z+/=]+)"); + regex = TQRegExp("base64:([0-9a-zA-Z+/=]+)"); regex.search(msg); // Retrieve the first chunk of the ink format gif. - QString base64 = regex.cap(1); + TQString base64 = regex.cap(1); // More chunks are expected, buffer the chunk received. InkMessage inkMessage; inkMessage.chunks = numberOfChunks; @@ -527,10 +527,10 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) else { // There is only one chunk of data. - regex = QRegExp("base64:([0-9a-zA-Z+/=]*)"); + regex = TQRegExp("base64:([0-9a-zA-Z+/=]*)"); regex.search(msg); // Retrieve the base64 encoded ink data. - QString data = regex.cap(1); + TQString data = regex.cap(1); DispatchInkMessage(data); } @@ -558,9 +558,9 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes ) } } -void MSNSwitchBoardSocket::DispatchInkMessage(const QString& base64String) +void MSNSwitchBoardSocket::DispatchInkMessage(const TQString& base64String) { - QByteArray image; + TQByteArray image; // Convert from base64 encoded string to byte array. KCodecs::base64Decode(base64String.utf8() , image); KTempFile *inkImage = new KTempFile(locateLocal( "tmp", "inkformatgif-" ), ".gif"); @@ -585,18 +585,18 @@ void MSNSwitchBoardSocket::sendTypingMsg( bool isTyping ) } - QCString message = QString( "MIME-Version: 1.0\r\n" + TQCString message = TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgscontrol\r\n" "TypingUser: " + m_myHandle + "\r\n" "\r\n" ).utf8(); // Length is appended by sendCommand() - QString args = "U"; + TQString args = "U"; sendCommand( "MSG", args, true, message ); } // this Invites an Contact -void MSNSwitchBoardSocket::slotInviteContact(const QString &handle) +void MSNSwitchBoardSocket::slotInviteContact(const TQString &handle) { m_msgHandle=handle; sendCommand( "CAL", handle ); @@ -604,13 +604,13 @@ void MSNSwitchBoardSocket::slotInviteContact(const QString &handle) // // Send a custum emoticon // -int MSNSwitchBoardSocket::sendCustomEmoticon(const QString &name, const QString &filename) +int MSNSwitchBoardSocket::sendCustomEmoticon(const TQString &name, const TQString &filename) { - QString picObj; + TQString picObj; //try to find it in the cache. - const QMap<QString, QString> objectList = PeerDispatcher()->objectList; - for (QMap<QString,QString>::ConstIterator it = objectList.begin(); it != objectList.end(); ++it ) + const TQMap<TQString, TQString> objectList = PeerDispatcher()->objectList; + for (TQMap<TQString,TQString>::ConstIterator it = objectList.begin(); it != objectList.end(); ++it ) { if(it.data() == filename) { @@ -621,18 +621,18 @@ int MSNSwitchBoardSocket::sendCustomEmoticon(const QString &name, const QString if(picObj.isNull()) { //if not found in the cache, generate the picture object - QFileInfo fi(filename); + TQFileInfo fi(filename); // open the icon file - QFile pictFile(fi.filePath()); + TQFile pictFile(fi.filePath()); if (pictFile.open(IO_ReadOnly)) { - QByteArray ar = pictFile.readAll(); + TQByteArray ar = pictFile.readAll(); pictFile.close(); - QString sha1d = QString(KCodecs::base64Encode(SHA1::hash(ar))); - QString size = QString::number( pictFile.size() ); - QString all = "Creator" + m_account->accountId() + "Size" + size + "Type2Location" + fi.fileName() + "FriendlyAAA=SHA1D" + sha1d; - QString sha1c = QString(KCodecs::base64Encode(SHA1::hashString(all.utf8()))); + TQString sha1d = TQString(KCodecs::base64Encode(SHA1::hash(ar))); + TQString size = TQString::number( pictFile.size() ); + TQString all = "Creator" + m_account->accountId() + "Size" + size + "Type2Location" + fi.fileName() + "FriendlyAAA=SHA1D" + sha1d; + TQString sha1c = TQString(KCodecs::base64Encode(SHA1::hashString(all.utf8()))); picObj = "<msnobj Creator=\"" + m_account->accountId() + "\" Size=\"" + size + "\" Type=\"2\" Location=\""+ fi.fileName() + "\" Friendly=\"AAA=\" SHA1D=\""+sha1d+ "\" SHA1C=\""+sha1c+"\"/>"; PeerDispatcher()->objectList.insert(picObj, filename); @@ -641,7 +641,7 @@ int MSNSwitchBoardSocket::sendCustomEmoticon(const QString &name, const QString return 0; } - QString msg = "MIME-Version: 1.0\r\n" + TQString msg = "MIME-Version: 1.0\r\n" "Content-Type: text/x-mms-emoticon\r\n" "\r\n" + name + "\t" + picObj + "\t\r\n"; @@ -671,12 +671,12 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) config->setGroup( "MSN" ); if ( config->readBoolEntry( "exportEmoticons", false ) ) { - QMap<QString, QStringList> emap = Kopete::Emoticons::self()->emoticonAndPicList(); + TQMap<TQString, TQStringList> emap = Kopete::Emoticons::self()->emoticonAndPicList(); // Check the list for any custom emoticons - for (QMap<QString, QStringList>::const_iterator itr = emap.begin(); itr != emap.end(); itr++) + for (TQMap<TQString, TQStringList>::const_iterator itr = emap.begin(); itr != emap.end(); itr++) { - for ( QStringList::const_iterator itr2 = itr.data().constBegin(); itr2 != itr.data().constEnd(); ++itr2 ) + for ( TQStringList::const_iterator itr2 = itr.data().constBegin(); itr2 != itr.data().constEnd(); ++itr2 ) { if ( msg.plainBody().contains( *itr2 ) ) sendCustomEmoticon( *itr2, itr.key() ); @@ -686,7 +686,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) if( msg.format() & Kopete::Message::RichText ) { - QRegExp regex("^\\s*<img src=\"([^>\"]+)\"[^>]*>\\s*$"); + TQRegExp regex("^\\s*<img src=\"([^>\"]+)\"[^>]*>\\s*$"); if(regex.search(msg.escapedBody()) != -1) { // FIXME why are we sending the images.. the contact should request them. @@ -696,19 +696,19 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) } // User-Agent is not a official flag, but GAIM has it - QString UA; + TQString UA; if( config->readBoolEntry("SendClientInfo", true) ) { UA="User-Agent: Kopete/"+escape(kapp->aboutData()->version())+"\r\n"; } - QString head = + TQString head = "MIME-Version: 1.0\r\n" "Content-Type: text/plain; charset=UTF-8\r\n" +UA+ "X-MMS-IM-Format: "; - if(msg.font() != QFont() ) + if(msg.font() != TQFont() ) { //It's verry strange that if the font name is bigger than 31 char, the _server_ close the socket and don't deliver the message. // the real question is why ? my guess is that MS patched the server because a bug in their client, but that's just a guess. @@ -735,7 +735,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) // Color support if (msg.fg().isValid()) { - QString colorCode = QColor(msg.fg().blue(),msg.fg().green(),msg.fg().red()).name().remove(0,1); //colors aren't sent in RGB but in BGR (O.G.) + TQString colorCode = TQColor(msg.fg().blue(),msg.fg().green(),msg.fg().red()).name().remove(0,1); //colors aren't sent in RGB but in BGR (O.G.) head += "CO=" + colorCode; } else @@ -748,7 +748,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) head += "; RL=1"; head += "\r\n"; - QString message= msg.plainBody().replace( "\n" , "\r\n" ); + TQString message= msg.plainBody().replace( "\n" , "\r\n" ); //-- Check if the message isn't too big, TODO: do that at the libkopete level. int len_H=head.utf8().length(); // != head.length() because i need the size in butes and @@ -759,7 +759,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) //It's possible to made the opposite client join them, as explained in this MS Word document //http://www.bot-depot.com/forums/index.php?act=Attach&type=post&id=35110 - head+="Message-ID: {7B7B34E6-7A8D-44FF-926C-1799156B58"+QString::number( rand()%10)+QString::number( rand()%10)+"}\r\n"; + head+="Message-ID: {7B7B34E6-7A8D-44FF-926C-1799156B58"+TQString::number( rand()%10)+TQString::number( rand()%10)+"}\r\n"; int len_H=head.utf8().length()+ 14; //14 is the size of "Chunks: x" //this is the size of each part of the message (excluding the header) int futurmessages_size=1400; //1400 is a common good size @@ -777,7 +777,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) int chunk=0; do { - QString m=message.mid(place, futurmessages_size); + TQString m=message.mid(place, futurmessages_size); place += futurmessages_size; //make sure the size is not too big because of utf8 @@ -798,11 +798,11 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) m=m.left(len-d); place -= d; } - QString chunk_str; + TQString chunk_str; if(chunk==0) - chunk_str="Chunks: "+QString::number(nb)+"\r\n"; + chunk_str="Chunks: "+TQString::number(nb)+"\r\n"; else if(chunk<nb) - chunk_str="Chunk: "+QString::number(chunk)+"\r\n"; + chunk_str="Chunk: "+TQString::number(chunk)+"\r\n"; else { kdDebug(14140) << k_funcinfo <<"The message is slit in more than initially estimated" <<endl; @@ -815,7 +815,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) while(chunk<nb) { kdDebug(14140) << k_funcinfo <<"The message is plit in less than initially estimated. Sending empty message to complete" <<endl; - QString chunk_str="Chunk: "+QString::number(chunk); + TQString chunk_str="Chunk: "+TQString::number(chunk); sendCommand( "MSG", "A", true, (head+chunk_str+"\r\n").utf8() ); chunk++; } @@ -827,8 +827,8 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) if(!m_keepAlive) { m_keepAliveNb=20; - m_keepAlive=new QTimer(this); - QObject::connect(m_keepAlive, SIGNAL(timeout()) , this , SLOT(slotKeepAliveTimer())); + m_keepAlive=new TQTimer(this); + TQObject::connect(m_keepAlive, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotKeepAliveTimer())); m_keepAlive->start(50*1000); } @@ -838,7 +838,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg ) void MSNSwitchBoardSocket::slotSocketClosed( ) { - for( QStringList::Iterator it = m_chatMembers.begin(); it != m_chatMembers.end(); ++it ) + for( TQStringList::Iterator it = m_chatMembers.begin(); it != m_chatMembers.end(); ++it ) { emit userLeft( (*it), i18n("connection closed")); } @@ -850,7 +850,7 @@ void MSNSwitchBoardSocket::slotSocketClosed( ) void MSNSwitchBoardSocket::slotCloseSession() { - sendCommand( "OUT", QString::null, false ); + sendCommand( "OUT", TQString::null, false ); disconnect(); } @@ -859,8 +859,8 @@ void MSNSwitchBoardSocket::slotOnlineStatusChanged( MSNSocket::OnlineStatus stat { if (status == Connected) { - QCString command; - QString args; + TQCString command; + TQString args; if( !m_ID ) // we're inviting { @@ -877,14 +877,14 @@ void MSNSwitchBoardSocket::slotOnlineStatusChanged( MSNSocket::OnlineStatus stat if(!m_keepAlive) { m_keepAliveNb=20; - m_keepAlive=new QTimer(this); - QObject::connect(m_keepAlive, SIGNAL(timeout()) , this , SLOT(slotKeepAliveTimer())); + m_keepAlive=new TQTimer(this); + TQObject::connect(m_keepAlive, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotKeepAliveTimer())); m_keepAlive->start(50*1000); } } } -void MSNSwitchBoardSocket::userLeftChat(const QString& handle , const QString &reason) +void MSNSwitchBoardSocket::userLeftChat(const TQString& handle , const TQString &reason) { emit userLeft( handle, reason ); @@ -903,7 +903,7 @@ void MSNSwitchBoardSocket::requestDisplayPicture() PeerDispatcher()->requestDisplayIcon(m_msgHandle, contact->object()); } -void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const QString &msnObj ) +void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const TQString &msnObj ) { kdDebug(14141) << k_funcinfo << msnObj << endl; @@ -920,17 +920,17 @@ void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const QString } else if(msnObj == "inkformatgif") { - QString msg=i18n("<img src=\"%1\" alt=\"Typewrited message\" />" ).arg( file->name() ); + TQString msg=i18n("<img src=\"%1\" alt=\"Typewrited message\" />" ).arg( file->name() ); kdDebug(14140) << k_funcinfo << file->name() <<endl; m_typewrited.append(file); m_typewrited.setAutoDelete(true); - QPtrList<Kopete::Contact> others; + TQPtrList<Kopete::Contact> others; others.append( m_account->myself() ); - QStringList::iterator it2; + TQStringList::iterator it2; for( it2 = m_chatMembers.begin(); it2 != m_chatMembers.end(); ++it2 ) { if( *it2 != m_msgHandle ) @@ -961,11 +961,11 @@ void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const QString } } -void MSNSwitchBoardSocket::slotIncomingFileTransfer(const QString& from, const QString& /*fileName*/, Q_INT64 /*fileSize*/) +void MSNSwitchBoardSocket::slotIncomingFileTransfer(const TQString& from, const TQString& /*fileName*/, Q_INT64 /*fileSize*/) { - QPtrList<Kopete::Contact> others; + TQPtrList<Kopete::Contact> others; others.append( m_account->myself() ); - QStringList::iterator it2; + TQStringList::iterator it2; for( it2 = m_chatMembers.begin(); it2 != m_chatMembers.end(); ++it2 ) { if( *it2 != m_msgHandle ) @@ -980,7 +980,7 @@ void MSNSwitchBoardSocket::slotIncomingFileTransfer(const QString& from, const Q m_chatMembers.append( m_msgHandle ); emit userJoined( m_msgHandle , m_msgHandle , false); } - QString invite = "Incoming file transfer."; + TQString invite = "Incoming file transfer."; Kopete::Message msg = Kopete::Message(m_account->contacts()[from], others, invite, Kopete::Message::Internal, Kopete::Message::PlainText); emit msgReceived(msg); @@ -996,7 +996,7 @@ void MSNSwitchBoardSocket::cleanQueue() } kdDebug(14141) << k_funcinfo << m_msgQueue.count() << endl; - QValueList<const Kopete::Message>::Iterator it_msg; + TQValueList<const Kopete::Message>::Iterator it_msg; for ( it_msg = m_msgQueue.begin(); it_msg != m_msgQueue.end(); ++it_msg ) { Kopete::Message kmsg = (*it_msg); @@ -1007,33 +1007,33 @@ void MSNSwitchBoardSocket::cleanQueue() Kopete::Message &MSNSwitchBoardSocket::parseCustomEmoticons(Kopete::Message &kmsg) { - QString message=kmsg.escapedBody(); - QMap<QString , QPair<QString , KTempFile*> >::Iterator it; + TQString message=kmsg.escapedBody(); + TQMap<TQString , QPair<TQString , KTempFile*> >::Iterator it; for ( it = m_emoticons.begin(); it != m_emoticons.end(); ++it ) { - QString es=QStyleSheet::escape(it.data().first); + TQString es=TQStyleSheet::escape(it.data().first); KTempFile *f=it.data().second; if(message.contains(es) && f) { - QString imgPath = f->name(); - QImage iconImage(imgPath); + TQString imgPath = f->name(); + TQImage iconImage(imgPath); /* We don't use a comple algoritm (like the one in the #if) because the msn client shows * emoticons like that. So, in that case, we show like the MSN client */ #if 0 - QString em = QRegExp::escape( es ); - message.replace( QRegExp(QString::fromLatin1( "(^|[\\W\\s]|%1)(%2)(?!\\w)" ).arg(em).arg(em)), - QString::fromLatin1("\\1<img align=\"center\" width=\"") + + TQString em = TQRegExp::escape( es ); + message.replace( TQRegExp(TQString::fromLatin1( "(^|[\\W\\s]|%1)(%2)(?!\\w)" ).arg(em).arg(em)), + TQString::fromLatin1("\\1<img align=\"center\" width=\"") + #endif //match any occurence which is not in a html tag. - message.replace( QRegExp(QString::fromLatin1("%1(?![^><]*>)").arg(QRegExp::escape(es))), - QString::fromLatin1("<img align=\"center\" width=\"") + - QString::number(iconImage.width()) + - QString::fromLatin1("\" height=\"") + - QString::number(iconImage.height()) + - QString::fromLatin1("\" src=\"") + imgPath + - QString::fromLatin1("\" title=\"") + es + - QString::fromLatin1("\" alt=\"") + es + - QString::fromLatin1( "\"/>" ) ); + message.replace( TQRegExp(TQString::fromLatin1("%1(?![^><]*>)").arg(TQRegExp::escape(es))), + TQString::fromLatin1("<img align=\"center\" width=\"") + + TQString::number(iconImage.width()) + + TQString::fromLatin1("\" height=\"") + + TQString::number(iconImage.height()) + + TQString::fromLatin1("\" src=\"") + imgPath + + TQString::fromLatin1("\" title=\"") + es + + TQString::fromLatin1("\" alt=\"") + es + + TQString::fromLatin1( "\"/>" ) ); kmsg.setBody(message, Kopete::Message::RichText); } } @@ -1042,22 +1042,22 @@ Kopete::Message &MSNSwitchBoardSocket::parseCustomEmoticons(Kopete::Message &kms int MSNSwitchBoardSocket::sendNudge() { - QCString message = QString( "MIME-Version: 1.0\r\n" + TQCString message = TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msnmsgr-datacast\r\n" "\r\n" "ID: 1\r\n" "\r\n\r\n" ).utf8(); - QString args = "U"; + TQString args = "U"; return sendCommand( "MSG", args, true, message ); } // FIXME: This is nasty... replace with a regexp or so. -QString MSNSwitchBoardSocket::parseFontAttr(QString str, QString attr) +TQString MSNSwitchBoardSocket::parseFontAttr(TQString str, TQString attr) { - QString tmp; + TQString tmp; int pos1=0, pos2=0; pos1 = str.find(attr + "="); @@ -1081,7 +1081,7 @@ Dispatcher* MSNSwitchBoardSocket::PeerDispatcher() { // Create a new msnslp dispatcher to handle // all peer to peer requests. - QStringList ip; + TQStringList ip; if(m_account->notifySocket()) { ip << m_account->notifySocket()->localIP(); @@ -1090,11 +1090,11 @@ Dispatcher* MSNSwitchBoardSocket::PeerDispatcher() } m_dispatcher = new Dispatcher(this, m_account->accountId(),ip ); -// QObject::connect(this, SIGNAL(blockRead(const QByteArray&)), m_dispatcher, SLOT(slotReadMessage(const QByteArray&))); -// QObject::connect(m_dispatcher, SIGNAL(sendCommand(const QString&, const QString&, bool, const QByteArray&, bool)), this, SLOT(sendCommand(const QString&, const QString&, bool, const QByteArray&, bool))); - QObject::connect(m_dispatcher, SIGNAL(incomingTransfer(const QString&, const QString&, Q_INT64)), this, SLOT(slotIncomingFileTransfer(const QString&, const QString&, Q_INT64))); - QObject::connect(m_dispatcher, SIGNAL(displayIconReceived(KTempFile *, const QString&)), this, SLOT(slotEmoticonReceived( KTempFile *, const QString&))); - QObject::connect(this, SIGNAL(msgAcknowledgement(unsigned int, bool)), m_dispatcher, SLOT(messageAcknowledged(unsigned int, bool))); +// TQObject::connect(this, TQT_SIGNAL(blockRead(const TQByteArray&)), m_dispatcher, TQT_SLOT(slotReadMessage(const TQByteArray&))); +// TQObject::connect(m_dispatcher, TQT_SIGNAL(sendCommand(const TQString&, const TQString&, bool, const TQByteArray&, bool)), this, TQT_SLOT(sendCommand(const TQString&, const TQString&, bool, const TQByteArray&, bool))); + TQObject::connect(m_dispatcher, TQT_SIGNAL(incomingTransfer(const TQString&, const TQString&, Q_INT64)), this, TQT_SLOT(slotIncomingFileTransfer(const TQString&, const TQString&, Q_INT64))); + TQObject::connect(m_dispatcher, TQT_SIGNAL(displayIconReceived(KTempFile *, const TQString&)), this, TQT_SLOT(slotEmoticonReceived( KTempFile *, const TQString&))); + TQObject::connect(this, TQT_SIGNAL(msgAcknowledgement(unsigned int, bool)), m_dispatcher, TQT_SLOT(messageAcknowledged(unsigned int, bool))); m_dispatcher->m_pictureUrl = m_account->pictureUrl(); } return m_dispatcher; @@ -1120,12 +1120,12 @@ void MSNSwitchBoardSocket::slotKeepAliveTimer( ) } - QCString message = QString( "MIME-Version: 1.0\r\n" + TQCString message = TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-keepalive\r\n" "\r\n" ).utf8(); // Length is appended by sendCommand() - QString args = "U"; + TQString args = "U"; sendCommand( "MSG", args, true, message ); m_keepAliveNb--; diff --git a/kopete/protocols/msn/msnswitchboardsocket.h b/kopete/protocols/msn/msnswitchboardsocket.h index 5a6f9628..70cb7fa0 100644 --- a/kopete/protocols/msn/msnswitchboardsocket.h +++ b/kopete/protocols/msn/msnswitchboardsocket.h @@ -21,9 +21,9 @@ #ifndef MSNSWITCHBOARDSOCKET_H #define MSNSWITCHBOARDSOCKET_H -#include <qobject.h> -#include <qstrlist.h> -#include <qvaluevector.h> +#include <tqobject.h> +#include <tqstrlist.h> +#include <tqvaluevector.h> #include <kstringhandler.h> @@ -48,37 +48,37 @@ public: /** * Contructor: id is the KopeteMessageMangager's id */ - MSNSwitchBoardSocket( MSNAccount * account , QObject *parent); + MSNSwitchBoardSocket( MSNAccount * account , TQObject *parent); ~MSNSwitchBoardSocket(); private: P2P::Dispatcher *m_dispatcher; MSNAccount *m_account; - QString m_myHandle; // our handle + TQString m_myHandle; // our handle // contains the handle of the last person that msg'ed us. // since we receive the actual message by readBlock(), we need // to remember what the handle was of the person sending us the message. - QString m_msgHandle; + TQString m_msgHandle; - QString m_ID; - QString m_auth; - QStringList m_chatMembers; + TQString m_ID; + TQString m_auth; + TQStringList m_chatMembers; //used for emoticons - QValueList<const Kopete::Message> m_msgQueue; + TQValueList<const Kopete::Message> m_msgQueue; unsigned m_recvIcons; - QMap<QString , QPair<QString , KTempFile*> > m_emoticons; + TQMap<TQString , QPair<TQString , KTempFile*> > m_emoticons; Kopete::Message &parseCustomEmoticons(Kopete::Message &msg); - QTimer *m_emoticonTimer; - QPtrList<KTempFile> m_typewrited; + TQTimer *m_emoticonTimer; + TQPtrList<KTempFile> m_typewrited; struct InkMessage{ Q_UINT32 chunks; - QString data; + TQString data; }; - QMap<QString, InkMessage> m_inkMessageBuffer; + TQMap<TQString, InkMessage> m_inkMessageBuffer; /** the number of chunk for currents messages */ unsigned int m_chunks; @@ -87,33 +87,33 @@ private: bool m_clientcapsSent; private: - void DispatchInkMessage(const QString &base64String); + void DispatchInkMessage(const TQString &base64String); protected: /** * Handle an MSN command response line. */ - virtual void parseCommand( const QString &cmd, uint id, - const QString &data ); + virtual void parseCommand( const TQString &cmd, uint id, + const TQString &data ); /** * Handle exceptions that might occur during a chat. */ virtual void handleError( uint code, uint id ); - QString parseFontAttr( QString str, QString attr ); + TQString parseFontAttr( TQString str, TQString attr ); public: - void connectToSwitchBoard( QString ID, QString address, QString auth ); - void setHandle( QString handle ) { m_myHandle = handle; } - void setMsgHandle( QString handle ) { m_msgHandle = handle; } + void connectToSwitchBoard( TQString ID, TQString address, TQString auth ); + void setHandle( TQString handle ) { m_myHandle = handle; } + void setMsgHandle( TQString handle ) { m_msgHandle = handle; } - const QStringList &chatMembers() { return m_chatMembers; } + const TQStringList &chatMembers() { return m_chatMembers; } - void userLeftChat( const QString &handle , const QString &reason ); + void userLeftChat( const TQString &handle , const TQString &reason ); int sendMsg( const Kopete::Message &msg ); - int sendCustomEmoticon(const QString &name, const QString &filename); + int sendCustomEmoticon(const TQString &name, const TQString &filename); int sendNudge(); @@ -121,7 +121,7 @@ public: public slots: void slotCloseSession(); - void slotInviteContact(const QString &handle); + void slotInviteContact(const TQString &handle); /** * Notify the server that the user is typing a message @@ -131,7 +131,7 @@ public slots: void requestDisplayPicture(); /** workaround Bug 113425 . see slotKeepAliveTimer() **/ - QTimer *m_keepAlive; + TQTimer *m_keepAlive; int m_keepAliveNb; @@ -139,9 +139,9 @@ public slots: private slots: void slotOnlineStatusChanged( MSNSocket::OnlineStatus status ); void slotSocketClosed( ); - void slotReadMessage( const QByteArray &bytes ); - void slotEmoticonReceived( KTempFile *, const QString& ); - void slotIncomingFileTransfer(const QString& from, const QString& fileName, Q_INT64 fileSize); + void slotReadMessage( const TQByteArray &bytes ); + void slotEmoticonReceived( KTempFile *, const TQString& ); + void slotIncomingFileTransfer(const TQString& from, const TQString& fileName, Q_INT64 fileSize); void cleanQueue(); /** workaround Bug 113425 . see comment inside the function **/ @@ -149,14 +149,14 @@ private slots: signals: void msgReceived( Kopete::Message &msg ); - void receivedTypingMsg( const QString &contactId, bool isTyping ); + void receivedTypingMsg( const TQString &contactId, bool isTyping ); void msgAcknowledgement(unsigned int, bool); - void userJoined(const QString& handle , const QString &publicName , bool IRO); - void userLeft(const QString& handle , const QString &reason); - void nudgeReceived(const QString &handle); + void userJoined(const TQString& handle , const TQString &publicName , bool IRO); + void userLeft(const TQString& handle , const TQString &reason); + void nudgeReceived(const TQString &handle); void switchBoardClosed( ); - void invitation(const QString& handle, const QString& msg); + void invitation(const TQString& handle, const TQString& msg); }; diff --git a/kopete/protocols/msn/outgoingtransfer.cpp b/kopete/protocols/msn/outgoingtransfer.cpp index 4879cf52..f6b71c12 100644 --- a/kopete/protocols/msn/outgoingtransfer.cpp +++ b/kopete/protocols/msn/outgoingtransfer.cpp @@ -26,9 +26,9 @@ using namespace KNetwork; // Qt includes -#include <qfile.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqtimer.h> // Kopete includes #include <kopetetransfermanager.h> @@ -39,7 +39,7 @@ using P2P::Dispatcher; using P2P::OutgoingTransfer; using P2P::Message; -OutgoingTransfer::OutgoingTransfer(const QString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId) +OutgoingTransfer::OutgoingTransfer(const TQString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId) : TransferContext(to,dispatcher,sessionId) { m_direction = Outgoing; @@ -51,12 +51,12 @@ OutgoingTransfer::~OutgoingTransfer() kdDebug(14140) << k_funcinfo << endl; } -void OutgoingTransfer::sendImage(const QByteArray& image) +void OutgoingTransfer::sendImage(const TQByteArray& image) { -// TODO QByteArray base64 = KCodecs::base64Encode(image); +// TODO TQByteArray base64 = KCodecs::base64Encode(image); // -// QCString body = "MIME-Version: 1.0\r\n" +// TQCString body = "MIME-Version: 1.0\r\n" // "Content-Type: image/gif\r\n" // "\r\n" // "base64:" + @@ -71,7 +71,7 @@ void OutgoingTransfer::sendImage(const QByteArray& image) // outbound.header.ackSessionIdentifier = rand()%0x8FFFFFF0 + 4; // outbound.header.ackUniqueIdentifier = 0; // outbound.header.ackDataSize = 0l; -// QByteArray bytes(4); +// TQByteArray bytes(4); // bytes.fill('\0'); // outbound.body = bytes; // outbound.applicationIdentifier = 0; @@ -84,7 +84,7 @@ void OutgoingTransfer::sendImage(const QByteArray& image) void OutgoingTransfer::slotSendData() { Q_INT32 bytesRead = 0; - QByteArray buffer(1202); + TQByteArray buffer(1202); if(!m_file) return; @@ -101,7 +101,7 @@ void OutgoingTransfer::slotSendData() buffer.resize(bytesRead); } - kdDebug(14140) << k_funcinfo << QString("Sending, %1 bytes").arg(bytesRead) << endl; + kdDebug(14140) << k_funcinfo << TQString("Sending, %1 bytes").arg(bytesRead) << endl; if((m_offset + bytesRead) < m_file->size()) { @@ -193,8 +193,8 @@ void OutgoingTransfer::acknowledged() void OutgoingTransfer::processMessage(const Message& message) { - QString body = - QCString(message.body.data(), message.header.dataSize); + TQString body = + TQCString(message.body.data(), message.header.dataSize); kdDebug(14140) << k_funcinfo << "received, " << body << endl; if(body.startsWith("BYE")) @@ -217,9 +217,9 @@ void OutgoingTransfer::processMessage(const Message& message) else if(body.startsWith("MSNSLP/1.0 200 OK")) { // Retrieve the message content type. - QRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)"); + TQRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)"); regex.search(body); - QString contentType = regex.cap(1); + TQString contentType = regex.cap(1); if(contentType == "application/x-msnmsgr-sessionreqbody") { @@ -246,19 +246,19 @@ void OutgoingTransfer::processMessage(const Message& message) m_transfer = Kopete::TransferManager::transferManager()->addTransfer(contact, m_file->name(), m_file->size(), m_recipient, Kopete::FileTransferInfo::Outgoing); - QObject::connect(m_transfer , SIGNAL(transferCanceled()), this, SLOT(abort())); + TQObject::connect(m_transfer , TQT_SIGNAL(transferCanceled()), this, TQT_SLOT(abort())); m_state = Negotiation; m_branch = P2P::Uid::createUid(); // Send the direct connection invitation message. - QString content = "Bridges: TRUDPv1 TCPv1\r\n" + - QString("NetID: %1\r\n").arg("-123657987") + - QString("Conn-Type: %1\r\n").arg("Restrict-NAT") + + TQString content = "Bridges: TRUDPv1 TCPv1\r\n" + + TQString("NetID: %1\r\n").arg("-123657987") + + TQString("Conn-Type: %1\r\n").arg("Restrict-NAT") + "UPnPNat: false\r\n" "ICF: false\r\n" + - QString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) + + TQString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) + "\r\n"; sendMessage(INVITE, content); } @@ -266,7 +266,7 @@ void OutgoingTransfer::processMessage(const Message& message) { // Determine whether the recipient created // a listening endpoint. - regex = QRegExp("Listening: ([^\r\n]+)\r\n"); + regex = TQRegExp("Listening: ([^\r\n]+)\r\n"); regex.search(body); bool isListening = (regex.cap(1) == "true"); @@ -281,16 +281,16 @@ void OutgoingTransfer::processMessage(const Message& message) if(isListening) { // Retrieve the hashed nonce for this direct connection instance. - regex = QRegExp("Hashed-Nonce: \\{([0-9A-F\\-]*)\\}\r\n"); + regex = TQRegExp("Hashed-Nonce: \\{([0-9A-F\\-]*)\\}\r\n"); regex.search(body); m_nonce = regex.cap(1); // Retrieve the listening endpoints of the receiving client. - regex = QRegExp("IPv4Internal-Addrs: ([^\r\n]+)\r\n"); + regex = TQRegExp("IPv4Internal-Addrs: ([^\r\n]+)\r\n"); regex.search(body); - m_peerEndpoints = QStringList::split(" ", regex.cap(1)); + m_peerEndpoints = TQStringList::split(" ", regex.cap(1)); m_endpointIterator = m_peerEndpoints.begin(); // Retrieve the listening port of the receiving client. - regex = QRegExp("IPv4Internal-Port: ([^\r\n]+)\r\n"); + regex = TQRegExp("IPv4Internal-Port: ([^\r\n]+)\r\n"); regex.search(body); m_remotePort = regex.cap(1); @@ -336,7 +336,7 @@ void OutgoingTransfer::readyToSend() slotSendData(); } -void OutgoingTransfer::connectToEndpoint(const QString& hostName) +void OutgoingTransfer::connectToEndpoint(const TQString& hostName) { m_socket = new KBufferedSocket(hostName, m_remotePort); m_socket->setBlocking(false); @@ -345,10 +345,10 @@ void OutgoingTransfer::connectToEndpoint(const QString& hostName) // when we are ready to sent data. // NOTE readyWrite consumes too much cpu usage. m_socket->enableWrite(false); - QObject::connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotRead())); - QObject::connect(m_socket, SIGNAL(connected(const KResolverEntry&)), this, SLOT(slotConnected())); - QObject::connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int))); - QObject::connect(m_socket, SIGNAL(closed()), this, SLOT(slotSocketClosed())); + TQObject::connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotRead())); + TQObject::connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry&)), this, TQT_SLOT(slotConnected())); + TQObject::connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int))); + TQObject::connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed())); // Try to connect to the endpoint. m_socket->connect(); } @@ -357,13 +357,13 @@ void OutgoingTransfer::slotConnected() { kdDebug(14140) << k_funcinfo << endl; // Check if connection is ok. - Q_UINT32 bytesWritten = m_socket->writeBlock(QCString("foo").data(), 4); + Q_UINT32 bytesWritten = m_socket->writeBlock(TQCString("foo").data(), 4); if(bytesWritten != 4) { // Not all data was written, close the socket. m_socket->closeNow(); // Schedule the data to be sent through the existing session. - QTimer::singleShot(2000, this, SLOT(slotSendData())); + TQTimer::singleShot(2000, this, TQT_SLOT(slotSendData())); return; } @@ -377,7 +377,7 @@ void OutgoingTransfer::slotConnected() // Set the flag to indicate that this is // a direct connection handshake message. handshake.header.flag = 0x100; - QString nonce = m_nonce.remove('-'); + TQString nonce = m_nonce.remove('-'); handshake.header.ackSessionIdentifier = nonce.mid(0, 8).toUInt(0, 16); handshake.header.ackUniqueIdentifier = nonce.mid(8, 4).toUInt(0, 16) | (nonce.mid(12, 4).toUInt(0, 16) << 16); @@ -386,7 +386,7 @@ void OutgoingTransfer::slotConnected() handshake.header.ackDataSize = ((Q_INT64)htonl(lo)) | (((Q_INT64)htonl(hi)) << 32); - QByteArray stream; + TQByteArray stream; // Write the message to the memory stream. m_messageFormatter.writeMessage(handshake, stream, true); // Send the byte stream over the wire. @@ -418,7 +418,7 @@ void OutgoingTransfer::slotSocketError(int) { // Otherwise, send the data through the session. m_identifier -= 1; - QTimer::singleShot(2000, this, SLOT(slotSendData())); + TQTimer::singleShot(2000, this, TQT_SLOT(slotSendData())); } } diff --git a/kopete/protocols/msn/outgoingtransfer.h b/kopete/protocols/msn/outgoingtransfer.h index 014971ef..ee55593f 100644 --- a/kopete/protocols/msn/outgoingtransfer.h +++ b/kopete/protocols/msn/outgoingtransfer.h @@ -19,7 +19,7 @@ #include "p2p.h" #include "dispatcher.h" -#include <qstringlist.h> +#include <tqstringlist.h> /** @author Kopete Developers @@ -28,10 +28,10 @@ namespace P2P{ class OutgoingTransfer : public TransferContext { Q_OBJECT public: - OutgoingTransfer(const QString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId); + OutgoingTransfer(const TQString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId); virtual ~OutgoingTransfer(); - void sendImage(const QByteArray& image); + void sendImage(const TQByteArray& image); private slots: void slotConnected(); @@ -42,13 +42,13 @@ namespace P2P{ private: virtual void acknowledged(); - void connectToEndpoint(const QString& hostName); + void connectToEndpoint(const TQString& hostName); virtual void processMessage(const Message& message); - QStringList m_peerEndpoints; - QStringList::Iterator m_endpointIterator; - QString m_remotePort; - QString m_nonce; + TQStringList m_peerEndpoints; + TQStringList::Iterator m_endpointIterator; + TQString m_remotePort; + TQString m_nonce; char m_handshake; protected: diff --git a/kopete/protocols/msn/p2p.cpp b/kopete/protocols/msn/p2p.cpp index 219fd935..1aa3ddae 100644 --- a/kopete/protocols/msn/p2p.cpp +++ b/kopete/protocols/msn/p2p.cpp @@ -27,25 +27,25 @@ using P2P::TransferType; #include <kbufferedsocket.h> #include <kdebug.h> // Qt includes -#include <qfile.h> +#include <tqfile.h> // Kopete includes #include <kopetetransfermanager.h> -QString P2P::Uid::createUid() +TQString P2P::Uid::createUid() { - return (QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" - + QString::number(rand()%0xAAFF+0x1111, 16) + "-" - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)).upper(); + return (TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" + + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" + + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" + + TQString::number(rand()%0xAAFF+0x1111, 16) + "-" + + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)).upper(); } -TransferContext::TransferContext(const QString &contact, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId) - : QObject(dispatcher) , +TransferContext::TransferContext(const TQString &contact, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId) + : TQObject(dispatcher) , m_sessionId(sessionId) , m_identifier(0) , m_file(0) , @@ -115,7 +115,7 @@ void TransferContext::acknowledge(const Message& message) outbound.applicationIdentifier = 0l; outbound.destination = m_recipient; - QByteArray stream; + TQByteArray stream; // Write the acknowledge message to the stream. m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l)); if(!m_socket) @@ -137,7 +137,7 @@ void TransferContext::error() m_dispatcher->detach(this); } -void TransferContext::sendData(const QByteArray& bytes) +void TransferContext::sendData(const TQByteArray& bytes) { Message outbound; outbound.header.sessionId = m_sessionId; @@ -166,7 +166,7 @@ void TransferContext::sendData(const QByteArray& bytes) outbound.destination = m_recipient; - QByteArray stream; + TQByteArray stream; m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l)); if(!m_socket) { @@ -194,19 +194,19 @@ void TransferContext::sendDataPreparation() outbound.header.ackSessionIdentifier = rand()%0x8FFFFFF0 + 4; outbound.header.ackUniqueIdentifier = 0; outbound.header.ackDataSize = 0l; - QByteArray bytes(4); + TQByteArray bytes(4); bytes.fill('\0'); outbound.body = bytes; outbound.applicationIdentifier = 1; outbound.destination = m_recipient; - QByteArray stream; + TQByteArray stream; m_messageFormatter.writeMessage(outbound, stream); // Send the receiving client the data prepartion message. m_dispatcher->callbackChannel()->send(stream); } -void TransferContext::sendMessage(MessageType type, const QString& content, Q_INT32 flag, Q_INT32 appId) +void TransferContext::sendMessage(MessageType type, const TQString& content, Q_INT32 flag, Q_INT32 appId) { Message outbound; if(appId != 0){ @@ -237,7 +237,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN outbound.applicationIdentifier = appId; outbound.destination = m_recipient; - QString contentType, cSeq, method; + TQString contentType, cSeq, method; switch(m_state) { @@ -295,7 +295,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN break; } - QCString body = QString(method + "\r\n" + TQCString body = TQString(method + "\r\n" "To: <msnmsgr:" + m_recipient + ">\r\n" "From: <msnmsgr:" + m_sender + ">\r\n" "Via: MSNSLP/1.0/TLP ;branch={" + m_branch.upper() + "}\r\n" @@ -303,12 +303,12 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN "Call-ID: {" + m_callId.upper() + "}\r\n" "Max-Forwards: 0\r\n" "Content-Type: " + contentType + "\r\n" - "Content-Length: "+ QString::number(content.length() + 1) + "\r\n" + "Content-Length: "+ TQString::number(content.length() + 1) + "\r\n" "\r\n" + content).utf8(); // NOTE The body must have a null character at the end. - // QCString by chance automatically adds a \0 to the + // TQCString by chance automatically adds a \0 to the // end of the string. outbound.header.totalDataSize = body.size(); @@ -316,7 +316,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN sendMessage(outbound, body); } -void TransferContext::sendMessage(Message& outbound, const QByteArray& body) +void TransferContext::sendMessage(Message& outbound, const TQByteArray& body) { Q_INT64 offset = 0L, bytesLeft = outbound.header.totalDataSize; Q_INT16 chunkLength = 1202; @@ -343,10 +343,10 @@ void TransferContext::sendMessage(Message& outbound, const QByteArray& body) } kdDebug(14140) << k_funcinfo << - QCString(outbound.body.data(), outbound.body.size()) + TQCString(outbound.body.data(), outbound.body.size()) << endl; - QByteArray stream; + TQByteArray stream; // Write the outbound message to the stream. m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l)); if(!m_socket) diff --git a/kopete/protocols/msn/p2p.h b/kopete/protocols/msn/p2p.h index c9b29af1..426b8dc5 100644 --- a/kopete/protocols/msn/p2p.h +++ b/kopete/protocols/msn/p2p.h @@ -18,7 +18,7 @@ #define P2P_H // Qt includes -#include <qobject.h> +#include <tqobject.h> #include "messageformatter.h" #include "kopete_export.h" @@ -41,7 +41,7 @@ namespace System{ public: ~Guid(){} static Guid newGuid(); - QString toString(); + TQString toString(); private: Guid(){} @@ -78,19 +78,19 @@ namespace P2P{ struct Message { public: - QString mimeVersion; - QString contentType; - QString destination; - QString source; + TQString mimeVersion; + TQString contentType; + TQString destination; + TQString source; TransportHeader header; - QByteArray body; + TQByteArray body; Q_INT32 applicationIdentifier; bool attachApplicationIdentifier; }; class KOPETE_EXPORT Uid { - public: static QString createUid(); + public: static TQString createUid(); }; class KOPETE_EXPORT TransferContext : public QObject @@ -103,20 +103,20 @@ namespace P2P{ void error(); virtual void processMessage(const P2P::Message& message) = 0; void sendDataPreparation(); - void sendMessage(MessageType type, const QString& content=QString::null, Q_INT32 flag=0, Q_INT32 appId=0); + void sendMessage(MessageType type, const TQString& content=TQString::null, Q_INT32 flag=0, Q_INT32 appId=0); void setType(TransferType type); public: Q_UINT32 m_sessionId; Q_UINT32 m_identifier; - QFile *m_file; + TQFile *m_file; Q_UINT32 m_transactionId; Q_UINT32 m_ackSessionIdentifier; Q_UINT32 m_ackUniqueIdentifier; Kopete::Transfer *m_transfer; - QString m_branch; - QString m_callId; - QString m_object; + TQString m_branch; + TQString m_callId; + TQString m_object; public slots: @@ -124,9 +124,9 @@ namespace P2P{ void readyWrite(); protected: - TransferContext(const QString& contact, P2P::Dispatcher *dispatcher,Q_UINT32 sessionId); - void sendData(const QByteArray& bytes); - void sendMessage(P2P::Message& outbound, const QByteArray& body); + TransferContext(const TQString& contact, P2P::Dispatcher *dispatcher,Q_UINT32 sessionId); + void sendData(const TQByteArray& bytes); + void sendMessage(P2P::Message& outbound, const TQByteArray& body); virtual void readyToSend(); Q_UINT32 m_baseIdentifier; @@ -136,8 +136,8 @@ namespace P2P{ Q_INT64 m_offset; Q_INT64 m_totalDataSize; P2P::MessageFormatter m_messageFormatter; - QString m_recipient; - QString m_sender; + TQString m_recipient; + TQString m_sender; KNetwork::KBufferedSocket *m_socket; CommunicationState m_state; TransferType m_type; diff --git a/kopete/protocols/msn/sha1.cpp b/kopete/protocols/msn/sha1.cpp index 84ad13ad..0774cede 100644 --- a/kopete/protocols/msn/sha1.cpp +++ b/kopete/protocols/msn/sha1.cpp @@ -159,10 +159,10 @@ void SHA1::final(unsigned char digest[20], SHA1_CONTEXT* context) memset(&finalcount, 0, 8); } -QByteArray SHA1::hash(const QByteArray &a) +TQByteArray SHA1::hash(const TQByteArray &a) { SHA1_CONTEXT context; - QByteArray b(20); + TQByteArray b(20); SHA1 s; s.init(&context); @@ -171,19 +171,19 @@ QByteArray SHA1::hash(const QByteArray &a) return b; } -QByteArray SHA1::hashString(const QCString &cs) +TQByteArray SHA1::hashString(const TQCString &cs) { - QByteArray a(cs.length()); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return SHA1::hash(a); } -QString SHA1::digest(const QString &in) +TQString SHA1::digest(const TQString &in) { - QByteArray a = SHA1::hashString(in.utf8()); - QString out; + TQByteArray a = SHA1::hashString(in.utf8()); + TQString out; for(int n = 0; n < (int)a.size(); ++n) { - QString str; + TQString str; str.sprintf("%02x", (uchar)a[n]); out.append(str); } diff --git a/kopete/protocols/msn/sha1.h b/kopete/protocols/msn/sha1.h index 24f31af0..2038b9e7 100644 --- a/kopete/protocols/msn/sha1.h +++ b/kopete/protocols/msn/sha1.h @@ -21,14 +21,14 @@ #ifndef CS_SHA1_H #define CS_SHA1_H -#include<qstring.h> +#include<tqstring.h> class SHA1 { public: - static QByteArray hash(const QByteArray &); - static QByteArray hashString(const QCString &); - static QString digest(const QString &); + static TQByteArray hash(const TQByteArray &); + static TQByteArray hashString(const TQCString &); + static TQString digest(const TQString &); private: SHA1(); diff --git a/kopete/protocols/msn/transport.cpp b/kopete/protocols/msn/transport.cpp index 492117b6..904e9411 100644 --- a/kopete/protocols/msn/transport.cpp +++ b/kopete/protocols/msn/transport.cpp @@ -34,8 +34,8 @@ using namespace KNetwork; namespace PeerToPeer { -Transport::Transport(QObject* parent, const char* name) - : QObject(parent, name) +Transport::Transport(TQObject* parent, const char* name) + : TQObject(parent, name) { mFormatter = new PeerToPeer::MessageFormatter(this); } @@ -47,7 +47,7 @@ Transport::~Transport() //BEGIN Public Methods -TransportBridge* Transport::getBridge (const QString& to, Q_UINT16 port, TransportBridgeType type, const QString& identifier) +TransportBridge* Transport::getBridge (const TQString& to, Q_UINT16 port, TransportBridgeType type, const TQString& identifier) { TransportBridge *bridge = 0l; KInetSocketAddress address; @@ -72,7 +72,7 @@ TransportBridge* Transport::getBridge (const QString& to, Q_UINT16 port, Transpo if (bridge != 0l) { - QObject::connect(bridge, SIGNAL(readyRead(const QByteArray&)), SLOT(slotOnReceive(const QByteArray&))); + TQObject::connect(bridge, TQT_SIGNAL(readyRead(const TQByteArray&)), TQT_SLOT(slotOnReceive(const TQByteArray&))); } return 0l; @@ -81,7 +81,7 @@ TransportBridge* Transport::getBridge (const QString& to, Q_UINT16 port, Transpo void Transport::setDefaultBridge(MSNSwitchBoardSocket* mss) { mDefaultBridge = mss; - QObject::connect((MSNSwitchBoardSocket*)mDefaultBridge, SIGNAL(messageReceived(const QString&, const QByteArray&)), SLOT(slotOnReceive(const QString&, const QByteArray&))); + TQObject::connect((MSNSwitchBoardSocket*)mDefaultBridge, TQT_SIGNAL(messageReceived(const TQString&, const TQByteArray&)), TQT_SLOT(slotOnReceive(const TQString&, const TQByteArray&))); } //END @@ -92,7 +92,7 @@ void Transport::setDefaultBridge(MSNSwitchBoardSocket* mss) // { // } -void Transport::slotOnReceive(const QString& contact, const QByteArray& bytes) +void Transport::slotOnReceive(const TQString& contact, const TQByteArray& bytes) { kdDebug (14140) << k_funcinfo << " >> RECEIVED " << bytes.size() << " bytes." << endl; // Message message = mFormatter->readMessage(bytes); @@ -103,15 +103,15 @@ void Transport::slotOnReceive(const QString& contact, const QByteArray& bytes) -TransportBridge::TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name) -: QObject(parent, name) +TransportBridge::TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name) +: TQObject(parent, name) { mAddress = to; mFormatter = formatter; } -TransportBridge::TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name) -: QObject(parent, name) +TransportBridge::TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name) +: TQObject(parent, name) { mSocket = socket; mAddress = mSocket->peerAddress(); @@ -166,17 +166,17 @@ void TransportBridge::slotOnSocketReceive() -TcpTransportBridge::TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name) +TcpTransportBridge::TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name) : TransportBridge(to, formatter, parent, name) { - mSocket = new KStreamSocket(mAddress.ipAddress().toString(), QString::number(mAddress.port()), this); + mSocket = new KStreamSocket(mAddress.ipAddress().toString(), TQString::number(mAddress.port()), this); mSocket->setBlocking(false); - QObject::connect(mSocket, SIGNAL(connected(const KResolverEntry&)), SLOT(slotOnSocketConnect())); - QObject::connect(mSocket, SIGNAL(gotError(int)), SLOT(slotOnError(int))); + TQObject::connect(mSocket, TQT_SIGNAL(connected(const KResolverEntry&)), TQT_SLOT(slotOnSocketConnect())); + TQObject::connect(mSocket, TQT_SIGNAL(gotError(int)), TQT_SLOT(slotOnError(int))); mConnected = false; } -TcpTransportBridge::TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name) +TcpTransportBridge::TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name) : TransportBridge(socket, formatter, parent, name) { mConnected = (mSocket->state() == KStreamSocket::Open) ? true : false; @@ -199,7 +199,7 @@ void TcpTransportBridge::slotOnConnect() KStreamSocket *socket = static_cast<KStreamSocket*>(mSocket); socket->setTimeout(5000); - QObject::connect(socket, SIGNAL(timeOut()), SLOT(slotOnSocketConnectTimeout())); + TQObject::connect(socket, TQT_SIGNAL(timeOut()), TQT_SLOT(slotOnSocketConnectTimeout())); mSocket->connect(); } @@ -213,7 +213,7 @@ void TcpTransportBridge::slotOnDisconnect() void TcpTransportBridge::slotOnError(int errorCode) { kdDebug(14140) << k_funcinfo << "Bridge (" << name() << ") ERROR occurred on {" << mSocket->localAddress().toString() << " <-> " << mSocket->peerAddress().toString() << "} - " << mSocket->errorString() << endl; - emit bridgeError(QString("Bridge ERROR %1: %2").arg(errorCode).arg(mSocket->errorString())); + emit bridgeError(TQString("Bridge ERROR %1: %2").arg(errorCode).arg(mSocket->errorString())); if (mConnected){ mSocket->disconnect(); mConnected = false; @@ -239,13 +239,13 @@ void TcpTransportBridge::slotOnSocketConnect() << mSocket->localAddress().toString() << endl; mConnected = true; - QObject::connect(mSocket, SIGNAL(readyRead()), SLOT(slotOnSocketReceive())); - QObject::connect(mSocket, SIGNAL(closed()), SLOT(slotOnSocketClose())); + TQObject::connect(mSocket, TQT_SIGNAL(readyRead()), TQT_SLOT(slotOnSocketReceive())); + TQObject::connect(mSocket, TQT_SIGNAL(closed()), TQT_SLOT(slotOnSocketClose())); mVerified = true; - QString foo = "foo\0"; + TQString foo = "foo\0"; mSocket->writeBlock(foo.ascii(), foo.length()); - foo = QString::null; + foo = TQString::null; emit bridgeConnect(); } @@ -254,15 +254,15 @@ void TcpTransportBridge::slotOnSocketReceive() { kdDebug (14140) << k_funcinfo << "Bridge (" << name() << ") RECEIVED " << mSocket->bytesAvailable() << " bytes." << endl; - QByteArray bytes(mSocket->bytesAvailable()); + TQByteArray bytes(mSocket->bytesAvailable()); mSocket->readBlock(bytes.data(), bytes.size()); // Write the data to the buffer. mBuffer.write(bytes); if (mVerified == false && mBuffer.size() >= 4) { - QByteArray foo = mBuffer.read(4); - if (QString(foo) == "foo"){ + TQByteArray foo = mBuffer.read(4); + if (TQString(foo) == "foo"){ kdDebug (14140) << k_funcinfo << "Bridge (" << name() << ") CONNECTION verified." << endl; mVerified = true; } @@ -272,7 +272,7 @@ void TcpTransportBridge::slotOnSocketReceive() { if (mBuffer.size() >= 4 && mLength == 0) { - QByteArray array = mBuffer.read(4); + TQByteArray array = mBuffer.read(4); for (int i=0; i < 4; i++){ ((char*)mLength)[i] = array[i]; } @@ -312,7 +312,7 @@ void TcpTransportBridge::slotOnSocketConnectTimeout() TcpTransportBridge::Buffer::Buffer(Q_UINT32 length) -: QByteArray(length) +: TQByteArray(length) { } @@ -322,7 +322,7 @@ TcpTransportBridge::Buffer::~Buffer() //BEGIN Public Methods -void TcpTransportBridge::Buffer::write(const QByteArray& bytes) +void TcpTransportBridge::Buffer::write(const TQByteArray& bytes) { resize(size() + bytes.size()); for (uint i=0; i < bytes.size(); i++){ @@ -330,11 +330,11 @@ void TcpTransportBridge::Buffer::write(const QByteArray& bytes) } } -QByteArray TcpTransportBridge::Buffer::read(Q_UINT32 length) +TQByteArray TcpTransportBridge::Buffer::read(Q_UINT32 length) { - if (length >= size()) return QByteArray(); + if (length >= size()) return TQByteArray(); - QByteArray buffer; + TQByteArray buffer; buffer.duplicate(data(), length); char *bytes = new char[size() - length]; diff --git a/kopete/protocols/msn/transport.h b/kopete/protocols/msn/transport.h index 0dae0f32..eb190325 100644 --- a/kopete/protocols/msn/transport.h +++ b/kopete/protocols/msn/transport.h @@ -18,9 +18,9 @@ #define PEERTOPEERTRANSPORT_H //BEGIN QT Includes -#include <qobject.h> -#include <qguardedptr.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqguardedptr.h> +#include <tqvaluelist.h> //END //BEGIN KDE Includes @@ -52,10 +52,10 @@ class Transport : public QObject Q_OBJECT public: /** @brief Creates a new instance of the class Transport. */ - Transport(QObject* parent, const char* name = 0l); + Transport(TQObject* parent, const char* name = 0l); ~Transport(); /** @brief Get a transport bridge with the specified address, port, type and identifier. */ - TransportBridge* getBridge(const QString& address, Q_UINT16 port, TransportBridgeType type, const QString& identifier); + TransportBridge* getBridge(const TQString& address, Q_UINT16 port, TransportBridgeType type, const TQString& identifier); /** @brief Sets the default transport bridge. */ void setDefaultBridge(MSNSwitchBoardSocket* mss); @@ -63,15 +63,15 @@ private slots: /** @brief Invokes when a message is received on a transport bridge. */ // void slotOnReceive(Message& message); /** @brief Invokes when a message is received on the default transport bridge (relay). */ - void slotOnReceive(const QString& contact, const QByteArray& bytes); + void slotOnReceive(const TQString& contact, const TQByteArray& bytes); private: /** @brief Known SocketAddresses of peers. */ - QMap<QString, KNetwork::KInetSocketAddress> mAddresses; + TQMap<TQString, KNetwork::KInetSocketAddress> mAddresses; /** @brief The list the connected transport bridges. */ - QValueList<TransportBridge*> mBridges; + TQValueList<TransportBridge*> mBridges; /** @brief The default transport bridge (relay). */ - QGuardedPtr<MSNSwitchBoardSocket> mDefaultBridge; + TQGuardedPtr<MSNSwitchBoardSocket> mDefaultBridge; /** @brief Message formatter used to ser/deser message. */ MessageFormatter *mFormatter; }; @@ -85,9 +85,9 @@ public: protected: /** @brief Creates a new instance of the class TransportBridge with the specified address and formatter. */ - TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name = 0l); + TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name = 0l); /** @brief Creates a new instance of the class TransportBridge with the specified socket and formatter. */ - TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name = 0l); + TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name = 0l); public: /** @brief Creates a connection between two peers. */ @@ -106,8 +106,8 @@ protected slots: signals: void bridgeConnect(); void bridgeDisconnect(); - void bridgeError(const QString& e); - void bytesReceived(const QByteArray&); + void bridgeError(const TQString& e); + void bytesReceived(const TQByteArray&); protected: @@ -128,8 +128,8 @@ public: virtual ~TcpTransportBridge(); private: - TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name = 0l); - TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name = 0l); + TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name = 0l); + TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name = 0l); protected slots: virtual void slotOnConnect(); @@ -153,8 +153,8 @@ private: ~Buffer(); public: - void write(const QByteArray& bytes); - QByteArray read(Q_UINT32 length); + void write(const TQByteArray& bytes); + TQByteArray read(Q_UINT32 length); }; Buffer mBuffer; diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.cpp b/kopete/protocols/msn/ui/msneditaccountwidget.cpp index 1829f41d..baa4fb60 100644 --- a/kopete/protocols/msn/ui/msneditaccountwidget.cpp +++ b/kopete/protocols/msn/ui/msneditaccountwidget.cpp @@ -18,16 +18,16 @@ #include "msneditaccountwidget.h" -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qspinbox.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqspinbox.h> #include <kcombobox.h> #include <kautoconfig.h> @@ -61,18 +61,18 @@ public: KAutoConfig *autoConfig; MSNEditAccountUI *ui; - QString pictureUrl; - QImage pictureData; + TQString pictureUrl; + TQImage pictureData; }; -MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, QWidget *parent, const char * /* name */ ) -: QWidget( parent ), KopeteEditAccountWidget( account ) +MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, TQWidget *parent, const char * /* name */ ) +: TQWidget( parent ), KopeteEditAccountWidget( account ) { d = new MSNEditAccountWidgetPrivate; d->protocol=proto; - ( new QVBoxLayout( this, 0, 0 ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this, 0, 0 ) )->setAutoAdd( true ); d->ui = new MSNEditAccountUI( this ); @@ -85,9 +85,9 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account //Get a list of all jabber accounts KGlobal::config()->setGroup("MSN"); - QString jab_account=KGlobal::config()->readEntry("JabberAccount"); + TQString jab_account=KGlobal::config()->readEntry("JabberAccount"); - QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() ) { if(a->protocol()->pluginId()=="JabberProtocol") @@ -146,20 +146,20 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account d->ui->m_serverName->setText( m_account->serverName() ); d->ui->m_serverPort->setValue( m_account->serverPort() ); - QStringList blockList = config->readListEntry( "blockList" ); - QStringList allowList = config->readListEntry( "allowList" ); - //QStringList reverseList = config->readListEntry("reverseList" ); + TQStringList blockList = config->readListEntry( "blockList" ); + TQStringList allowList = config->readListEntry( "allowList" ); + //TQStringList reverseList = config->readListEntry("reverseList" ); - for ( QStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it ) + for ( TQStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it ) d->ui->m_BL->insertItem( *it ); - for ( QStringList::Iterator it = allowList.begin(); it != allowList.end(); ++it ) + for ( TQStringList::Iterator it = allowList.begin(); it != allowList.end(); ++it ) d->ui->m_AL->insertItem( *it ); d->ui->m_blp->setChecked( config->readEntry( "BLP" ) == "BL" ); d->pictureUrl = locateLocal( "appdata", "msnpicture-" + - account->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" ); + account->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" ); d->ui->m_displayPicture->setPixmap( d->pictureUrl ); d->ui->m_useDisplayPicture->setChecked( config->readBoolEntry( "exportCustomPicture" )); @@ -174,14 +174,14 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account d->ui->m_phones->setDisabled( true ); } - connect( d->ui->m_allowButton, SIGNAL( clicked() ), this, SLOT( slotAllow() ) ); - connect( d->ui->m_blockButton, SIGNAL( clicked() ), this, SLOT( slotBlock() ) ); - connect( d->ui->m_selectImage, SIGNAL( clicked() ), this, SLOT( slotSelectImage() ) ); - connect( d->ui->m_RLButton, SIGNAL( clicked() ), this, SLOT( slotShowReverseList() ) ); - connect( d->ui->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); - QWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered ); - QWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword ); - QWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin ); + connect( d->ui->m_allowButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAllow() ) ); + connect( d->ui->m_blockButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBlock() ) ); + connect( d->ui->m_selectImage, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSelectImage() ) ); + connect( d->ui->m_RLButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowReverseList() ) ); + connect( d->ui->buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister())); + TQWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered ); + TQWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword ); + TQWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin ); } MSNEditAccountWidget::~MSNEditAccountWidget() @@ -227,7 +227,7 @@ Kopete::Account * MSNEditAccountWidget::apply() if( d->ui->m_useDisplayPicture->isChecked() && !d->pictureData.isNull() ) { d->pictureUrl = locateLocal( "appdata", "msnpicture-" + - account()->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" ); + account()->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" ); if ( d->pictureData.save( d->pictureUrl, "PNG" ) ) { static_cast<MSNAccount *>( account() )->setPictureUrl( d->pictureUrl ); @@ -270,7 +270,7 @@ Kopete::Account * MSNEditAccountWidget::apply() bool MSNEditAccountWidget::validateData() { - QString userid = d->ui->m_login->text(); + TQString userid = d->ui->m_login->text(); if ( MSNProtocol::validContactId( userid ) ) return true; @@ -282,16 +282,16 @@ bool MSNEditAccountWidget::validateData() void MSNEditAccountWidget::slotAllow() { //TODO: play with multiple selection - QListBoxItem *item = d->ui->m_BL->selectedItem(); + TQListBoxItem *item = d->ui->m_BL->selectedItem(); if ( !item ) return; - QString handle = item->text(); + TQString handle = item->text(); MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket(); if ( !notify ) return; - notify->removeContact( handle, MSNProtocol::BL, QString::null, QString::null ); + notify->removeContact( handle, MSNProtocol::BL, TQString::null, TQString::null ); d->ui->m_BL->takeItem( item ); d->ui->m_AL->insertItem( item ); @@ -300,17 +300,17 @@ void MSNEditAccountWidget::slotAllow() void MSNEditAccountWidget::slotBlock() { //TODO: play with multiple selection - QListBoxItem *item = d->ui->m_AL->selectedItem(); + TQListBoxItem *item = d->ui->m_AL->selectedItem(); if ( !item ) return; - QString handle = item->text(); + TQString handle = item->text(); MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket(); if ( !notify ) return; - notify->removeContact( handle, MSNProtocol::AL, QString::null, QString::null ); + notify->removeContact( handle, MSNProtocol::AL, TQString::null, TQString::null ); d->ui->m_AL->takeItem( item ); d->ui->m_BL->insertItem( item ); @@ -318,16 +318,16 @@ void MSNEditAccountWidget::slotBlock() void MSNEditAccountWidget::slotShowReverseList() { - QStringList reverseList = account()->configGroup()->readListEntry( "reverseList" ); + TQStringList reverseList = account()->configGroup()->readListEntry( "reverseList" ); KMessageBox::informationList( this, i18n( "Here you can see a list of contacts who added you to their contact list" ), reverseList, i18n( "Reverse List - MSN Plugin" ) ); } void MSNEditAccountWidget::slotSelectImage() { - QString path = 0; + TQString path = 0; bool remoteFile = false; - KURL filePath = KFileDialog::getImageOpenURL( QString::null, this, i18n( "MSN Display Picture" ) ); + KURL filePath = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "MSN Display Picture" ) ); if( filePath.isEmpty() ) return; @@ -340,14 +340,14 @@ void MSNEditAccountWidget::slotSelectImage() } else path = filePath.path(); - QImage img( path ); - img = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(img), 96, 96, this ); + TQImage img( path ); + img = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(img), 96, 96, this ); if(!img.isNull()) { img = MSNProtocol::protocol()->scalePicture(img); - d->ui->m_displayPicture->setPixmap( QPixmap(img) ); + d->ui->m_displayPicture->setPixmap( TQPixmap(img) ); d->pictureData = img; } else diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.h b/kopete/protocols/msn/ui/msneditaccountwidget.h index 2b8b8f6e..40900871 100644 --- a/kopete/protocols/msn/ui/msneditaccountwidget.h +++ b/kopete/protocols/msn/ui/msneditaccountwidget.h @@ -19,7 +19,7 @@ #ifndef MSNEDITACCOUNTWIDEGET_H #define MSNEDITACCOUNTWIDEGET_H -#include <qwidget.h> +#include <tqwidget.h> #include "editaccountwidget.h" @@ -32,12 +32,12 @@ class MSNEditAccountWidgetPrivate; /** * @author Olivier Goffart <ogoffart @ kde.org> */ -class MSNEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class MSNEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: - MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, QWidget *parent = 0, const char *name = 0 ); + MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, TQWidget *parent = 0, const char *name = 0 ); ~MSNEditAccountWidget(); virtual bool validateData(); virtual Kopete::Account * apply(); diff --git a/kopete/protocols/msn/webcam.cpp b/kopete/protocols/msn/webcam.cpp index db27d65f..60ce0e82 100644 --- a/kopete/protocols/msn/webcam.cpp +++ b/kopete/protocols/msn/webcam.cpp @@ -18,16 +18,16 @@ #include <stdlib.h> #include <kdebug.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kbufferedsocket.h> #include <klocale.h> #include <kserversocket.h> #include <kmessagebox.h> -#include <qlabel.h> -#include <qguardedptr.h> -#include <qtimer.h> -#include <qevent.h> -#include <qdatetime.h> +#include <tqlabel.h> +#include <tqguardedptr.h> +#include <tqtimer.h> +#include <tqevent.h> +#include <tqdatetime.h> #include <kconfig.h> #include "dispatcher.h" @@ -42,7 +42,7 @@ using namespace KNetwork; namespace P2P { -Webcam::Webcam(Who who, const QString& to, Dispatcher *parent, Q_UINT32 sessionId) +Webcam::Webcam(Who who, const TQString& to, Dispatcher *parent, Q_UINT32 sessionId) : TransferContext(to,parent,sessionId) , m_who(who) , m_timerId(0) { setType(P2P::WebcamType); @@ -83,8 +83,8 @@ void Webcam::askIncommingInvitation() { m_direction = Incoming; //protect, in case this is deleted when the messagebox is active - QGuardedPtr<Webcam> _this = this; - QString message= (m_who==wProducer) ? + TQGuardedPtr<Webcam> _this = this; + TQString message= (m_who==wProducer) ? i18n("<qt>The contact %1 wants to see <b>your</b> webcam, do you want them to see it?</qt>") : i18n("The contact %1 wants to show you his/her webcam, do you want to see it?") ; int result=KMessageBox::questionYesNo( 0L , message.arg(m_recipient), @@ -92,7 +92,7 @@ void Webcam::askIncommingInvitation() if(!_this) return; - QString content = QString("SessionID: %1\r\n\r\n").arg(m_sessionId); + TQString content = TQString("SessionID: %1\r\n\r\n").arg(m_sessionId); if(result==KMessageBox::Yes) { //Send two message, an OK, and an invite. @@ -107,7 +107,7 @@ void Webcam::askIncommingInvitation() m_branch=Uid::createUid(); m_state = Negotiation; //set type to application/x-msnmsgr-transreqbody - content=QString("Bridges: TRUDPv1 TCPv1\r\n" + content=TQString("Bridges: TRUDPv1 TCPv1\r\n" "NetID: -1280904111\r\n" "Conn-Type: Firewall\r\n" "UPnPNat: false\r\n" @@ -127,11 +127,11 @@ void Webcam::askIncommingInvitation() void Webcam::sendBYEMessage() { m_state=Finished; - QString content="Context: dAMAgQ==\r\n"; + TQString content="Context: dAMAgQ==\r\n"; sendMessage(BYE,content); //If ever the opposite client was dead or something, we'll ack anyway, so everything get cleaned - QTimer::singleShot(60*1000 , this, SLOT(acknowledged())); + TQTimer::singleShot(60*1000 , this, TQT_SLOT(acknowledged())); } @@ -203,7 +203,7 @@ void Webcam::processMessage(const Message& message) if(message.applicationIdentifier != 4l) { - QString body = QCString(message.body.data(), message.header.dataSize); + TQString body = TQCString(message.body.data(), message.header.dataSize); kdDebug(14141) << k_funcinfo << "received, " << body << endl; if(body.startsWith("MSNSLP/1.0 200 OK")) @@ -214,7 +214,7 @@ void Webcam::processMessage(const Message& message) { if(m_direction == Outgoing) { - QRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n"); + TQRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n"); regex.search(body); m_branch=regex.cap(1); //decline @@ -242,10 +242,10 @@ void Webcam::processMessage(const Message& message) //Let's take the fun, we entering into the delicious webcam negotiation binary protocol //well, there is maybe better to take utf16, but it's ascii, so no problem. - QByteArray dataMessage=message.body; + TQByteArray dataMessage=message.body; #if 0 - QString echoS=""; + TQString echoS=""; unsigned int f=0; while(f<dataMessage.size()) { @@ -257,7 +257,7 @@ void Webcam::processMessage(const Message& message) unsigned int N=(unsigned int) (dataMessage[q+f]); if(N<16) echoS+="0"; - echoS+=QString::number( N ,16)+" "; + echoS+=TQString::number( N ,16)+" "; } else echoS+=" "; @@ -268,7 +268,7 @@ void Webcam::processMessage(const Message& message) { unsigned char X=dataMessage[q+f]; char C=((char)(( X<128 && X>31 ) ? X : '.')); - echoS+=QString::fromLatin1(&C,1); + echoS+=TQString::fromLatin1(&C,1); } f+=16; } @@ -305,31 +305,31 @@ void Webcam::processMessage(const Message& message) { uint sess=rand()%1000+5000; uint rid=rand()%100+50; - m_myAuth=QString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid).arg(sess); + m_myAuth=TQString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid).arg(sess); kdDebug(14140) << k_funcinfo << "m_myAuth= " << m_myAuth << endl; - QString producerxml=xml(sess , rid); + TQString producerxml=xml(sess , rid); kdDebug(14140) << k_funcinfo << "producerxml= " << producerxml << endl; makeSIPMessage(producerxml); } } else if(m_content.contains("<producer>") || m_content.contains("<viewer>")) { - QRegExp rx("<rid>([0-9]*)</rid>.*<session>([0-9]*)</session>"); + TQRegExp rx("<rid>([0-9]*)</rid>.*<session>([0-9]*)</session>"); rx.search(m_content); - QString rid=rx.cap(1); - QString sess=rx.cap(2); + TQString rid=rx.cap(1); + TQString sess=rx.cap(2); if(m_content.contains("<producer>")) { - QString viewerxml=xml(sess.toUInt() , rid.toUInt()); + TQString viewerxml=xml(sess.toUInt() , rid.toUInt()); kdDebug(14140) << k_funcinfo << "vewerxml= " << viewerxml << endl; makeSIPMessage( viewerxml ,0x00,0x09,0x00 ); - m_peerAuth=m_myAuth=QString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess); + m_peerAuth=m_myAuth=TQString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess); kdDebug(14140) << k_funcinfo << "m_auth= " << m_myAuth << endl; } else { - m_peerAuth=QString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess); + m_peerAuth=TQString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess); makeSIPMessage("receivedViewerData", 0xec , 0xda , 0x03); } @@ -342,39 +342,39 @@ void Webcam::processMessage(const Message& message) } //m_listener->setResolutionEnabled(true); // Create the callback that will try to accept incoming connections. - QObject::connect(m_listener, SIGNAL(readyAccept()), this, SLOT(slotAccept())); - QObject::connect(m_listener, SIGNAL(gotError(int)), this, SLOT(slotListenError(int))); + TQObject::connect(m_listener, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotAccept())); + TQObject::connect(m_listener, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotListenError(int))); // Listen for incoming connections. bool isListening = m_listener->listen(); - kdDebug(14140) << k_funcinfo << (isListening ? QString("listening %1").arg(m_listener->localAddress().toString()) : QString("not listening")) << endl; + kdDebug(14140) << k_funcinfo << (isListening ? TQString("listening %1").arg(m_listener->localAddress().toString()) : TQString("not listening")) << endl; - rx=QRegExp("<tcpport>([^<]*)</tcpport>"); + rx=TQRegExp("<tcpport>([^<]*)</tcpport>"); rx.search(m_content); - QString port1=rx.cap(1); + TQString port1=rx.cap(1); if(port1=="0") - port1=QString::null; + port1=TQString::null; - rx=QRegExp("<tcplocalport>([^<]*)</tcplocalport>"); + rx=TQRegExp("<tcplocalport>([^<]*)</tcplocalport>"); rx.search(m_content); - QString port2=rx.cap(1); + TQString port2=rx.cap(1); if(port2==port1 || port2=="0") - port2=QString::null; + port2=TQString::null; - rx=QRegExp("<tcpexternalport>([^<]*)</tcpexternalport>"); + rx=TQRegExp("<tcpexternalport>([^<]*)</tcpexternalport>"); rx.search(m_content); - QString port3=rx.cap(1); + TQString port3=rx.cap(1); if(port3==port1 || port3==port2 || port3=="0") - port3=QString::null; + port3=TQString::null; int an=0; while(true) { an++; - if(!m_content.contains( QString("<tcpipaddress%1>").arg(an) )) + if(!m_content.contains( TQString("<tcpipaddress%1>").arg(an) )) break; - rx=QRegExp(QString("<tcpipaddress%1>([^<]*)</tcpipaddress%2>").arg(an).arg(an)); + rx=TQRegExp(TQString("<tcpipaddress%1>([^<]*)</tcpipaddress%2>").arg(an).arg(an)); rx.search(m_content); - QString ip=rx.cap(1); + TQString ip=rx.cap(1); if(ip.isNull()) continue; @@ -383,8 +383,8 @@ void Webcam::processMessage(const Message& message) kdDebug(14140) << k_funcinfo << "trying to connect on " << ip <<":" << port1 << endl; KBufferedSocket *sock=new KBufferedSocket( ip, port1, this ); m_allSockets.append(sock); - QObject::connect( sock, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotSocketConnected() ) ); - QObject::connect( sock, SIGNAL( gotError(int)), this, SLOT(slotSocketError(int))); + TQObject::connect( sock, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotSocketConnected() ) ); + TQObject::connect( sock, TQT_SIGNAL( gotError(int)), this, TQT_SLOT(slotSocketError(int))); sock->connect(ip, port1); kdDebug(14140) << k_funcinfo << "okok " << sock << " - " << sock->peerAddress().toString() << " ; " << sock->localAddress().toString() << endl; } @@ -393,8 +393,8 @@ void Webcam::processMessage(const Message& message) kdDebug(14140) << k_funcinfo << "trying to connect on " << ip <<":" << port2 << endl; KBufferedSocket *sock=new KBufferedSocket( ip, port2, this ); m_allSockets.append(sock); - QObject::connect( sock, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotSocketConnected() ) ); - QObject::connect( sock, SIGNAL( gotError(int)), this, SLOT(slotSocketError(int))); + TQObject::connect( sock, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotSocketConnected() ) ); + TQObject::connect( sock, TQT_SIGNAL( gotError(int)), this, TQT_SLOT(slotSocketError(int))); sock->connect(ip, port2); } if(!port3.isNull()) @@ -402,12 +402,12 @@ void Webcam::processMessage(const Message& message) kdDebug(14140) << k_funcinfo << "trying to connect on " << ip <<":" << port3 << endl; KBufferedSocket *sock=new KBufferedSocket( ip, port3, this ); m_allSockets.append(sock); - QObject::connect( sock, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotSocketConnected() ) ); - QObject::connect( sock, SIGNAL( gotError(int)), this, SLOT(slotSocketError(int))); + TQObject::connect( sock, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotSocketConnected() ) ); + TQObject::connect( sock, TQT_SIGNAL( gotError(int)), this, TQT_SLOT(slotSocketError(int))); sock->connect(ip, port3); } } - QValueList<KBufferedSocket*>::iterator it; + TQValueList<KBufferedSocket*>::iterator it; for ( it = m_allSockets.begin(); it != m_allSockets.end(); ++it ) { KBufferedSocket *sock=(*it); @@ -422,14 +422,14 @@ void Webcam::processMessage(const Message& message) } else error(); - m_content=QString::null; + m_content=TQString::null; } -void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_UINT8 ZZ) +void Webcam::makeSIPMessage(const TQString &message, Q_UINT8 XX, Q_UINT8 YY , Q_UINT8 ZZ) { - QByteArray dataMessage; //(12+message.length()*2); - QDataStream writer(dataMessage, IO_WriteOnly); - writer.setByteOrder(QDataStream::LittleEndian); + TQByteArray dataMessage; //(12+message.length()*2); + TQDataStream writer(dataMessage, IO_WriteOnly); + writer.setByteOrder(TQDataStream::LittleEndian); writer << (Q_UINT8)0x80; writer << (Q_UINT8)XX; writer << (Q_UINT8)YY; @@ -439,7 +439,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U writer << message+'\0'; //writer << (Q_UINT16)0x0000; - /*QString echoS=""; + /*TQString echoS=""; unsigned int f=0; while(f<dataMessage.size()) { @@ -451,7 +451,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U unsigned int N=(unsigned int) (dataMessage[q+f]); if(N<16) echoS+="0"; - echoS+=QString::number( N ,16)+" "; + echoS+=TQString::number( N ,16)+" "; } else echoS+=" "; @@ -462,7 +462,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U { unsigned char X=dataMessage[q+f]; char C=((char)(( X<128 && X>31 ) ? X : '.')); - echoS+=QString::fromLatin1(&C,1); + echoS+=TQString::fromLatin1(&C,1); } f+=16; } @@ -472,7 +472,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U sendBigP2PMessage(dataMessage); } -void Webcam::sendBigP2PMessage( const QByteArray & dataMessage) +void Webcam::sendBigP2PMessage( const TQByteArray & dataMessage) { unsigned int size=m_totalDataSize=dataMessage.size(); m_offset=0; @@ -481,7 +481,7 @@ void Webcam::sendBigP2PMessage( const QByteArray & dataMessage) for(unsigned int f=0;f<size;f+=1200) { m_offset=f; - QByteArray dm2; + TQByteArray dm2; dm2.duplicate(dataMessage.data()+m_offset, QMIN(1200,m_totalDataSize-m_offset)); sendData( dm2 ); m_offset+=dm2.size(); @@ -492,26 +492,26 @@ void Webcam::sendBigP2PMessage( const QByteArray & dataMessage) -QString Webcam::xml(uint session , uint rid) +TQString Webcam::xml(uint session , uint rid) { - QString who= ( m_who == wProducer ) ? QString("producer") : QString("viewer"); + TQString who= ( m_who == wProducer ) ? TQString("producer") : TQString("viewer"); - QString ip; + TQString ip; uint ip_number=1; - QStringList::iterator it; - QStringList ips=m_dispatcher->localIp(); + TQStringList::iterator it; + TQStringList ips=m_dispatcher->localIp(); for ( it = ips.begin(); it != ips.end(); ++it ) { - ip+=QString("<tcpipaddress%1>%2</tcpipaddress%3>").arg(ip_number).arg(*it).arg(ip_number); + ip+=TQString("<tcpipaddress%1>%2</tcpipaddress%3>").arg(ip_number).arg(*it).arg(ip_number); ++ip_number; } - QString port = QString::number(getAvailablePort()); + TQString port = TQString::number(getAvailablePort()); m_listener = new KServerSocket(port, this) ; - return "<" + who + "><version>2.0</version><rid>"+QString::number(rid)+"</rid><udprid>"+QString::number(rid+1)+"</udprid><session>"+QString::number(session)+"</session><ctypes>0</ctypes><cpu>2931</cpu>" + + return "<" + who + "><version>2.0</version><rid>"+TQString::number(rid)+"</rid><udprid>"+TQString::number(rid+1)+"</udprid><session>"+TQString::number(session)+"</session><ctypes>0</ctypes><cpu>2931</cpu>" + "<tcp><tcpport>"+port+"</tcpport>\t\t\t\t\t\t\t\t <tcplocalport>"+port+"</tcplocalport>\t\t\t\t\t\t\t\t <tcpexternalport>"+port+"</tcpexternalport>"+ip+"</tcp>"+ "<udp><udplocalport>7786</udplocalport><udpexternalport>31863</udpexternalport><udpexternalip>"+ ip +"</udpexternalip><a1_port>31859</a1_port><b1_port>31860</b1_port><b2_port>31861</b2_port><b3_port>31862</b3_port><symmetricallocation>1</symmetricallocation><symmetricallocationincrement>1</symmetricallocationincrement><udpversion>1</udpversion><udpinternalipaddress1>127.0.0.1</udpinternalipaddress1></udp>"+ "<codec></codec><channelmode>1</channelmode></"+who+">\r\n\r\n"; @@ -521,7 +521,7 @@ int Webcam::getAvailablePort() { KConfig *config = KGlobal::config(); config->setGroup( "MSN" ); - QString basePort=config->readEntry("WebcamPort"); + TQString basePort=config->readEntry("WebcamPort"); if(basePort.isEmpty() || basePort == "0" ) basePort="6891"; @@ -536,7 +536,7 @@ int Webcam::getAvailablePort() bool found = false; unsigned int port = firstport; for( ; port <= lastport; ++port) { - ss->setAddress( QString::number( port ) ); + ss->setAddress( TQString::number( port ) ); bool success = ss->listen(); if( found = ( success && ss->error() == KSocketBase::NoError ) ) break; @@ -568,14 +568,14 @@ void Webcam::slotSocketConnected() m_webcamSocket->enableWrite(false); // Create the callback that will try to read bytes from the accepted socket. - QObject::connect(m_webcamSocket, SIGNAL(readyRead()), this, SLOT(slotSocketRead())); + TQObject::connect(m_webcamSocket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketRead())); // Create the callback that will try to handle the socket close event. - QObject::connect(m_webcamSocket, SIGNAL(closed()), this, SLOT(slotSocketClosed())); + TQObject::connect(m_webcamSocket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed())); // Create the callback that will try to handle the socket error event. -// QObject::connect(m_webcamSocket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int))); +// TQObject::connect(m_webcamSocket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int))); m_webcamStates[m_webcamSocket]=wsConnected; - QCString to_send=m_peerAuth.utf8(); + TQCString to_send=m_peerAuth.utf8(); m_webcamSocket->writeBlock(to_send.data(), to_send.length()); kdDebug(14140) << k_funcinfo << "sending "<< m_peerAuth << endl; @@ -608,11 +608,11 @@ void Webcam::slotAccept() m_webcamSocket->enableWrite(false); // Create the callback that will try to read bytes from the accepted socket. - QObject::connect(m_webcamSocket, SIGNAL(readyRead()), this, SLOT(slotSocketRead())); + TQObject::connect(m_webcamSocket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketRead())); // Create the callback that will try to handle the socket close event. - QObject::connect(m_webcamSocket, SIGNAL(closed()), this, SLOT(slotSocketClosed())); + TQObject::connect(m_webcamSocket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed())); // Create the callback that will try to handle the socket error event. - QObject::connect(m_webcamSocket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int))); + TQObject::connect(m_webcamSocket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int))); m_allSockets.append(m_webcamSocket); m_webcamStates[m_webcamSocket]=wsNegotiating; @@ -625,14 +625,14 @@ void Webcam::slotSocketRead() uint available = m_webcamSocket->bytesAvailable(); kdDebug(14140) << k_funcinfo << m_webcamSocket << "############# " << available << " bytes available." << endl; - QByteArray avail_buff(available); + TQByteArray avail_buff(available); m_webcamSocket->peekBlock(avail_buff.data(), avail_buff.size()); kdDebug(14140) << k_funcinfo << m_webcamSocket << avail_buff << endl; - const QString connected_str("connected\r\n\r\n"); + const TQString connected_str("connected\r\n\r\n"); switch(m_webcamStates[m_webcamSocket]) { case wsNegotiating: @@ -642,16 +642,16 @@ void Webcam::slotSocketRead() kdDebug(14140) << k_funcinfo << "waiting more data ( " << available << " of " <<m_myAuth.length()<< " )"<< endl; break; } - QByteArray buffer(available); + TQByteArray buffer(available); m_webcamSocket->readBlock(buffer.data(), buffer.size()); kdDebug(14140) << k_funcinfo << buffer.data() << endl; - if(QString(buffer) == m_myAuth ) + if(TQString(buffer) == m_myAuth ) { closeAllOtherSockets(); kdDebug(14140) << k_funcinfo << "Sending " << connected_str << endl; - QCString conne=connected_str.utf8(); + TQCString conne=connected_str.utf8(); m_webcamSocket->writeBlock(conne.data(), conne.length()); m_webcamStates[m_webcamSocket]=wsConnecting; @@ -668,7 +668,7 @@ void Webcam::slotSocketRead() kdDebug(14140) << k_funcinfo << "new timer" << m_timerId << endl; } m_widget=new MSNWebcamDialog(m_recipient); - connect(m_widget, SIGNAL( closingWebcamDialog() ) , this , SLOT(sendBYEMessage())); + connect(m_widget, TQT_SIGNAL( closingWebcamDialog() ) , this , TQT_SLOT(sendBYEMessage())); } else @@ -690,19 +690,19 @@ void Webcam::slotSocketRead() kdDebug(14140) << k_funcinfo << "waiting more data ( " << available << " of " <<connected_str.length()<< " )"<< endl; break; } - QByteArray buffer(connected_str.length()); + TQByteArray buffer(connected_str.length()); m_webcamSocket->readBlock(buffer.data(), buffer.size()); -// kdDebug(14140) << k_funcinfo << "state " << m_webcamState << " received :" << QCString(buffer) << endl; +// kdDebug(14140) << k_funcinfo << "state " << m_webcamState << " received :" << TQCString(buffer) << endl; - if(QString(buffer) == connected_str) + if(TQString(buffer) == connected_str) { if(m_webcamStates[m_webcamSocket]==wsConnected) { closeAllOtherSockets(); kdDebug(14140) << k_funcinfo << "Sending " << connected_str << endl; - QCString conne=connected_str.utf8(); + TQCString conne=connected_str.utf8(); m_webcamSocket->writeBlock(conne.data(), conne.length()); //SHOULD BE DONE IN ALL CASE @@ -718,7 +718,7 @@ void Webcam::slotSocketRead() kdDebug(14140) << k_funcinfo << "new timer" << m_timerId << endl; } m_widget=new MSNWebcamDialog(m_recipient); - connect(m_widget, SIGNAL( closingWebcamDialog() ) , this , SLOT(sendBYEMessage())); + connect(m_widget, TQT_SIGNAL( closingWebcamDialog() ) , this , TQT_SLOT(sendBYEMessage())); } m_webcamStates[m_webcamSocket]=wsTransfer; @@ -746,7 +746,7 @@ void Webcam::slotSocketRead() kdDebug(14140) << k_funcinfo << "waiting more data ( " << available << " of " <<24<< " )"<< endl; break; } - QByteArray buffer(24); + TQByteArray buffer(24); m_webcamSocket->peekBlock(buffer.data(), buffer.size()); Q_UINT32 paysize=(uchar)buffer[8] + ((uchar)buffer[9]<<8) + ((uchar)buffer[10]<<16) + ((uchar)buffer[11]<<24); @@ -760,7 +760,7 @@ void Webcam::slotSocketRead() buffer.resize(paysize); m_webcamSocket->readBlock(buffer.data(), buffer.size()); - QPixmap pix=m_mimic->decode(buffer); + TQPixmap pix=m_mimic->decode(buffer); if(pix.isNull()) { kdWarning(14140) << k_funcinfo << "incorrect pixmap returned, better to stop everything"<< endl; @@ -815,7 +815,7 @@ void Webcam::closeAllOtherSockets() delete m_listener; m_listener=0l; - QValueList<KBufferedSocket*>::iterator it; + TQValueList<KBufferedSocket*>::iterator it; for ( it = m_allSockets.begin(); it != m_allSockets.end(); ++it ) { KBufferedSocket *sock=(*it); @@ -826,7 +826,7 @@ void Webcam::closeAllOtherSockets() } -void Webcam::timerEvent( QTimerEvent *e ) +void Webcam::timerEvent( TQTimerEvent *e ) { if(e->timerId() != m_timerId) return TransferContext::timerEvent(e); @@ -835,7 +835,7 @@ void Webcam::timerEvent( QTimerEvent *e ) Kopete::AV::VideoDevicePool *videoDevice = Kopete::AV::VideoDevicePool::self(); videoDevice->getFrame(); - QImage img; + TQImage img; videoDevice->getImage(&img); if(m_widget) @@ -848,7 +848,7 @@ void Webcam::timerEvent( QTimerEvent *e ) } uchar *bits=img.bits(); - QByteArray image_data(img.width()*img.height()*3); + TQByteArray image_data(img.width()*img.height()*3); uint b2=0; uint imgsize=img.width()*img.height()*4; for(uint f=0; f< imgsize; f+=4) @@ -859,15 +859,15 @@ void Webcam::timerEvent( QTimerEvent *e ) b2+=3; } - QByteArray frame=m_mimic->encode(image_data); + TQByteArray frame=m_mimic->encode(image_data); kdDebug(14140) << k_funcinfo << "Sendinf frame of size " << frame.size() << endl; //build the header. - QByteArray header; + TQByteArray header; - QDataStream writer(header, IO_WriteOnly); - writer.setByteOrder(QDataStream::LittleEndian); + TQDataStream writer(header, IO_WriteOnly); + writer.setByteOrder(TQDataStream::LittleEndian); writer << (Q_UINT16)24; // header size writer << (Q_UINT16)img.width(); writer << (Q_UINT16)img.height(); @@ -875,7 +875,7 @@ void Webcam::timerEvent( QTimerEvent *e ) writer << (Q_UINT32)frame.size(); writer << (Q_UINT8)('M') << (Q_UINT8)('L') << (Q_UINT8)('2') << (Q_UINT8)('0'); writer << (Q_UINT32)0x00000000; //wtf .? - writer << QTime::currentTime(); //FIXME: possible midnight bug ? + writer << TQTime::currentTime(); //FIXME: possible midnight bug ? m_webcamSocket->writeBlock(header.data(), header.size()); m_webcamSocket->writeBlock(frame.data(), frame.size()); diff --git a/kopete/protocols/msn/webcam.h b/kopete/protocols/msn/webcam.h index 4dc72fae..4bcc4f59 100644 --- a/kopete/protocols/msn/webcam.h +++ b/kopete/protocols/msn/webcam.h @@ -33,7 +33,7 @@ class Webcam : public TransferContext public: enum Who { wProducer , wViewer }; - Webcam( Who who , const QString& to, Dispatcher *parent, Q_UINT32 sessionID); + Webcam( Who who , const TQString& to, Dispatcher *parent, Q_UINT32 sessionID); ~Webcam( ); virtual void processMessage(const Message& message); @@ -44,12 +44,12 @@ class Webcam : public TransferContext void sendBYEMessage(); private: - void makeSIPMessage(const QString &message, Q_UINT8 XX=0, Q_UINT8 YY=9 , Q_UINT8 ZZ=0); - void sendBigP2PMessage( const QByteArray& dataMessage ); + void makeSIPMessage(const TQString &message, Q_UINT8 XX=0, Q_UINT8 YY=9 , Q_UINT8 ZZ=0); + void sendBigP2PMessage( const TQByteArray& dataMessage ); void closeAllOtherSockets(); - QString m_content; + TQString m_content; - QString xml(uint session , uint rid); + TQString xml(uint session , uint rid); int getAvailablePort(); @@ -60,14 +60,14 @@ class Webcam : public TransferContext Who m_who; - QString m_myAuth; - QString m_peerAuth; + TQString m_myAuth; + TQString m_peerAuth; MimicWrapper *m_mimic; MSNWebcamDialog *m_widget; - QValueList<KNetwork::KBufferedSocket* > m_allSockets; - QMap<KNetwork::KBufferedSocket*, WebcamStatus> m_webcamStates; + TQValueList<KNetwork::KBufferedSocket* > m_allSockets; + TQMap<KNetwork::KBufferedSocket*, WebcamStatus> m_webcamStates; int m_timerId; int m_timerFps; @@ -81,7 +81,7 @@ class Webcam : public TransferContext void slotSocketConnected(); // void slotReadyWrite(); protected: - virtual void timerEvent( QTimerEvent * ); + virtual void timerEvent( TQTimerEvent * ); }; } diff --git a/kopete/protocols/msn/webcam/mimicwrapper.cpp b/kopete/protocols/msn/webcam/mimicwrapper.cpp index f7a43d93..a9d3b131 100644 --- a/kopete/protocols/msn/webcam/mimicwrapper.cpp +++ b/kopete/protocols/msn/webcam/mimicwrapper.cpp @@ -18,7 +18,7 @@ //#include <qbytearray.h> #include <kdebug.h> -#include <qimage.h> +#include <tqimage.h> MimicWrapper::MimicWrapper() : m_init(false) { @@ -31,35 +31,35 @@ MimicWrapper::~MimicWrapper() } -QPixmap MimicWrapper::decode(const QByteArray& data) +TQPixmap MimicWrapper::decode(const TQByteArray& data) { if(!m_init) { if(!mimic_decoder_init(m_mimctx, (guchar*)(data.data()))) { kdWarning(14140) << k_funcinfo << "Impossible to init decoder" << endl; - return QPixmap(); + return TQPixmap(); } if (!mimic_get_property( m_mimctx, "buffer_size", &m_bufferSize) ) { kdWarning(14140) << k_funcinfo << "Impossible to get buffer size" << endl; - return QPixmap(); + return TQPixmap(); } m_init=true; } - QByteArray buff(m_bufferSize); + TQByteArray buff(m_bufferSize); if(!mimic_decode_frame(m_mimctx, (guchar*)(data.data()) , (guchar*)(buff.data()) ) ) { kdWarning(14140) << k_funcinfo << "Impossible to decode frame" << endl; - return QPixmap(); + return TQPixmap(); } int width,height; mimic_get_property(m_mimctx, "width", &width); mimic_get_property(m_mimctx, "height", &height); - QByteArray buff2(m_bufferSize*4/3); + TQByteArray buff2(m_bufferSize*4/3); uint b2=0; for(uint f=0;f<m_bufferSize;f+=3) { @@ -70,34 +70,34 @@ QPixmap MimicWrapper::decode(const QByteArray& data) b2+=4; } - QImage img( (uchar*)(buff2.data()) , width , height , 32 , 0L , 0, QImage::BigEndian ); - return QPixmap(img); + TQImage img( (uchar*)(buff2.data()) , width , height , 32 , 0L , 0, TQImage::BigEndian ); + return TQPixmap(img); } -QByteArray MimicWrapper::encode(const QByteArray& data) +TQByteArray MimicWrapper::encode(const TQByteArray& data) { if(!m_init) { if(!mimic_encoder_init(m_mimctx, MIMIC_RES_HIGH)) { kdWarning(14140) << k_funcinfo << "Impossible to init encoder" << endl; - return QByteArray(); + return TQByteArray(); } if (!mimic_get_property( m_mimctx, "buffer_size", &m_bufferSize) ) { kdWarning(14140) << k_funcinfo << "Impossible to get buffer size" << endl; - return QByteArray(); + return TQByteArray(); } m_init=true; m_numFrames=0; } - QByteArray buff(m_bufferSize); + TQByteArray buff(m_bufferSize); int buff_new_size; if(!mimic_encode_frame(m_mimctx, (guchar*)(data.data()) , (guchar*)(buff.data()) , (gint*)(&buff_new_size) , m_numFrames%15==0 ) ) { kdWarning(14140) << k_funcinfo << "Impossible to decode frame" << endl; - return QByteArray(); + return TQByteArray(); } buff.resize(buff_new_size); ++m_numFrames; diff --git a/kopete/protocols/msn/webcam/mimicwrapper.h b/kopete/protocols/msn/webcam/mimicwrapper.h index c4a7475f..1ed048a2 100644 --- a/kopete/protocols/msn/webcam/mimicwrapper.h +++ b/kopete/protocols/msn/webcam/mimicwrapper.h @@ -14,7 +14,7 @@ #ifndef MIMICWRAPPER_H #define MIMICWREPPER_H -#include <qpixmap.h> +#include <tqpixmap.h> #include "kopete_export.h" @@ -26,8 +26,8 @@ class KOPETE_EXPORT MimicWrapper MimicWrapper(); ~MimicWrapper(); - QPixmap decode(const QByteArray &data); - QByteArray encode(const QByteArray &data); + TQPixmap decode(const TQByteArray &data); + TQByteArray encode(const TQByteArray &data); private: MimCtx *m_mimctx; diff --git a/kopete/protocols/msn/webcam/msnwebcamdialog.cpp b/kopete/protocols/msn/webcam/msnwebcamdialog.cpp index 092135f0..b0540cbb 100644 --- a/kopete/protocols/msn/webcam/msnwebcamdialog.cpp +++ b/kopete/protocols/msn/webcam/msnwebcamdialog.cpp @@ -19,31 +19,31 @@ #include "msnwebcamdialog.h" -#include <qframe.h> -#include <qobject.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqobject.h> +#include <tqwidget.h> #include <kdebug.h> #include <klocale.h> -MSNWebcamDialog::MSNWebcamDialog( const QString& contact, QWidget * parent, const char * name ) +MSNWebcamDialog::MSNWebcamDialog( const TQString& contact, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::Plain, i18n( "Webcam for %1" ).arg( contact ), KDialogBase::Close, KDialogBase::Close, parent, name, false, true /*seperator*/ ), m_imageContainer( this ) { - setInitialSize( QSize(320,290), true ); + setInitialSize( TQSize(320,290), true ); setEscapeButton( KDialogBase::Close ); /* - QObject::connect( contact, SIGNAL( signalReceivedWebcamImage( const QPixmap& ) ), - this, SLOT( newImage( const QPixmap& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( signalReceivedWebcamImage( const TQPixmap& ) ), + this, TQT_SLOT( newImage( const TQPixmap& ) ) ); */ - QObject::connect( this, SIGNAL( closeClicked() ), this, SIGNAL( closingWebcamDialog() ) ); + TQObject::connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SIGNAL( closingWebcamDialog() ) ); /* - QObject::connect( contact, SIGNAL( webcamClosed( int ) ), this, SLOT( webcamClosed( int ) ) ); + TQObject::connect( contact, TQT_SIGNAL( webcamClosed( int ) ), this, TQT_SLOT( webcamClosed( int ) ) ); */ - QFrame* page = plainPage(); + TQFrame* page = plainPage(); if ( page ) { kdDebug(14180) << k_funcinfo << "Adding webcam image container" << endl; @@ -59,7 +59,7 @@ MSNWebcamDialog::~ MSNWebcamDialog( ) } -void MSNWebcamDialog::newImage( const QPixmap & image ) +void MSNWebcamDialog::newImage( const TQPixmap & image ) { kdDebug(14180) << k_funcinfo << "New image received" << endl; // kdDebug(14180) << image << endl; @@ -72,7 +72,7 @@ void MSNWebcamDialog::webcamClosed( int reason ) { kdDebug(14180) << k_funcinfo << "webcam closed with reason?? " << reason <<endl; //m_imageContainer.clear(); - //m_imageContainer.setText( i18n( "Webcam closed with reason %1" ).arg( QString::number( reason ) ) ); + //m_imageContainer.setText( i18n( "Webcam closed with reason %1" ).arg( TQString::number( reason ) ) ); //m_imageContainer.setAlignment( Qt::AlignCenter ); //show(); } diff --git a/kopete/protocols/msn/webcam/msnwebcamdialog.h b/kopete/protocols/msn/webcam/msnwebcamdialog.h index dc10285d..a86050c4 100644 --- a/kopete/protocols/msn/webcam/msnwebcamdialog.h +++ b/kopete/protocols/msn/webcam/msnwebcamdialog.h @@ -21,7 +21,7 @@ #ifndef YAHOOWEBCAMDIALOG_H_ #define YAHOOWEBCAMDIALOG_H_ -//#include <qlabel.h> +//#include <tqlabel.h> #include <webcamwidget.h> #include <kdialogbase.h> @@ -36,11 +36,11 @@ class KOPETE_EXPORT MSNWebcamDialog : public KDialogBase { Q_OBJECT public: - MSNWebcamDialog( const QString& contact, QWidget* parent = 0, const char* name = 0 ); + MSNWebcamDialog( const TQString& contact, TQWidget* parent = 0, const char* name = 0 ); ~MSNWebcamDialog(); public slots: - void newImage( const QPixmap& image ); + void newImage( const TQPixmap& image ); void webcamClosed( int ); signals: diff --git a/kopete/protocols/oscar/aim/aimaccount.cpp b/kopete/protocols/oscar/aim/aimaccount.cpp index c6228040..9a6ec9de 100644 --- a/kopete/protocols/oscar/aim/aimaccount.cpp +++ b/kopete/protocols/oscar/aim/aimaccount.cpp @@ -13,8 +13,8 @@ ************************************************************************* */ -#include <qdom.h> -#include <qfile.h> +#include <tqdom.h> +#include <tqfile.h> #include <kdebug.h> #include <kconfig.h> @@ -68,20 +68,20 @@ void AIMMyselfContact::userInfoUpdated() setOnlineStatus( static_cast<AIMProtocol*>( protocol() )->statusAway ); //we're away } -void AIMMyselfContact::setOwnProfile( const QString& newProfile ) +void AIMMyselfContact::setOwnProfile( const TQString& newProfile ) { m_profileString = newProfile; if ( m_acct->isConnected() ) m_acct->engine()->updateProfile( newProfile ); } -QString AIMMyselfContact::userProfile() +TQString AIMMyselfContact::userProfile() { return m_profileString; } Kopete::ChatSession* AIMMyselfContact::manager( Kopete::Contact::CanCreateFlags canCreate, - Oscar::WORD exchange, const QString& room ) + Oscar::WORD exchange, const TQString& room ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << endl; Kopete::ContactPtrList chatMembers; @@ -95,8 +95,8 @@ Kopete::ChatSession* AIMMyselfContact::manager( Kopete::Contact::CanCreateFlags session = new AIMChatSession( this, chatMembers, account()->protocol(), exchange, room ); session->setEngine( m_acct->engine() ); - connect( session, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), - this, SLOT( sendMessage( Kopete::Message&, Kopete::ChatSession* ) ) ); + connect( session, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), + this, TQT_SLOT( sendMessage( Kopete::Message&, Kopete::ChatSession* ) ) ); m_chatRoomSessions.append( session ); } return session; @@ -112,7 +112,7 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "sending a message" << endl; //TODO: remove duplication - factor into a message utils class or something Oscar::Message msg; - QString s; + TQString s; if (message.plainBody().isEmpty()) // no text, do nothing return; @@ -127,53 +127,53 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio //font-size:xxpt -> <font ptsize=xx> s=message.escapedBody(); - s.replace ( QRegExp( QString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), - QString::fromLatin1("<style>\\1;\"\\2</style>")); + s.replace ( TQRegExp( TQString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), + TQString::fromLatin1("<style>\\1;\"\\2</style>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("\\2")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("\\2")); //okay now change the <font ptsize="xx"> to <font size="xx"> //0-9 are size 1 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"\\d\">")), - QString::fromLatin1("<font size=\"1\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"\\d\">")), + TQString::fromLatin1("<font size=\"1\">")); //10-11 are size 2 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[01]\">")), - QString::fromLatin1("<font size=\"2\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[01]\">")), + TQString::fromLatin1("<font size=\"2\">")); //12-13 are size 3 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[23]\">")), - QString::fromLatin1("<font size=\"3\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[23]\">")), + TQString::fromLatin1("<font size=\"3\">")); //14-16 are size 4 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[456]\">")), - QString::fromLatin1("<font size=\"4\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[456]\">")), + TQString::fromLatin1("<font size=\"4\">")); //17-22 are size 5 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), - QString::fromLatin1("<font size=\"5\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), + TQString::fromLatin1("<font size=\"5\">")); //23-29 are size 6 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"2[3456789]\">")),QString::fromLatin1("<font size=\"6\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"2[3456789]\">")),TQString::fromLatin1("<font size=\"6\">")); //30- (and any I missed) are size 7 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"[^\"]*\">")),QString::fromLatin1("<font size=\"7\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"[^\"]*\">")),TQString::fromLatin1("<font size=\"7\">")); - s.replace ( QRegExp ( QString::fromLatin1("<br[ /]*>")), QString::fromLatin1("<br>") ); + s.replace ( TQRegExp ( TQString::fromLatin1("<br[ /]*>")), TQString::fromLatin1("<br>") ); kdDebug(14190) << k_funcinfo << "sending " << s << endl; @@ -200,34 +200,34 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio } -AIMAccount::AIMAccount(Kopete::Protocol *parent, QString accountID, const char *name) +AIMAccount::AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, false) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; AIMMyselfContact* mc = new AIMMyselfContact( this ); setMyself( mc ); myself()->setOnlineStatus( static_cast<AIMProtocol*>( parent )->statusOffline ); - QString profile = configGroup()->readEntry( "Profile", + TQString profile = configGroup()->readEntry( "Profile", i18n( "Visit the Kopete website at <a href=\"http://kopete.kde.org\">http://kopete.kde.org</a>") ); mc->setOwnProfile( profile ); m_joinChatDialog = 0; m_visibilityDialog = 0; - QObject::connect( Kopete::ContactList::self(), - SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), + TQObject::connect( Kopete::ContactList::self(), + TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), this, - SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( engine(), SIGNAL( chatRoomConnected( WORD, const QString& ) ), - this, SLOT( connectedToChatRoom( WORD, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( chatRoomConnected( WORD, const TQString& ) ), + this, TQT_SLOT( connectedToChatRoom( WORD, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); } @@ -235,19 +235,19 @@ AIMAccount::~AIMAccount() { } -OscarContact *AIMAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *AIMAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - AIMContact* contact = new AIMContact( this, contactId, parentContact, QString::null, ssiItem ); + AIMContact* contact = new AIMContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); return contact; } -QString AIMAccount::sanitizedMessage( const QString& message ) +TQString AIMAccount::sanitizedMessage( const TQString& message ) { - QDomDocument doc; - QString domError; + TQDomDocument doc; + TQString domError; int errLine = 0, errCol = 0; doc.setContent( message, false, &domError, &errLine, &errCol ); if ( !domError.isEmpty() ) //error parsing, do nothing @@ -260,7 +260,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "conversion to dom document successful." << "looking for font tags" << endl; - QDomNodeList fontTagList = doc.elementsByTagName( "font" ); + TQDomNodeList fontTagList = doc.elementsByTagName( "font" ); if ( fontTagList.count() == 0 ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "No font tags found. Returning normal message" << endl; @@ -272,8 +272,8 @@ QString AIMAccount::sanitizedMessage( const QString& message ) uint numFontTags = fontTagList.count(); for ( uint i = 0; i < numFontTags; i++ ) { - QDomNode fontNode = fontTagList.item(i); - QDomElement fontEl; + TQDomNode fontNode = fontTagList.item(i); + TQDomElement fontEl; if ( !fontNode.isNull() && fontNode.isElement() ) fontEl = fontTagList.item(i).toElement(); else @@ -281,7 +281,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) if ( fontEl.hasAttribute( "back" ) ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Found attribute to replace. Doing replacement" << endl; - QString backgroundColor = fontEl.attribute( "back" ); + TQString backgroundColor = fontEl.attribute( "back" ); backgroundColor.insert( 0, "background-color: " ); backgroundColor.append( ';' ); fontEl.setAttribute( "style", backgroundColor ); @@ -304,42 +304,42 @@ KActionMenu* AIMAccount::actionMenu() AIMProtocol *p = AIMProtocol::protocol(); - QString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); mActionMenu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), i18n( "%2 <%1>" ).arg( accountId(), accountNick )); mActionMenu->insert( new KAction( i18n("Online"), p->statusOnline.iconFor( this ), 0, this, - SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); + TQT_SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); KAction* mActionAway = new Kopete::AwayAction(i18n("Away"), p->statusAway.iconFor( this ), 0, this, - SLOT(slotGoAway( const QString & )), this, "AIMAccount::mActionNA" ); + TQT_SLOT(slotGoAway( const TQString & )), this, "AIMAccount::mActionNA" ); mActionAway->setEnabled( isConnected() ); mActionMenu->insert( mActionAway ); KAction* mActionOffline = new KAction( i18n("Offline"), p->statusOffline.iconFor(this), 0, this, - SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); + TQT_SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); mActionMenu->insert( mActionOffline ); mActionMenu->popupMenu()->insertSeparator(); - KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), QString::null, 0, this, - SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); + KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), TQString::null, 0, this, + TQT_SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); mActionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "AIMAccount::mActionSetVisibility") ); mActionMenu->insert( m_joinChatAction ); KAction* m_editInfoAction = new KAction( i18n( "Edit User Info..." ), "identity", 0, - this, SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); + this, TQT_SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); mActionMenu->insert( m_editInfoAction ); return mActionMenu; } -void AIMAccount::setAway(bool away, const QString &awayReason) +void AIMAccount::setAway(bool away, const TQString &awayReason) { // kdDebug(14152) << k_funcinfo << accountId() << "reason is " << awayReason << endl; if ( away ) @@ -353,12 +353,12 @@ void AIMAccount::setAway(bool away, const QString &awayReason) { engine()->setStatus( Client::Online ); AIMMyselfContact* me = static_cast<AIMMyselfContact *> ( myself() ); - me->setLastAwayMessage(QString::null); + me->setLastAwayMessage(TQString::null); me->removeProperty( Kopete::Global::Properties::self()->awayMessage() ); } } -void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { kdDebug(14152) << k_funcinfo << "called with reason = " << reason <<" status = "<< status.status() << endl;; if ( status.status() == Kopete::OnlineStatus::Online ) @@ -368,13 +368,13 @@ void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -void AIMAccount::setUserProfile(const QString &profile) +void AIMAccount::setUserProfile(const TQString &profile) { kdDebug(14152) << k_funcinfo << "called." << endl; AIMMyselfContact* aimmc = dynamic_cast<AIMMyselfContact*>( myself() ); if ( aimmc ) aimmc->setOwnProfile( profile ); - configGroup()->writeEntry( QString::fromLatin1( "Profile" ), profile ); + configGroup()->writeEntry( TQString::fromLatin1( "Profile" ), profile ); } void AIMAccount::slotEditInfo() @@ -391,7 +391,7 @@ void AIMAccount::slotEditInfo() myInfo->exec(); // This is a modal dialog } -void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void AIMAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Global identity changed" << endl; @@ -415,14 +415,14 @@ void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void AIMAccount::slotBuddyIconChanged() { // need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); if ( !engine()->isActive() ) { - QObject::connect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); return; } - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); SSIManager* ssi = engine()->ssiManager(); Oscar::SSI item = ssi->findItemForIconByRef( 1 ); @@ -435,7 +435,7 @@ void AIMAccount::slotBuddyIconChanged() Oscar::SSI s(item); //remove hash and alias - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) tList.remove( t ); @@ -447,7 +447,7 @@ void AIMAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -467,7 +467,7 @@ void AIMAccount::slotBuddyIconChanged() memcpy(t.data.data() + 2, iconHash.rawDigest(), 16); t.length = t.data.size(); - QValueList<Oscar::TLV> list; + TQValueList<Oscar::TLV> list; list.append( t ); Oscar::SSI s( "1", 0, ssi->nextContactId(), ROSTER_BUDDYICONS, list ); @@ -480,7 +480,7 @@ void AIMAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "modifying old item in ssi." << endl; - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) @@ -520,9 +520,9 @@ void AIMAccount::slotJoinChat() if ( !m_joinChatDialog ) { m_joinChatDialog = new AIMJoinChatUI( this, false, Kopete::UI::Global::mainWidget() ); - QObject::connect( m_joinChatDialog, SIGNAL( closing( int ) ), - this, SLOT( joinChatDialogClosed( int ) ) ); - QValueList<int> list = engine()->chatExchangeList(); + TQObject::connect( m_joinChatDialog, TQT_SIGNAL( closing( int ) ), + this, TQT_SLOT( joinChatDialogClosed( int ) ) ); + TQValueList<int> list = engine()->chatExchangeList(); m_joinChatDialog->setExchangeList( list ); m_joinChatDialog->show(); } @@ -549,7 +549,7 @@ void AIMAccount::slotGoOnline() } } -void AIMAccount::slotGoAway(const QString &message) +void AIMAccount::slotGoAway(const TQString &message) { kdDebug(14152) << k_funcinfo << message << endl; setAway(true, message); @@ -557,7 +557,7 @@ void AIMAccount::slotGoAway(const QString &message) void AIMAccount::joinChatDialogClosed( int code ) { - if ( code == QDialog::Accepted ) + if ( code == TQDialog::Accepted ) { //join the chat kdDebug(14152) << k_funcinfo << "chat accepted." << endl; @@ -583,7 +583,7 @@ void AIMAccount::disconnected( DisconnectReason reason ) kdDebug( OSCAR_AIM_DEBUG ) << k_funcinfo << "Attempting to set status offline" << endl; myself()->setOnlineStatus( static_cast<AIMProtocol*>( protocol() )->statusOffline ); - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast<OscarContact*>( it.current() ); @@ -608,7 +608,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(14152) << k_funcinfo << "Checking to see if I'm online.." << endl; if( myself()->onlineStatus().status() == Kopete::OnlineStatus::Away ) { - QString sender = Oscar::normalize( message.sender() ); + TQString sender = Oscar::normalize( message.sender() ); AIMContact* aimSender = static_cast<AIMContact *> ( contacts()[sender] ); //should exist now if ( !aimSender ) { @@ -621,7 +621,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) // get the away message we have set AIMMyselfContact* myContact = static_cast<AIMMyselfContact *> ( myself() ); - QString msg = myContact->lastAwayMessage(); + TQString msg = myContact->lastAwayMessage(); kdDebug(14152) << k_funcinfo << "Got away message: " << msg << endl; // Create the message Kopete::Message chatMessage( myself(), aimSender, msg, Kopete::Message::Outbound, @@ -636,8 +636,8 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "have chat message" << endl; //handle chat room messages seperately - QValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); + TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -652,7 +652,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "found chat session for chat room" << endl; Kopete::Contact* ocSender = contacts()[Oscar::normalize( message.sender() )]; //sanitize; - QString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); + TQString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); Kopete::ContactPtrList me; me.append( myself() ); @@ -665,7 +665,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) } } -void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) +void AIMAccount::connectedToChatRoom( WORD exchange, const TQString& room ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Creating chat room session" << endl; Kopete::ContactPtrList emptyList; @@ -677,14 +677,14 @@ void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) session->raiseView(); } -void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userJoinedChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "user " << contact << " has joined the chat" << endl; - QValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); + TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -717,13 +717,13 @@ void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QStri } } -void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userLeftChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; - QValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); + TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -753,18 +753,18 @@ void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString } -void AIMAccount::connectWithPassword( const QString & ) +void AIMAccount::connectWithPassword( const TQString & ) { kdDebug(14152) << k_funcinfo << "accountId='" << accountId() << "'" << endl; // Get the screen name for this account - QString screenName = accountId(); - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString screenName = accountId(); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); - QString _password = password().cachedValue(); + TQString _password = password().cachedValue(); if ( _password.isEmpty() ) { kdDebug(14150) << "Kopete is unable to attempt to sign-on to the " @@ -794,19 +794,19 @@ void AIMAccount::slotSetVisiblility() if ( !m_visibilityDialog ) { m_visibilityDialog = new OscarVisibilityDialog( engine(), Kopete::UI::Global::mainWidget() ); - QObject::connect( m_visibilityDialog, SIGNAL( closing() ), - this, SLOT( slotVisibilityDialogClosed() ) ); + TQObject::connect( m_visibilityDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( slotVisibilityDialogClosed() ) ); //add all contacts; OscarVisibilityDialog::ContactMap contactMap; - QMap<QString, QString> revContactMap; + TQMap<TQString, TQString> revContactMap; - QValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); - QValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); + TQValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); + TQValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); for ( it = contactList.constBegin(); it != cEnd; ++it ) { - QString contactId = ( *it ).name(); + TQString contactId = ( *it ).name(); OscarContact* oc = dynamic_cast<OscarContact*>( contacts()[( *it ).name()] ); if ( oc ) @@ -823,7 +823,7 @@ void AIMAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -895,9 +895,9 @@ void AIMAccount::setPrivacySettings( int privacy ) void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) { SSIManager* ssi = engine()->ssiManager(); - Oscar::SSI item = ssi->findItem( QString::null, ROSTER_VISIBILITY ); + Oscar::SSI item = ssi->findItem( TQString::null, ROSTER_VISIBILITY ); - QValueList<Oscar::TLV> tList; + TQValueList<Oscar::TLV> tList; tList.append( TLV( 0x00CA, 1, (char *)&privacy ) ); tList.append( TLV( 0x00CB, sizeof(userClasses), (char *)&userClasses ) ); @@ -905,7 +905,7 @@ void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) if ( !item ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Adding new privacy TLV item" << endl; - Oscar::SSI s( QString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); + Oscar::SSI s( TQString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); engine()->modifySSIItem( item, s ); } else diff --git a/kopete/protocols/oscar/aim/aimaccount.h b/kopete/protocols/oscar/aim/aimaccount.h index 034b9836..2df309b6 100644 --- a/kopete/protocols/oscar/aim/aimaccount.h +++ b/kopete/protocols/oscar/aim/aimaccount.h @@ -19,9 +19,9 @@ #ifndef AIMACCOUNT_H #define AIMACCOUNT_H -#include <qdict.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqwidget.h> #include "oscartypeclasses.h" #include "oscaraccount.h" @@ -56,26 +56,26 @@ Q_OBJECT public: AIMMyselfContact( AIMAccount *acct ); void userInfoUpdated(); - void setOwnProfile( const QString& newProfile ); - QString userProfile(); - void setLastAwayMessage( const QString& msg) {m_lastAwayMessage = msg;} - QString lastAwayMessage() { return m_lastAwayMessage; }; + void setOwnProfile( const TQString& newProfile ); + TQString userProfile(); + void setLastAwayMessage( const TQString& msg) {m_lastAwayMessage = msg;} + TQString lastAwayMessage() { return m_lastAwayMessage; }; virtual Kopete::ChatSession* manager( Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate, - WORD exchange = 0, const QString& room = QString::null); + WORD exchange = 0, const TQString& room = TQString::null); public slots: void sendMessage( Kopete::Message&, Kopete::ChatSession* session ); void chatSessionDestroyed( Kopete::ChatSession* ); private: - QString m_profileString; + TQString m_profileString; AIMAccount* m_acct; /** * There has GOT to be a better way to get this away message */ - QString m_lastAwayMessage; - QValueList<Kopete::ChatSession*> m_chatRoomSessions; + TQString m_lastAwayMessage; + TQValueList<Kopete::ChatSession*> m_chatRoomSessions; }; @@ -85,42 +85,42 @@ class AIMAccount : public OscarAccount Q_OBJECT public: - AIMAccount(Kopete::Protocol *parent, QString accountID, const char *name=0L); + AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name=0L); virtual ~AIMAccount(); // Accessor method for the action menu virtual KActionMenu* actionMenu(); - void setAway(bool away, const QString &awayReason = QString::null ); + void setAway(bool away, const TQString &awayReason = TQString::null ); - virtual void connectWithPassword( const QString &password ); + virtual void connectWithPassword( const TQString &password ); - void setUserProfile(const QString &profile); + void setUserProfile(const TQString &profile); void setPrivacySettings( int privacy ); public slots: /** Reimplementation from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason = QString::null ); + void setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason = TQString::null ); void slotEditInfo(); void slotGoOnline(); - void slotGlobalIdentityChanged( const QString&, const QVariant& ); + void slotGlobalIdentityChanged( const TQString&, const TQVariant& ); void slotBuddyIconChanged(); void slotJoinChat(); protected slots: - void slotGoAway(const QString&); + void slotGoAway(const TQString&); void joinChatDialogClosed( int ); virtual void loginActions(); virtual void disconnected( Kopete::Account::DisconnectReason reason ); virtual void messageReceived( const Oscar::Message& message ); - void connectedToChatRoom( WORD exchange, const QString& roomName ); - void userJoinedChat( Oscar::WORD exchange, const QString& room, const QString& contact ); - void userLeftChat( Oscar::WORD exchange, const QString& room, const QString& contact ); + void connectedToChatRoom( WORD exchange, const TQString& roomName ); + void userJoinedChat( Oscar::WORD exchange, const TQString& room, const TQString& contact ); + void userLeftChat( Oscar::WORD exchange, const TQString& room, const TQString& contact ); void slotSetVisiblility(); void slotVisibilityDialogClosed(); @@ -131,9 +131,9 @@ protected: * Implement virtual method from OscarAccount * This allows OscarAccount to take care of adding new contacts */ - OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); + OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); - QString sanitizedMessage( const QString& message ); + TQString sanitizedMessage( const TQString& message ); private: // Set privacy tlv item diff --git a/kopete/protocols/oscar/aim/aimchatsession.cpp b/kopete/protocols/oscar/aim/aimchatsession.cpp index fa0616a6..10938a6a 100644 --- a/kopete/protocols/oscar/aim/aimchatsession.cpp +++ b/kopete/protocols/oscar/aim/aimchatsession.cpp @@ -26,7 +26,7 @@ AIMChatSession::AIMChatSession( const Kopete::Contact* user, Kopete::ContactPtrList others, Kopete::Protocol* protocol, Oscar::WORD exchange, - const QString& room ) + const TQString& room ) : Kopete::ChatSession( user, others, protocol, "AIMChatSession" ) { @@ -48,13 +48,13 @@ void AIMChatSession::setEngine( Client* engine ) m_engine = engine; } -QString AIMChatSession::roomName() const +TQString AIMChatSession::roomName() const { return m_roomName; } -void AIMChatSession::setRoomName( const QString& room ) +void AIMChatSession::setRoomName( const TQString& room ) { m_roomName = room; } diff --git a/kopete/protocols/oscar/aim/aimchatsession.h b/kopete/protocols/oscar/aim/aimchatsession.h index 79c0685e..9ce3ce1f 100644 --- a/kopete/protocols/oscar/aim/aimchatsession.h +++ b/kopete/protocols/oscar/aim/aimchatsession.h @@ -30,7 +30,7 @@ Q_OBJECT public: AIMChatSession( const Kopete::Contact* contact, Kopete::ContactPtrList others, Kopete::Protocol* protocol, Oscar::WORD exchange = 0, - const QString& room = QString::null ); + const TQString& room = TQString::null ); virtual ~AIMChatSession(); /** @@ -44,14 +44,14 @@ public: * this ChatSession object * @return the name of the chat room */ - QString roomName() const; + TQString roomName() const; /** * Set the name of the AIM chat room represented by * this ChatSession object * @param room the name of the AIM chat room */ - void setRoomName( const QString& room ); + void setRoomName( const TQString& room ); /** * Get the exchange of the AIM chat room represented by @@ -68,7 +68,7 @@ public: void setExchange( Oscar::WORD exchange ); private: - QString m_roomName; + TQString m_roomName; Oscar::WORD m_exchange; Client* m_engine; }; diff --git a/kopete/protocols/oscar/aim/aimcontact.cpp b/kopete/protocols/oscar/aim/aimcontact.cpp index 7e46c585..fc55537d 100644 --- a/kopete/protocols/oscar/aim/aimcontact.cpp +++ b/kopete/protocols/oscar/aim/aimcontact.cpp @@ -16,10 +16,10 @@ #include <time.h> -#include <qimage.h> -#include <qregexp.h> -#include <qtimer.h> -#include <qtextcodec.h> +#include <tqimage.h> +#include <tqregexp.h> +#include <tqtimer.h> +#include <tqtextcodec.h> #include <kapplication.h> #include <kactionclasses.h> @@ -43,8 +43,8 @@ #include "aimcontact.h" #include "aimaccount.h" -AIMContact::AIMContact( Kopete::Account* account, const QString& name, Kopete::MetaContact* parent, - const QString& icon, const Oscar::SSI& ssiItem ) +AIMContact::AIMContact( Kopete::Account* account, const TQString& name, Kopete::MetaContact* parent, + const TQString& icon, const Oscar::SSI& ssiItem ) : OscarContact(account, name, parent, icon, ssiItem ) { mProtocol=static_cast<AIMProtocol *>(protocol()); @@ -56,23 +56,23 @@ AIMContact::AIMContact( Kopete::Account* account, const QString& name, Kopete::M m_haveAwayMessage = false; m_mobile = false; // Set the last autoresponse time to the current time yesterday - m_lastAutoresponseTime = QDateTime::currentDateTime().addDays(-1); - - QObject::connect( mAccount->engine(), SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ), - this, SLOT( userInfoUpdated( const QString&, const UserDetails& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userIsOffline( const QString& ) ), - this, SLOT( userOffline( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SLOT( updateAwayMessage( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedProfile( const QString&, const QString& ) ), - this, SLOT( updateProfile( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ), - this, SLOT( gotWarning( const QString&, Q_UINT16, Q_UINT16 ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( haveIconForContact( const QString&, QByteArray ) ), - this, SLOT( haveIcon( const QString&, QByteArray ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( iconServerConnected() ), - this, SLOT( requestBuddyIcon() ) ); - QObject::connect( this, SIGNAL( featuresUpdated() ), this, SLOT( updateFeatures() ) ); + m_lastAutoresponseTime = TQDateTime::currentDateTime().addDays(-1); + + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( userInfoUpdated( const TQString&, const UserDetails& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOffline( const TQString& ) ), + this, TQT_SLOT( userOffline( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SLOT( updateAwayMessage( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ), + this, TQT_SLOT( updateProfile( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ), + this, TQT_SLOT( gotWarning( const TQString&, Q_UINT16, Q_UINT16 ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ), + this, TQT_SLOT( haveIcon( const TQString&, TQByteArray ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( requestBuddyIcon() ) ); + TQObject::connect( this, TQT_SIGNAL( featuresUpdated() ), this, TQT_SLOT( updateFeatures() ) ); } AIMContact::~AIMContact() @@ -84,18 +84,18 @@ bool AIMContact::isReachable() return true; } -QPtrList<KAction> *AIMContact::customContextMenuActions() +TQPtrList<KAction> *AIMContact::customContextMenuActions() { - QPtrList<KAction> *actionCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>(); if ( !m_warnUserAction ) { - m_warnUserAction = new KAction( i18n( "&Warn User" ), 0, this, SLOT( warnUser() ), this, "warnAction" ); + m_warnUserAction = new KAction( i18n( "&Warn User" ), 0, this, TQT_SLOT( warnUser() ), this, "warnAction" ); } m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), "", 0, - this, SLOT(slotVisibleTo()), this, "actionVisibleTo"); + this, TQT_SLOT(slotVisibleTo()), this, "actionVisibleTo"); m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), "", 0, - this, SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); + this, TQT_SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); bool on = account()->isConnected(); @@ -117,26 +117,26 @@ QPtrList<KAction> *AIMContact::customContextMenuActions() return actionCollection; } -const QString AIMContact::awayMessage() +const TQString AIMContact::awayMessage() { return property(mProtocol->awayMessage).value().toString(); } -void AIMContact::setAwayMessage(const QString &message) +void AIMContact::setAwayMessage(const TQString &message) { kdDebug(14152) << k_funcinfo << "Called for '" << contactId() << "', away msg='" << message << "'" << endl; - QString filteredMessage = message; + TQString filteredMessage = message; filteredMessage.replace( - QRegExp(QString::fromLatin1("<[hH][tT][mM][lL].*>(.*)</[hH][tT][mM][lL]>")), - QString::fromLatin1("\\1")); + TQRegExp(TQString::fromLatin1("<[hH][tT][mM][lL].*>(.*)</[hH][tT][mM][lL]>")), + TQString::fromLatin1("\\1")); filteredMessage.replace( - QRegExp(QString::fromLatin1("<[bB][oO][dD][yY].*>(.*)</[bB][oO][dD][yY]>")), - QString::fromLatin1("\\1") ); - QRegExp fontRemover( QString::fromLatin1("<[fF][oO][nN][tT].*>(.*)</[fF][oO][nN][tT]>") ); + TQRegExp(TQString::fromLatin1("<[bB][oO][dD][yY].*>(.*)</[bB][oO][dD][yY]>")), + TQString::fromLatin1("\\1") ); + TQRegExp fontRemover( TQString::fromLatin1("<[fF][oO][nN][tT].*>(.*)</[fF][oO][nN][tT]>") ); fontRemover.setMinimal(true); while ( filteredMessage.find( fontRemover ) != -1 ) - filteredMessage.replace( fontRemover, QString::fromLatin1("\\1") ); + filteredMessage.replace( fontRemover, TQString::fromLatin1("\\1") ); setProperty(mProtocol->awayMessage, filteredMessage); } @@ -162,7 +162,7 @@ void AIMContact::slotUserInfo() m_infoDialog = new AIMUserInfoDialog( this, static_cast<AIMAccount*>( account() ), false, Kopete::UI::Global::mainWidget(), 0 ); if( !m_infoDialog ) return; - connect( m_infoDialog, SIGNAL( finished() ), this, SLOT( closeUserInfoDialog() ) ); + connect( m_infoDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfoDialog() ) ); m_infoDialog->show(); if ( mAccount->isConnected() ) { @@ -174,7 +174,7 @@ void AIMContact::slotUserInfo() m_infoDialog->raise(); } -void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void AIMContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -183,7 +183,7 @@ void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& det //if they don't have an SSI alias, make sure we use the capitalization from the //server so their contact id looks all pretty. - QString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( nickname.isEmpty() || Oscar::normalize( nickname ) == Oscar::normalize( contact ) ) setNickName( contact ); @@ -240,13 +240,13 @@ void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& det int time = ( KApplication::random() % 10 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestBuddyIcon() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); } OscarContact::userInfoUpdated( contact, details ); } -void AIMContact::userOnline( const QString& userId ) +void AIMContact::userOnline( const TQString& userId ) { if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) ) { @@ -255,7 +255,7 @@ void AIMContact::userOnline( const QString& userId ) } } -void AIMContact::userOffline( const QString& userId ) +void AIMContact::userOffline( const TQString& userId ) { if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) ) { @@ -264,7 +264,7 @@ void AIMContact::userOffline( const QString& userId ) } } -void AIMContact::updateAwayMessage( const QString& contact, const QString& message ) +void AIMContact::updateAwayMessage( const TQString& contact, const TQString& message ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -293,7 +293,7 @@ void AIMContact::updateAwayMessage( const QString& contact, const QString& messa emit updatedProfile(); } -void AIMContact::updateProfile( const QString& contact, const QString& profile ) +void AIMContact::updateProfile( const TQString& contact, const TQString& profile ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -302,7 +302,7 @@ void AIMContact::updateProfile( const QString& contact, const QString& profile ) emit updatedProfile(); } -void AIMContact::gotWarning( const QString& contact, Q_UINT16 increase, Q_UINT16 newLevel ) +void AIMContact::gotWarning( const TQString& contact, Q_UINT16 increase, Q_UINT16 newLevel ) { //somebody just got bitchslapped! :O Q_UNUSED( increase ); @@ -322,16 +322,16 @@ void AIMContact::requestBuddyIcon() } } -void AIMContact::haveIcon( const QString& user, QByteArray icon ) +void AIMContact::haveIcon( const TQString& user, TQByteArray icon ) { if ( Oscar::normalize( user ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Updating icon for " << contactId() << endl; - QImage buddyIcon( icon ); + TQImage buddyIcon( icon ); if ( buddyIcon.isNull() ) { - kdWarning(OSCAR_AIM_DEBUG) << k_funcinfo << "Failed to convert buddy icon to QImage" << endl; + kdWarning(OSCAR_AIM_DEBUG) << k_funcinfo << "Failed to convert buddy icon to TQImage" << endl; return; } @@ -346,8 +346,8 @@ void AIMContact::closeUserInfoDialog() void AIMContact::warnUser() { - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); - QString message = i18n( "<qt>Would you like to warn %1 anonymously or with your name?<br>" \ + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString message = i18n( "<qt>Would you like to warn %1 anonymously or with your name?<br>" \ "(Warning a user on AIM will result in a \"Warning Level\"" \ " increasing for the user you warn. Once this level has reached a" \ " certain point, they will not be able to sign on. Please do not abuse" \ @@ -377,7 +377,7 @@ void AIMContact::slotInvisibleTo() void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *) { Oscar::Message msg; - QString s; + TQString s; if (message.plainBody().isEmpty()) // no text, do nothing return; @@ -392,56 +392,56 @@ void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *) //font-size:xxpt -> <font ptsize=xx> s=message.escapedBody(); - s.replace ( QRegExp( QString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), - QString::fromLatin1("<style>\\1;\"\\2</style>")); + s.replace ( TQRegExp( TQString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), + TQString::fromLatin1("<style>\\1;\"\\2</style>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("\\2")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("\\2")); //okay now change the <font ptsize="xx"> to <font size="xx"> //0-9 are size 1 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"\\d\">")), - QString::fromLatin1("<font size=\"1\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"\\d\">")), + TQString::fromLatin1("<font size=\"1\">")); //10-11 are size 2 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[01]\">")), - QString::fromLatin1("<font size=\"2\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[01]\">")), + TQString::fromLatin1("<font size=\"2\">")); //12-13 are size 3 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[23]\">")), - QString::fromLatin1("<font size=\"3\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[23]\">")), + TQString::fromLatin1("<font size=\"3\">")); //14-16 are size 4 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[456]\">")), - QString::fromLatin1("<font size=\"4\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[456]\">")), + TQString::fromLatin1("<font size=\"4\">")); //17-22 are size 5 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), - QString::fromLatin1("<font size=\"5\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), + TQString::fromLatin1("<font size=\"5\">")); //23-29 are size 6 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"2[3456789]\">")),QString::fromLatin1("<font size=\"6\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"2[3456789]\">")),TQString::fromLatin1("<font size=\"6\">")); //30- (and any I missed) are size 7 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"[^\"]*\">")),QString::fromLatin1("<font size=\"7\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"[^\"]*\">")),TQString::fromLatin1("<font size=\"7\">")); - s.replace ( QRegExp ( QString::fromLatin1("<br[ /]*>")), QString::fromLatin1("<br>") ); + s.replace ( TQRegExp ( TQString::fromLatin1("<br[ /]*>")), TQString::fromLatin1("<br>") ); // strip left over line break - s.remove( QRegExp( QString::fromLatin1( "<br>$" ) ) ); + s.remove( TQRegExp( TQString::fromLatin1( "<br>$" ) ) ); kdDebug(14190) << k_funcinfo << "sending " << s << endl; @@ -472,9 +472,9 @@ void AIMContact::updateFeatures() void AIMContact::sendAutoResponse(Kopete::Message& msg) { // The target time is 2 minutes later than the last message - int delta = m_lastAutoresponseTime.secsTo( QDateTime::currentDateTime() ); + int delta = m_lastAutoresponseTime.secsTo( TQDateTime::currentDateTime() ); kdDebug(14152) << k_funcinfo << "Last autoresponse time: " << m_lastAutoresponseTime << endl; - kdDebug(14152) << k_funcinfo << "Current time: " << QDateTime::currentDateTime() << endl; + kdDebug(14152) << k_funcinfo << "Current time: " << TQDateTime::currentDateTime() << endl; kdDebug(14152) << k_funcinfo << "Difference: " << delta << endl; // Check to see if we're past that time if(delta > 120) @@ -491,7 +491,7 @@ void AIMContact::sendAutoResponse(Kopete::Message& msg) } else { - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); message.setText( Oscar::Message::UserDefined, msg.plainBody(), codec ); } @@ -506,7 +506,7 @@ void AIMContact::sendAutoResponse(Kopete::Message& msg) manager(Kopete::Contact::CanCreate)->appendMessage(msg); manager(Kopete::Contact::CanCreate)->messageSucceeded(); // Update the last autoresponse time - m_lastAutoresponseTime = QDateTime::currentDateTime(); + m_lastAutoresponseTime = TQDateTime::currentDateTime(); } else { diff --git a/kopete/protocols/oscar/aim/aimcontact.h b/kopete/protocols/oscar/aim/aimcontact.h index 458db2f5..a246c029 100644 --- a/kopete/protocols/oscar/aim/aimcontact.h +++ b/kopete/protocols/oscar/aim/aimcontact.h @@ -18,7 +18,7 @@ #ifndef AIMCONTACT_H #define AIMCONTACT_H -#include <qdatetime.h> +#include <tqdatetime.h> #include "oscarcontact.h" @@ -37,25 +37,25 @@ class AIMContact : public OscarContact Q_OBJECT public: - AIMContact( Kopete::Account*, const QString&, Kopete::MetaContact*, - const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + AIMContact( Kopete::Account*, const TQString&, Kopete::MetaContact*, + const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~AIMContact(); bool isReachable(); - QPtrList<KAction> *customContextMenuActions(); + TQPtrList<KAction> *customContextMenuActions(); - const QString &userProfile() { return mUserProfile; } + const TQString &userProfile() { return mUserProfile; } - virtual const QString awayMessage(); - virtual void setAwayMessage( const QString &message ); + virtual const TQString awayMessage(); + virtual void setAwayMessage( const TQString &message ); int warningLevel() const; /** * Gets the last time an autoresponse was sent to this contact - * @returns QDateTime Object that represents the date/time + * @returns TQDateTime Object that represents the date/time */ - QDateTime lastAutoResponseTime() {return m_lastAutoresponseTime;} + TQDateTime lastAutoResponseTime() {return m_lastAutoresponseTime;} /** Sends an auto response to this contact */ virtual void sendAutoResponse(Kopete::Message& msg); @@ -63,12 +63,12 @@ public: public slots: void updateSSIItem(); void slotUserInfo(); - void userInfoUpdated( const QString& contact, const UserDetails& details ); - void userOnline( const QString& userId ); - void userOffline( const QString& userId ); - void updateAwayMessage( const QString& userId, const QString& message ); - void updateProfile( const QString& contact, const QString& profile ); - void gotWarning( const QString& contact, Q_UINT16, Q_UINT16 ); + void userInfoUpdated( const TQString& contact, const UserDetails& details ); + void userOnline( const TQString& userId ); + void userOffline( const TQString& userId ); + void updateAwayMessage( const TQString& userId, const TQString& message ); + void updateProfile( const TQString& contact, const TQString& profile ); + void gotWarning( const TQString& contact, Q_UINT16, Q_UINT16 ); signals: void updatedProfile(); @@ -79,7 +79,7 @@ protected slots: private slots: void requestBuddyIcon(); - void haveIcon( const QString&, QByteArray ); + void haveIcon( const TQString&, TQByteArray ); void closeUserInfoDialog(); void warnUser(); @@ -89,10 +89,10 @@ private slots: private: AIMProtocol* mProtocol; AIMUserInfoDialog* m_infoDialog; - QString mUserProfile; + TQString mUserProfile; bool m_haveAwayMessage; bool m_mobile; // Is this user mobile (i.e. do they have message forwarding on, or mobile AIM) - QDateTime m_lastAutoresponseTime; + TQDateTime m_lastAutoresponseTime; KAction* m_warnUserAction; KToggleAction *m_actionVisibleTo; diff --git a/kopete/protocols/oscar/aim/aimjoinchat.cpp b/kopete/protocols/oscar/aim/aimjoinchat.cpp index 8b8c78a9..2ccec9b2 100644 --- a/kopete/protocols/oscar/aim/aimjoinchat.cpp +++ b/kopete/protocols/oscar/aim/aimjoinchat.cpp @@ -19,15 +19,15 @@ #include "aimjoinchat.h" -#include <qlineedit.h> -#include <qcombobox.h> +#include <tqlineedit.h> +#include <tqcombobox.h> #include <klocale.h> #include "aimjoinchatbase.h" #include "aimaccount.h" AIMJoinChatUI::AIMJoinChatUI( AIMAccount* account, bool modal, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( parent, name, modal, i18n( "Join AIM Chat Room" ), Cancel | User1, User1, true, i18n( "Join" ) ) { @@ -41,8 +41,8 @@ AIMJoinChatUI::AIMJoinChatUI( AIMAccount* account, bool modal, setMainWidget( m_joinUI ); - QObject::connect( this, SIGNAL( user1Clicked() ), this, SLOT( joinChat() ) ); - QObject::connect( this, SIGNAL( cancelClicked() ), this, SLOT( closeClicked() ) ); + TQObject::connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( joinChat() ) ); + TQObject::connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( closeClicked() ) ); } AIMJoinChatUI::~AIMJoinChatUI() @@ -50,14 +50,14 @@ AIMJoinChatUI::~AIMJoinChatUI() m_exchanges.clear(); } -void AIMJoinChatUI::setExchangeList( const QValueList<int>& list ) +void AIMJoinChatUI::setExchangeList( const TQValueList<int>& list ) { m_exchanges = list; - QStringList exchangeList; - QValueList<int>::const_iterator it = list.begin(); + TQStringList exchangeList; + TQValueList<int>::const_iterator it = list.begin(); while ( it != list.end() ) { - exchangeList.append( QString::number( ( *it ) ) ); + exchangeList.append( TQString::number( ( *it ) ) ); ++it; } @@ -71,21 +71,21 @@ void AIMJoinChatUI::joinChat() int item = m_joinUI->exchange->currentItem(); m_exchange = m_joinUI->exchange->text( item ); - emit closing( QDialog::Accepted ); + emit closing( TQDialog::Accepted ); } void AIMJoinChatUI::closeClicked() { //hmm, do nothing? - emit closing( QDialog::Rejected ); + emit closing( TQDialog::Rejected ); } -QString AIMJoinChatUI::roomName() const +TQString AIMJoinChatUI::roomName() const { return m_roomName; } -QString AIMJoinChatUI::exchange() const +TQString AIMJoinChatUI::exchange() const { return m_exchange; } diff --git a/kopete/protocols/oscar/aim/aimjoinchat.h b/kopete/protocols/oscar/aim/aimjoinchat.h index dc74a8a9..a6e493d4 100644 --- a/kopete/protocols/oscar/aim/aimjoinchat.h +++ b/kopete/protocols/oscar/aim/aimjoinchat.h @@ -31,15 +31,15 @@ class AIMJoinChatUI : public KDialogBase { Q_OBJECT public: - AIMJoinChatUI( AIMAccount*, bool modal, QWidget* parent = 0, + AIMJoinChatUI( AIMAccount*, bool modal, TQWidget* parent = 0, const char* name = 0 ); ~AIMJoinChatUI(); - void setExchangeList( const QValueList<int>& ); - QValueList<int> exchangeList() const; + void setExchangeList( const TQValueList<int>& ); + TQValueList<int> exchangeList() const; - QString roomName() const; - QString exchange() const; + TQString roomName() const; + TQString exchange() const; protected slots: @@ -52,9 +52,9 @@ signals: private: AIMJoinChatBase* m_joinUI; AIMAccount* m_account; - QValueList<int> m_exchanges; - QString m_roomName; - QString m_exchange; + TQValueList<int> m_exchanges; + TQString m_roomName; + TQString m_exchange; }; diff --git a/kopete/protocols/oscar/aim/aimprotocol.cpp b/kopete/protocols/oscar/aim/aimprotocol.cpp index 9f64fe28..779c63c8 100644 --- a/kopete/protocols/oscar/aim/aimprotocol.cpp +++ b/kopete/protocols/oscar/aim/aimprotocol.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include <qstringlist.h> +#include <tqstringlist.h> #include <kgenericfactory.h> #include <kmessagebox.h> #include <kdebug.h> @@ -46,7 +46,7 @@ AIMProtocol* AIMProtocol::protocolStatic_ = 0L; AIMProtocolHandler::AIMProtocolHandler() : Kopete::MimeTypeHandler(false) { - registerAsProtocolHandler(QString::fromLatin1("aim")); + registerAsProtocolHandler(TQString::fromLatin1("aim")); } void AIMProtocolHandler::handleURL(const KURL &url) const @@ -78,8 +78,8 @@ void AIMProtocolHandler::handleURL(const KURL &url) const AIMProtocol *proto = AIMProtocol::protocol(); kdDebug(14152) << k_funcinfo << "URL url : '" << url.url() << "'" << endl; kdDebug(14152) << k_funcinfo << "URL path : '" << url.path() << "'" << endl; - QString command = url.path(); - QString realCommand, firstParam, secondParam; + TQString command = url.path(); + TQString realCommand, firstParam, secondParam; bool needContactAddition = false; if ( command.find( "goim", 0, false ) != -1 ) { @@ -150,11 +150,11 @@ void AIMProtocolHandler::handleURL(const KURL &url) const } Kopete::Account *account = 0; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto); if (accounts.count() == 1) { - QDictIterator<Kopete::Account> it(accounts); + TQDictIterator<Kopete::Account> it(accounts); account = it.current(); } @@ -170,7 +170,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const account = accSelector->selectedItem(); delete chooser; - if (ret == QDialog::Rejected || account == 0) + if (ret == TQDialog::Rejected || account == 0) { kdDebug(14152) << k_funcinfo << "Cancelled" << endl; return; @@ -190,7 +190,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), i18n("Do you want to add '%1' to your contact list?").arg(command), - QString::null, i18n("Add"), i18n("Do Not Add")) + TQString::null, i18n("Add"), i18n("Do Not Add")) != KMessageBox::Yes) { kdDebug(14152) << k_funcinfo << "Cancelled" << endl; @@ -213,7 +213,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const KMessageBox::sorry( Kopete::UI::Global::mainWidget(), i18n( "Unable to connect to the chat room %1 because the account" " for %2 is not connected." ).arg( firstParam ).arg( aimAccount->accountId() ), - QString::null ); + TQString::null ); } @@ -227,21 +227,21 @@ void AIMProtocolHandler::handleURL(const KURL &url) const -AIMProtocol::AIMProtocol(QObject *parent, const char *name, const QStringList &) +AIMProtocol::AIMProtocol(TQObject *parent, const char *name, const TQStringList &) : Kopete::Protocol( AIMProtocolFactory::instance(), parent, name ), - statusOnline( Kopete::OnlineStatus::Online, 2, this, 0, QString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online ), - statusOffline( Kopete::OnlineStatus::Offline, 2, this, 10, QString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline ), + statusOnline( Kopete::OnlineStatus::Online, 2, this, 0, TQString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online ), + statusOffline( Kopete::OnlineStatus::Offline, 2, this, 10, TQString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline ), statusAway( Kopete::OnlineStatus::Away, 2, this, 20, "contact_away_overlay", i18n("Away"), i18n("Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage ), statusWirelessOnline( Kopete::OnlineStatus::Online, 1, this, 30, "contact_phone_overlay", i18n("Mobile"), i18n("Mobile"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HideFromMenu ), - statusWirelessAway( Kopete::OnlineStatus::Away, 1, this, 31, QStringList::split( " ", "contact_phone_overlay contact_away_overlay"), + statusWirelessAway( Kopete::OnlineStatus::Away, 1, this, 31, TQStringList::split( " ", "contact_phone_overlay contact_away_overlay"), i18n("Mobile Away"), i18n("Mobile Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HideFromMenu ), statusConnecting(Kopete::OnlineStatus::Connecting, 99, this, 99, "aim_connecting", i18n("Connecting...")), awayMessage(Kopete::Global::Properties::self()->awayMessage()), clientFeatures("clientFeatures", i18n("Client Features"), 0, false), clientProfile( "clientProfile", i18n( "User Profile"), 0, false, true), - iconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString::null, true, false, true) + iconHash("iconHash", i18n("Buddy Icon MD5 Hash"), TQString::null, true, false, true) { if (protocolStatic_) kdDebug(14152) << k_funcinfo << "AIM plugin already initialized" << endl; @@ -265,28 +265,28 @@ AIMProtocol *AIMProtocol::protocol(void) } Kopete::Contact *AIMProtocol::deserializeContact(Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &/*addressBookData*/) + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &/*addressBookData*/) { - QString contactId = serializedData["contactId"]; - QString accountId = serializedData["accountId"]; - QString displayName = serializedData["displayName"]; + TQString contactId = serializedData["contactId"]; + TQString accountId = serializedData["accountId"]; + TQString displayName = serializedData["displayName"]; // Get the account it belongs to - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[accountId]; if ( !account ) //no account return 0; uint ssiGid = 0, ssiBid = 0, ssiType = 0xFFFF; - QString ssiName; + TQString ssiName; bool ssiWaitingAuth = false; if ( serializedData.contains( "ssi_type" ) ) { ssiName = serializedData["ssi_name"]; - QString authStatus = serializedData["ssi_waitingAuth"]; + TQString authStatus = serializedData["ssi_waitingAuth"]; if ( authStatus == "true" ) ssiWaitingAuth = true; ssiGid = serializedData["ssi_gid"].toUInt(); @@ -294,24 +294,24 @@ Kopete::Contact *AIMProtocol::deserializeContact(Kopete::MetaContact *metaContac ssiType = serializedData["ssi_type"].toUInt(); } - Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, QValueList<TLV>(), 0 ); + Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList<TLV>(), 0 ); item.setWaitingAuth( ssiWaitingAuth ); - AIMContact *c = new AIMContact( account, contactId, metaContact, QString::null, item ); + AIMContact *c = new AIMContact( account, contactId, metaContact, TQString::null, item ); return c; } -AddContactPage *AIMProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account) +AddContactPage *AIMProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account) { return ( new AIMAddContactPage( account->isConnected(), parent ) ); } -KopeteEditAccountWidget *AIMProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *AIMProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return ( new AIMEditAccountWidget( this, account, parent ) ); } -Kopete::Account *AIMProtocol::createNewAccount(const QString &accountId) +Kopete::Account *AIMProtocol::createNewAccount(const TQString &accountId) { return ( new AIMAccount( this, accountId ) ); } diff --git a/kopete/protocols/oscar/aim/aimprotocol.h b/kopete/protocols/oscar/aim/aimprotocol.h index e6c578e6..16c8860a 100644 --- a/kopete/protocols/oscar/aim/aimprotocol.h +++ b/kopete/protocols/oscar/aim/aimprotocol.h @@ -23,7 +23,7 @@ #include "kopetemimetypehandler.h" #include "kopeteonlinestatus.h" -#include <qmap.h> +#include <tqmap.h> namespace Kopete { @@ -42,7 +42,7 @@ class AIMProtocol : public Kopete::Protocol Q_OBJECT public: - AIMProtocol( QObject *parent, const char *name, const QStringList &args ); + AIMProtocol( TQObject *parent, const char *name, const TQStringList &args ); virtual ~AIMProtocol(); /** * Return the active instance of the protocol @@ -53,12 +53,12 @@ public: bool canSendOffline() const { return false; } virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &addressBookData ); + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &addressBookData ); - AddContactPage*createAddContactWidget( QWidget *parent, Kopete::Account *account ); - KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account *account, QWidget *parent ); - Kopete::Account* createNewAccount( const QString &accountId ); + AddContactPage*createAddContactWidget( TQWidget *parent, Kopete::Account *account ); + KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); + Kopete::Account* createNewAccount( const TQString &accountId ); /** * The set of online statuses that AIM contacts can have diff --git a/kopete/protocols/oscar/aim/aimuserinfo.cpp b/kopete/protocols/oscar/aim/aimuserinfo.cpp index 81bdd9c7..927a12ec 100644 --- a/kopete/protocols/oscar/aim/aimuserinfo.cpp +++ b/kopete/protocols/oscar/aim/aimuserinfo.cpp @@ -21,11 +21,11 @@ #include "aimcontact.h" #include "aimprotocol.h" -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtimer.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqtimer.h> #include <klocale.h> #include <kstandarddirs.h> @@ -37,7 +37,7 @@ #include <krun.h> AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool modal, - QWidget *parent, const char* name ) + TQWidget *parent, const char* name ) : KDialogBase( parent, name, modal, i18n( "User Information on %1" ) .arg( c->property( Kopete::Global::Properties::self()->nickName() ).value().toString() ), Cancel | Ok , Ok, true ) @@ -50,14 +50,14 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool mMainWidget = new AIMUserInfoWidget(this, "aimuserinfowidget"); setMainWidget(mMainWidget); - QObject::connect(this, SIGNAL(okClicked()), this, SLOT(slotSaveClicked())); - QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotUpdateClicked())); - QObject::connect(this, SIGNAL(cancelClicked()), this, SLOT(slotCloseClicked())); - QObject::connect(c, SIGNAL(updatedProfile()), this, SLOT(slotUpdateProfile())); + TQObject::connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotSaveClicked())); + TQObject::connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotUpdateClicked())); + TQObject::connect(this, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCloseClicked())); + TQObject::connect(c, TQT_SIGNAL(updatedProfile()), this, TQT_SLOT(slotUpdateProfile())); mMainWidget->txtScreenName->setText( c->contactId() ); - QString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( nickName.isEmpty() ) mMainWidget->txtNickName->setText( c->contactId() ); else @@ -75,9 +75,9 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool mMainWidget->lblAwayMessage->hide(); userInfoView=0L; - mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame); - userInfoEdit = new KTextEdit(QString::null, QString::null, + mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); + userInfoEdit = new KTextEdit(TQString::null, TQString::null, mMainWidget->userInfoFrame, "userInfoEdit"); userInfoEdit->setTextFormat(PlainText); @@ -85,7 +85,7 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool if ( aimmc ) userInfoEdit->setText( aimmc->userProfile() ); else - userInfoEdit->setText( QString::null ); + userInfoEdit->setText( TQString::null ); setButtonText(Ok, i18n("&Save Profile")); showButton(User1, false); @@ -94,17 +94,17 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool else { userInfoEdit=0L; - mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame); + mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); userInfoView = new KTextBrowser(mMainWidget->userInfoFrame, "userInfoView"); userInfoView->setTextFormat(AutoText); userInfoView->setNotifyClick(true); - QObject::connect( - userInfoView, SIGNAL(urlClick(const QString&)), - this, SLOT(slotUrlClicked(const QString&))); - QObject::connect( - userInfoView, SIGNAL(mailClick(const QString&, const QString&)), - this, SLOT(slotMailClicked(const QString&, const QString&))); + TQObject::connect( + userInfoView, TQT_SIGNAL(urlClick(const TQString&)), + this, TQT_SLOT(slotUrlClicked(const TQString&))); + TQObject::connect( + userInfoView, TQT_SIGNAL(mailClick(const TQString&, const TQString&)), + this, TQT_SLOT(slotMailClicked(const TQString&, const TQString&))); showButton(Cancel, false); setButtonText(Ok, i18n("&Close")); setEscapeButton(Ok); @@ -115,7 +115,7 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool // Update the user view to indicate that we're requesting the user's profile userInfoView->setText(i18n("Requesting User Profile, please wait...")); } - QTimer::singleShot(0, this, SLOT(slotUpdateProfile())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateProfile())); } } @@ -127,8 +127,8 @@ AIMUserInfoDialog::~AIMUserInfoDialog() void AIMUserInfoDialog::slotUpdateClicked() { kdDebug(14200) << k_funcinfo << "Called." << endl; - QString newNick = mMainWidget->txtNickName->text(); - QString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString newNick = mMainWidget->txtNickName->text(); + TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( !newNick.isEmpty() && ( newNick != currentNick ) ) { //m_contact->rename(newNick); @@ -144,8 +144,8 @@ void AIMUserInfoDialog::slotSaveClicked() if (userInfoEdit) { // editable mode, set profile - QString newNick = mMainWidget->txtNickName->text(); - QString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString newNick = mMainWidget->txtNickName->text(); + TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if(!newNick.isEmpty() && ( newNick != currentNick ) ) { //m_contact->rename(newNick); @@ -169,7 +169,7 @@ void AIMUserInfoDialog::slotUpdateProfile() { kdDebug(14152) << k_funcinfo << "Got User Profile." << endl; AIMProtocol* p = static_cast<AIMProtocol*>( mAccount->protocol() ); - QString awayMessage = m_contact->property( p->awayMessage ).value().toString(); + TQString awayMessage = m_contact->property( p->awayMessage ).value().toString(); mMainWidget->txtAwayMessage->setText( awayMessage ); if ( awayMessage.isNull() ) @@ -183,15 +183,15 @@ void AIMUserInfoDialog::slotUpdateProfile() mMainWidget->lblAwayMessage->show(); } - QString onlineSince = m_contact->property("onlineSince").value().toString(); - //QString onlineSince = m_details.onlineSinceTime().toString(); + TQString onlineSince = m_contact->property("onlineSince").value().toString(); + //TQString onlineSince = m_details.onlineSinceTime().toString(); mMainWidget->txtOnlineSince->setText( onlineSince ); AIMContact* c = static_cast<AIMContact*>( m_contact ); mMainWidget->txtIdleTime->setText(c->formattedIdleTime()); - mMainWidget->txtWarnLevel->setText(QString::number(c->warningLevel())); + mMainWidget->txtWarnLevel->setText(TQString::number(c->warningLevel())); - QString contactProfile = m_contact->property( p->clientProfile ).value().toString(); + TQString contactProfile = m_contact->property( p->clientProfile ).value().toString(); if ( contactProfile.isNull() ) { contactProfile = @@ -209,12 +209,12 @@ void AIMUserInfoDialog::slotUpdateProfile() } -void AIMUserInfoDialog::slotUrlClicked(const QString &url) +void AIMUserInfoDialog::slotUrlClicked(const TQString &url) { new KRun(KURL(url)); } -void AIMUserInfoDialog::slotMailClicked(const QString&, const QString &address) +void AIMUserInfoDialog::slotMailClicked(const TQString&, const TQString &address) { new KRun(KURL(address)); } diff --git a/kopete/protocols/oscar/aim/aimuserinfo.h b/kopete/protocols/oscar/aim/aimuserinfo.h index f128610f..886274ac 100644 --- a/kopete/protocols/oscar/aim/aimuserinfo.h +++ b/kopete/protocols/oscar/aim/aimuserinfo.h @@ -32,7 +32,7 @@ class AIMUserInfoDialog : public KDialogBase Q_OBJECT public: AIMUserInfoDialog(Kopete::Contact *c, AIMAccount *acc, bool modal, - QWidget *parent, const char* name); + TQWidget *parent, const char* name); ~AIMUserInfoDialog(); private: @@ -47,11 +47,11 @@ class AIMUserInfoDialog : public KDialogBase void slotCloseClicked(); void slotUpdateClicked(); void slotUpdateProfile(); - void slotUrlClicked(const QString&); - void slotMailClicked(const QString&, const QString&); + void slotUrlClicked(const TQString&); + void slotMailClicked(const TQString&, const TQString&); signals: -// void updateNickname(const QString &); +// void updateNickname(const TQString &); void closing(); }; diff --git a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp index cf5fbae5..f00741c9 100644 --- a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp +++ b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp @@ -20,17 +20,17 @@ #include "kopeteaccount.h" -#include <qlayout.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqlineedit.h> #include <klocale.h> #include <kmessagebox.h> -AIMAddContactPage::AIMAddContactPage(bool connected, QWidget *parent, +AIMAddContactPage::AIMAddContactPage(bool connected, TQWidget *parent, const char *name ) : AddContactPage(parent,name) { m_gui = 0; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); if(connected) { @@ -39,8 +39,8 @@ AIMAddContactPage::AIMAddContactPage(bool connected, QWidget *parent, } else { - noaddMsg1 = new QLabel(i18n("You need to be connected to be able to add contacts."), this); - noaddMsg2 = new QLabel(i18n("Connect to the AIM network and try again."), this); + noaddMsg1 = new TQLabel(i18n("You need to be connected to be able to add contacts."), this); + noaddMsg2 = new TQLabel(i18n("Connect to the AIM network and try again."), this); canadd = false; } } @@ -58,7 +58,7 @@ bool AIMAddContactPage::validateData() if ( !m_gui ) return false; - QString sn = m_gui->addSN->text(); + TQString sn = m_gui->addSN->text(); if ( sn.isEmpty() ) { KMessageBox::sorry ( this, diff --git a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h index 979d0472..7f6c732d 100644 --- a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h +++ b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h @@ -2,8 +2,8 @@ #ifndef AIMADDCONTACTPAGE_H #define AIMADDCONTACTPAGE_H -#include <qwidget.h> -#include <qlabel.h> +#include <tqwidget.h> +#include <tqlabel.h> #include "addcontactpage.h" class aimAddContactUI; @@ -19,7 +19,7 @@ class AIMAddContactPage : public AddContactPage Q_OBJECT public: - AIMAddContactPage(bool connected, QWidget *parent=0, + AIMAddContactPage(bool connected, TQWidget *parent=0, const char *name=0); ~AIMAddContactPage(); @@ -31,8 +31,8 @@ public: protected: /** The actual GUI */ aimAddContactUI *m_gui; - QLabel *noaddMsg1; - QLabel *noaddMsg2; + TQLabel *noaddMsg1; + TQLabel *noaddMsg2; bool canadd; }; #endif diff --git a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp index de720e17..2e0100ab 100644 --- a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp +++ b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp @@ -1,12 +1,12 @@ #include "aimeditaccountwidget.h" #include "aimeditaccountui.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qlineedit.h> -#include <qspinbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> +#include <tqspinbox.h> #include <kdebug.h> #include <krun.h> @@ -20,8 +20,8 @@ #include "aimaccount.h" AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, - Kopete::Account *account, QWidget *parent, const char *name ) - : QWidget( parent, name ), KopeteEditAccountWidget( account ) + Kopete::Account *account, TQWidget *parent, const char *name ) + : TQWidget( parent, name ), KopeteEditAccountWidget( account ) { //kdDebug(14152) << k_funcinfo << "Called." << endl; @@ -29,7 +29,7 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, mProtocol = protocol; // create the gui (generated from a .ui file) - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); mGui = new aimEditAccountUI( this, "AIMEditAccountWidget::mGui" ); // Read in the settings from the account if it exists @@ -40,7 +40,7 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, //Remove me after we can change Account IDs (Matt) mGui->edtAccountId->setDisabled( true ); mGui->mAutoLogon->setChecked( account->excludeConnect() ); - QString serverEntry = account->configGroup()->readEntry( "Server", "login.oscar.aol.com" ); + TQString serverEntry = account->configGroup()->readEntry( "Server", "login.oscar.aol.com" ); int portEntry = account->configGroup()->readNumEntry( "Port", 5190 ); if ( serverEntry != "login.oscar.aol.com" || portEntry != 5190 ) mGui->optionOverrideServer->setChecked( true ); @@ -80,12 +80,12 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, // Global Identity mGui->mGlobalIdentity->setChecked( account->configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ); } - QObject::connect( mGui->buttonRegister, SIGNAL( clicked() ), this, SLOT( slotOpenRegister() ) ); + TQObject::connect( mGui->buttonRegister, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenRegister() ) ); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mGui->edtAccountId, mGui->mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mGui->mPasswordWidget->mRemembered, mGui->mPasswordWidget->mPassword ); - QWidget::setTabOrder( mGui->mPasswordWidget->mPassword, mGui->mAutoLogon ); + TQWidget::setTabOrder( mGui->edtAccountId, mGui->mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mGui->mPasswordWidget->mRemembered, mGui->mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mGui->mPasswordWidget->mPassword, mGui->mAutoLogon ); } AIMEditAccountWidget::~AIMEditAccountWidget() @@ -99,7 +99,7 @@ Kopete::Account *AIMEditAccountWidget::apply() if ( !mAccount ) { kdDebug( 14152 ) << k_funcinfo << "creating a new account" << endl; - QString newId = mGui->edtAccountId->text(); + TQString newId = mGui->edtAccountId->text(); mAccount = new AIMAccount( mProtocol, newId ); } @@ -145,8 +145,8 @@ bool AIMEditAccountWidget::validateData() { //kdDebug(14152) << k_funcinfo << "Called." << endl; - QString userName = mGui->edtAccountId->text(); - QString server = mGui->edtServerAddress->text(); + TQString userName = mGui->edtAccountId->text(); + TQString server = mGui->edtServerAddress->text(); int port = mGui->sbxServerPort->value(); if ( userName.length() < 1 ) diff --git a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h index ccb2b451..9f180315 100644 --- a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h +++ b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h @@ -19,7 +19,7 @@ #ifndef AIMEDITACCOUNTWIDGET_H #define AIMEDITACCOUNTWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include "editaccountwidget.h" /** * @author Chris TenHarmsel <tenharmsel@staticmethod.net> @@ -34,13 +34,13 @@ class AIMAccount; class AIMProtocol; class aimEditAccountUI; -class AIMEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class AIMEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: AIMEditAccountWidget(AIMProtocol *protocol, Kopete::Account *account, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual ~AIMEditAccountWidget(); virtual bool validateData(); diff --git a/kopete/protocols/oscar/icq/icqaccount.cpp b/kopete/protocols/oscar/icq/icqaccount.cpp index 9a071442..7e358346 100644 --- a/kopete/protocols/oscar/icq/icqaccount.cpp +++ b/kopete/protocols/oscar/icq/icqaccount.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include <qfile.h> +#include <tqfile.h> #include <kconfig.h> #include <kdebug.h> @@ -43,21 +43,21 @@ ICQMyselfContact::ICQMyselfContact( ICQAccount *acct ) : OscarMyselfContact( acct ) { - QObject::connect( acct->engine(), SIGNAL( loggedIn() ), this, SLOT( fetchShortInfo() ) ); - QObject::connect( acct->engine(), SIGNAL( receivedIcqShortInfo( const QString& ) ), - this, SLOT( receivedShortInfo( const QString& ) ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( fetchShortInfo() ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( receivedIcqShortInfo( const TQString& ) ), + this, TQT_SLOT( receivedShortInfo( const TQString& ) ) ); } void ICQMyselfContact::userInfoUpdated() { DWORD extendedStatus = details().extendedStatus(); - kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << QString::number( extendedStatus, 16 ) << endl; + kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << TQString::number( extendedStatus, 16 ) << endl; ICQ::Presence presence = ICQ::Presence::fromOscarStatus( extendedStatus & 0xffff ); setOnlineStatus( presence.toOnlineStatus() ); setProperty( Kopete::Global::Properties::self()->awayMessage(), static_cast<ICQAccount*>( account() )->engine()->statusMessage() ); } -void ICQMyselfContact::receivedShortInfo( const QString& contact ) +void ICQMyselfContact::receivedShortInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -74,7 +74,7 @@ void ICQMyselfContact::fetchShortInfo() static_cast<ICQAccount*>( account() )->engine()->requestShortInfo( contactId() ); } -ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char *name) +ICQAccount::ICQAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, true) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; @@ -83,15 +83,15 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * m_visibilityDialog = 0; - QString nickName = configGroup()->readEntry("NickName", QString::null); + TQString nickName = configGroup()->readEntry("NickName", TQString::null); mWebAware = configGroup()->readBoolEntry( "WebAware", false ); mHideIP = configGroup()->readBoolEntry( "HideIP", true ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; - QObject::connect( Kopete::ContactList::self(), SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), - this, SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), + this, TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); //setIgnoreUnknownContacts(pluginData(protocol(), "IgnoreUnknownContacts").toUInt() == 1); @@ -100,7 +100,7 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * { kdDebug(14153) << k_funcinfo << "sending status to reflect HideIP and WebAware settings" << endl; - //setStatus(mStatus, QString::null); + //setStatus(mStatus, TQString::null); }*/ } @@ -129,21 +129,21 @@ KActionMenu* ICQAccount::actionMenu() KToggleAction* actionInvisible = new KToggleAction( i18n( "In&visible" ), ICQ::Presence( presence().type(), ICQ::Presence::Invisible ).toOnlineStatus().iconFor( this ), - 0, this, SLOT( slotToggleInvisible() ), this ); + 0, this, TQT_SLOT( slotToggleInvisible() ), this ); actionInvisible->setChecked( presence().visibility() == ICQ::Presence::Invisible ); actionMenu->insert( actionInvisible ); actionMenu->popupMenu()->insertSeparator(); actionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "ICQAccount::mActionSetVisibility") ); - //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); + //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, TQT_SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); return actionMenu; } -void ICQAccount::connectWithPassword( const QString &password ) +void ICQAccount::connectWithPassword( const TQString &password ) { if ( password.isNull() ) return; @@ -162,9 +162,9 @@ void ICQAccount::connectWithPassword( const QString &password ) if ( accountIsOffline ) { myself()->setOnlineStatus( protocol()->statusManager()->connectingStatus() ); - QString icqNumber = accountId(); + TQString icqNumber = accountId(); kdDebug(14153) << k_funcinfo << "Logging in as " << icqNumber << endl ; - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); @@ -185,7 +185,7 @@ void ICQAccount::connectWithPassword( const QString &password ) engine()->start( server, port, accountId(), password ); engine()->connectToServer( c, server, true /* doAuth */ ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; } } @@ -195,7 +195,7 @@ void ICQAccount::disconnected( DisconnectReason reason ) ICQ::Presence presOffline = ICQ::Presence( ICQ::Presence::Offline, presence().visibility() ); myself()->setOnlineStatus( presOffline.toOnlineStatus() ); - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast<OscarContact*>( it.current() ); @@ -231,25 +231,25 @@ void ICQAccount::slotSetVisiblility() if ( !m_visibilityDialog ) { m_visibilityDialog = new OscarVisibilityDialog( engine(), Kopete::UI::Global::mainWidget() ); - QObject::connect( m_visibilityDialog, SIGNAL( closing() ), - this, SLOT( slotVisibilityDialogClosed() ) ); + TQObject::connect( m_visibilityDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( slotVisibilityDialogClosed() ) ); //add all contacts; OscarVisibilityDialog::ContactMap contactMap; //temporary map for faster lookup of contactId - QMap<QString, QString> revContactMap; + TQMap<TQString, TQString> revContactMap; - QValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); - QValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); + TQValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); + TQValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); for ( it = contactList.constBegin(); it != cEnd; ++it ) { - QString contactId = ( *it ).name(); + TQString contactId = ( *it ).name(); OscarContact* oc = dynamic_cast<OscarContact*>( contacts()[( *it ).name()] ); if ( oc ) { //for better orientation in lists use nickName and icq number - QString screenName( "%1 (%2)" ); + TQString screenName( "%1 (%2)" ); screenName = screenName.arg( oc->nickName(), contactId); contactMap.insert( screenName, contactId ); revContactMap.insert( contactId, screenName ); @@ -263,7 +263,7 @@ void ICQAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -299,7 +299,7 @@ void ICQAccount::slotVisibilityDialogClosed() m_visibilityDialog = 0L; } -void ICQAccount::setAway( bool away, const QString &awayReason ) +void ICQAccount::setAway( bool away, const TQString &awayReason ) { kdDebug(14153) << k_funcinfo << "account='" << accountId() << "'" << endl; if ( away ) @@ -319,7 +319,7 @@ void ICQAccount::setInvisible( ICQ::Presence::Visibility vis ) setPresenceTarget( ICQ::Presence( pres.type(), vis ) ); } -void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &message ) +void ICQAccount::setPresenceType( ICQ::Presence::Type type, const TQString &message ) { ICQ::Presence pres = presence(); kdDebug(14153) << k_funcinfo << "new type=" << (int)type << ", old type=" << (int)pres.type() << ", new message=" << message << endl; @@ -327,7 +327,7 @@ void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &messa setPresenceTarget( ICQ::Presence( type, pres.visibility() ), message ); } -void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString &message ) +void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const TQString &message ) { bool targetIsOffline = (newPres.type() == ICQ::Presence::Offline); bool accountIsOffline = ( presence().type() == ICQ::Presence::Offline || @@ -351,7 +351,7 @@ void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString } -void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { if ( status.status() == Kopete::OnlineStatus::Invisible ) { @@ -375,9 +375,9 @@ void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *ICQAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - ICQContact* contact = new ICQContact( this, contactId, parentContact, QString::null, ssiItem ); + ICQContact* contact = new ICQContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); @@ -387,13 +387,13 @@ OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::Me return contact; } -QString ICQAccount::sanitizedMessage( const QString& message ) +TQString ICQAccount::sanitizedMessage( const TQString& message ) { return Kopete::Message::escape( message ); } -void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void ICQAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(14153) << k_funcinfo << "Global identity changed" << endl; @@ -417,14 +417,14 @@ void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void ICQAccount::slotBuddyIconChanged() { // need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); if ( !engine()->isActive() ) { - QObject::connect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); return; } - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); SSIManager* ssi = engine()->ssiManager(); Oscar::SSI item = ssi->findItemForIconByRef( 1 ); @@ -437,7 +437,7 @@ void ICQAccount::slotBuddyIconChanged() Oscar::SSI s(item); //remove hash and alias - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) tList.remove( t ); @@ -453,7 +453,7 @@ void ICQAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -478,7 +478,7 @@ void ICQAccount::slotBuddyIconChanged() t2.type = 0x0131; t2.length = 0; - QValueList<Oscar::TLV> list; + TQValueList<Oscar::TLV> list; list.append( t ); list.append( t2 ); @@ -492,7 +492,7 @@ void ICQAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(14153) << k_funcinfo << "modifying old item in ssi." << endl; - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) diff --git a/kopete/protocols/oscar/icq/icqaccount.h b/kopete/protocols/oscar/icq/icqaccount.h index f6231ec9..d64fe5d7 100644 --- a/kopete/protocols/oscar/icq/icqaccount.h +++ b/kopete/protocols/oscar/icq/icqaccount.h @@ -39,7 +39,7 @@ public: void userInfoUpdated(); public slots: - void receivedShortInfo( const QString& ); + void receivedShortInfo( const TQString& ); void fetchShortInfo(); }; @@ -49,7 +49,7 @@ class ICQAccount : public OscarAccount Q_OBJECT public: - ICQAccount( Kopete::Protocol *parent, QString accountID, const char *name = 0L ); + ICQAccount( Kopete::Protocol *parent, TQString accountID, const char *name = 0L ); virtual ~ICQAccount(); ICQProtocol *protocol(); @@ -58,18 +58,18 @@ public: virtual KActionMenu* actionMenu(); /** Reimplementation from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus&, const QString& ); + void setOnlineStatus( const Kopete::OnlineStatus&, const TQString& ); - virtual void setAway( bool away, const QString &awayReason ); + virtual void setAway( bool away, const TQString &awayReason ); - void connectWithPassword( const QString &password ); + void connectWithPassword( const TQString &password ); - void setUserProfile( const QString &profile ); + void setUserProfile( const TQString &profile ); protected: - virtual OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); + virtual OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); - virtual QString sanitizedMessage( const QString& message ); + virtual TQString sanitizedMessage( const TQString& message ); protected slots: virtual void disconnected( DisconnectReason reason ); @@ -79,8 +79,8 @@ private: ICQ::Presence presence(); void setInvisible( ICQ::Presence::Visibility ); - void setPresenceType( ICQ::Presence::Type, const QString &awayMessage = QString::null ); - void setPresenceTarget( const ICQ::Presence &presence, const QString &message = QString::null ); + void setPresenceType( ICQ::Presence::Type, const TQString &awayMessage = TQString::null ); + void setPresenceTarget( const ICQ::Presence &presence, const TQString &message = TQString::null ); //const unsigned long fullStatus( const unsigned long plainStatus ); @@ -90,14 +90,14 @@ private slots: void slotSetVisiblility(); void slotVisibilityDialogClosed(); - void slotGlobalIdentityChanged( const QString& key, const QVariant& value ); + void slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ); void slotBuddyIconChanged(); private: bool mWebAware; bool mHideIP; - QString mInitialStatusMessage; + TQString mInitialStatusMessage; OscarVisibilityDialog* m_visibilityDialog; }; diff --git a/kopete/protocols/oscar/icq/icqcontact.cpp b/kopete/protocols/oscar/icq/icqcontact.cpp index 8ba8d195..90204bdf 100644 --- a/kopete/protocols/oscar/icq/icqcontact.cpp +++ b/kopete/protocols/oscar/icq/icqcontact.cpp @@ -17,9 +17,9 @@ #include "icqcontact.h" -#include <qtimer.h> -#include <qimage.h> -#include <qfile.h> +#include <tqtimer.h> +#include <tqimage.h> +#include <tqfile.h> #include <kaction.h> #include <kactionclasses.h> @@ -51,8 +51,8 @@ #include "oscarencodingselectiondialog.h" #include "ssimanager.h" -ICQContact::ICQContact( ICQAccount *account, const QString &name, Kopete::MetaContact *parent, - const QString& icon, const Oscar::SSI& ssiItem ) +ICQContact::ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *parent, + const TQString& icon, const Oscar::SSI& ssiItem ) : OscarContact( account, name, parent, icon, ssiItem ) { mProtocol = static_cast<ICQProtocol *>(protocol()); @@ -66,28 +66,28 @@ ICQContact::ICQContact( ICQAccount *account, const QString &name, Kopete::MetaCo else setOnlineStatus( ICQ::Presence( ICQ::Presence::Offline, ICQ::Presence::Visible ).toOnlineStatus() ); - QObject::connect( mAccount->engine(), SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); - //QObject::connect( mAccount->engine(), SIGNAL( userIsOnline( const QString& ) ), this, SLOT( userOnline( const QString&, UserDetails ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userIsOffline( const QString& ) ), this, SLOT( userOffline( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( authRequestReceived( const QString&, const QString& ) ), - this, SLOT( slotGotAuthRequest( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ), - this, SLOT( slotGotAuthReply(const QString&, const QString&, bool ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedIcqShortInfo( const QString& ) ), - this, SLOT( receivedShortInfo( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedIcqLongInfo( const QString& ) ), - this, SLOT( receivedLongInfo( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ), - this, SLOT( userInfoUpdated( const QString&, const UserDetails& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SLOT( receivedStatusMessage( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const Oscar::Message& ) ), - this, SLOT( receivedStatusMessage( const Oscar::Message& ) ) ); - QObject::connect( this, SIGNAL( featuresUpdated() ), this, SLOT( updateFeatures() ) ); - QObject::connect( mAccount->engine(), SIGNAL( iconServerConnected() ), - this, SLOT( requestBuddyIcon() ) ); - QObject::connect( mAccount->engine(), SIGNAL( haveIconForContact( const QString&, QByteArray ) ), - this, SLOT( haveIcon( const QString&, QByteArray ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loggedIn() ) ); + //TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOnline( const TQString& ) ), this, TQT_SLOT( userOnline( const TQString&, UserDetails ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOffline( const TQString& ) ), this, TQT_SLOT( userOffline( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( authRequestReceived( const TQString&, const TQString& ) ), + this, TQT_SLOT( slotGotAuthRequest( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( authReplyReceived( const TQString&, const TQString&, bool ) ), + this, TQT_SLOT( slotGotAuthReply(const TQString&, const TQString&, bool ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedIcqShortInfo( const TQString& ) ), + this, TQT_SLOT( receivedShortInfo( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedIcqLongInfo( const TQString& ) ), + this, TQT_SLOT( receivedLongInfo( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( userInfoUpdated( const TQString&, const UserDetails& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SLOT( receivedStatusMessage( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const Oscar::Message& ) ), + this, TQT_SLOT( receivedStatusMessage( const Oscar::Message& ) ) ); + TQObject::connect( this, TQT_SIGNAL( featuresUpdated() ), this, TQT_SLOT( updateFeatures() ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( requestBuddyIcon() ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ), + this, TQT_SLOT( haveIcon( const TQString&, TQByteArray ) ) ); } @@ -111,7 +111,7 @@ void ICQContact::updateSSIItem() } -void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void ICQContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { //kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << contact << contactId() << endl; if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) @@ -193,7 +193,7 @@ void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& det int time = ( KApplication::random() % 10 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestBuddyIcon() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); } } } @@ -201,7 +201,7 @@ void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& det OscarContact::userInfoUpdated( contact, details ); } -void ICQContact::userOnline( const QString& userId ) +void ICQContact::userOnline( const TQString& userId ) { if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; @@ -211,7 +211,7 @@ void ICQContact::userOnline( const QString& userId ) //mAccount->engine()->requestStatusInfo( contactId() ); } -void ICQContact::userOffline( const QString& userId ) +void ICQContact::userOffline( const TQString& userId ) { if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; @@ -237,7 +237,7 @@ void ICQContact::loggedIn() m_requestingNickname = true; int time = ( KApplication::random() % 20 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating nickname in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestShortInfo() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestShortInfo() ) ); } } @@ -250,7 +250,7 @@ void ICQContact::requestShortInfo() void ICQContact::slotRequestAuth() { - QString reason = KInputDialog::getText( i18n("Request Authorization"), + TQString reason = KInputDialog::getText( i18n("Request Authorization"), i18n("Reason for requesting authorization:") ); if ( !reason.isNull() ) mAccount->engine()->requestAuth( contactId(), reason ); @@ -266,13 +266,13 @@ void ICQContact::slotSendAuth() mAccount->engine()->sendAuth( contactId(), replyDialog.reason(), replyDialog.grantAuth() ); } -void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason, bool granted ) +void ICQContact::slotGotAuthReply( const TQString& contact, const TQString& reason, bool granted ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << endl; - QString message; + TQString message; if( granted ) { message = i18n( "User %1 has granted your authorization request.\nReason: %2" ) @@ -291,14 +291,14 @@ void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason KNotifyClient::event( Kopete::UI::Global::sysTrayWId(), "icq_authorization", message ); } -void ICQContact::slotGotAuthRequest( const QString& contact, const QString& reason ) +void ICQContact::slotGotAuthRequest( const TQString& contact, const TQString& reason ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; ICQAuthReplyDialog *replyDialog = new ICQAuthReplyDialog(); - connect( replyDialog, SIGNAL( okClicked() ), this, SLOT( slotAuthReplyDialogOkClicked() ) ); + connect( replyDialog, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotAuthReplyDialogOkClicked() ) ); replyDialog->setUser( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ); replyDialog->setRequestReason( reason ); replyDialog->setModal( TRUE ); @@ -314,7 +314,7 @@ void ICQContact::slotAuthReplyDialogOkClicked() mAccount->engine()->sendAuth( contactId(), replyDialog->reason(), replyDialog->grantAuth() ); } -void ICQContact::receivedLongInfo( const QString& contact ) +void ICQContact::receivedLongInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) { @@ -323,7 +323,7 @@ void ICQContact::receivedLongInfo( const QString& contact ) return; } - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "received long info from engine" << endl; @@ -343,12 +343,12 @@ void ICQContact::receivedLongInfo( const QString& contact ) } -void ICQContact::receivedShortInfo( const QString& contact ) +void ICQContact::receivedShortInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); m_requestingNickname = false; //done requesting nickname ICQShortInfo shortInfo = mAccount->engine()->getShortInfo( contact ); @@ -372,7 +372,7 @@ void ICQContact::receivedShortInfo( const QString& contact ) } -void ICQContact::receivedStatusMessage( const QString &contact, const QString &message ) +void ICQContact::receivedStatusMessage( const TQString &contact, const TQString &message ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -389,9 +389,9 @@ void ICQContact::receivedStatusMessage( const Oscar::Message &message ) return; //decode message - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); - QString realText = message.text(codec); + TQString realText = message.text(codec); if ( !realText.isEmpty() ) setProperty( mProtocol->awayMessage, realText ); @@ -404,7 +404,7 @@ void ICQContact::slotSendMsg( Kopete::Message& msg, Kopete::ChatSession* session //Why is this unused? Q_UNUSED( session ); - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); int messageChannel = 0x01; Oscar::Message::Encoding messageEncoding; @@ -414,14 +414,14 @@ void ICQContact::slotSendMsg( Kopete::Message& msg, Kopete::ChatSession* session else messageEncoding = Oscar::Message::UserDefined; - QString msgText( msg.plainBody() ); + TQString msgText( msg.plainBody() ); // TODO: More intelligent handling of message length. uint chunk_length = !isOnline() ? 450 : 4096; uint msgPosition = 0; do { - QString msgChunk( msgText.mid( msgPosition, chunk_length ) ); + TQString msgChunk( msgText.mid( msgPosition, chunk_length ) ); // Try to split on space if needed if ( msgChunk.length() == chunk_length ) { @@ -460,7 +460,7 @@ void ICQContact::requestBuddyIcon() } } -void ICQContact::haveIcon( const QString& user, QByteArray icon ) +void ICQContact::haveIcon( const TQString& user, TQByteArray icon ) { if ( Oscar::normalize( user ) != Oscar::normalize( contactId() ) ) return; @@ -470,9 +470,9 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) KMD5 buddyIconHash( icon ); if ( memcmp( buddyIconHash.rawDigest(), m_details.buddyIconHash().data(), 16 ) == 0 ) { - QString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); + TQString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); - QFile iconFile( iconLocation ); + TQFile iconFile( iconLocation ); if ( !iconFile.open( IO_WriteOnly ) ) { kdDebug(14153) << k_funcinfo << "Cannot open file" @@ -483,7 +483,7 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) iconFile.writeBlock( icon ); iconFile.close(); - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; } @@ -494,11 +494,11 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) } } -bool ICQContact::cachedBuddyIcon( QByteArray hash ) +bool ICQContact::cachedBuddyIcon( TQByteArray hash ) { - QString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); + TQString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); - QFile iconFile( iconLocation ); + TQFile iconFile( iconLocation ); if ( !iconFile.open( IO_ReadOnly ) ) return false; @@ -510,7 +510,7 @@ bool ICQContact::cachedBuddyIcon( QByteArray hash ) { kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "Updating icon for " << contactId() << " from local cache" << endl; - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; return true; @@ -532,7 +532,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) /*kdDebug(14190) << k_funcinfo << "Called for '" << displayName() << "', contactName()=" << contactName() << endl;*/ - QStringList capList; + TQStringList capList; // Append client name and version in case we found one if (!mInfo.clientName.isEmpty()) { @@ -595,7 +595,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) setStatus(newStatus); } -void ICQContact::slotOffgoingBuddy(QString sender) +void ICQContact::slotOffgoingBuddy(TQString sender) { if(sender != contactName()) return; @@ -605,7 +605,7 @@ void ICQContact::slotOffgoingBuddy(QString sender) setOnlineStatus(mProtocol->statusOffline); } -void ICQContact::gotIM(OscarSocket::OscarMessageType /*type*/, const QString &message) +void ICQContact::gotIM(OscarSocket::OscarMessageType /*type*/, const TQString &message) { // Build a Kopete::Message and set the body as Rich Text Kopete::ContactPtrList tmpList; @@ -649,12 +649,12 @@ bool ICQContact::isReachable() return account()->isConnected(); } -QPtrList<KAction> *ICQContact::customContextMenuActions() +TQPtrList<KAction> *ICQContact::customContextMenuActions() { - QPtrList<KAction> *actionCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>(); /* - QString awTxt; - QString awIcn; + TQString awTxt; + TQString awIcn; unsigned int status = onlineStatus().internalStatus(); if (status >= 15) status -= 15; // get rid of invis addon @@ -685,12 +685,12 @@ QPtrList<KAction> *ICQContact::customContextMenuActions() if(actionReadAwayMessage==0) { actionReadAwayMessage = new KAction(awTxt, awIcn, 0, - this, SLOT(slotReadAwayMessage()), this, "actionReadAwayMessage"); + this, TQT_SLOT(slotReadAwayMessage()), this, "actionReadAwayMessage"); */ actionRequestAuth = new KAction(i18n("&Request Authorization"), "mail_reply", 0, - this, SLOT(slotRequestAuth()), this, "actionRequestAuth"); + this, TQT_SLOT(slotRequestAuth()), this, "actionRequestAuth"); actionSendAuth = new KAction(i18n("&Grant Authorization"), "mail_forward", 0, - this, SLOT(slotSendAuth()), this, "actionSendAuth"); + this, TQT_SLOT(slotSendAuth()), this, "actionSendAuth"); /* } else @@ -701,11 +701,11 @@ QPtrList<KAction> *ICQContact::customContextMenuActions() */ m_actionIgnore = new KToggleAction(i18n("&Ignore"), "", 0, - this, SLOT(slotIgnore()), this, "actionIgnore"); + this, TQT_SLOT(slotIgnore()), this, "actionIgnore"); m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), "", 0, - this, SLOT(slotVisibleTo()), this, "actionVisibleTo"); + this, TQT_SLOT(slotVisibleTo()), this, "actionVisibleTo"); m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), "", 0, - this, SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); + this, TQT_SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); bool on = account()->isConnected(); if ( m_ssiItem.waitingAuth() ) @@ -717,7 +717,7 @@ QPtrList<KAction> *ICQContact::customContextMenuActions() m_selectEncoding = new KAction( i18n( "Select Encoding..." ), "charset", 0, - this, SLOT( changeContactEncoding() ), this, "changeEncoding" ); + this, TQT_SLOT( changeContactEncoding() ), this, "changeEncoding" ); /* actionReadAwayMessage->setEnabled(status != OSCAR_OFFLINE && status != OSCAR_ONLINE); @@ -748,7 +748,7 @@ QPtrList<KAction> *ICQContact::customContextMenuActions() void ICQContact::slotUserInfo() { m_infoWidget = new ICQUserInfoWidget( Kopete::UI::Global::mainWidget(), "icq info" ); - QObject::connect( m_infoWidget, SIGNAL( finished() ), this, SLOT( closeUserInfoDialog() ) ); + TQObject::connect( m_infoWidget, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfoDialog() ) ); m_infoWidget->setContact( this ); m_infoWidget->show(); if ( account()->isConnected() ) @@ -757,7 +757,7 @@ void ICQContact::slotUserInfo() void ICQContact::closeUserInfoDialog() { - QObject::disconnect( this, 0, m_infoWidget, 0 ); + TQObject::disconnect( this, 0, m_infoWidget, 0 ); m_infoWidget->delayedDestruct(); m_infoWidget = 0L; } @@ -768,14 +768,14 @@ void ICQContact::changeContactEncoding() return; m_oesd = new OscarEncodingSelectionDialog( Kopete::UI::Global::mainWidget(), property(mProtocol->contactEncoding).value().toInt() ); - connect( m_oesd, SIGNAL( closing( int ) ), - this, SLOT( changeEncodingDialogClosed( int ) ) ); + connect( m_oesd, TQT_SIGNAL( closing( int ) ), + this, TQT_SLOT( changeEncodingDialogClosed( int ) ) ); m_oesd->show(); } void ICQContact::changeEncodingDialogClosed( int result ) { - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) { int mib = m_oesd->selectedEncoding(); if ( mib != 0 ) @@ -827,7 +827,7 @@ void ICQContact::slotReadAwayMessage() awayMessageDialog = new ICQReadAway(this, 0L, "awayMessageDialog"); if(!awayMessageDialog) return; - QObject::connect(awayMessageDialog, SIGNAL(closing()), this, SLOT(slotCloseAwayMessageDialog())); + TQObject::connect(awayMessageDialog, TQT_SIGNAL(closing()), this, TQT_SLOT(slotCloseAwayMessageDialog())); awayMessageDialog->show(); } else @@ -844,14 +844,14 @@ void ICQContact::slotCloseAwayMessageDialog() } -const QString ICQContact::awayMessage() +const TQString ICQContact::awayMessage() { kdDebug(14150) << k_funcinfo << property(mProtocol->awayMessage).value().toString() << endl; return property(mProtocol->awayMessage).value().toString(); } -void ICQContact::setAwayMessage(const QString &message) +void ICQContact::setAwayMessage(const TQString &message) { /*kdDebug(14150) << k_funcinfo << "Called for '" << displayName() << "', away msg='" << message << "'" << endl;*/ diff --git a/kopete/protocols/oscar/icq/icqcontact.h b/kopete/protocols/oscar/icq/icqcontact.h index 41084e63..8e3301cf 100644 --- a/kopete/protocols/oscar/icq/icqcontact.h +++ b/kopete/protocols/oscar/icq/icqcontact.h @@ -51,30 +51,30 @@ Q_OBJECT public: /** Normal ICQ constructor */ - ICQContact( ICQAccount *account, const QString &name, Kopete::MetaContact *parent, - const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *parent, + const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~ICQContact(); /** * Returns a set of custom menu items for * the context menu */ - virtual QPtrList<KAction> *customContextMenuActions(); + virtual TQPtrList<KAction> *customContextMenuActions(); /** Return whether or not this contact is reachable. */ virtual bool isReachable(); - //virtual const QString awayMessage(); - //virtual void setAwayMessage(const QString &message); + //virtual const TQString awayMessage(); + //virtual void setAwayMessage(const TQString &message); public slots: virtual void slotUserInfo(); virtual void updateSSIItem(); - void userInfoUpdated( const QString& contact, const UserDetails& details ); + void userInfoUpdated( const TQString& contact, const UserDetails& details ); - void userOnline( const QString& userId ); - void userOffline( const QString& userID ); + void userOnline( const TQString& userId ); + void userOffline( const TQString& userID ); void loggedIn(); void requestShortInfo(); @@ -87,7 +87,7 @@ signals: void haveInterestInfo( const ICQInterestInfo& ); private: - bool cachedBuddyIcon( QByteArray hash ); + bool cachedBuddyIcon( TQByteArray hash ); bool m_buddyIconDirty; bool m_requestingNickname; @@ -125,22 +125,22 @@ private slots: void slotAuthReplyDialogOkClicked(); /** We have received an auth request */ - void slotGotAuthRequest( const QString& contact, const QString& reason ); + void slotGotAuthRequest( const TQString& contact, const TQString& reason ); /** We have received an auth reply */ - void slotGotAuthReply( const QString& contact, const QString& reason, bool granted ); + void slotGotAuthReply( const TQString& contact, const TQString& reason, bool granted ); void closeUserInfoDialog(); - void receivedLongInfo( const QString& contact ); - void receivedShortInfo( const QString& contact ); + void receivedLongInfo( const TQString& contact ); + void receivedShortInfo( const TQString& contact ); void changeContactEncoding(); void changeEncodingDialogClosed( int ); void requestBuddyIcon(); - void haveIcon( const QString&, QByteArray ); - void receivedStatusMessage( const QString &contact, const QString &message ); + void haveIcon( const TQString&, TQByteArray ); + void receivedStatusMessage( const TQString &contact, const TQString &message ); void receivedStatusMessage( const Oscar::Message &message ); //void slotCloseAwayMessageDialog(); diff --git a/kopete/protocols/oscar/icq/icqpresence.cpp b/kopete/protocols/oscar/icq/icqpresence.cpp index ab6bb670..393f04c9 100644 --- a/kopete/protocols/oscar/icq/icqpresence.cpp +++ b/kopete/protocols/oscar/icq/icqpresence.cpp @@ -39,9 +39,9 @@ struct PresenceTypeData Kopete::OnlineStatus::StatusType onlineStatusType; unsigned long setFlag; unsigned long getFlag; - QString caption; - QString visibleName; - QString invisibleName; + TQString caption; + TQString visibleName; + TQString invisibleName; const char *visibleIcon; const char *invisibleIcon; unsigned int categories; @@ -132,8 +132,8 @@ public: , waitingForAuth( Kopete::OnlineStatus::Unknown, 1, ICQProtocol::protocol(), Presence::Offline, "button_cancel", i18n("Waiting for Authorization") ) , invisible( Kopete::OnlineStatus::Invisible, 2, ICQProtocol::protocol(), - Presence::Offline, QString::null, QString::null, - QString::null, Kopete::OnlineStatusManager::Invisible, + Presence::Offline, TQString::null, TQString::null, + TQString::null, Kopete::OnlineStatusManager::Invisible, Kopete::OnlineStatusManager::HideFromMenu ) { @@ -150,8 +150,8 @@ public: const PresenceTypeData &data = PresenceTypeData::forType( static_cast<Presence::Type>(n) ); const uint weight = n + firstUsableWeight; const uint internalStatus = n + invisibleOffset; - QStringList overlayIcons( data.visibleIcon ); - QString description( data.visibleName ); + TQStringList overlayIcons( data.visibleIcon ); + TQString description( data.visibleName ); Kopete::OnlineStatus status; if ( invisible ) { diff --git a/kopete/protocols/oscar/icq/icqprotocol.cpp b/kopete/protocols/oscar/icq/icqprotocol.cpp index 42616e32..79fd2848 100644 --- a/kopete/protocols/oscar/icq/icqprotocol.cpp +++ b/kopete/protocols/oscar/icq/icqprotocol.cpp @@ -23,15 +23,15 @@ #include <netinet/in.h> // for ntohl() -#include <qcombobox.h> +#include <tqcombobox.h> /* -#include <qhostaddress.h> -#include <qlistbox.h> -#include <qspinbox.h> -#include <qtextedit.h> +#include <tqhostaddress.h> +#include <tqlistbox.h> +#include <tqspinbox.h> +#include <tqtextedit.h> #include <kdatewidget.h>*/ -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdialogbase.h> /* #include <klineedit.h> @@ -66,10 +66,10 @@ K_EXPORT_COMPONENT_FACTORY( kopete_icq, ICQProtocolFactory( "kopete_icq" ) ) ICQProtocolHandler::ICQProtocolHandler() : Kopete::MimeTypeHandler(false) { - registerAsMimeHandler(QString::fromLatin1("application/x-icq")); + registerAsMimeHandler(TQString::fromLatin1("application/x-icq")); } -void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) const +void ICQProtocolHandler::handleURL(const TQString &mimeType, const KURL & url) const { if (mimeType != "application/x-icq") return; @@ -96,21 +96,21 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co ICQProtocol *proto = ICQProtocol::protocol(); - QString uin = file.readEntry("UIN"); + TQString uin = file.readEntry("UIN"); if (uin.isEmpty()) return; - QString nick = file.readEntry("NickName"); - QString first = file.readEntry("FirstName"); - QString last = file.readEntry("LastName"); - QString email = file.readEntry("Email"); + TQString nick = file.readEntry("NickName"); + TQString first = file.readEntry("FirstName"); + TQString last = file.readEntry("LastName"); + TQString email = file.readEntry("Email"); Kopete::Account *account = 0; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto); // do not show chooser if we only have one account to "choose" from if (accounts.count() == 1) { - QDictIterator<Kopete::Account> it(accounts); + TQDictIterator<Kopete::Account> it(accounts); account = it.current(); } else @@ -126,7 +126,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co account = accSelector->selectedItem(); delete chooser; - if (ret == QDialog::Rejected || account == 0) + if (ret == TQDialog::Rejected || account == 0) { kdDebug(14153) << k_funcinfo << "Cancelled" << endl; return; @@ -140,12 +140,12 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co return; } - QString nickuin = nick.isEmpty() ? + TQString nickuin = nick.isEmpty() ? i18n("'%1'").arg(uin) : i18n("'%1' (%2)").arg(nick, uin); if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), - i18n("Do you want to add %1 to your contact list?").arg(nickuin), QString::null, i18n("Add"), i18n("Do Not Add")) + i18n("Do you want to add %1 to your contact list?").arg(nickuin), TQString::null, i18n("Add"), i18n("Do Not Add")) != KMessageBox::Yes) { kdDebug(14153) << k_funcinfo << "Cancelled" << endl; @@ -173,7 +173,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co ICQProtocol* ICQProtocol::protocolStatic_ = 0L; -ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&) +ICQProtocol::ICQProtocol(TQObject *parent, const char *name, const TQStringList&) : Kopete::Protocol( ICQProtocolFactory::instance(), parent, name ), firstName(Kopete::Global::Properties::self()->firstName()), lastName(Kopete::Global::Properties::self()->lastName()), @@ -181,8 +181,8 @@ ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&) emailAddress(Kopete::Global::Properties::self()->emailAddress()), ipAddress("ipAddress", i18n("IP Address") ), clientFeatures("clientFeatures", i18n("Client Features"), 0, false), - buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString::null, true, false, true), - contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), QString::null, true, false, true ) + buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), TQString::null, true, false, true), + contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), TQString::null, true, false, true ) { if (protocolStatic_) @@ -219,7 +219,7 @@ void ICQProtocol::initGenders() void ICQProtocol::initCountries() { mCountries.insert(0, ""); // unspecified - KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete")); + KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete")); mCountries.insert(93, kl->twoAlphaToCountryName("af")); mCountries.insert(355, kl->twoAlphaToCountryName("al")); @@ -468,7 +468,7 @@ void ICQProtocol::initCountries() void ICQProtocol::initLang() { - KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete")); + KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete")); mLanguages.insert(0 , ""); mLanguages.insert(1 , kl->twoAlphaToLanguageName("ar") /*i18n("Arabic")*/); @@ -660,19 +660,19 @@ void ICQProtocol::initInterests() } -void ICQProtocol::fillComboFromTable(QComboBox *box, const QMap<int, QString> &map) +void ICQProtocol::fillComboFromTable(TQComboBox *box, const TQMap<int, TQString> &map) { // kdDebug(14153) << k_funcinfo << "Called." << endl; - QStringList list = map.values(); + TQStringList list = map.values(); list.sort(); box->insertStringList(list); } -void ICQProtocol::setComboFromTable(QComboBox *box, const QMap<int, QString> &map, int value) +void ICQProtocol::setComboFromTable(TQComboBox *box, const TQMap<int, TQString> &map, int value) { // kdDebug(14153) << k_funcinfo << "Called." << endl; - QMap<int, QString>::ConstIterator it; + TQMap<int, TQString>::ConstIterator it; it = map.find(value); if (!(*it)) return; @@ -687,11 +687,11 @@ void ICQProtocol::setComboFromTable(QComboBox *box, const QMap<int, QString> &ma } } -int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap<int, QString> &map) +int ICQProtocol::getCodeForCombo(TQComboBox *cmb, const TQMap<int, TQString> &map) { - const QString curText = cmb->currentText(); + const TQString curText = cmb->currentText(); - QMap<int, QString>::ConstIterator it; + TQMap<int, TQString>::ConstIterator it; for(it = map.begin(); it != map.end(); ++it) { if(it.data() == curText) @@ -701,10 +701,10 @@ int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap<int, QString> &map) } #if 0 -void ICQProtocol::fillTZCombo(QComboBox *combo) +void ICQProtocol::fillTZCombo(TQComboBox *combo) { - QTime time(12, 0); - QTime done(0, 0); + TQTime time(12, 0); + TQTime done(0, 0); while(time > done) { @@ -713,8 +713,8 @@ void ICQProtocol::fillTZCombo(QComboBox *combo) time = time.addSecs(-30 * 60); } - time = QTime(0, 0); - done = QTime(12, 0); + time = TQTime(0, 0); + done = TQTime(12, 0); while(time <= done) { @@ -724,7 +724,7 @@ void ICQProtocol::fillTZCombo(QComboBox *combo) } } -void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz) +void ICQProtocol::setTZComboValue(TQComboBox *combo, const char &tz) { kdDebug(14153) << k_funcinfo << "tz=" << int(tz) << endl; if ((tz < -24) || (tz > 24)) @@ -733,7 +733,7 @@ void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz) combo->setCurrentItem(24 + tz); } -char ICQProtocol::getTZComboValue(QComboBox *combo) +char ICQProtocol::getTZComboValue(TQComboBox *combo) { char ret = combo->currentItem() - 24; // kdDebug(14153) << k_funcinfo << "return value=" << int(ret) << endl; @@ -752,11 +752,11 @@ bool ICQProtocol::canSendOffline() const } Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &/*addressBookData*/ ) + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &/*addressBookData*/ ) { - QString accountId = serializedData["accountId"]; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(this); + TQString accountId = serializedData["accountId"]; + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(this); ICQAccount *account = static_cast<ICQAccount*>(accounts[accountId]); if(!account) @@ -766,16 +766,16 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta return 0; } - QString contactId=serializedData["contactId"]; + TQString contactId=serializedData["contactId"]; uint ssiGid = 0, ssiBid = 0, ssiType = 0xFFFF; - QString ssiName; + TQString ssiName; bool ssiWaitingAuth = false; if ( serializedData.contains( "ssi_name" ) ) ssiName = serializedData["ssi_name"]; if ( serializedData.contains( "ssi_waitingAuth" ) ) { - QString authStatus = serializedData["ssi_waitingAuth"]; + TQString authStatus = serializedData["ssi_waitingAuth"]; if ( authStatus == "true" ) ssiWaitingAuth = true; } @@ -787,23 +787,23 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta if ( serializedData.contains( "ssi_type" ) ) ssiType = serializedData["ssi_type"].toUInt(); - Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, QValueList<TLV>(), 0 ); + Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList<TLV>(), 0 ); item.setWaitingAuth( ssiWaitingAuth ); - ICQContact *c = new ICQContact( account, contactId, metaContact, QString::null, item ); + ICQContact *c = new ICQContact( account, contactId, metaContact, TQString::null, item ); return c; } -AddContactPage *ICQProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account) +AddContactPage *ICQProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account) { return new ICQAddContactPage( static_cast<ICQAccount*>( account ), parent); } -KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new ICQEditAccountWidget(this, account, parent); } -Kopete::Account *ICQProtocol::createNewAccount(const QString &accountId) +Kopete::Account *ICQProtocol::createNewAccount(const TQString &accountId) { return new ICQAccount(this, accountId); } diff --git a/kopete/protocols/oscar/icq/icqprotocol.h b/kopete/protocols/oscar/icq/icqprotocol.h index 8e3c1be9..96b2e201 100644 --- a/kopete/protocols/oscar/icq/icqprotocol.h +++ b/kopete/protocols/oscar/icq/icqprotocol.h @@ -31,7 +31,7 @@ class ICQProtocolHandler : public Kopete::MimeTypeHandler { public: ICQProtocolHandler(); - void handleURL(const QString &mimeType, const KURL & url) const; + void handleURL(const TQString &mimeType, const KURL & url) const; }; @@ -40,7 +40,7 @@ class ICQProtocol : public Kopete::Protocol Q_OBJECT public: - ICQProtocol(QObject *parent, const char *name, const QStringList &args); + ICQProtocol(TQObject *parent, const char *name, const TQStringList &args); virtual ~ICQProtocol(); /** @@ -51,11 +51,11 @@ public: virtual bool canSendOffline() const; virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &addressBookData ); - AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account); - KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - Kopete::Account *createNewAccount(const QString &accountId); + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &addressBookData ); + AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *account); + KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + Kopete::Account *createNewAccount(const TQString &accountId); ICQ::OnlineStatusManager *statusManager(); @@ -69,19 +69,19 @@ public: const Kopete::ContactPropertyTmpl buddyIconHash; const Kopete::ContactPropertyTmpl contactEncoding; - const QMap<int, QString> &genders() { return mGenders; } - const QMap<int, QString> &countries() { return mCountries; } - const QMap<int, QString> &languages() { return mLanguages; } - const QMap<int, QString> &encodings() { return mEncodings; } - const QMap<int, QString> &maritals() { return mMarital; } - const QMap<int, QString> &interests() { return mInterests; } + const TQMap<int, TQString> &genders() { return mGenders; } + const TQMap<int, TQString> &countries() { return mCountries; } + const TQMap<int, TQString> &languages() { return mLanguages; } + const TQMap<int, TQString> &encodings() { return mEncodings; } + const TQMap<int, TQString> &maritals() { return mMarital; } + const TQMap<int, TQString> &interests() { return mInterests; } - void fillComboFromTable( QComboBox*, const QMap<int, QString>& ); - void setComboFromTable( QComboBox*, const QMap<int, QString>&, int ); - int getCodeForCombo( QComboBox*, const QMap<int, QString>& ); - /* void fillTZCombo(QComboBox *combo); - void setTZComboValue(QComboBox *combo, const char &tz); - char getTZComboValue(QComboBox *combo); */ + void fillComboFromTable( TQComboBox*, const TQMap<int, TQString>& ); + void setComboFromTable( TQComboBox*, const TQMap<int, TQString>&, int ); + int getCodeForCombo( TQComboBox*, const TQMap<int, TQString>& ); + /* void fillTZCombo(TQComboBox *combo); + void setTZComboValue(TQComboBox *combo, const char &tz); + char getTZComboValue(TQComboBox *combo); */ private: void initGenders(); @@ -94,12 +94,12 @@ private: private: static ICQProtocol* protocolStatic_; ICQ::OnlineStatusManager* statusManager_; - QMap<int, QString> mGenders; - QMap<int, QString> mCountries; - QMap<int, QString> mLanguages; - QMap<int, QString> mEncodings; - QMap<int, QString> mMarital; - QMap<int, QString> mInterests; + TQMap<int, TQString> mGenders; + TQMap<int, TQString> mCountries; + TQMap<int, TQString> mLanguages; + TQMap<int, TQString> mEncodings; + TQMap<int, TQString> mMarital; + TQMap<int, TQString> mInterests; ICQProtocolHandler protohandler; }; #endif diff --git a/kopete/protocols/oscar/icq/icqreadaway.cpp b/kopete/protocols/oscar/icq/icqreadaway.cpp index 94cccafd..28b86d33 100644 --- a/kopete/protocols/oscar/icq/icqreadaway.cpp +++ b/kopete/protocols/oscar/icq/icqreadaway.cpp @@ -20,7 +20,7 @@ #include "icqaccount.h" #include "icqcontact.h" -#include <qvbox.h> +#include <tqvbox.h> #include <ktextbrowser.h> #include <klocale.h> @@ -29,8 +29,8 @@ #include <assert.h> -ICQReadAway::ICQReadAway(ICQContact *c, QWidget *parent, const char* name) - : KDialogBase(parent, name, false, QString::null, Close | User1, +ICQReadAway::ICQReadAway(ICQContact *c, TQWidget *parent, const char* name) + : KDialogBase(parent, name, false, TQString::null, Close | User1, Close, false, i18n("&Fetch Again")) { assert(c); @@ -39,27 +39,27 @@ ICQReadAway::ICQReadAway(ICQContact *c, QWidget *parent, const char* name) mContact = c; setCaption(i18n("'%2' Message for %1").arg(c->displayName()).arg(c->onlineStatus().description())); - QVBox *mMainWidget = makeVBoxMainWidget(); + TQVBox *mMainWidget = makeVBoxMainWidget(); awayMessageBrowser = new KTextBrowser(mMainWidget, "userInfoView"); awayMessageBrowser->setTextFormat(AutoText); awayMessageBrowser->setNotifyClick(true); awayMessageBrowser->setText(mContact->awayMessage()); - QObject::connect( - awayMessageBrowser, SIGNAL(urlClick(const QString&)), - this, SLOT(slotUrlClicked(const QString&))); - QObject::connect( - awayMessageBrowser, SIGNAL(mailClick(const QString&, const QString&)), - this, SLOT(slotMailClicked(const QString&, const QString&))); + TQObject::connect( + awayMessageBrowser, TQT_SIGNAL(urlClick(const TQString&)), + this, TQT_SLOT(slotUrlClicked(const TQString&))); + TQObject::connect( + awayMessageBrowser, TQT_SIGNAL(mailClick(const TQString&, const TQString&)), + this, TQT_SLOT(slotMailClicked(const TQString&, const TQString&))); - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotFetchAwayMessage())); - connect(this, SIGNAL(closeClicked()), - this, SLOT(slotCloseClicked())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotFetchAwayMessage())); + connect(this, TQT_SIGNAL(closeClicked()), + this, TQT_SLOT(slotCloseClicked())); - connect(c, SIGNAL(awayMessageChanged()), - this, SLOT(slotAwayMessageChanged())); + connect(c, TQT_SIGNAL(awayMessageChanged()), + this, TQT_SLOT(slotAwayMessageChanged())); slotFetchAwayMessage(); } @@ -92,12 +92,12 @@ void ICQReadAway::slotCloseClicked() emit closing(); } -void ICQReadAway::slotUrlClicked(const QString &url) +void ICQReadAway::slotUrlClicked(const TQString &url) { new KRun(KURL(url)); } -void ICQReadAway::slotMailClicked(const QString&, const QString &address) +void ICQReadAway::slotMailClicked(const TQString&, const TQString &address) { new KRun(KURL(address)); } diff --git a/kopete/protocols/oscar/icq/icqreadaway.h b/kopete/protocols/oscar/icq/icqreadaway.h index 7e62588e..81981257 100644 --- a/kopete/protocols/oscar/icq/icqreadaway.h +++ b/kopete/protocols/oscar/icq/icqreadaway.h @@ -30,14 +30,14 @@ class ICQReadAway : public KDialogBase Q_OBJECT public: - ICQReadAway(ICQContact *, QWidget *parent = 0, const char* name = "ICQReadAway"); + ICQReadAway(ICQContact *, TQWidget *parent = 0, const char* name = "ICQReadAway"); private slots: void slotFetchAwayMessage(); void slotAwayMessageChanged(); void slotCloseClicked(); - void slotUrlClicked(const QString &url); - void slotMailClicked(const QString&, const QString &address); + void slotUrlClicked(const TQString &url); + void slotMailClicked(const TQString&, const TQString &address); signals: void closing(); @@ -45,7 +45,7 @@ class ICQReadAway : public KDialogBase private: ICQAccount *mAccount; ICQContact *mContact; - QVBox *mMainWidget; + TQVBox *mMainWidget; KTextBrowser *awayMessageBrowser; }; #endif diff --git a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp index b1ab2eb4..3461ed8f 100644 --- a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp +++ b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp @@ -18,13 +18,13 @@ #include <ctype.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qtabwidget.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqtabwidget.h> +#include <tqlabel.h> #include <kdebug.h> #include <kiconloader.h> @@ -39,28 +39,28 @@ #include "icqsearchdialog.h" -ICQAddContactPage::ICQAddContactPage(ICQAccount *owner, QWidget *parent, const char *name) +ICQAddContactPage::ICQAddContactPage(ICQAccount *owner, TQWidget *parent, const char *name) : AddContactPage(parent,name) { kdDebug(14153) << k_funcinfo << "called" << endl; mAccount = owner; m_searchDialog = 0L; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); addUI = new icqAddUI(this); - connect( addUI->searchButton, SIGNAL( clicked() ), this, SLOT( showSearchDialog() ) ); + connect( addUI->searchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( showSearchDialog() ) ); } ICQAddContactPage::~ICQAddContactPage() { } -void ICQAddContactPage::setUINFromSearch( const QString& uin ) +void ICQAddContactPage::setUINFromSearch( const TQString& uin ) { addUI->uinEdit->setText( uin ); } -void ICQAddContactPage::showEvent(QShowEvent *e) +void ICQAddContactPage::showEvent(TQShowEvent *e) { // slotSelectionChanged(); AddContactPage::showEvent(e); @@ -70,7 +70,7 @@ bool ICQAddContactPage::apply(Kopete::Account* , Kopete::MetaContact *parentCont { kdDebug(14153) << k_funcinfo << "called; adding contact..." << endl; - QString contactId = addUI->uinEdit->text(); + TQString contactId = addUI->uinEdit->text(); kdDebug(14153) << k_funcinfo << "uin=" << contactId << endl; return mAccount->addContact(contactId, parentContact, Kopete::Account::ChangeKABC ); @@ -109,13 +109,13 @@ void ICQAddContactPage::showSearchDialog() { m_searchDialog = new ICQSearchDialog( mAccount, this, "icqSearchDialog" ); m_searchDialog->show(); - connect( m_searchDialog, SIGNAL( finished() ), this, SLOT( searchDialogDestroyed() ) ); + connect( m_searchDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( searchDialogDestroyed() ) ); } } void ICQAddContactPage::searchDialogDestroyed() { - QObject::disconnect( this, 0, m_searchDialog, 0 ); + TQObject::disconnect( this, 0, m_searchDialog, 0 ); m_searchDialog->delayedDestruct(); m_searchDialog = NULL; } diff --git a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h index e9285b79..c6c22eb2 100644 --- a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h +++ b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h @@ -18,7 +18,7 @@ #ifndef ICQADDCONTACTPAGE_H #define ICQADDCONTACTPAGE_H -#include <qwidget.h> +#include <tqwidget.h> #include <addcontactpage.h> /** @@ -34,16 +34,16 @@ class ICQAddContactPage : public AddContactPage Q_OBJECT public: - ICQAddContactPage(ICQAccount *owner, QWidget *parent = 0, const char *name = 0); + ICQAddContactPage(ICQAccount *owner, TQWidget *parent = 0, const char *name = 0); ~ICQAddContactPage(); virtual bool validateData(); virtual bool apply(Kopete::Account* , Kopete::MetaContact *parentContact); - void setUINFromSearch( const QString& ); + void setUINFromSearch( const TQString& ); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); private slots: void showSearchDialog(); diff --git a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp index 76b56fba..a92b33de 100644 --- a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp +++ b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp @@ -20,11 +20,11 @@ #include <klocale.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qlineedit.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> -ICQAuthReplyDialog::ICQAuthReplyDialog( QWidget *parent, const char *name, bool wasRequested ) +ICQAuthReplyDialog::ICQAuthReplyDialog( TQWidget *parent, const char *name, bool wasRequested ) : KDialogBase( parent, name, true, i18n( "Authorization Reply" ), KDialogBase::Ok | KDialogBase::Cancel ) { m_ui = new ICQAuthReplyUI( this ); @@ -46,7 +46,7 @@ ICQAuthReplyDialog::~ICQAuthReplyDialog() { } -void ICQAuthReplyDialog::setUser( const QString & user ) +void ICQAuthReplyDialog::setUser( const TQString & user ) { if ( m_wasRequested ) m_ui->lblUserReq->setText( @@ -55,12 +55,12 @@ void ICQAuthReplyDialog::setUser( const QString & user ) m_ui->lblUserReq->setText( i18n( "Authorization reply to <b>%1</b>." ).arg( user ) ); } -void ICQAuthReplyDialog::setRequestReason( const QString & reason ) +void ICQAuthReplyDialog::setRequestReason( const TQString & reason ) { m_ui->lblRequestReason->setText( reason ); } -QString ICQAuthReplyDialog::reason() +TQString ICQAuthReplyDialog::reason() { return m_ui->leReason->text(); } diff --git a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h index da27b241..f32d4569 100644 --- a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h +++ b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h @@ -30,12 +30,12 @@ class ICQAuthReplyDialog : public KDialogBase { Q_OBJECT public: - ICQAuthReplyDialog(QWidget *parent = 0, const char *name = 0, bool wasRequested = true); + ICQAuthReplyDialog(TQWidget *parent = 0, const char *name = 0, bool wasRequested = true); ~ICQAuthReplyDialog(); - void setUser( const QString& user ); - void setRequestReason( const QString& reason ); - QString reason(); + void setUser( const TQString& user ); + void setRequestReason( const TQString& reason ); + TQString reason(); bool grantAuth(); private: bool m_wasRequested; diff --git a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp index e4b308be..04a312a4 100644 --- a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp +++ b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp @@ -17,13 +17,13 @@ #include "icqeditaccountwidget.h" #include "icqeditaccountui.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qtextedit.h> -#include <qspinbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqtextedit.h> +#include <tqspinbox.h> +#include <tqpushbutton.h> #include <kconfig.h> #include <kdebug.h> @@ -44,15 +44,15 @@ #include "icqcontact.h" ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, - Kopete::Account *account, QWidget *parent, const char *name) - : QWidget(parent, name), KopeteEditAccountWidget(account) + Kopete::Account *account, TQWidget *parent, const char *name) + : TQWidget(parent, name), KopeteEditAccountWidget(account) { kdDebug(14153) << k_funcinfo << "Called." << endl; mAccount=dynamic_cast<ICQAccount*>(account); mProtocol=protocol; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); mAccountSettings = new ICQEditAccountUI( this ); mProtocol->fillComboFromTable( mAccountSettings->encodingCombo, mProtocol->encodings() ); @@ -67,7 +67,7 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, mAccountSettings->mPasswordWidget->load(&mAccount->password()); mAccountSettings->chkAutoLogin->setChecked(mAccount->excludeConnect()); - QString serverEntry = mAccount->configGroup()->readEntry("Server", "login.oscar.aol.com"); + TQString serverEntry = mAccount->configGroup()->readEntry("Server", "login.oscar.aol.com"); int portEntry = mAccount->configGroup()->readNumEntry("Port", 5190); if ( serverEntry != "login.oscar.aol.com" || ( portEntry != 5190) ) mAccountSettings->optionOverrideServer->setChecked( true ); @@ -99,12 +99,12 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, 4 ); } - QObject::connect(mAccountSettings->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); + TQObject::connect(mAccountSettings->buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister())); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mRemembered, mAccountSettings->mPasswordWidget->mPassword ); - QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mPassword, mAccountSettings->chkAutoLogin ); + TQWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mAccountSettings->mPasswordWidget->mRemembered, mAccountSettings->mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mAccountSettings->mPasswordWidget->mPassword, mAccountSettings->chkAutoLogin ); } @@ -158,7 +158,7 @@ bool ICQEditAccountWidget::validateData() { kdDebug(14153) << k_funcinfo << "Called." << endl; - QString userName = mAccountSettings->edtAccountId->text(); + TQString userName = mAccountSettings->edtAccountId->text(); if (userName.isEmpty()) return false; diff --git a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h index fc5c6d38..4bc1a52b 100644 --- a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h +++ b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h @@ -18,8 +18,8 @@ #ifndef ICQEDITACCOUNTWIDGET_H #define ICQEDITACCOUNTWIDGET_H -#include <qwidget.h> -#include <qdatetime.h> +#include <tqwidget.h> +#include <tqdatetime.h> #include "editaccountwidget.h" namespace Kopete { class Account; } @@ -28,13 +28,13 @@ class ICQAccount; class ICQProtocol; class ICQEditAccountUI; -class ICQEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class ICQEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: ICQEditAccountWidget(ICQProtocol *, Kopete::Account *, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual bool validateData(); virtual Kopete::Account *apply(); diff --git a/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp b/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp index 0010166a..e52e707f 100644 --- a/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp +++ b/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp @@ -18,12 +18,12 @@ #include "icqsearchdialog.h" -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qtextcodec.h> -#include <qtabwidget.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqtextcodec.h> +#include <tqtabwidget.h> #include <kdebug.h> #include <kiconloader.h> #include <klistview.h> @@ -41,20 +41,20 @@ #include "icqcontact.h" #include "icquserinfowidget.h" -ICQSearchDialog::ICQSearchDialog( ICQAccount* account, QWidget* parent, const char* name ) +ICQSearchDialog::ICQSearchDialog( ICQAccount* account, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "ICQ User Search" ), 0, NoDefault ) { m_account = account; m_searchUI = new ICQSearchBase( this, name ); setMainWidget( m_searchUI ); - connect( m_searchUI->searchButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); - connect( m_searchUI->searchResults, SIGNAL( selectionChanged() ), this, SLOT( resultSelectionChanged() ) ); - connect( m_searchUI->addButton, SIGNAL( clicked() ), this, SLOT( addContact() ) ); - connect( m_searchUI->clearButton, SIGNAL( clicked() ), this, SLOT( clearResults() ) ); - connect( m_searchUI->stopButton, SIGNAL( clicked() ), this, SLOT( stopSearch() ) ); - connect( m_searchUI->closeButton, SIGNAL( clicked() ), this, SLOT( closeDialog() ) ); - connect( m_searchUI->userInfoButton, SIGNAL( clicked() ), this, SLOT( userInfo() ) ); - connect( m_searchUI->newSearchButton, SIGNAL( clicked() ), this, SLOT( newSearch() ) ); + connect( m_searchUI->searchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startSearch() ) ); + connect( m_searchUI->searchResults, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( resultSelectionChanged() ) ); + connect( m_searchUI->addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addContact() ) ); + connect( m_searchUI->clearButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clearResults() ) ); + connect( m_searchUI->stopButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( stopSearch() ) ); + connect( m_searchUI->closeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeDialog() ) ); + connect( m_searchUI->userInfoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( userInfo() ) ); + connect( m_searchUI->newSearchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( newSearch() ) ); ICQProtocol *p = ICQProtocol::protocol(); p->fillComboFromTable( m_searchUI->gender, p->genders() ); @@ -91,12 +91,12 @@ void ICQSearchDialog::startSearch() m_searchUI->searchButton->setEnabled( false ); m_searchUI->newSearchButton->setEnabled( false ); - connect( m_account->engine(), SIGNAL( gotSearchResults( const ICQSearchResult& ) ), - this, SLOT( newResult( const ICQSearchResult& ) ) ); - connect( m_account->engine(), SIGNAL( endOfSearch( int ) ), - this, SLOT( searchFinished( int ) ) ); + connect( m_account->engine(), TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ), + this, TQT_SLOT( newResult( const ICQSearchResult& ) ) ); + connect( m_account->engine(), TQT_SIGNAL( endOfSearch( int ) ), + this, TQT_SLOT( searchFinished( int ) ) ); - const QWidget* currentPage = m_searchUI->tabWidget3->currentPage(); + const TQWidget* currentPage = m_searchUI->tabWidget3->currentPage(); if ( currentPage == m_searchUI->tab ) { @@ -119,7 +119,7 @@ void ICQSearchDialog::startSearch() //create a ICQWPSearchInfo struct and send it ICQProtocol* p = ICQProtocol::protocol(); ICQWPSearchInfo info; - QTextCodec* codec = m_account->defaultCodec(); + TQTextCodec* codec = m_account->defaultCodec(); info.firstName = codec->fromUnicode( m_searchUI->firstName->text() ); info.lastName = codec->fromUnicode( m_searchUI->lastName->text() ); info.nickName = codec->fromUnicode( m_searchUI->nickName->text() ); @@ -159,10 +159,10 @@ void ICQSearchDialog::startSearch() void ICQSearchDialog::stopSearch() { - disconnect( m_account->engine(), SIGNAL( gotSearchResults( const ICQSearchResult& ) ), - this, SLOT( newResult( const ICQSearchResult& ) ) ); - disconnect( m_account->engine(), SIGNAL( endOfSearch( int ) ), - this, SLOT( searchFinished( int ) ) ); + disconnect( m_account->engine(), TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ), + this, TQT_SLOT( newResult( const ICQSearchResult& ) ) ); + disconnect( m_account->engine(), TQT_SIGNAL( endOfSearch( int ) ), + this, TQT_SLOT( searchFinished( int ) ) ); m_searchUI->stopButton->setEnabled( false ); m_searchUI->searchButton->setEnabled( true ); @@ -178,7 +178,7 @@ void ICQSearchDialog::addContact() } else { - QString uin = m_searchUI->searchResults->selectedItem()->text( 0 ); + TQString uin = m_searchUI->searchResults->selectedItem()->text( 0 ); kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "Passing " << uin << " back to the ACP" << endl; iacp->setUINFromSearch( uin ); @@ -203,7 +203,7 @@ void ICQSearchDialog::userInfo() NULL); m_infoWidget = new ICQUserInfoWidget( Kopete::UI::Global::mainWidget(), "icq info" ); - QObject::connect( m_infoWidget, SIGNAL( finished() ), this, SLOT( closeUserInfo() ) ); + TQObject::connect( m_infoWidget, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfo() ) ); m_infoWidget->setContact( m_contact ); m_infoWidget->setModal(true); @@ -217,7 +217,7 @@ void ICQSearchDialog::userInfo() void ICQSearchDialog::closeUserInfo() { // Free the ICQUserInfoWidget - QObject::disconnect( this, 0, m_infoWidget, 0 ); + TQObject::disconnect( this, 0, m_infoWidget, 0 ); m_infoWidget->delayedDestruct(); m_infoWidget = NULL; @@ -266,9 +266,9 @@ void ICQSearchDialog::newResult( const ICQSearchResult& info ) return; } - QTextCodec* codec = m_account->defaultCodec(); + TQTextCodec* codec = m_account->defaultCodec(); - QListViewItem *item = new QListViewItem( m_searchUI->searchResults, QString::number( info.uin ), + TQListViewItem *item = new TQListViewItem( m_searchUI->searchResults, TQString::number( info.uin ), codec->toUnicode( info.nickName ), codec->toUnicode( info.firstName ), codec->toUnicode( info.lastName ), @@ -296,13 +296,13 @@ void ICQSearchDialog::searchFinished( int numLeft ) void ICQSearchDialog::clearFields() { - m_searchUI->uin->setText( QString::null ); + m_searchUI->uin->setText( TQString::null ); - m_searchUI->firstName->setText( QString::null ); - m_searchUI->lastName->setText( QString::null ); - m_searchUI->nickName->setText( QString::null ); - m_searchUI->email->setText( QString::null ); - m_searchUI->city->setText( QString::null ); + m_searchUI->firstName->setText( TQString::null ); + m_searchUI->lastName->setText( TQString::null ); + m_searchUI->nickName->setText( TQString::null ); + m_searchUI->email->setText( TQString::null ); + m_searchUI->city->setText( TQString::null ); m_searchUI->gender->setCurrentItem( 0 ); // Unspecified m_searchUI->country->setCurrentItem( 0 ); m_searchUI->language->setCurrentItem( 0 ); diff --git a/kopete/protocols/oscar/icq/ui/icqsearchdialog.h b/kopete/protocols/oscar/icq/ui/icqsearchdialog.h index b14aa2a1..aca61ee7 100644 --- a/kopete/protocols/oscar/icq/ui/icqsearchdialog.h +++ b/kopete/protocols/oscar/icq/ui/icqsearchdialog.h @@ -33,7 +33,7 @@ class ICQSearchDialog : public KDialogBase { Q_OBJECT public: - ICQSearchDialog( ICQAccount* account, QWidget* parent = 0, const char* name = 0 ); + ICQSearchDialog( ICQAccount* account, TQWidget* parent = 0, const char* name = 0 ); ~ICQSearchDialog(); private slots: diff --git a/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp b/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp index 3830e05f..44fd5afd 100644 --- a/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp +++ b/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp @@ -18,12 +18,12 @@ #include "icquserinfowidget.h" -#include <qlayout.h> -#include <qlineedit.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qobject.h> -#include <qtextcodec.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqspinbox.h> +#include <tqcombobox.h> +#include <tqobject.h> +#include <tqtextcodec.h> #include <kdatewidget.h> #include <kdebug.h> @@ -40,36 +40,36 @@ #include "icqinterestinfowidget.h" -ICQUserInfoWidget::ICQUserInfoWidget( QWidget * parent, const char * name ) +ICQUserInfoWidget::ICQUserInfoWidget( TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::IconList, 0, parent, name, false, i18n( "ICQ User Information" ), Ok ) { kdDebug(14153) << k_funcinfo << "Creating new icq user info widget" << endl; - QFrame* genInfo = addPage( i18n( "General Info" ), + TQFrame* genInfo = addPage( i18n( "General Info" ), i18n( "General ICQ Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "identity" ), KIcon::Desktop ) ); - QVBoxLayout* genLayout = new QVBoxLayout( genInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "identity" ), KIcon::Desktop ) ); + TQVBoxLayout* genLayout = new TQVBoxLayout( genInfo ); m_genInfoWidget = new ICQGeneralInfoWidget( genInfo, "Basic Information" ); genLayout->addWidget( m_genInfoWidget ); - QFrame* workInfo = addPage( i18n( "Work Info" ), + TQFrame* workInfo = addPage( i18n( "Work Info" ), i18n( "Work Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "attach" ), KIcon::Desktop ) ); - QVBoxLayout* workLayout = new QVBoxLayout( workInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "attach" ), KIcon::Desktop ) ); + TQVBoxLayout* workLayout = new TQVBoxLayout( workInfo ); m_workInfoWidget = new ICQWorkInfoWidget( workInfo, "Work Information" ); workLayout->addWidget( m_workInfoWidget ); - QFrame* otherInfo = addPage( i18n( "Other Info" ), + TQFrame* otherInfo = addPage( i18n( "Other Info" ), i18n( "Other ICQ Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* otherLayout = new QVBoxLayout( otherInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* otherLayout = new TQVBoxLayout( otherInfo ); m_otherInfoWidget = new ICQOtherInfoWidget( otherInfo, "Other Information" ); otherLayout->addWidget( m_otherInfoWidget ); - QFrame* interestInfo = addPage( i18n( "Interest Info" ), + TQFrame* interestInfo = addPage( i18n( "Interest Info" ), i18n( "Interest" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* interestLayout = new QVBoxLayout( interestInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* interestLayout = new TQVBoxLayout( interestInfo ); m_interestInfoWidget = new ICQInterestInfoWidget( interestInfo, "Other Information" ); interestLayout->addWidget( m_interestInfoWidget ); @@ -78,21 +78,21 @@ ICQUserInfoWidget::ICQUserInfoWidget( QWidget * parent, const char * name ) void ICQUserInfoWidget::setContact( ICQContact* contact ) { m_contact = contact; - QObject::connect( contact, SIGNAL( haveBasicInfo( const ICQGeneralUserInfo& ) ), - this, SLOT( fillBasicInfo( const ICQGeneralUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveWorkInfo( const ICQWorkUserInfo& ) ), - this, SLOT( fillWorkInfo( const ICQWorkUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveEmailInfo( const ICQEmailInfo& ) ), - this, SLOT( fillEmailInfo( const ICQEmailInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveMoreInfo( const ICQMoreUserInfo& ) ), - this, SLOT( fillMoreInfo( const ICQMoreUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveInterestInfo( const ICQInterestInfo& ) ), - this, SLOT( fillInterestInfo( const ICQInterestInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveBasicInfo( const ICQGeneralUserInfo& ) ), + this, TQT_SLOT( fillBasicInfo( const ICQGeneralUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveWorkInfo( const ICQWorkUserInfo& ) ), + this, TQT_SLOT( fillWorkInfo( const ICQWorkUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveEmailInfo( const ICQEmailInfo& ) ), + this, TQT_SLOT( fillEmailInfo( const ICQEmailInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveMoreInfo( const ICQMoreUserInfo& ) ), + this, TQT_SLOT( fillMoreInfo( const ICQMoreUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveInterestInfo( const ICQInterestInfo& ) ), + this, TQT_SLOT( fillInterestInfo( const ICQInterestInfo& ) ) ); } void ICQUserInfoWidget::fillBasicInfo( const ICQGeneralUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_genInfoWidget->uinEdit->setText( m_contact->contactId() ); m_genInfoWidget->nickNameEdit->setText( codec->toUnicode( ui.nickname ) ); m_genInfoWidget->fullNameEdit->setText( codec->toUnicode( ui.firstName ) + " " + codec->toUnicode( ui.lastName ) ); @@ -106,13 +106,13 @@ void ICQUserInfoWidget::fillBasicInfo( const ICQGeneralUserInfo& ui ) m_genInfoWidget->cellEdit->setText( codec->toUnicode( ui.cellNumber ) ); m_genInfoWidget->zipEdit->setText( codec->toUnicode( ui.zip ) ); - QString country = static_cast<ICQProtocol*>( m_contact->protocol() )->countries()[ui.country]; + TQString country = static_cast<ICQProtocol*>( m_contact->protocol() )->countries()[ui.country]; m_genInfoWidget->countryEdit->setText( country ); } void ICQUserInfoWidget::fillWorkInfo( const ICQWorkUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_workInfoWidget->cityEdit->setText( codec->toUnicode( ui.city ) ); m_workInfoWidget->stateEdit->setText( codec->toUnicode( ui.state ) ); m_workInfoWidget->phoneEdit->setText( codec->toUnicode( ui.phone ) ); @@ -125,7 +125,7 @@ void ICQUserInfoWidget::fillWorkInfo( const ICQWorkUserInfo& ui ) m_workInfoWidget->homepageEdit->setText( codec->toUnicode( ui.homepage ) ); ICQProtocol* p = static_cast<ICQProtocol*>( m_contact->protocol() ); - QString country = p->countries()[ui.country]; + TQString country = p->countries()[ui.country]; m_workInfoWidget->countryEdit->setText( country ); //TODO handle the occupation @@ -137,24 +137,24 @@ void ICQUserInfoWidget::fillEmailInfo( const ICQEmailInfo& ) void ICQUserInfoWidget::fillInterestInfo( const ICQInterestInfo& info) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); if (info.count>0) { - QString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[0]]; + TQString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[0]]; m_interestInfoWidget->topic1->setText( topic ); m_interestInfoWidget->desc1->setText( codec->toUnicode( info.descriptions[0] ) ); } if (info.count>1) { - QString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[1]]; + TQString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[1]]; m_interestInfoWidget->topic2->setText( topic ); m_interestInfoWidget->desc2->setText( codec->toUnicode( info.descriptions[1] ) ); } if (info.count>2) { - QString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[2]]; + TQString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[2]]; m_interestInfoWidget->topic3->setText( topic ); m_interestInfoWidget->desc3->setText( codec->toUnicode( info.descriptions[2] ) ); } if (info.count>3) { - QString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[3]]; + TQString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[3]]; m_interestInfoWidget->topic4->setText( topic ); m_interestInfoWidget->desc4->setText( codec->toUnicode( info.descriptions[3] ) ); } @@ -162,22 +162,22 @@ void ICQUserInfoWidget::fillInterestInfo( const ICQInterestInfo& info) void ICQUserInfoWidget::fillMoreInfo( const ICQMoreUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_genInfoWidget->ageSpinBox->setValue( ui.age ); if ( ui.birthday.isValid() ) m_genInfoWidget->birthday->setText( KGlobal::locale()->formatDate( ui.birthday,true ) ); - QString gender = static_cast<ICQProtocol*>( m_contact->protocol() )->genders()[ui.gender]; + TQString gender = static_cast<ICQProtocol*>( m_contact->protocol() )->genders()[ui.gender]; m_genInfoWidget->genderEdit->setText( gender ); m_genInfoWidget->homepageEdit->setText( codec->toUnicode( ui.homepage ) ); - QString ms = static_cast<ICQProtocol*>( m_contact->protocol() )->maritals()[ui.marital]; + TQString ms = static_cast<ICQProtocol*>( m_contact->protocol() )->maritals()[ui.marital]; m_genInfoWidget->marital->setText( ms ); m_genInfoWidget->oCityEdit->setText( codec->toUnicode( ui.ocity) ); m_genInfoWidget->oStateEdit->setText( codec->toUnicode( ui.ostate) ); - QString ocountry = static_cast<ICQProtocol*>( m_contact->protocol() )->countries()[ui.ocountry]; + TQString ocountry = static_cast<ICQProtocol*>( m_contact->protocol() )->countries()[ui.ocountry]; m_genInfoWidget->oCountryEdit->setText( ocountry ); //TODO languages diff --git a/kopete/protocols/oscar/icq/ui/icquserinfowidget.h b/kopete/protocols/oscar/icq/ui/icquserinfowidget.h index ef478e59..ac4048ab 100644 --- a/kopete/protocols/oscar/icq/ui/icquserinfowidget.h +++ b/kopete/protocols/oscar/icq/ui/icquserinfowidget.h @@ -33,7 +33,7 @@ class ICQUserInfoWidget : public KDialogBase { Q_OBJECT public: - ICQUserInfoWidget( QWidget* parent = 0, const char* name = 0 ); + ICQUserInfoWidget( TQWidget* parent = 0, const char* name = 0 ); void setContact( ICQContact* contact ); public slots: diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.cpp b/kopete/protocols/oscar/liboscar/aimlogintask.cpp index 69a9c770..da066333 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/aimlogintask.cpp @@ -43,7 +43,7 @@ void AimLoginTask::onGo() //send Snac 17,06 sendAuthStringRequest(); //when we have the authKey, login - connect( this, SIGNAL( haveAuthKey() ), this, SLOT( sendLoginRequest() ) ); + connect( this, TQT_SIGNAL( haveAuthKey() ), this, TQT_SLOT( sendLoginRequest() ) ); } bool AimLoginTask::forMe( Transfer* transfer ) const @@ -72,17 +72,17 @@ bool AimLoginTask::forMe( Transfer* transfer ) const return false; } -const QByteArray& AimLoginTask::cookie() const +const TQByteArray& AimLoginTask::cookie() const { return m_cookie; } -const QString& AimLoginTask::bosHost() const +const TQString& AimLoginTask::bosHost() const { return m_bosHost; } -const QString& AimLoginTask::bosPort() const +const TQString& AimLoginTask::bosPort() const { return m_bosPort; } @@ -158,7 +158,7 @@ void AimLoginTask::sendLoginRequest() outbuf->addTLV(0x0001, client()->userId().length(), client()->userId().latin1()); - QByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long + TQByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long encodePassword( digest ); digest[16] = '\0'; //do this so that addTLV sees a NULL-terminator @@ -189,16 +189,16 @@ void AimLoginTask::handleLoginResponse() if ( !st ) { - setError( -1 , QString::null ); + setError( -1 , TQString::null ); return; } - QValueList<TLV> tlvList = st->buffer()->getTLVList(); + TQValueList<TLV> tlvList = st->buffer()->getTLVList(); TLV uin = findTLV( tlvList, 0x0001 ); if ( uin ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [SN], SN=" << QString( uin.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [SN], SN=" << TQString( uin.data ) << endl; } TLV err = findTLV( tlvList, 0x0008 ); @@ -211,14 +211,14 @@ void AimLoginTask::handleLoginResponse() errorNum << endl; Oscar::SNAC s = { 0, 0, 0, 0 }; client()->fatalTaskError( s, errorNum ); - setError( errorNum, QString::null ); + setError( errorNum, TQString::null ); return; //if there's an error, we'll need to disconnect anyways } TLV server = findTLV( tlvList, 0x0005 ); if ( server ) { - QString ip = QString( server.data ); + TQString ip = TQString( server.data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << ip << endl; int index = ip.find( ':' ); m_bosHost = ip.left( index ); @@ -233,12 +233,12 @@ void AimLoginTask::handleLoginResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(6) [COOKIE]" << endl; m_cookie.duplicate( cookie.data ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } tlvList.clear(); } -void AimLoginTask::encodePassword( QByteArray& digest ) const +void AimLoginTask::encodePassword( TQByteArray& digest ) const { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; md5_state_t state; diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.h b/kopete/protocols/oscar/liboscar/aimlogintask.h index 66308178..cc564592 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.h +++ b/kopete/protocols/oscar/liboscar/aimlogintask.h @@ -33,9 +33,9 @@ public: virtual void onGo(); //Protocol specific stuff - const QByteArray& cookie() const; - const QString& bosHost() const; - const QString& bosPort() const; + const TQByteArray& cookie() const; + const TQString& bosHost() const; + const TQString& bosPort() const; protected: bool forMe( Transfer* transfer ) const; @@ -45,7 +45,7 @@ signals: private: //! Encodes a password using MD5 - void encodePassword( QByteArray& digest ) const; + void encodePassword( TQByteArray& digest ) const; //! Send SNAC 0x17, 0x06 void sendAuthStringRequest(); @@ -58,7 +58,7 @@ private: //! Parse the error codes to generate a reason why sign-on failed //Massive code duplication with CloseConnectionTask - bool parseDisconnectCode( int error, QString& reason ); + bool parseDisconnectCode( int error, TQString& reason ); private slots: //! Send SNAC 0x17, 0x02 @@ -66,16 +66,16 @@ private slots: private: //! The authorization key to use when encoding the password - QByteArray m_authKey; + TQByteArray m_authKey; //! The all important connection cookie - QByteArray m_cookie; + TQByteArray m_cookie; //! The new BOS Host - QString m_bosHost; + TQString m_bosHost; //! The new BOS Port - QString m_bosPort; + TQString m_bosPort; }; diff --git a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp index c3fe7e6e..0b866de8 100644 --- a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp +++ b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp @@ -71,7 +71,7 @@ bool BLMLimitsTask::take(Transfer* transfer) break; } } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } else diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.cpp b/kopete/protocols/oscar/liboscar/buddyicontask.cpp index 1828b7b9..facaae1a 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.cpp +++ b/kopete/protocols/oscar/liboscar/buddyicontask.cpp @@ -19,7 +19,7 @@ #include "buddyicontask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "buffer.h" #include "connection.h" @@ -36,20 +36,20 @@ BuddyIconTask::BuddyIconTask( Task* parent ) m_hashType = 0; } -void BuddyIconTask::uploadIcon( WORD length, const QByteArray& data ) +void BuddyIconTask::uploadIcon( WORD length, const TQByteArray& data ) { m_iconLength = length; m_icon = data; m_action = Send; } -void BuddyIconTask::requestIconFor( const QString& user ) +void BuddyIconTask::requestIconFor( const TQString& user ) { m_user = user; m_action = Receive; } -void BuddyIconTask::setHash( const QByteArray& md5Hash ) +void BuddyIconTask::setHash( const TQByteArray& md5Hash ) { m_hash = md5Hash; } @@ -125,7 +125,7 @@ bool BuddyIconTask::take( Transfer* transfer ) else handleICQBuddyIconResponse(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } @@ -150,10 +150,10 @@ void BuddyIconTask::handleUploadResponse() Buffer* b = transfer()->buffer(); b->skipBytes( 4 ); BYTE iconHashSize = b->getByte(); - QByteArray hash( b->getBlock( iconHashSize ) ); + TQByteArray hash( b->getBlock( iconHashSize ) ); //check the hash kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "hash " << hash << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } @@ -178,16 +178,16 @@ void BuddyIconTask::sendAIMBuddyIconRequest() void BuddyIconTask::handleAIMBuddyIconResponse() { Buffer* b = transfer()->buffer(); - QString user = b->getBUIN(); + TQString user = b->getBUIN(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Receiving buddy icon for " << user << endl; b->skipBytes(2); //unknown field. not used BYTE iconType = b->getByte(); Q_UNUSED( iconType ); BYTE hashSize = b->getByte(); - QByteArray iconHash; + TQByteArray iconHash; iconHash.duplicate( b->getBlock(hashSize) ); WORD iconSize = b->getWord(); - QByteArray icon; + TQByteArray icon; icon.duplicate( b->getBlock(iconSize) ); emit haveIcon( user, icon ); } @@ -213,7 +213,7 @@ void BuddyIconTask::sendICQBuddyIconRequest() void BuddyIconTask::handleICQBuddyIconResponse() { Buffer* b = transfer()->buffer(); - QString user = b->getBUIN(); + TQString user = b->getBUIN(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Receiving buddy icon for " << user << endl; b->skipBytes(2); //not used @@ -221,7 +221,7 @@ void BuddyIconTask::handleICQBuddyIconResponse() Q_UNUSED( iconType ); BYTE hashSize = b->getByte(); - QByteArray iconHash; + TQByteArray iconHash; iconHash.duplicate( b->getBlock(hashSize) ); b->skipBytes(1); //not used @@ -230,11 +230,11 @@ void BuddyIconTask::handleICQBuddyIconResponse() Q_UNUSED( iconType2 ); BYTE hashSize2 = b->getByte(); - QByteArray iconHash2; + TQByteArray iconHash2; iconHash2.duplicate( b->getBlock(hashSize2) ); WORD iconSize = b->getWord(); - QByteArray icon; + TQByteArray icon; icon.duplicate( b->getBlock(iconSize) ); emit haveIcon( user, icon ); diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.h b/kopete/protocols/oscar/liboscar/buddyicontask.h index 83e70a53..f00a5b23 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.h +++ b/kopete/protocols/oscar/liboscar/buddyicontask.h @@ -21,7 +21,7 @@ #define BUDDYICONTASK_H #include "task.h" -#include <qcstring.h> +#include <tqcstring.h> class Transfer; @@ -31,11 +31,11 @@ Q_OBJECT public: BuddyIconTask( Task* parent ); - void uploadIcon( WORD length, const QByteArray& data ); + void uploadIcon( WORD length, const TQByteArray& data ); void setReferenceNum( WORD num ); - void requestIconFor( const QString& user ); - void setHash( const QByteArray& md5Hash ); + void requestIconFor( const TQString& user ); + void setHash( const TQByteArray& md5Hash ); void setHashType( BYTE type ); //! Task implementation @@ -44,7 +44,7 @@ public: bool take( Transfer* transfer ); signals: - void haveIcon( const QString&, QByteArray ); + void haveIcon( const TQString&, TQByteArray ); private: void sendIcon(); @@ -59,9 +59,9 @@ private: Action m_action; WORD m_iconLength; int m_refNum; - QByteArray m_icon; - QString m_user; - QByteArray m_hash; + TQByteArray m_icon; + TQString m_user; + TQByteArray m_hash; BYTE m_hashType; DWORD m_seq; }; diff --git a/kopete/protocols/oscar/liboscar/buffer.cpp b/kopete/protocols/oscar/liboscar/buffer.cpp index b04587e7..23dca1bb 100644 --- a/kopete/protocols/oscar/liboscar/buffer.cpp +++ b/kopete/protocols/oscar/liboscar/buffer.cpp @@ -40,7 +40,7 @@ Buffer::Buffer(const char *b, Q_ULONG len) mReadPos=0; } -Buffer::Buffer( const QByteArray& data ) +Buffer::Buffer( const TQByteArray& data ) { mBuffer.duplicate( data ); mReadPos = 0; @@ -110,7 +110,7 @@ int Buffer::addLEDWord(const DWORD dw) return mBuffer.size(); } -int Buffer::addString(QByteArray s) +int Buffer::addString(TQByteArray s) { unsigned int pos = mBuffer.size(); int len = s.size(); @@ -122,7 +122,7 @@ int Buffer::addString(QByteArray s) return mBuffer.size(); } -int Buffer::addString(QByteArray s, DWORD len) +int Buffer::addString(TQByteArray s, DWORD len) { Q_UNUSED( len ); return addString( s ); @@ -130,14 +130,14 @@ int Buffer::addString(QByteArray s, DWORD len) int Buffer::addString( const char* s, DWORD len ) { - QByteArray qba; + TQByteArray qba; qba.duplicate( s, len ); return addString( qba ); } int Buffer::addString(const unsigned char* s, DWORD len) { - QByteArray qba; + TQByteArray qba; qba.duplicate( (const char*) s, len ); return addString( qba ); } @@ -253,9 +253,9 @@ void Buffer::setBuf(char *b, const WORD len) mReadPos = 0; } -QByteArray Buffer::getBlock(WORD len) +TQByteArray Buffer::getBlock(WORD len) { - QByteArray ch( len ); + TQByteArray ch( len ); for ( int i = 0; i < len; i++ ) { ch[i] = getByte(); @@ -264,9 +264,9 @@ QByteArray Buffer::getBlock(WORD len) return ch; } -QByteArray Buffer::getBBlock(WORD len) +TQByteArray Buffer::getBBlock(WORD len) { - QByteArray data; + TQByteArray data; data.duplicate(mBuffer.data() + mReadPos, len); mReadPos += len; return data; @@ -286,9 +286,9 @@ WORD *Buffer::getWordBlock(WORD len) } -QCString Buffer::getLEBlock(WORD len) +TQCString Buffer::getLEBlock(WORD len) { - QCString ch; + TQCString ch; for (unsigned int i=0;i<len;i++) ch += getLEByte(); @@ -340,9 +340,9 @@ TLV Buffer::getTLV() return t; } -QValueList<TLV> Buffer::getTLVList() +TQValueList<TLV> Buffer::getTLVList() { - QValueList<TLV> ql; + TQValueList<TLV> ql; while (mReadPos < mBuffer.size()) { @@ -363,7 +363,7 @@ QValueList<TLV> Buffer::getTLVList() } int Buffer::addChatTLV(const WORD type, const WORD exchange, - const QString &roomname, const WORD instance) + const TQString &roomname, const WORD instance) { addWord(type); addWord(0x0005 + roomname.length()); @@ -376,21 +376,21 @@ int Buffer::addChatTLV(const WORD type, const WORD exchange, void Buffer::expandBuffer(unsigned int inc) { - mBuffer.resize(mBuffer.size()+inc, QGArray::SpeedOptim); + mBuffer.resize(mBuffer.size()+inc, TQGArray::SpeedOptim); } -QCString Buffer::getLNTS() +TQCString Buffer::getLNTS() { WORD len = getLEWord(); - QCString qcs; + TQCString qcs; qcs.duplicate( getBlock(len) ); return qcs; } -QCString Buffer::getLELNTS() +TQCString Buffer::getLELNTS() { WORD len = getLEWord(); - QCString qcs; + TQCString qcs; qcs.duplicate( getBlock(len) ); return qcs; } @@ -425,10 +425,10 @@ int Buffer::addBSTR(const char * s) return ret; } -QByteArray Buffer::getBSTR() +TQByteArray Buffer::getBSTR() { WORD len = getWord(); - QByteArray qba; + TQByteArray qba; qba.duplicate( getBlock(len) ); return qba; } @@ -441,10 +441,10 @@ int Buffer::addBUIN(const char * s) return ret; } -QByteArray Buffer::getBUIN() +TQByteArray Buffer::getBUIN() { BYTE len = getByte(); - QByteArray qba; + TQByteArray qba; qba.duplicate( getBlock(len) ); return qba; } @@ -459,16 +459,16 @@ int Buffer::length() const return (mBuffer.size() - mReadPos); } -QString Buffer::toString() const +TQString Buffer::toString() const { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; + TQByteArray::ConstIterator it; for ( it = mBuffer.begin(); it != mBuffer.end(); ++it ) { i++; @@ -477,7 +477,7 @@ QString Buffer::toString() const if ( c < 0x10 ) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -485,8 +485,8 @@ QString Buffer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -497,22 +497,22 @@ QString Buffer::toString() const return output; } -QString Buffer::peekBSTR() +TQString Buffer::peekBSTR() { int lastPos = mReadPos; - QByteArray qba = getBSTR(); + TQByteArray qba = getBSTR(); mReadPos = lastPos; - return QString( qba ); + return TQString( qba ); } -QString Buffer::peekBUIN() +TQString Buffer::peekBUIN() { int lastPos = mReadPos; - QByteArray qba = getBUIN(); + TQByteArray qba = getBUIN(); mReadPos = lastPos; - return QString( qba ); + return TQString( qba ); } -Buffer::operator QByteArray() const +Buffer::operator TQByteArray() const { return mBuffer; } diff --git a/kopete/protocols/oscar/liboscar/buffer.h b/kopete/protocols/oscar/liboscar/buffer.h index 900ddb50..b5035b52 100644 --- a/kopete/protocols/oscar/liboscar/buffer.h +++ b/kopete/protocols/oscar/liboscar/buffer.h @@ -22,8 +22,8 @@ #include "oscartypes.h" -#include <qvaluelist.h> -#include <qcstring.h> +#include <tqvaluelist.h> +#include <tqcstring.h> class QString; @@ -50,9 +50,9 @@ class Buffer /** * \brief Create a prefilled buffer * - * Constructor that creates a prefilled buffer from the QByteArray \p data + * Constructor that creates a prefilled buffer from the TQByteArray \p data */ - Buffer( const QByteArray& data ); + Buffer( const TQByteArray& data ); /** Default destructor */ @@ -72,8 +72,8 @@ class Buffer /** * adds the given string to the buffer (make sure it's NULL-terminated) */ - int addString(QByteArray); - int addString(QByteArray, DWORD); + int addString(TQByteArray); + int addString(TQByteArray, DWORD); int addString(const char*, DWORD); int addString(const unsigned char*, DWORD); @@ -141,9 +141,9 @@ class Buffer int addLETLV(WORD, WORD, const char *); /** - * Returns a QString representation of the buffer + * Returns a TQString representation of the buffer */ - QString toString() const; + TQString toString() const; /** * gets a DWord out of the buffer @@ -183,8 +183,8 @@ class Buffer /** * Allocates memory for and gets a block of buffer bytes */ - QByteArray getBlock(WORD len); - QByteArray getBBlock(WORD len); + TQByteArray getBlock(WORD len); + TQByteArray getBBlock(WORD len); /** * Allocates memory for and gets a block of buffer words @@ -194,14 +194,14 @@ class Buffer /** * Same as above but returning little-endian */ - QCString getLEBlock(WORD len); + TQCString getLEBlock(WORD len); /** * Convenience function that gets a LNTS (long null terminated string) * from the buffer. Otherwise you'd need a getWord() + getBlock() call :) */ - QCString getLNTS(); - QCString getLELNTS(); + TQCString getLNTS(); + TQCString getLELNTS(); /** * adds a 16-bit long TLV @@ -231,25 +231,25 @@ class Buffer /** * Gets a list of TLV's */ - QValueList<TLV> getTLVList(); + TQValueList<TLV> getTLVList(); /** * Creates a chat data segment for a tlv and calls addTLV with that data */ - int addChatTLV(const WORD, const WORD, const QString &, const WORD); + int addChatTLV(const WORD, const WORD, const TQString &, const WORD); /** * Similar to the LNTS functions but string is NOT null-terminated */ int addBSTR(const char * s); - QByteArray getBSTR(); - QString peekBSTR(); + TQByteArray getBSTR(); + TQString peekBSTR(); int addBUIN(const char * s); - QByteArray getBUIN(); - QString peekBUIN(); + TQByteArray getBUIN(); + TQString peekBUIN(); - operator QByteArray() const; + operator TQByteArray() const; private: /** @@ -258,7 +258,7 @@ class Buffer void expandBuffer(unsigned int inc); private: - QByteArray mBuffer; + TQByteArray mBuffer; unsigned int mReadPos; }; diff --git a/kopete/protocols/oscar/liboscar/bytestream.cpp b/kopete/protocols/oscar/liboscar/bytestream.cpp index 109dbbad..87603c76 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.cpp +++ b/kopete/protocols/oscar/liboscar/bytestream.cpp @@ -35,7 +35,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>. +//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -59,13 +59,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -95,7 +95,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -109,7 +109,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { return takeRead(bytes); } @@ -130,9 +130,9 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -153,14 +153,14 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { appendArray(&d->readBuf, block); } //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { appendArray(&d->writeBuf, block); } @@ -169,7 +169,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { return takeArray(&d->readBuf, size, del); } @@ -178,21 +178,21 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { return takeArray(&d->writeBuf, size, del); } //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { return d->writeBuf; } @@ -207,7 +207,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -218,9 +218,9 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/oscar/liboscar/bytestream.h b/kopete/protocols/oscar/liboscar/bytestream.h index 1c2dfa15..a990a940 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.h +++ b/kopete/protocols/oscar/liboscar/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include <qobject.h> -#include <qcstring.h> +#include <tqobject.h> +#include <tqcstring.h> // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp index 5cb44720..7c6ff26a 100644 --- a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp +++ b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp @@ -18,7 +18,7 @@ #include "changevisibilitytask.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdebug.h> #include "buffer.h" #include "client.h" @@ -64,13 +64,13 @@ bool ChangeVisibilityTask::take(Transfer* transfer) if ( forMe( transfer ) ) { setTransfer( transfer ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } else { - setError( 0, QString::null ); + setError( 0, TQString::null ); return false; } } @@ -82,7 +82,7 @@ void ChangeVisibilityTask::onGo() if ( !item ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Didn't find a visibility item" << endl; - setError( 0, QString::null ); + setError( 0, TQString::null ); return; } @@ -90,14 +90,14 @@ void ChangeVisibilityTask::onGo() BYTE visibleByte = m_visible ? 0x04 : 0x03; c8tlv.addByte( visibleByte ); - QValueList<Oscar::TLV> tList; + TQValueList<Oscar::TLV> tList; tList.append( TLV( 0x00CA, c8tlv.length(), c8tlv.buffer() ) ); Oscar::SSI newSSI(item); if ( Oscar::uptateTLVs( newSSI, tList ) == false ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Visibility didn't change, don't update" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -118,8 +118,8 @@ void ChangeVisibilityTask::onGo() b->addWord( newSSI.type() ); b->addWord( newSSI.tlvListLength() ); - QValueList<TLV>::const_iterator it2 = newSSI.tlvList().begin(); - QValueList<TLV>::const_iterator listEnd2 = newSSI.tlvList().end(); + TQValueList<TLV>::const_iterator it2 = newSSI.tlvList().begin(); + TQValueList<TLV>::const_iterator listEnd2 = newSSI.tlvList().end(); for( ; it2 != listEnd2; ++it2 ) b->addTLV( ( *it2 ) ); diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp index f661d1f4..914de496 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp @@ -45,7 +45,7 @@ ChatNavServiceTask::RequestType ChatNavServiceTask::requestType() return m_type; } -QValueList<int> ChatNavServiceTask::exchangeList() const +TQValueList<int> ChatNavServiceTask::exchangeList() const { return m_exchanges; } @@ -97,7 +97,7 @@ bool ChatNavServiceTask::take( Transfer* transfer ) } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; @@ -113,12 +113,12 @@ void ChatNavServiceTask::onGo() send( t ); } -void ChatNavServiceTask::createRoom( WORD exchange, const QString& name ) +void ChatNavServiceTask::createRoom( WORD exchange, const TQString& name ) { //most of this comes from gaim. thanks to them for figuring it out - QString cookie = "create"; //hardcoded, seems to be ignored by AOL - QString lang = "en"; - QString charset = "us-ascii"; + TQString cookie = "create"; //hardcoded, seems to be ignored by AOL + TQString lang = "en"; + TQString charset = "us-ascii"; FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x000D, 0x0008, 0x0000, client()->snacSequence() }; @@ -202,7 +202,7 @@ void ChatNavServiceTask::handleExchangeInfo( const TLV& t ) break; case 0xD3: { - QString eName( t.data ); + TQString eName( t.data ); kdDebug(OSCAR_RAW_DEBUG) << "exchange name: " << eName << endl; exchangeInfo.description = eName; break; @@ -227,16 +227,16 @@ void ChatNavServiceTask::handleBasicRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << "Parsing room info TLV" << t.length << endl; Buffer b(t.data); WORD exchange = b.getWord(); - QByteArray cookie( b.getBlock( b.getByte() ) ); + TQByteArray cookie( b.getBlock( b.getByte() ) ); WORD instance = b.getWord(); b.getByte(); //detail level, which i'm not sure we need WORD tlvCount = b.getWord(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "e: " << exchange << " c: " << cookie << " i: " << instance << endl; - QValueList<Oscar::TLV> tlvList = b.getTLVList(); - QValueList<Oscar::TLV>::iterator it, itEnd = tlvList.end(); - QString roomName; + TQValueList<Oscar::TLV> tlvList = b.getTLVList(); + TQValueList<Oscar::TLV>::iterator it, itEnd = tlvList.end(); + TQString roomName; for ( it = tlvList.begin(); it != itEnd; ++it ) { TLV t = ( *it ); @@ -255,7 +255,7 @@ void ChatNavServiceTask::handleBasicRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << "evil generated array" << endl; break; case 0x6A: - roomName = QString( t.data ); + roomName = TQString( t.data ); kdDebug(OSCAR_RAW_DEBUG) << "fully qualified name" << roomName << endl; break; case 0x6B: @@ -305,7 +305,7 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) Buffer b( t.data ); WORD exchange = b.getWord(); WORD cookieLength = b.getByte(); - QByteArray cookie( b.getBlock( cookieLength ) ); + TQByteArray cookie( b.getBlock( cookieLength ) ); WORD instance = b.getWord(); BYTE detailLevel = b.getByte(); @@ -316,16 +316,16 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) } WORD numberTlvs = b.getWord(); - QValueList<Oscar::TLV> roomTLVList = b.getTLVList(); - QValueList<Oscar::TLV>::iterator itEnd = roomTLVList.end(); - for ( QValueList<Oscar::TLV>::iterator it = roomTLVList.begin(); + TQValueList<Oscar::TLV> roomTLVList = b.getTLVList(); + TQValueList<Oscar::TLV>::iterator itEnd = roomTLVList.end(); + for ( TQValueList<Oscar::TLV>::iterator it = roomTLVList.begin(); it != itEnd; ++ it ) { switch( ( *it ).type ) { case 0x006A: { - QString fqcn = QString( ( *it ).data ); + TQString fqcn = TQString( ( *it ).data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "fqcn: " << fqcn << endl; break; } @@ -342,7 +342,7 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "max occupancy: " << t.data << endl; break; case 0x00D3: - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "name: " << QString( t.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "name: " << TQString( t.data ) << endl; break; case 0x00D5: kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "create perms: " << t.data << endl; diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.h b/kopete/protocols/oscar/liboscar/chatnavservicetask.h index 6b7d8764..8af63247 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.h @@ -19,7 +19,7 @@ #include "task.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <oscartypes.h> class Transfer; @@ -43,13 +43,13 @@ public: virtual bool forMe( const Transfer* transfer ) const; virtual bool take( Transfer* transfer ); virtual void onGo(); - void createRoom( WORD exchange, const QString& name ); //create a room. sends the packet as well + void createRoom( WORD exchange, const TQString& name ); //create a room. sends the packet as well - QValueList<int> exchangeList() const; + TQValueList<int> exchangeList() const; signals: - void haveChatExchanges( const QValueList<int>& ); - void connectChat( WORD, QByteArray, WORD, const QString& ); + void haveChatExchanges( const TQValueList<int>& ); + void connectChat( WORD, TQByteArray, WORD, const TQString& ); private: void handleExchangeInfo( const TLV& t ); @@ -57,7 +57,7 @@ private: void handleCreateRoomInfo( const TLV& t ); private: - QValueList<int> m_exchanges; + TQValueList<int> m_exchanges; RequestType m_type; }; diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.cpp b/kopete/protocols/oscar/liboscar/chatservicetask.cpp index 9d07afe8..c8998495 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatservicetask.cpp @@ -20,17 +20,17 @@ #include "chatservicetask.h" -#include <qstring.h> +#include <tqstring.h> #include <kapplication.h> #include <kdebug.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include "connection.h" #include "transfer.h" #include "buffer.h" #include "oscartypes.h" -ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const QString& room ) +ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ) : Task( parent ), m_encoding( "us-ascii" ) { m_exchange = exchange; @@ -47,7 +47,7 @@ void ChatServiceTask::setMessage( const Oscar::Message& msg ) m_message = msg; } -void ChatServiceTask::setEncoding( const QCString& enc ) +void ChatServiceTask::setEncoding( const TQCString& enc ) { m_encoding = enc; } @@ -56,7 +56,7 @@ void ChatServiceTask::onGo() { if ( !m_message ) { - setSuccess( true, QString::null ); + setSuccess( true, TQString::null ); return; } @@ -78,7 +78,7 @@ void ChatServiceTask::onGo() type3.type = 0x0003; type3.length = 0x0002; - type3.data = QCString( "en" ); //hardcode for right now. don't know that we can do others + type3.data = TQCString( "en" ); //hardcode for right now. don't know that we can do others type1.type = 0x0001; type1.length = m_message.textArray().size(); @@ -158,7 +158,7 @@ bool ChatServiceTask::take( Transfer* t ) break; }; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } @@ -170,7 +170,7 @@ void ChatServiceTask::parseRoomInfo() Buffer* b = transfer()->buffer(); m_exchange = b->getWord(); - QByteArray cookie( b->getBlock( b->getByte() ) ); + TQByteArray cookie( b->getBlock( b->getByte() ) ); instance = b->getWord(); detailLevel = b->getByte(); @@ -179,15 +179,15 @@ void ChatServiceTask::parseRoomInfo() //correctly anyways b->skipBytes( 2 ); - QValueList<Oscar::TLV> tlvList = b->getTLVList(); - QValueList<Oscar::TLV>::iterator it = tlvList.begin(); - QValueList<Oscar::TLV>::iterator itEnd = tlvList.end(); + TQValueList<Oscar::TLV> tlvList = b->getTLVList(); + TQValueList<Oscar::TLV>::iterator it = tlvList.begin(); + TQValueList<Oscar::TLV>::iterator itEnd = tlvList.end(); for ( ; it != itEnd; ++it ) { switch ( ( *it ).type ) { case 0x006A: - m_internalRoom = QString( ( *it ).data ); + m_internalRoom = TQString( ( *it ).data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "room name: " << m_room << endl; break; case 0x006F: @@ -221,7 +221,7 @@ void ChatServiceTask::parseJoinNotification() Buffer* b = transfer()->buffer(); while ( b->length() > 0 ) { - QString sender( b->getBUIN() ); + TQString sender( b->getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl; WORD warningLevel = b->getWord(); WORD numTLVs = b->getWord(); @@ -252,7 +252,7 @@ void ChatServiceTask::parseLeftNotification() Buffer* b = transfer()->buffer(); while ( b->length() > 0 ) { - QString sender( b->getBUIN() ); + TQString sender( b->getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl; WORD warningLevel = b->getWord(); WORD numTLVs = b->getWord(); @@ -281,12 +281,12 @@ void ChatServiceTask::parseChatMessage() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "have new chat room message" << endl; Buffer* b = transfer()->buffer(); bool whisper = true, reflection = false; - QByteArray language, encoding, message; - QString sender; - QByteArray icbmCookie( b->getBlock( 8 ) ); + TQByteArray language, encoding, message; + TQString sender; + TQByteArray icbmCookie( b->getBlock( 8 ) ); b->skipBytes( 2 ); //message channel always 0x03 - QValueList<Oscar::TLV> chatTLVs = b->getTLVList(); - QValueList<Oscar::TLV>::iterator it, itEnd = chatTLVs.end(); + TQValueList<Oscar::TLV> chatTLVs = b->getTLVList(); + TQValueList<Oscar::TLV>::iterator it, itEnd = chatTLVs.end(); for ( it = chatTLVs.begin(); it != itEnd; ++it ) { switch ( ( *it ).type ) @@ -326,7 +326,7 @@ void ChatServiceTask::parseChatMessage() case 0x0003: //user info { Buffer b( ( *it ).data ); - sender = QString( b.getBUIN() ); + sender = TQString( b.getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "got user info. sender is " << sender << endl; } break; @@ -334,14 +334,14 @@ void ChatServiceTask::parseChatMessage() } } - QTextCodec* codec = QTextCodec::codecForName( encoding ); + TQTextCodec* codec = TQTextCodec::codecForName( encoding ); if ( ! codec ) - codec = QTextCodec::codecForMib( 4 ); - QString msgText( codec->toUnicode( message ) ); + codec = TQTextCodec::codecForMib( 4 ); + TQString msgText( codec->toUnicode( message ) ); Oscar::Message omessage; omessage.setReceiver( client()->userId() ); omessage.setSender( sender ); - omessage.setTimestamp( QDateTime::currentDateTime() ); + omessage.setTimestamp( TQDateTime::currentDateTime() ); omessage.setText( Oscar::Message::UTF8, msgText ); omessage.setType( 0x03 ); omessage.setExchange( m_exchange ); diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.h b/kopete/protocols/oscar/liboscar/chatservicetask.h index 90e29300..5f19fcae 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatservicetask.h @@ -29,7 +29,7 @@ class ChatServiceTask : public Task { Q_OBJECT public: - ChatServiceTask( Task* parent, Oscar::WORD exchange, const QString& room ); + ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ); ~ChatServiceTask(); void onGo(); @@ -44,11 +44,11 @@ public: void parseChatError(); void setMessage( const Oscar::Message& msg ); - void setEncoding( const QCString &enc ); + void setEncoding( const TQCString &enc ); signals: - void userJoinedChat( Oscar::WORD, const QString& r, const QString& u ); - void userLeftChat( Oscar::WORD, const QString& r, const QString& u ); + void userJoinedChat( Oscar::WORD, const TQString& r, const TQString& u ); + void userLeftChat( Oscar::WORD, const TQString& r, const TQString& u ); void newChatMessage( const Oscar::Message& msg ); protected: @@ -56,10 +56,10 @@ protected: private: WORD m_exchange; - QString m_room; - QString m_internalRoom; + TQString m_room; + TQString m_internalRoom; Oscar::Message m_message; - QCString m_encoding; + TQCString m_encoding; }; #endif diff --git a/kopete/protocols/oscar/liboscar/client.cpp b/kopete/protocols/oscar/liboscar/client.cpp index af967512..222d9d69 100644 --- a/kopete/protocols/oscar/liboscar/client.cpp +++ b/kopete/protocols/oscar/liboscar/client.cpp @@ -20,8 +20,8 @@ #include "client.h" -#include <qtimer.h> -#include <qtextcodec.h> +#include <tqtimer.h> +#include <tqtextcodec.h> #include <kdebug.h> //for kdDebug() #include <klocale.h> @@ -66,13 +66,13 @@ namespace class DefaultCodecProvider : public Client::CodecProvider { public: - virtual QTextCodec* codecForContact( const QString& ) const + virtual TQTextCodec* codecForContact( const TQString& ) const { - return QTextCodec::codecForMib( 4 ); + return TQTextCodec::codecForMib( 4 ); } - virtual QTextCodec* codecForAccount() const + virtual TQTextCodec* codecForAccount() const { - return QTextCodec::codecForMib( 4 ); + return TQTextCodec::codecForMib( 4 ); } }; @@ -84,7 +84,7 @@ class Client::ClientPrivate public: ClientPrivate() {} - QString host, user, pass; + TQString host, user, pass; uint port; int tzoffset; bool active; @@ -95,11 +95,11 @@ public: //Protocol specific data bool isIcq; bool redirectRequested; - QValueList<WORD> redirectionServices; + TQValueList<WORD> redirectionServices; WORD currentRedirect; - QByteArray cookie; + TQByteArray cookie; DWORD connectAsStatus; // icq only - QString connectWithMessage; // icq only + TQString connectWithMessage; // icq only Oscar::Settings* settings; //Tasks @@ -120,25 +120,25 @@ public: UserDetails ourDetails; //Infos - QValueList<int> exchanges; + TQValueList<int> exchanges; - QString statusMessage; // for away-,DND-message etc... + TQString statusMessage; // for away-,DND-message etc... //away messages struct AwayMsgRequest { - QString contact; + TQString contact; ICQStatus contactStatus; }; - QValueList<AwayMsgRequest> awayMsgRequestQueue; - QTimer* awayMsgRequestTimer; + TQValueList<AwayMsgRequest> awayMsgRequestQueue; + TQTimer* awayMsgRequestTimer; CodecProvider* codecProvider; const Oscar::ClientVersion* version; }; -Client::Client( QObject* parent ) -:QObject( parent, "oscarclient" ) +Client::Client( TQObject* parent ) +:TQObject( parent, "oscarclient" ) { m_loginTask = 0L; m_loginTaskTwo = 0L; @@ -162,13 +162,13 @@ Client::Client( QObject* parent ) d->stage = ClientPrivate::StageOne; d->typingNotifyTask = 0L; d->ssiModifyTask = 0L; - d->awayMsgRequestTimer = new QTimer(); + d->awayMsgRequestTimer = new TQTimer(); d->codecProvider = &defaultCodecProvider; - connect( this, SIGNAL( redirectionFinished( WORD ) ), - this, SLOT( checkRedirectionQueue( WORD ) ) ); - connect( d->awayMsgRequestTimer, SIGNAL( timeout() ), - this, SLOT( nextICQAwayMessageRequest() ) ); + connect( this, TQT_SIGNAL( redirectionFinished( WORD ) ), + this, TQT_SLOT( checkRedirectionQueue( WORD ) ) ); + connect( d->awayMsgRequestTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( nextICQAwayMessageRequest() ) ); } Client::~Client() @@ -188,20 +188,20 @@ Oscar::Settings* Client::clientSettings() const return d->settings; } -void Client::connectToServer( Connection *c, const QString& server, bool auth ) +void Client::connectToServer( Connection *c, const TQString& server, bool auth ) { d->connections.append( c ); if ( auth == true ) { m_loginTask = new StageOneLoginTask( c->rootTask() ); - connect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + connect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); } - connect( c, SIGNAL( socketError( int, const QString& ) ), this, SLOT( determineDisconnection( int, const QString& ) ) ); + connect( c, TQT_SIGNAL( socketError( int, const TQString& ) ), this, TQT_SLOT( determineDisconnection( int, const TQString& ) ) ); c->connectToServer(server, auth); } -void Client::start( const QString &host, const uint port, const QString &userId, const QString &pass ) +void Client::start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ) { Q_UNUSED( host ); Q_UNUSED( port ); @@ -223,7 +223,7 @@ void Client::close() if ( d->stage == ClientPrivate::StageTwo ) { d->connectAsStatus = 0x0; - d->connectWithMessage = QString::null; + d->connectWithMessage = TQString::null; } d->exchanges.clear(); @@ -233,18 +233,18 @@ void Client::close() d->ssiManager->clear(); } -void Client::setStatus( AIMStatus status, const QString &_message ) +void Client::setStatus( AIMStatus status, const TQString &_message ) { // AIM: you're away exactly when your away message isn't empty. - // can't use QString::null as a message either; ProfileTask + // can't use TQString::null as a message either; ProfileTask // interprets null as "don't change". - QString message; + TQString message; if ( status == Online ) - message = QString::fromAscii(""); + message = TQString::fromAscii(""); else { if ( _message.isEmpty() ) - message = QString::fromAscii(" "); + message = TQString::fromAscii(" "); else message = _message; } @@ -257,7 +257,7 @@ void Client::setStatus( AIMStatus status, const QString &_message ) pt->go( true ); } -void Client::setStatus( DWORD status, const QString &message ) +void Client::setStatus( DWORD status, const TQString &message ) { // remember the message to reply with, when requested kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Setting status message to "<< message << endl; @@ -302,7 +302,7 @@ UserDetails Client::ourInfo() const return d->ourDetails; } -QString Client::host() +TQString Client::host() { return d->host; } @@ -343,7 +343,7 @@ void Client::lt_loginFinished() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage two done. setting up services" << endl; initializeStaticTasks(); ServiceSetupTask* ssTask = new ServiceSetupTask( d->connections.defaultConnection()->rootTask() ); - connect( ssTask, SIGNAL( finished() ), this, SLOT( serviceSetupFinished() ) ); + connect( ssTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( serviceSetupFinished() ) ); ssTask->go( true ); //fire and forget m_loginTaskTwo->deleteLater(); m_loginTaskTwo = 0; @@ -351,7 +351,7 @@ void Client::lt_loginFinished() else if ( d->stage == ClientPrivate::StageOne ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage one login done" << endl; - disconnect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + disconnect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); if ( m_loginTask->statusCode() == 0 ) //we can start stage two { @@ -362,7 +362,7 @@ void Client::lt_loginFinished() d->port = m_loginTask->bosPort().toUInt(); d->cookie = m_loginTask->loginCookie(); close(); - QTimer::singleShot( 100, this, SLOT(startStageTwo() ) ); + TQTimer::singleShot( 100, this, TQT_SLOT(startStageTwo() ) ); } else { @@ -379,17 +379,17 @@ void Client::lt_loginFinished() void Client::startStageTwo() { //create a new connection and set it up - Connection* c = createConnection( d->host, QString::number( d->port ) ); + Connection* c = createConnection( d->host, TQString::number( d->port ) ); new CloseConnectionTask( c->rootTask() ); //create the new login task m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() ); m_loginTaskTwo->setCookie( d->cookie ); - QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); //connect - QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) ); + TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) ); connectToServer( c, d->host, false ) ; } @@ -411,8 +411,8 @@ void Client::serviceSetupFinished() return; OfflineMessagesTask *offlineMsgTask = new OfflineMessagesTask( c->rootTask() ); - connect( offlineMsgTask, SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ), - this, SIGNAL( messageReceived(const Oscar::Message& ) ) ); + connect( offlineMsgTask, TQT_SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ), + this, TQT_SIGNAL( messageReceived(const Oscar::Message& ) ) ); offlineMsgTask->go( true ); } @@ -420,7 +420,7 @@ void Client::serviceSetupFinished() emit loggedIn(); } -void Client::receivedIcqInfo( const QString& contact, unsigned int type ) +void Client::receivedIcqInfo( const TQString& contact, unsigned int type ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "received icq info for " << contact << " of type " << type << endl; @@ -437,7 +437,7 @@ void Client::receivedInfo( Q_UINT16 sequence ) emit receivedUserInfo( details.userId(), details ); } -void Client::offlineUser( const QString& user, const UserDetails& ) +void Client::offlineUser( const TQString& user, const UserDetails& ) { emit userIsOffline( user ); } @@ -462,27 +462,27 @@ void Client::setVersion( const Oscar::ClientVersion* version ) // INTERNALS // -QString Client::userId() const +TQString Client::userId() const { return d->user; } -QString Client::password() const +TQString Client::password() const { return d->pass; } -QString Client::statusMessage() const +TQString Client::statusMessage() const { return d->statusMessage; } -void Client::setStatusMessage( const QString &message ) +void Client::setStatusMessage( const TQString &message ) { d->statusMessage = message; } -QCString Client::ipAddress() const +TQCString Client::ipAddress() const { //!TODO determine ip address return "127.0.0.1"; @@ -493,7 +493,7 @@ void Client::notifyTaskError( const Oscar::SNAC& s, int errCode, bool fatal ) emit taskError( s, errCode, fatal ); } -void Client::notifySocketError( int errCode, const QString& msg ) +void Client::notifySocketError( int errCode, const TQString& msg ) { emit socketError( errCode, msg ); } @@ -538,13 +538,13 @@ void Client::receivedMessage( const Oscar::Message& msg ) Oscar::Message response ( msg ); if ( msg.hasProperty( Oscar::Message::StatusMessageRequest ) ) { - QTextCodec* codec = d->codecProvider->codecForContact( msg.sender() ); + TQTextCodec* codec = d->codecProvider->codecForContact( msg.sender() ); response.setText( Oscar::Message::UserDefined, statusMessage(), codec ); } else { response.setEncoding( Oscar::Message::UserDefined ); - response.setTextArray( QByteArray() ); + response.setTextArray( TQByteArray() ); } response.setReceiver( msg.sender() ); response.addProperty( Oscar::Message::AutoResponse ); @@ -557,7 +557,7 @@ void Client::receivedMessage( const Oscar::Message& msg ) if ( msg.hasProperty( Oscar::Message::AutoResponse ) ) { // we got a response to a status message request. - QString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) ); + TQString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Received an away message: " << awayMessage << endl; emit receivedAwayMessage( msg.sender(), awayMessage ); } @@ -574,7 +574,7 @@ void Client::receivedMessage( const Oscar::Message& msg ) } } -void Client::requestAuth( const QString& contactid, const QString& reason ) +void Client::requestAuth( const TQString& contactid, const TQString& reason ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -582,7 +582,7 @@ void Client::requestAuth( const QString& contactid, const QString& reason ) d->ssiAuthTask->sendAuthRequest( contactid, reason ); } -void Client::sendAuth( const QString& contactid, const QString& reason, bool auth ) +void Client::sendAuth( const TQString& contactid, const TQString& reason, bool auth ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -605,7 +605,7 @@ void Client::setIsIcq( bool isIcq ) d->isIcq = isIcq; } -void Client::debug( const QString& str ) +void Client::debug( const TQString& str ) { Q_UNUSED(str); // qDebug( "CLIENT: %s", str.ascii() ); @@ -627,37 +627,37 @@ void Client::initializeStaticTasks() d->typingNotifyTask = new TypingNotifyTask( c->rootTask() ); d->ssiModifyTask = new SSIModifyTask( c->rootTask(), true ); - connect( d->onlineNotifier, SIGNAL( userIsOnline( const QString&, const UserDetails& ) ), - this, SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ) ); - connect( d->onlineNotifier, SIGNAL( userIsOffline( const QString&, const UserDetails& ) ), - this, SLOT( offlineUser( const QString&, const UserDetails & ) ) ); + connect( d->onlineNotifier, TQT_SIGNAL( userIsOnline( const TQString&, const UserDetails& ) ), + this, TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ) ); + connect( d->onlineNotifier, TQT_SIGNAL( userIsOffline( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( offlineUser( const TQString&, const UserDetails & ) ) ); - connect( d->ownStatusTask, SIGNAL( gotInfo() ), this, SLOT( haveOwnUserInfo() ) ); - connect( d->ownStatusTask, SIGNAL( buddyIconUploadRequested() ), this, - SIGNAL( iconNeedsUploading() ) ); + connect( d->ownStatusTask, TQT_SIGNAL( gotInfo() ), this, TQT_SLOT( haveOwnUserInfo() ) ); + connect( d->ownStatusTask, TQT_SIGNAL( buddyIconUploadRequested() ), this, + TQT_SIGNAL( iconNeedsUploading() ) ); - connect( d->messageReceiverTask, SIGNAL( receivedMessage( const Oscar::Message& ) ), - this, SLOT( receivedMessage( const Oscar::Message& ) ) ); + connect( d->messageReceiverTask, TQT_SIGNAL( receivedMessage( const Oscar::Message& ) ), + this, TQT_SLOT( receivedMessage( const Oscar::Message& ) ) ); - connect( d->ssiAuthTask, SIGNAL( authRequested( const QString&, const QString& ) ), - this, SIGNAL( authRequestReceived( const QString&, const QString& ) ) ); - connect( d->ssiAuthTask, SIGNAL( authReplied( const QString&, const QString&, bool ) ), - this, SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ) ); + connect( d->ssiAuthTask, TQT_SIGNAL( authRequested( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( authRequestReceived( const TQString&, const TQString& ) ) ); + connect( d->ssiAuthTask, TQT_SIGNAL( authReplied( const TQString&, const TQString&, bool ) ), + this, TQT_SIGNAL( authReplyReceived( const TQString&, const TQString&, bool ) ) ); - connect( d->icqInfoTask, SIGNAL( receivedInfoFor( const QString&, unsigned int ) ), - this, SLOT( receivedIcqInfo( const QString&, unsigned int ) ) ); + connect( d->icqInfoTask, TQT_SIGNAL( receivedInfoFor( const TQString&, unsigned int ) ), + this, TQT_SLOT( receivedIcqInfo( const TQString&, unsigned int ) ) ); - connect( d->userInfoTask, SIGNAL( receivedProfile( const QString&, const QString& ) ), - this, SIGNAL( receivedProfile( const QString&, const QString& ) ) ); - connect( d->userInfoTask, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ) ); - connect( d->typingNotifyTask, SIGNAL( typingStarted( const QString& ) ), - this, SIGNAL( userStartedTyping( const QString& ) ) ); - connect( d->typingNotifyTask, SIGNAL( typingFinished( const QString& ) ), - this, SIGNAL( userStoppedTyping( const QString& ) ) ); + connect( d->userInfoTask, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ) ); + connect( d->userInfoTask, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ) ); + connect( d->typingNotifyTask, TQT_SIGNAL( typingStarted( const TQString& ) ), + this, TQT_SIGNAL( userStartedTyping( const TQString& ) ) ); + connect( d->typingNotifyTask, TQT_SIGNAL( typingFinished( const TQString& ) ), + this, TQT_SIGNAL( userStoppedTyping( const TQString& ) ) ); } -void Client::removeGroup( const QString& groupName ) +void Client::removeGroup( const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -671,7 +671,7 @@ void Client::removeGroup( const QString& groupName ) delete ssimt; } -void Client::addGroup( const QString& groupName ) +void Client::addGroup( const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -685,7 +685,7 @@ void Client::addGroup( const QString& groupName ) delete ssimt; } -void Client::addContact( const QString& contactName, const QString& groupName ) +void Client::addContact( const TQString& contactName, const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -699,7 +699,7 @@ void Client::addContact( const QString& contactName, const QString& groupName ) delete ssimt; } -void Client::removeContact( const QString& contactName ) +void Client::removeContact( const TQString& contactName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -713,7 +713,7 @@ void Client::removeContact( const QString& contactName ) delete ssimt; } -void Client::renameGroup( const QString & oldGroupName, const QString & newGroupName ) +void Client::renameGroup( const TQString & oldGroupName, const TQString & newGroupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -764,7 +764,7 @@ void Client::modifySSIItem( const Oscar::SSI& oldItem, const Oscar::SSI& newItem } } -void Client::changeContactGroup( const QString& contact, const QString& newGroupName ) +void Client::changeContactGroup( const TQString& contact, const TQString& newGroupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -779,7 +779,7 @@ void Client::changeContactGroup( const QString& contact, const QString& newGroup delete ssimt; } -void Client::requestFullInfo( const QString& contactId ) +void Client::requestFullInfo( const TQString& contactId ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) @@ -789,7 +789,7 @@ void Client::requestFullInfo( const QString& contactId ) d->icqInfoTask->go(); } -void Client::requestShortInfo( const QString& contactId ) +void Client::requestShortInfo( const TQString& contactId ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) @@ -799,7 +799,7 @@ void Client::requestShortInfo( const QString& contactId ) d->icqInfoTask->go(); } -void Client::sendWarning( const QString& contact, bool anonymous ) +void Client::sendWarning( const TQString& contact, bool anonymous ) { Connection* c = d->connections.connectionForFamily( 0x0004 ); if ( !c ) @@ -807,62 +807,62 @@ void Client::sendWarning( const QString& contact, bool anonymous ) WarningTask* warnTask = new WarningTask( c->rootTask() ); warnTask->setContact( contact ); warnTask->setAnonymous( anonymous ); - QObject::connect( warnTask, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ), - this, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ) ); + TQObject::connect( warnTask, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ), + this, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ) ); warnTask->go( true ); } -ICQGeneralUserInfo Client::getGeneralInfo( const QString& contact ) +ICQGeneralUserInfo Client::getGeneralInfo( const TQString& contact ) { return d->icqInfoTask->generalInfoFor( contact ); } -ICQWorkUserInfo Client::getWorkInfo( const QString& contact ) +ICQWorkUserInfo Client::getWorkInfo( const TQString& contact ) { return d->icqInfoTask->workInfoFor( contact ); } -ICQEmailInfo Client::getEmailInfo( const QString& contact ) +ICQEmailInfo Client::getEmailInfo( const TQString& contact ) { return d->icqInfoTask->emailInfoFor( contact ); } -ICQMoreUserInfo Client::getMoreInfo( const QString& contact ) +ICQMoreUserInfo Client::getMoreInfo( const TQString& contact ) { return d->icqInfoTask->moreInfoFor( contact ); } -ICQInterestInfo Client::getInterestInfo( const QString& contact ) +ICQInterestInfo Client::getInterestInfo( const TQString& contact ) { return d->icqInfoTask->interestInfoFor( contact ); } -ICQShortInfo Client::getShortInfo( const QString& contact ) +ICQShortInfo Client::getShortInfo( const TQString& contact ) { return d->icqInfoTask->shortInfoFor( contact ); } -QValueList<int> Client::chatExchangeList() const +TQValueList<int> Client::chatExchangeList() const { return d->exchanges; } -void Client::setChatExchangeList( const QValueList<int>& exchanges ) +void Client::setChatExchangeList( const TQValueList<int>& exchanges ) { d->exchanges = exchanges; } -void Client::requestAIMProfile( const QString& contact ) +void Client::requestAIMProfile( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::Profile ); } -void Client::requestAIMAwayMessage( const QString& contact ) +void Client::requestAIMAwayMessage( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::AwayMessage ); } -void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactStatus ) +void Client::requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting away message for " << contact << endl; Oscar::Message msg; @@ -894,7 +894,7 @@ void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactSta sendMessage( msg ); } -void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contactStatus ) +void Client::addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "adding away message request for " << contact << " to queue" << endl; @@ -909,12 +909,12 @@ void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contact d->awayMsgRequestTimer->start( 1000 ); } -void Client::removeICQAwayMessageRequest( const QString& contact ) +void Client::removeICQAwayMessageRequest( const TQString& contact ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "removing away message request for " << contact << " from queue" << endl; - QValueList<ClientPrivate::AwayMsgRequest>::iterator it = d->awayMsgRequestQueue.begin(); + TQValueList<ClientPrivate::AwayMsgRequest>::iterator it = d->awayMsgRequestQueue.begin(); while ( it != d->awayMsgRequestQueue.end() ) { if ( (*it).contact == contact ) @@ -962,7 +962,7 @@ void Client::nextICQAwayMessageRequest() requestICQAwayMessage( amr.contact, amr.contactStatus ); } -void Client::requestStatusInfo( const QString& contact ) +void Client::requestStatusInfo( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::General ); } @@ -973,27 +973,27 @@ void Client::whitePagesSearch( const ICQWPSearchInfo& info ) if ( !c ) return; UserSearchTask* ust = new UserSearchTask( c->rootTask() ); - connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ), - this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); - connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) ); + connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ), + this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); + connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) ); ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works ust->searchWhitePages( info ); } -void Client::uinSearch( const QString& uin ) +void Client::uinSearch( const TQString& uin ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) return; UserSearchTask* ust = new UserSearchTask( c->rootTask() ); - connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ), - this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); - connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) ); + connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ), + this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); + connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) ); ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works ust->searchUserByUIN( uin ); } -void Client::updateProfile( const QString& profile ) +void Client::updateProfile( const TQString& profile ) { Connection* c = d->connections.connectionForFamily( 0x0002 ); if ( !c ) @@ -1003,7 +1003,7 @@ void Client::updateProfile( const QString& profile ) pt->go(true); } -void Client::sendTyping( const QString & contact, bool typing ) +void Client::sendTyping( const TQString & contact, bool typing ) { Connection* c = d->connections.connectionForFamily( 0x0004 ); if ( !c ) @@ -1022,7 +1022,7 @@ void Client::connectToIconServer() return; } -void Client::setIgnore( const QString& user, bool ignore ) +void Client::setIgnore( const TQString& user, bool ignore ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_IGNORE ); if ( item && !ignore ) @@ -1033,12 +1033,12 @@ void Client::setIgnore( const QString& user, bool ignore ) else if ( !item && ignore ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to ignore list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, QValueList<TLV>() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, TQValueList<TLV>() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::setVisibleTo( const QString& user, bool visible ) +void Client::setVisibleTo( const TQString& user, bool visible ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_VISIBLE ); if ( item && !visible ) @@ -1049,12 +1049,12 @@ void Client::setVisibleTo( const QString& user, bool visible ) else if ( !item && visible ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to visible list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, QValueList<TLV>() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, TQValueList<TLV>() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::setInvisibleTo( const QString& user, bool invisible ) +void Client::setInvisibleTo( const TQString& user, bool invisible ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_INVISIBLE ); if ( item && !invisible ) @@ -1065,20 +1065,20 @@ void Client::setInvisibleTo( const QString& user, bool invisible ) else if ( !item && invisible ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to invisible list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, QValueList<TLV>() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, TQValueList<TLV>() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE hashType ) +void Client::requestBuddyIcon( const TQString& user, const TQByteArray& hash, BYTE hashType ) { Connection* c = d->connections.connectionForFamily( 0x0010 ); if ( !c ) return; BuddyIconTask* bit = new BuddyIconTask( c->rootTask() ); - connect( bit, SIGNAL( haveIcon( const QString&, QByteArray ) ), - this, SIGNAL( haveIconForContact( const QString&, QByteArray ) ) ); + connect( bit, TQT_SIGNAL( haveIcon( const TQString&, TQByteArray ) ), + this, TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ) ); bit->requestIconFor( user ); bit->setHashType( hashType ); bit->setHash( hash ); @@ -1086,8 +1086,8 @@ void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE } void Client::requestServerRedirect( WORD family, WORD exchange, - QByteArray cookie, WORD instance, - const QString& room ) + TQByteArray cookie, WORD instance, + const TQString& room ) { //making the assumption that family 2 will always be the BOS connection //use it instead since we can't query for family 1 @@ -1116,21 +1116,21 @@ void Client::requestServerRedirect( WORD family, WORD exchange, srt->setChatRoom( room ); } - connect( srt, SIGNAL( haveServer( const QString&, const QByteArray&, WORD ) ), - this, SLOT( haveServerForRedirect( const QString&, const QByteArray&, WORD ) ) ); + connect( srt, TQT_SIGNAL( haveServer( const TQString&, const TQByteArray&, WORD ) ), + this, TQT_SLOT( haveServerForRedirect( const TQString&, const TQByteArray&, WORD ) ) ); srt->setService( family ); srt->go( true ); } -void Client::haveServerForRedirect( const QString& host, const QByteArray& cookie, WORD ) +void Client::haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD ) { //nasty sender() usage to get the task with chat room info - QObject* o = const_cast<QObject*>( sender() ); + TQObject* o = const_cast<TQObject*>( sender() ); ServerRedirectTask* srt = dynamic_cast<ServerRedirectTask*>( o ); //create a new connection and set it up int colonPos = host.find(':'); - QString realHost, realPort; + TQString realHost, realPort; if ( colonPos != -1 ) { realHost = host.left( colonPos ); @@ -1139,18 +1139,18 @@ void Client::haveServerForRedirect( const QString& host, const QByteArray& cooki else { realHost = host; - realPort = QString::fromLatin1("5190"); + realPort = TQString::fromLatin1("5190"); } Connection* c = createConnection( realHost, realPort ); //create the new login task m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() ); m_loginTaskTwo->setCookie( cookie ); - QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( serverRedirectFinished() ) ); + TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverRedirectFinished() ) ); //connect connectToServer( c, d->host, false ); - QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) ); + TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) ); if ( srt ) d->connections.addChatInfoForConnection( c, srt->chatExchange(), srt->chatRoomName() ); @@ -1176,8 +1176,8 @@ void Client::serverRedirectFinished() if ( d->currentRedirect == 0x000D ) { - connect( this, SIGNAL( chatNavigationConnected() ), - this, SLOT( requestChatNavLimits() ) ); + connect( this, TQT_SIGNAL( chatNavigationConnected() ), + this, TQT_SLOT( requestChatNavLimits() ) ); emit chatNavigationConnected(); } @@ -1192,18 +1192,18 @@ void Client::serverRedirectFinished() } Connection* c = m_loginTaskTwo->client(); - QString roomName = d->connections.chatRoomForConnection( c ); + TQString roomName = d->connections.chatRoomForConnection( c ); WORD exchange = d->connections.exchangeForConnection( c ); if ( c ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting up chat connection" << endl; ChatServiceTask* cst = new ChatServiceTask( c->rootTask(), exchange, roomName ); - connect( cst, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ), - this, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) ); - connect( cst, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ), - this, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) ); - connect( cst, SIGNAL( newChatMessage( const Oscar::Message& ) ), - this, SIGNAL( messageReceived( const Oscar::Message& ) ) ); + connect( cst, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) ); + connect( cst, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) ); + connect( cst, TQT_SIGNAL( newChatMessage( const Oscar::Message& ) ), + this, TQT_SIGNAL( messageReceived( const Oscar::Message& ) ) ); } emit chatRoomConnected( exchange, roomName ); } @@ -1234,19 +1234,19 @@ void Client::requestChatNavLimits() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting chat nav service limits" << endl; ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() ); cnst->setRequestType( ChatNavServiceTask::Limits ); - QObject::connect( cnst, SIGNAL( haveChatExchanges( const QValueList<int>& ) ), - this, SLOT( setChatExchangeList( const QValueList<int>& ) ) ); + TQObject::connect( cnst, TQT_SIGNAL( haveChatExchanges( const TQValueList<int>& ) ), + this, TQT_SLOT( setChatExchangeList( const TQValueList<int>& ) ) ); cnst->go( true ); //autodelete } -void Client::determineDisconnection( int code, const QString& string ) +void Client::determineDisconnection( int code, const TQString& string ) { if ( !sender() ) return; //yay for the sender() hack! - QObject* obj = const_cast<QObject*>( sender() ); + TQObject* obj = const_cast<TQObject*>( sender() ); Connection* c = dynamic_cast<Connection*>( obj ); if ( !c ) return; @@ -1262,7 +1262,7 @@ void Client::determineDisconnection( int code, const QString& string ) c = 0; } -void Client::sendBuddyIcon( const QByteArray& iconData ) +void Client::sendBuddyIcon( const TQByteArray& iconData ) { Connection* c = d->connections.connectionForFamily( 0x0010 ); if ( !c ) @@ -1274,7 +1274,7 @@ void Client::sendBuddyIcon( const QByteArray& iconData ) bit->go( true ); } -void Client::joinChatRoom( const QString& roomName, int exchange ) +void Client::joinChatRoom( const TQString& roomName, int exchange ) { Connection* c = d->connections.connectionForFamily( 0x000D ); if ( !c ) @@ -1283,21 +1283,21 @@ void Client::joinChatRoom( const QString& roomName, int exchange ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "joining the chat room '" << roomName << "' on exchange " << exchange << endl; ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() ); - connect( cnst, SIGNAL( connectChat( WORD, QByteArray, WORD, const QString& ) ), - this, SLOT( setupChatConnection( WORD, QByteArray, WORD, const QString& ) ) ); + connect( cnst, TQT_SIGNAL( connectChat( WORD, TQByteArray, WORD, const TQString& ) ), + this, TQT_SLOT( setupChatConnection( WORD, TQByteArray, WORD, const TQString& ) ) ); cnst->createRoom( exchange, roomName ); } -void Client::setupChatConnection( WORD exchange, QByteArray cookie, WORD instance, const QString& room ) +void Client::setupChatConnection( WORD exchange, TQByteArray cookie, WORD instance, const TQString& room ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "cookie is:" << cookie << endl; - QByteArray realCookie( cookie ); + TQByteArray realCookie( cookie ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "connection to chat room" << endl; requestServerRedirect( 0x000E, exchange, realCookie, instance, room ); } -void Client::disconnectChatRoom( WORD exchange, const QString& room ) +void Client::disconnectChatRoom( WORD exchange, const TQString& room ) { Connection* c = d->connections.connectionForChatRoom( exchange, room ); if ( !c ) @@ -1308,7 +1308,7 @@ void Client::disconnectChatRoom( WORD exchange, const QString& room ) } -Connection* Client::createConnection( const QString& host, const QString& port ) +Connection* Client::createConnection( const TQString& host, const TQString& port ) { KNetworkConnector* knc = new KNetworkConnector( 0 ); knc->setOptHostPort( host, port.toUInt() ); diff --git a/kopete/protocols/oscar/liboscar/client.h b/kopete/protocols/oscar/liboscar/client.h index f5dc531e..5c619c33 100644 --- a/kopete/protocols/oscar/liboscar/client.h +++ b/kopete/protocols/oscar/liboscar/client.h @@ -23,8 +23,8 @@ #ifndef LIBOSCAR_CLIENT_H #define LIBOSCAR_CLIENT_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include "kopete_export.h" #include "rtf2html.h" #include "transfer.h" @@ -56,8 +56,8 @@ public: class CodecProvider { public: virtual ~CodecProvider() {} - virtual QTextCodec* codecForContact( const QString& contactName ) const = 0; - virtual QTextCodec* codecForAccount() const = 0; + virtual TQTextCodec* codecForContact( const TQString& contactName ) const = 0; + virtual TQTextCodec* codecForAccount() const = 0; }; enum ErrorCodes { @@ -74,7 +74,7 @@ public: EXTERNAL API *************/ - Client(QObject *parent=0); + Client(TQObject *parent=0); ~Client(); /** @@ -89,7 +89,7 @@ public: * @param server the server to connect to - but this is also set on the connector used to construct the clientstream?? * @param auth indicate whether we're connecting to the authorizer or the bos server */ - void connectToServer( Connection *c, const QString& server, bool auth = true ); + void connectToServer( Connection *c, const TQString& server, bool auth = true ); /** * Start the login process for Oscar @@ -97,14 +97,14 @@ public: * @param user The user name to log in as. * @param pass The password to use when logging in */ - void start( const QString &host, const uint port, const QString &userId, const QString &pass ); + void start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ); /** Logout and disconnect */ void close(); /** Set our status for AIM */ - void setStatus( AIMStatus status, const QString &message = QString::null ); + void setStatus( AIMStatus status, const TQString &message = TQString::null ); /** Set our status for ICQ */ - void setStatus( DWORD status, const QString &message = QString::null ); + void setStatus( DWORD status, const TQString &message = TQString::null ); /** Retrieve our user info */ UserDetails ourInfo() const; @@ -114,35 +114,35 @@ public: * \param groupName the name of the group to remove * \return true if the group removal was successful */ - void removeGroup( const QString& groupName ); + void removeGroup( const TQString& groupName ); /** * Add a group from the contact list * \param groupName the name of the group to add * \return true if the group addition was successful */ - void addGroup( const QString& groupName ); + void addGroup( const TQString& groupName ); /** * Add a contact to the contact list * \param contactName the screen name of the new contact to add * \return true if the contact addition was successful */ - void addContact( const QString& contactName, const QString& groupName ); + void addContact( const TQString& contactName, const TQString& groupName ); /** * Remove a contact from the contact list * \param contactName the screen name of the contact to remove * \return true if the contact removal was successful */ - void removeContact( const QString &contactName ); + void removeContact( const TQString &contactName ); /** * Rename a group on the contact list * \param oldGroupName the old group name * \param newGroupName the new group name */ - void renameGroup( const QString& oldGroupName, const QString& newGroupName ); + void renameGroup( const TQString& oldGroupName, const TQString& newGroupName ); /** * Modify an SSI item on the SSI list @@ -155,7 +155,7 @@ public: * \param contact the contact to change * \param newGroup the new group to move the contact to */ - void changeContactGroup( const QString& contact, const QString& newGroupName ); + void changeContactGroup( const TQString& contact, const TQString& newGroupName ); /** * Send a message to a contact @@ -169,7 +169,7 @@ public: * \param contactid the id of the contact to request auth from * \param reason the reason for this authorization request */ - void requestAuth( const QString& contactid, const QString& reason ); + void requestAuth( const TQString& contactid, const TQString& reason ); /** * Grant or decline authorization to a contact @@ -177,128 +177,128 @@ public: * \param reason the reason to grant/decline authorization * \param auth grant or decline authorization */ - void sendAuth( const QString& contactid, const QString& reason, bool auth=true ); + void sendAuth( const TQString& contactid, const TQString& reason, bool auth=true ); /** * Request full user info from an ICQ contact * \param contactId the UIN of the contact to get info for */ - void requestFullInfo( const QString& contactId ); + void requestFullInfo( const TQString& contactId ); /** * Request short info for an ICQ contact * \param contactId the UIN of the contact to get info for */ - void requestShortInfo( const QString& contactId ); + void requestShortInfo( const TQString& contactId ); /** * Send a warning to the OSCAR servers about a contact * \param contact the contact to send the warning to * \param anon indicate whether to do it anonymously */ - void sendWarning( const QString& contact, bool anonymous ); + void sendWarning( const TQString& contact, bool anonymous ); /** * Get the general ICQ info for a client * \param contact the contact to get info for */ - ICQGeneralUserInfo getGeneralInfo( const QString& contact ); + ICQGeneralUserInfo getGeneralInfo( const TQString& contact ); /** * Get the work info for a contact * \param contact the contact to get info for */ - ICQWorkUserInfo getWorkInfo( const QString& contact ); + ICQWorkUserInfo getWorkInfo( const TQString& contact ); /** * Get the email info for a contact * \param contact the contact to get info for */ - ICQEmailInfo getEmailInfo( const QString& contact ); + ICQEmailInfo getEmailInfo( const TQString& contact ); /** * Get the additional info available for a contact * \param contact the contact to get info for */ - ICQMoreUserInfo getMoreInfo( const QString& contact ); + ICQMoreUserInfo getMoreInfo( const TQString& contact ); /** * Get the interest info available for a contact * \param contact the contact to get info for */ - ICQInterestInfo getInterestInfo( const QString& contact ); + ICQInterestInfo getInterestInfo( const TQString& contact ); /** * Get the short info available for an icq contact * \param contact the contact to get info for */ - ICQShortInfo getShortInfo( const QString& contact ); + ICQShortInfo getShortInfo( const TQString& contact ); /** * Get the list of chat room exchanges we have */ - QValueList<int> chatExchangeList() const; + TQValueList<int> chatExchangeList() const; /** * Request the aim profile * \param contact the contact to get info for */ - void requestAIMProfile( const QString& contact ); + void requestAIMProfile( const TQString& contact ); /** * Request the aim away message * \param contact the contact to get info for */ - void requestAIMAwayMessage( const QString& contact ); + void requestAIMAwayMessage( const TQString& contact ); /** * Add the icq away message request to queue * \param contact the contact to get info for */ - void addICQAwayMessageRequest( const QString& contact, ICQStatus contactStatus ); + void addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ); /** * Remove the icq away message request from queue * \param contact the contact to get info for */ - void removeICQAwayMessageRequest( const QString& contact ); + void removeICQAwayMessageRequest( const TQString& contact ); /** Request the extended status info */ - void requestStatusInfo( const QString& contact ); + void requestStatusInfo( const TQString& contact ); //! Run a whitepages search void whitePagesSearch( const ICQWPSearchInfo& info ); //! Run a UIN search - void uinSearch( const QString& uin ); + void uinSearch( const TQString& uin ); //! Update the user's AIM profile - void updateProfile( const QString& profile ); + void updateProfile( const TQString& profile ); //! Get buddy icon information for a person - void requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE hashType ); + void requestBuddyIcon( const TQString& user, const TQByteArray& hash, BYTE hashType ); //! Start a server redirect for a different service - void requestServerRedirect( WORD family, WORD e = 0, QByteArray c = QByteArray(), - WORD instance = 0, const QString& room = QString::null ); + void requestServerRedirect( WORD family, WORD e = 0, TQByteArray c = TQByteArray(), + WORD instance = 0, const TQString& room = TQString::null ); //! Start uploading a buddy icon - void sendBuddyIcon( const QByteArray& imageData ); + void sendBuddyIcon( const TQByteArray& imageData ); - void joinChatRoom( const QString& roomName, int exchange ); + void joinChatRoom( const TQString& roomName, int exchange ); - void setIgnore( const QString& user, bool ignore ); + void setIgnore( const TQString& user, bool ignore ); - void setVisibleTo( const QString& user, bool visible ); + void setVisibleTo( const TQString& user, bool visible ); - void setInvisibleTo( const QString& user, bool invisible ); + void setInvisibleTo( const TQString& user, bool invisible ); /** Accessors needed for login */ - QString host(); + TQString host(); int port(); /** Send a typing notification */ - void sendTyping( const QString & contact, bool typing ); + void sendTyping( const TQString & contact, bool typing ); /** Make a connection to the icon server */ void connectToIconServer(); @@ -306,7 +306,7 @@ public: bool hasIconConnection() const; /** We've finished chatting in a chat room, disconnect from it */ - void disconnectChatRoom( WORD exchange, const QString& room ); + void disconnectChatRoom( WORD exchange, const TQString& room ); /** Set codec provider */ void setCodecProvider( CodecProvider* codecProvider ); @@ -320,7 +320,7 @@ public: /** * Print a debug statement */ - void debug( const QString &str ); + void debug( const TQString &str ); /** Have we logged in yet? */ bool isActive() const; @@ -332,29 +332,29 @@ public: const Oscar::ClientVersion* version() const; /** The current user's user ID */ - QString userId() const; + TQString userId() const; /** The current user's password */ - QString password() const; + TQString password() const; /** The current status message (a.k.a. away message) */ - QString statusMessage() const; + TQString statusMessage() const; /** Change the current status message w/o changing status */ - void setStatusMessage( const QString &message ); + void setStatusMessage( const TQString &message ); /** ICQ Settings */ bool isIcq() const; void setIsIcq( bool isIcq ); /** Host's IP address */ - QCString ipAddress() const; + TQCString ipAddress() const; /** Notify that a task error was received */ void notifyTaskError( const Oscar::SNAC& s, int errCode, bool fatal ); /** Notify that a socket error has occured */ - void notifySocketError( int errCode, const QString& msg ); + void notifySocketError( int errCode, const TQString& msg ); signals: /** CONNECTION EVENTS */ @@ -378,19 +378,19 @@ signals: void haveSSIList(); /** a user is online. */ - void userIsOnline( const QString& ); + void userIsOnline( const TQString& ); /** a user is offline. */ - void userIsOffline( const QString& ); + void userIsOffline( const TQString& ); /** we've received a message */ void messageReceived( const Oscar::Message& ); /** we've received an authorization request */ - void authRequestReceived( const QString& contact, const QString& reason ); + void authRequestReceived( const TQString& contact, const TQString& reason ); /** we've received an authorization reply */ - void authReplyReceived( const QString& contact, const QString& reason, bool auth ); + void authReplyReceived( const TQString& contact, const TQString& reason, bool auth ); /** * we've received an error from a task and need to notify somebody @@ -400,37 +400,37 @@ signals: /** * we've received a socket error and need to notify somebody */ - void socketError( int errCode, const QString& msg ); + void socketError( int errCode, const TQString& msg ); - void receivedIcqShortInfo( const QString& contact ); - void receivedIcqLongInfo( const QString& contact ); + void receivedIcqShortInfo( const TQString& contact ); + void receivedIcqLongInfo( const TQString& contact ); - void receivedProfile( const QString& contact, const QString& profile ); - void receivedAwayMessage( const QString& contact, const QString& message ); + void receivedProfile( const TQString& contact, const TQString& profile ); + void receivedAwayMessage( const TQString& contact, const TQString& message ); void receivedAwayMessage( const Oscar::Message& message ); - void receivedUserInfo( const QString& contact, const UserDetails& details ); + void receivedUserInfo( const TQString& contact, const UserDetails& details ); /** We warned a user */ - void userWarned( const QString& contact, Q_UINT16 increase, Q_UINT16 newLevel ); + void userWarned( const TQString& contact, Q_UINT16 increase, Q_UINT16 newLevel ); /** Search signals */ void gotSearchResults( const ICQSearchResult& ); void endOfSearch( int); /* Typing signals */ - void userStartedTyping( const QString& contact ); - void userStoppedTyping( const QString& contact ); + void userStartedTyping( const TQString& contact ); + void userStoppedTyping( const TQString& contact ); /* Buddy icons */ - void haveIconForContact( const QString&, QByteArray iconData ); + void haveIconForContact( const TQString&, TQByteArray iconData ); void iconServerConnected(); void iconNeedsUploading(); /* Chat rooms */ void chatNavigationConnected(); - void chatRoomConnected( WORD, const QString& ); - void userJoinedChat( Oscar::WORD, const QString& room, const QString& contact ); - void userLeftChat( Oscar::WORD, const QString& room, const QString& contact ); + void chatRoomConnected( WORD, const TQString& ); + void userJoinedChat( Oscar::WORD, const TQString& room, const TQString& contact ); + void userLeftChat( Oscar::WORD, const TQString& room, const TQString& contact ); /* service redirection */ void redirectionFinished( WORD ); @@ -459,7 +459,7 @@ protected slots: void serviceSetupFinished(); /** we have icq info for a contact */ - void receivedIcqInfo( const QString& contact, unsigned int type ); + void receivedIcqInfo( const TQString& contact, unsigned int type ); /** we have normal user info for a contact */ void receivedInfo( Q_UINT16 sequence ); @@ -467,9 +467,9 @@ protected slots: /** received a message of some kind */ void receivedMessage( const Oscar::Message& msg ); - void offlineUser( const QString&, const UserDetails& ); + void offlineUser( const TQString&, const UserDetails& ); - void haveServerForRedirect( const QString& host, const QByteArray& cookie, WORD family ); + void haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD family ); void serverRedirectFinished(); void checkRedirectionQueue( WORD ); @@ -477,15 +477,15 @@ protected slots: /** * Set the list of chat room exchanges we have */ - void setChatExchangeList( const QValueList<int>& exchanges ); + void setChatExchangeList( const TQValueList<int>& exchanges ); /** * set up the connection to a chat room */ - void setupChatConnection( WORD, QByteArray, WORD, const QString& ); + void setupChatConnection( WORD, TQByteArray, WORD, const TQString& ); - void determineDisconnection( int, const QString& ); + void determineDisconnection( int, const TQString& ); void nextICQAwayMessageRequest(); @@ -497,14 +497,14 @@ private: /** Delete the static tasks */ void deleteStaticTasks(); - Connection* createConnection( const QString& host, const QString& port ); + Connection* createConnection( const TQString& host, const TQString& port ); /** * Request the icq away message * \param contact the contact to get info for */ //TODO only made a default for testing w/o frontend - void requestICQAwayMessage( const QString& contact, ICQStatus contactStatus = ICQAway ); + void requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus = ICQAway ); private: class ClientPrivate; diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.cpp b/kopete/protocols/oscar/liboscar/clientreadytask.cpp index 3338f7b3..d5b65069 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.cpp +++ b/kopete/protocols/oscar/liboscar/clientreadytask.cpp @@ -38,7 +38,7 @@ ClientReadyTask::~ClientReadyTask() { } -void ClientReadyTask::setFamilies( const QValueList<int>& families ) +void ClientReadyTask::setFamilies( const TQValueList<int>& families ) { m_familyList = families; } @@ -52,8 +52,8 @@ void ClientReadyTask::onGo() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Sending client ready, end of login" << endl; //nasty nasty nasty hack to get all the packets to work - QValueList<int>::const_iterator rcEnd = m_familyList.constEnd(); - for ( QValueList<int>::const_iterator it = m_familyList.constBegin(); it != rcEnd; ++it ) + TQValueList<int>::const_iterator rcEnd = m_familyList.constEnd(); + for ( TQValueList<int>::const_iterator it = m_familyList.constBegin(); it != rcEnd; ++it ) { //I have no idea what any of these values mean. I just copied them from oscarsocket int i = ( *it ); @@ -102,7 +102,7 @@ void ClientReadyTask::onGo() //with the hell that is oscar login. (just wait until you get a message) Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.h b/kopete/protocols/oscar/liboscar/clientreadytask.h index 4a9ea941..d632351f 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.h +++ b/kopete/protocols/oscar/liboscar/clientreadytask.h @@ -20,7 +20,7 @@ #include "task.h" #include "rateclass.h" -#include "qvaluelist.h" +#include "tqvaluelist.h" /** Fire and forget task to let the server know we're ready @@ -34,11 +34,11 @@ public: ~ClientReadyTask(); virtual void onGo(); - void setFamilies( const QValueList<int>& families ); + void setFamilies( const TQValueList<int>& families ); private: - QValueList<RateClass*> m_classList; - QValueList<int> m_familyList; + TQValueList<RateClass*> m_classList; + TQValueList<int> m_familyList; }; #endif diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp index 54926949..3b062b2a 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp @@ -18,8 +18,8 @@ #include "closeconnectiontask.h" -#include <qstring.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kdebug.h> #include <klocale.h> #include "connection.h" @@ -38,24 +38,24 @@ CloseConnectionTask::~CloseConnectionTask() { } -const QByteArray& CloseConnectionTask::cookie() const +const TQByteArray& CloseConnectionTask::cookie() const { return m_cookie; } -const QString& CloseConnectionTask::bosHost() const +const TQString& CloseConnectionTask::bosHost() const { return m_bosHost; } -const QString& CloseConnectionTask::bosPort() const +const TQString& CloseConnectionTask::bosPort() const { return m_bosPort; } bool CloseConnectionTask::take( Transfer* transfer ) { - QString errorReason; + TQString errorReason; WORD errorNum = 0; if ( forMe( transfer ) ) { @@ -70,12 +70,12 @@ bool CloseConnectionTask::take( Transfer* transfer ) return false; } - QValueList<TLV> tlvList = ft->buffer()->getTLVList(); + TQValueList<TLV> tlvList = ft->buffer()->getTLVList(); TLV uin = findTLV( tlvList, 0x0001 ); if ( uin ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [UIN], uin=" << QString( uin.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [UIN], uin=" << TQString( uin.data ) << endl; } TLV err = findTLV( tlvList, 0x0008 ); @@ -96,8 +96,8 @@ bool CloseConnectionTask::take( Transfer* transfer ) TLV server = findTLV( tlvList, 0x0005 ); if ( server ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << QString( server.data ) << endl; - QString ip = server.data; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << TQString( server.data ) << endl; + TQString ip = server.data; int index = ip.find( ':' ); m_bosHost = ip.left( index ); ip.remove( 0 , index+1 ); //get rid of the colon and everything before it diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.h b/kopete/protocols/oscar/liboscar/closeconnectiontask.h index b241b07e..35c2ed18 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.h +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.h @@ -20,7 +20,7 @@ #define CLOSECONNECTIONTASK_H #include <task.h> -#include <qcstring.h> +#include <tqcstring.h> class Transfer; class QString; @@ -38,21 +38,21 @@ public: virtual bool take(Transfer* transfer); //Protocol specific stuff - const QByteArray& cookie() const; - const QString& bosHost() const; - const QString& bosPort() const; + const TQByteArray& cookie() const; + const TQString& bosHost() const; + const TQString& bosPort() const; protected: virtual bool forMe(const Transfer* transfer) const; private: - bool parseDisconnectCode( int error, QString& reason ); + bool parseDisconnectCode( int error, TQString& reason ); private: - QByteArray m_cookie; - QString m_bosHost; - QString m_bosPort; + TQByteArray m_cookie; + TQString m_bosHost; + TQString m_bosPort; }; diff --git a/kopete/protocols/oscar/liboscar/connection.cpp b/kopete/protocols/oscar/liboscar/connection.cpp index c7cbc0fe..a4bc4877 100644 --- a/kopete/protocols/oscar/liboscar/connection.cpp +++ b/kopete/protocols/oscar/liboscar/connection.cpp @@ -38,7 +38,7 @@ public: DWORD snacSequence; WORD flapSequence; - QValueList<int> familyList; + TQValueList<int> familyList; RateClassManager* rateClassManager; ClientStream* clientStream; @@ -51,7 +51,7 @@ public: Connection::Connection( Connector* connector, ClientStream* cs, const char* name ) -: QObject( 0, name ) +: TQObject( 0, name ) { d = new ConnectionPrivate(); d->clientStream = cs; @@ -77,14 +77,14 @@ Connection::~Connection() void Connection::setClient( Client* c ) { d->client = c; - connect( c, SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); + connect( c, TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loggedIn() ) ); } -void Connection::connectToServer( const QString& host, bool auth ) +void Connection::connectToServer( const TQString& host, bool auth ) { - connect( d->clientStream, SIGNAL( error( int ) ), this, SLOT( streamSocketError( int ) ) ); - connect( d->clientStream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); - connect( d->clientStream, SIGNAL( connected() ), this, SIGNAL( connected() ) ); + connect( d->clientStream, TQT_SIGNAL( error( int ) ), this, TQT_SLOT( streamSocketError( int ) ) ); + connect( d->clientStream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); + connect( d->clientStream, TQT_SIGNAL( connected() ), this, TQT_SIGNAL( connected() ) ); d->clientStream->connectToServer( host, auth ); } @@ -99,12 +99,12 @@ bool Connection::isSupported( int family ) const return ( d->familyList.findIndex( family ) != -1 ); } -QValueList<int> Connection::supportedFamilies() const +TQValueList<int> Connection::supportedFamilies() const { return d->familyList; } -void Connection::addToSupportedFamilies( const QValueList<int>& familyList ) +void Connection::addToSupportedFamilies( const TQValueList<int>& familyList ) { d->familyList += familyList; } @@ -144,12 +144,12 @@ Q_UINT32 Connection::snacSequence() return d->snacSequence; } -QString Connection::userId() const +TQString Connection::userId() const { return d->client->userId(); } -QString Connection::password() const +TQString Connection::password() const { return d->client->password(); } diff --git a/kopete/protocols/oscar/liboscar/connection.h b/kopete/protocols/oscar/liboscar/connection.h index 4170857e..f2c1da75 100644 --- a/kopete/protocols/oscar/liboscar/connection.h +++ b/kopete/protocols/oscar/liboscar/connection.h @@ -18,8 +18,8 @@ Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org> #ifndef CONNECTION_H #define CONNECTION_H -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> #include "oscartypes.h" #include "rateclass.h" @@ -55,7 +55,7 @@ public: void setClient( Client* ); - void connectToServer( const QString& server, bool auth = true ); + void connectToServer( const TQString& server, bool auth = true ); /** * Close the connection and reset the connection data */ @@ -72,14 +72,14 @@ public: * Get the list of supported families * @return The list of families supported on this connection */ - QValueList<int> supportedFamilies() const; + TQValueList<int> supportedFamilies() const; /** * Add the SNAC families in \p familyList to the list of supported families for * this connection * \param familyList the list of families to add */ - void addToSupportedFamilies( const QValueList<int>& familyList ); + void addToSupportedFamilies( const TQValueList<int>& familyList ); /** * Add the SNAC family in \p family to the list of supported families for @@ -94,7 +94,7 @@ public: * need to be filtered on * \param rateClassList the list of rate classes to add */ - void addToRateClasses( const QValueList<RateClass*> rateClassList ); + void addToRateClasses( const TQValueList<RateClass*> rateClassList ); /** * Add the rate class in \p rc to the list of rate classes packets @@ -125,7 +125,7 @@ public: /** * Get the chat room name for this connection. - * @return the name of the room or QString::null if not connected to a room + * @return the name of the room or TQString::null if not connected to a room */ /** Get the user settings object */ @@ -138,10 +138,10 @@ public: Q_UINT32 snacSequence(); /** Get the cookie for this connection */ - QByteArray cookie() const; + TQByteArray cookie() const; - QString userId() const; - QString password() const; + TQString userId() const; + TQString password() const; bool isIcq() const; SSIManager* ssiManager() const; const Oscar::ClientVersion* version() const; @@ -176,7 +176,7 @@ signals: * \param errCode the error code from the operating system * \param errString the i18n'ed string that describes the error */ - void socketError( int errCode, const QString& errString ); + void socketError( int errCode, const TQString& errString ); private: diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.cpp b/kopete/protocols/oscar/liboscar/connectionhandler.cpp index bf5706ee..bd4df3c5 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.cpp +++ b/kopete/protocols/oscar/liboscar/connectionhandler.cpp @@ -17,7 +17,7 @@ */ #include "connectionhandler.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdebug.h> #include "connection.h" #include "oscartypes.h" @@ -25,8 +25,8 @@ class ConnectionHandler::Private { public: - QValueList<Connection*> connections; - QMap<Connection*, ConnectionRoomInfo> chatRoomConnections; + TQValueList<Connection*> connections; + TQMap<Connection*, ConnectionRoomInfo> chatRoomConnections; }; ConnectionHandler::ConnectionHandler() @@ -57,8 +57,8 @@ void ConnectionHandler::remove( int family ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing all connections " << "supporting family " << family << endl; - QValueList<Connection*>::iterator it = d->connections.begin(); - QValueList<Connection*>::iterator itEnd = d->connections.end(); + TQValueList<Connection*>::iterator it = d->connections.begin(); + TQValueList<Connection*>::iterator itEnd = d->connections.end(); for ( ; it != itEnd; ++it ) { if ( ( *it )->isSupported( family ) ) @@ -84,8 +84,8 @@ void ConnectionHandler::clear() Connection* ConnectionHandler::connectionForFamily( int family ) const { - QValueList<Connection*>::iterator it = d->connections.begin(); - QValueList<Connection*>::iterator itEnd = d->connections.end(); + TQValueList<Connection*>::iterator it = d->connections.begin(); + TQValueList<Connection*>::iterator itEnd = d->connections.end(); int connectionCount = 0; Connection* lastConnection = 0; for ( ; it != itEnd; ++it ) @@ -110,7 +110,7 @@ Connection* ConnectionHandler::defaultConnection() const return d->connections.first(); } -void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const QString& room ) +void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const TQString& room ) { if ( d->connections.findIndex( c ) == -1 ) d->connections.append( c ); @@ -119,10 +119,10 @@ void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exc d->chatRoomConnections[c] = info; } -Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, const QString& room ) +Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, const TQString& room ) { ConnectionRoomInfo infoToFind = qMakePair( exchange, room ); - QMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.data() == infoToFind ) @@ -135,22 +135,22 @@ Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, cons return 0; } -QString ConnectionHandler::chatRoomForConnection( Connection* c ) +TQString ConnectionHandler::chatRoomForConnection( Connection* c ) { if ( d->connections.findIndex( c ) == -1 ) - return QString::null; + return TQString::null; - QMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.key() == c ) { - QString room = it.data().second; + TQString room = it.data().second; return room; } } - return QString::null; + return TQString::null; } Oscar::WORD ConnectionHandler::exchangeForConnection( Connection* c ) @@ -159,7 +159,7 @@ Oscar::WORD ConnectionHandler::exchangeForConnection( Connection* c ) if ( d->connections.findIndex( c ) == -1 ) return 0xFFFF; - QMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.key() == c ) diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.h b/kopete/protocols/oscar/liboscar/connectionhandler.h index 6094cab3..e8c50b12 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.h +++ b/kopete/protocols/oscar/liboscar/connectionhandler.h @@ -20,13 +20,13 @@ #define CONNECTIONHANDLER_H #include "oscartypes.h" -#include <qstring.h> -#include <qpair.h> +#include <tqstring.h> +#include <tqpair.h> class Connection; -typedef QPair<Oscar::WORD, QString> ConnectionRoomInfo; +typedef QPair<Oscar::WORD, TQString> ConnectionRoomInfo; /** @author Kopete Developers @@ -84,7 +84,7 @@ public: * @param exchange the exchange the chat room is in * @param room the name of the chat room */ - void addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const QString& room ); + void addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const TQString& room ); /** * Get the connection for a particular room name and exchange number. @@ -92,15 +92,15 @@ public: * @param room the name of the chat room to find a connection for * @return a Connection for the chat room or 0L if no connection for that room */ - Connection* connectionForChatRoom( Oscar::WORD exchange, const QString& room ); + Connection* connectionForChatRoom( Oscar::WORD exchange, const TQString& room ); /** * Get the room name for the chat room based the connection * @return The name of the chat room that this connection is connected to * If the connection passed in by @p c is not a chat room connection then - * QString::null is returned. + * TQString::null is returned. */ - QString chatRoomForConnection( Connection* c ); + TQString chatRoomForConnection( Connection* c ); /** * Get the exchange number for the chat room based on the connection diff --git a/kopete/protocols/oscar/liboscar/connector.cpp b/kopete/protocols/oscar/liboscar/connector.cpp index 03a61882..c754e2d3 100644 --- a/kopete/protocols/oscar/liboscar/connector.cpp +++ b/kopete/protocols/oscar/liboscar/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setPeerAddressNone(); } @@ -35,7 +35,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -48,11 +48,11 @@ Q_UINT16 Connector::peerPort() const void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/oscar/liboscar/connector.h b/kopete/protocols/oscar/liboscar/connector.h index fd673163..3844ba49 100644 --- a/kopete/protocols/oscar/liboscar/connector.h +++ b/kopete/protocols/oscar/liboscar/connector.h @@ -22,8 +22,8 @@ #define LIBOSCAR_CONNECTOR_H -#include <qobject.h> -#include "qhostaddress.h" +#include <tqobject.h> +#include "tqhostaddress.h" class ByteStream; @@ -31,15 +31,15 @@ class Connector : public QObject { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -48,11 +48,11 @@ signals: protected: void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.cpp b/kopete/protocols/oscar/liboscar/coreprotocol.cpp index 4f114039..918b3751 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/coreprotocol.cpp @@ -24,9 +24,9 @@ #include "coreprotocol.h" -#include <qdatastream.h> -#include <qdatetime.h> -#include <qtextstream.h> +#include <tqdatastream.h> +#include <tqdatetime.h> +#include <tqtextstream.h> #include <kdebug.h> #include <ctype.h> @@ -36,16 +36,16 @@ #include "flapprotocol.h" #include "snacprotocol.h" -static QString toString( const QByteArray& buffer ) +static TQString toString( const TQByteArray& buffer ) { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; + TQByteArray::ConstIterator it; for ( it = buffer.begin(); it != buffer.end(); ++it ) { i++; @@ -54,7 +54,7 @@ static QString toString( const QByteArray& buffer ) if ( c < 0x10 ) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -62,8 +62,8 @@ static QString toString( const QByteArray& buffer ) { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -77,7 +77,7 @@ static QString toString( const QByteArray& buffer ) using namespace Oscar; -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_snacProtocol = new SnacProtocol( this, "snacprotocol" ); m_flapProtocol = new FlapProtocol( this, "flapprotocol" ); @@ -92,7 +92,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Received " << incomingBytes.count() << " bytes. " << endl; // store locally @@ -114,7 +114,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "more data in chunk!" << endl; // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -149,7 +149,7 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef OSCAR_COREPROTOCOL_DEBUG kdDebug(OSCAR_RAW_DEBUG) << "contains: " << bytes.count() << " bytes" << endl; @@ -174,7 +174,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) return; } -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { // processing incoming data and reassembling it into transfers // may be an event or a response @@ -194,13 +194,13 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) return bytesParsed; } - QDataStream din( wire, IO_ReadOnly ); + TQDataStream din( wire, IO_ReadOnly ); // look at first four bytes and decide what to do with the chunk if ( okToProceed( din ) ) { din >> flapStart; - QByteArray packet; + TQByteArray packet; packet.duplicate( wire ); if ( flapStart == 0x2A ) { @@ -264,12 +264,12 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -void CoreProtocol::slotOutgoingData( const QCString &out ) +void CoreProtocol::slotOutgoingData( const TQCString &out ) { kdDebug(OSCAR_RAW_DEBUG) << out.data() << endl; } -bool CoreProtocol::okToProceed( const QDataStream &din ) +bool CoreProtocol::okToProceed( const TQDataStream &din ) { if ( din.atEnd() ) { diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.h b/kopete/protocols/oscar/liboscar/coreprotocol.h index f49396af..bbc9b693 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.h +++ b/kopete/protocols/oscar/liboscar/coreprotocol.h @@ -21,9 +21,9 @@ #ifndef GW_CORE_PROTOCOL_H #define GW_CORE_PROTOCOL_H -#include <qcstring.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqcstring.h> +#include <tqobject.h> +#include <tqptrlist.h> class FlapProtocol; class SnacProtocol; @@ -49,7 +49,7 @@ public: * This requires parsing out each FLAP, etc. from the incoming data * @param incomingBytes Raw data in wire format. */ - void addIncomingData( const QByteArray& incomingBytes ); + void addIncomingData( const TQByteArray& incomingBytes ); /** * @return the incoming transfer or 0 if none is available. @@ -71,7 +71,7 @@ signals: /** * Emitted as the core protocol converts fields to wire ready data */ - void outgoingData( const QByteArray& ); + void outgoingData( const TQByteArray& ); /** * Emitted when there is incoming data, parsed into a Transfer @@ -81,21 +81,21 @@ protected slots: /** * Just a debug method to test emitting to the socket, atm - should go to the ClientStream */ - void slotOutgoingData( const QCString & ); + void slotOutgoingData( const TQCString & ); protected: /** * Check that there is data to read, and set the protocol's state if there isn't any. */ - bool okToProceed( const QDataStream &din ); + bool okToProceed( const TQDataStream &din ); /** * Convert incoming wire data into a Transfer object and queue it * @return number of bytes from the input that were parsed into a Transfer */ - int wireToTransfer( const QByteArray& wire ); + int wireToTransfer( const TQByteArray& wire ); private: - QByteArray m_in; // buffer containing unprocessed bytes we received + TQByteArray m_in; // buffer containing unprocessed bytes we received int m_error; Transfer* m_inTransfer; // the transfer that is being received int m_state; // represents the protocol's overall state diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.cpp b/kopete/protocols/oscar/liboscar/flapprotocol.cpp index c5dc04ed..f5e9fa03 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/flapprotocol.cpp @@ -19,16 +19,16 @@ #include "flapprotocol.h" -#include <qcstring.h> -#include <qdatastream.h> -#include <qobject.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqobject.h> #include <kdebug.h> #include "transfer.h" using namespace Oscar; -FlapProtocol::FlapProtocol(QObject *parent, const char *name) +FlapProtocol::FlapProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -37,9 +37,9 @@ FlapProtocol::~FlapProtocol() { } -Transfer* FlapProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* FlapProtocol::parse( const TQByteArray & packet, uint& bytes ) { - QDataStream* m_din = new QDataStream( packet, IO_ReadOnly ); + TQDataStream* m_din = new TQDataStream( packet, IO_ReadOnly ); BYTE b; WORD w; diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.h b/kopete/protocols/oscar/liboscar/flapprotocol.h index d61cf6c4..3d6de53b 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.h +++ b/kopete/protocols/oscar/liboscar/flapprotocol.h @@ -29,7 +29,7 @@ class FlapProtocol : public InputProtocolBase { Q_OBJECT public: - FlapProtocol( QObject *parent = 0, const char *name = 0 ); + FlapProtocol( TQObject *parent = 0, const char *name = 0 ); ~FlapProtocol(); /** @@ -39,7 +39,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an FlapTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; diff --git a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp index 960d4ee5..5b00a8fd 100644 --- a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp @@ -137,7 +137,7 @@ void ICBMParamsTask::sendMessageParams( int channel ) Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } //kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/icqlogintask.cpp b/kopete/protocols/oscar/liboscar/icqlogintask.cpp index c9f5cd52..76feaf42 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/icqlogintask.cpp @@ -18,7 +18,7 @@ #include "icqlogintask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "transfer.h" #include "connection.h" @@ -54,7 +54,7 @@ void IcqLoginTask::onGo() DWORD flapVersion = 0x00000001; Buffer *outbuf = new Buffer(); - QString encodedPassword = encodePassword( client()->password() ); + TQString encodedPassword = encodePassword( client()->password() ); const Oscar::ClientVersion* version = client()->version(); outbuf->addDWord( flapVersion ); @@ -78,14 +78,14 @@ void IcqLoginTask::onGo() } -QString IcqLoginTask::encodePassword( const QString& loginPassword ) +TQString IcqLoginTask::encodePassword( const TQString& loginPassword ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Called." << endl; // TODO: check if latin1 is the right conversion const char *password = loginPassword.latin1(); unsigned int i = 0; - QString encodedPassword = QString::null; + TQString encodedPassword = TQString::null; //encoding table used in ICQ password XOR transformation unsigned char encoding_table[] = diff --git a/kopete/protocols/oscar/liboscar/icqlogintask.h b/kopete/protocols/oscar/liboscar/icqlogintask.h index 45fb3eb6..3bce47f1 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.h +++ b/kopete/protocols/oscar/liboscar/icqlogintask.h @@ -40,7 +40,7 @@ protected: bool forMe( Transfer* transfer ) const; private: - QString encodePassword( const QString& pw ); + TQString encodePassword( const TQString& pw ); }; diff --git a/kopete/protocols/oscar/liboscar/icqtask.cpp b/kopete/protocols/oscar/liboscar/icqtask.cpp index a383922f..bb58a9c4 100644 --- a/kopete/protocols/oscar/liboscar/icqtask.cpp +++ b/kopete/protocols/oscar/liboscar/icqtask.cpp @@ -20,7 +20,7 @@ #include "buffer.h" #include "connection.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> @@ -69,8 +69,8 @@ void ICQTask::parseInitialData( Buffer buf ) m_requestSubType = 0xFFFF; /*kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "uin: " << m_icquin << " sequence: " << sequence - <<" request type: 0x" << QString::number( m_requestType, 16 ) - << " request sub type: 0x" << QString::number( m_requestSubType, 16 ) << endl;*/ + <<" request type: 0x" << TQString::number( m_requestType, 16 ) + << " request sub type: 0x" << TQString::number( m_requestSubType, 16 ) << endl;*/ } Buffer* ICQTask::addInitialData( Buffer* buf ) const @@ -89,8 +89,8 @@ Buffer* ICQTask::addInitialData( Buffer* buf ) const tlvData->addLEWord( m_requestSubType ); /*kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "uin: " << m_icquin << " sequence: " << sequence - <<" request type: 0x" << QString::number( m_requestType, 16 ) - << " request sub type: 0x" << QString::number( m_requestSubType, 16 ) << endl; */ + <<" request type: 0x" << TQString::number( m_requestType, 16 ) + << " request sub type: 0x" << TQString::number( m_requestSubType, 16 ) << endl; */ if ( buf != 0 ) tlvData->addString( buf->buffer(), buf->length() ); diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.cpp b/kopete/protocols/oscar/liboscar/icquserinfo.cpp index f853c045..bc37d313 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfo.cpp @@ -132,9 +132,9 @@ void ICQMoreUserInfo::fill( Buffer* buffer ) // set birthday to NULL if at least one of the values in the buffer is 0 if ( year == 0 || month == 0 || day == 0 ) - birthday = QDate(); + birthday = TQDate(); else - birthday = QDate( year, month, day ); + birthday = TQDate( year, month, day ); lang1 = buffer->getByte(); lang2 = buffer->getByte(); @@ -158,7 +158,7 @@ void ICQEmailInfo::fill( Buffer* buffer ) if ( buffer->getByte() == 0x0A ) { int numEmails = buffer->getByte(); - QString email; + TQString email; for ( int i = 0; i < numEmails; i++ ) { if ( buffer->getByte() == 0x00 ) @@ -183,7 +183,7 @@ void ICQInterestInfo::fill( Buffer* buffer ) for ( int i = 0; i < len; i++ ) { int t=buffer->getLEWord(); - QCString d = buffer->getLELNTS(); + TQCString d = buffer->getLELNTS(); if (t>0) { //there is some topic if (count<4) { //i think this could not happen, i have never seen more topics[count]=t; @@ -213,22 +213,22 @@ void ICQSearchResult::fill( Buffer* buffer ) WORD datalength = buffer->getLEWord(); // data length WORD len = 0; uin = buffer->getLEDWord(); - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Found UIN " << QString::number( uin ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Found UIN " << TQString::number( uin ) << endl; len = buffer->getLEWord(); if ( len > 0 ) - nickName = QCString( buffer->getBlock( len ) ); + nickName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - firstName = QCString( buffer->getBlock( len ) ); + firstName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - lastName = QCString( buffer->getBlock( len ) ); + lastName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - email = QCString( buffer->getBlock( len ) ); + email = TQCString( buffer->getBlock( len ) ); auth = ( buffer->getByte() != 0x01 ); online = ( buffer->getLEWord() == 0x0001 ); diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.h b/kopete/protocols/oscar/liboscar/icquserinfo.h index ac054721..3c3510f4 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.h +++ b/kopete/protocols/oscar/liboscar/icquserinfo.h @@ -19,9 +19,9 @@ #ifndef _ICQUSERINFO_H_ #define _ICQUSERINFO_H_ -#include <qcstring.h> -#include <qvaluelist.h> -#include <qdatetime.h> +#include <tqcstring.h> +#include <tqvaluelist.h> +#include <tqdatetime.h> #include "kopete_export.h" class Buffer; @@ -56,10 +56,10 @@ public: public: unsigned long uin; - QCString nickname; - QCString firstName; - QCString lastName; - QCString email; + TQCString nickname; + TQCString firstName; + TQCString lastName; + TQCString email; bool needsAuth; unsigned int gender; // 0=offline, 1=online, 2=not webaware }; @@ -73,17 +73,17 @@ public: public: unsigned long uin; - QCString nickname; - QCString firstName; - QCString lastName; - QCString email; - QCString city; - QCString state; - QCString phoneNumber; - QCString faxNumber; - QCString address; - QCString cellNumber; - QCString zip; + TQCString nickname; + TQCString firstName; + TQCString lastName; + TQCString email; + TQCString city; + TQCString state; + TQCString phoneNumber; + TQCString faxNumber; + TQCString address; + TQCString cellNumber; + TQCString zip; int country; char timezone; bool publishEmail; @@ -99,18 +99,18 @@ public: void fill( Buffer* buffer ); public: - QCString city; - QCString state; - QCString phone; - QCString fax; - QCString address; - QCString zip; + TQCString city; + TQCString state; + TQCString phone; + TQCString fax; + TQCString address; + TQCString zip; int country; - QCString company; - QCString department; - QCString position; + TQCString company; + TQCString department; + TQCString position; int occupation; - QCString homepage; + TQCString homepage; }; class KOPETE_EXPORT ICQMoreUserInfo : public ICQInfoBase @@ -123,13 +123,13 @@ public: public: int age; unsigned int gender; - QCString homepage; - QDate birthday; + TQCString homepage; + TQDate birthday; unsigned int lang1; unsigned int lang2; unsigned int lang3; - QCString ocity; - QCString ostate; + TQCString ocity; + TQCString ostate; int ocountry; int marital; }; @@ -142,7 +142,7 @@ public: void fill( Buffer* buffer ); public: - QValueList<QCString> emailList; + TQValueList<TQCString> emailList; }; class KOPETE_EXPORT ICQInterestInfo : public ICQInfoBase @@ -155,7 +155,7 @@ public: public: int count; int topics[4]; - QCString descriptions[4]; + TQCString descriptions[4]; }; @@ -165,10 +165,10 @@ public: ICQSearchResult(); void fill( Buffer* buffer ); Q_UINT32 uin; - QCString firstName; - QCString lastName; - QCString nickName; - QCString email; + TQCString firstName; + TQCString lastName; + TQCString nickName; + TQCString email; bool auth; bool online; char gender; @@ -180,19 +180,19 @@ class KOPETE_EXPORT ICQWPSearchInfo public: ICQWPSearchInfo(); - QCString firstName; - QCString lastName; - QCString nickName; - QCString email; + TQCString firstName; + TQCString lastName; + TQCString nickName; + TQCString email; int age; int gender; int language; - QCString city; - QCString state; + TQCString city; + TQCString state; int country; - QCString company; - QCString department; - QCString position; + TQCString company; + TQCString department; + TQCString position; int occupation; bool onlineOnly; }; @@ -202,11 +202,11 @@ class ICQInfoItem { public: int category; - QCString description; + TQCString description; }; -typedef QValueList<ICQInfoItem> ICQInfoItemList; +typedef TQValueList<ICQInfoItem> ICQInfoItemList; */ #endif diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp index 068ac273..3635bc71 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp @@ -89,7 +89,7 @@ bool ICQUserInfoRequestTask::take( Transfer* transfer ) buffer->skipBytes( 8 ); WORD seq = buffer->getLEWord(); // request sequence number buffer->getLEWord(); // request data sub type - QString contactId = m_contactSequenceMap[seq]; + TQString contactId = m_contactSequenceMap[seq]; switch ( requestSubType() ) { @@ -186,43 +186,43 @@ void ICQUserInfoRequestTask::onGo() send( t ); } -ICQGeneralUserInfo ICQUserInfoRequestTask::generalInfoFor( const QString& contact ) +ICQGeneralUserInfo ICQUserInfoRequestTask::generalInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_genInfoMap[seq]; } -ICQWorkUserInfo ICQUserInfoRequestTask::workInfoFor( const QString& contact ) +ICQWorkUserInfo ICQUserInfoRequestTask::workInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_workInfoMap[seq]; } -ICQMoreUserInfo ICQUserInfoRequestTask::moreInfoFor( const QString& contact ) +ICQMoreUserInfo ICQUserInfoRequestTask::moreInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_moreInfoMap[seq]; } -ICQEmailInfo ICQUserInfoRequestTask::emailInfoFor(const QString& contact ) +ICQEmailInfo ICQUserInfoRequestTask::emailInfoFor(const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_emailInfoMap[seq]; } -ICQShortInfo ICQUserInfoRequestTask::shortInfoFor( const QString& contact ) +ICQShortInfo ICQUserInfoRequestTask::shortInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_shortInfoMap[seq]; } -ICQInterestInfo ICQUserInfoRequestTask::interestInfoFor( const QString& contact ) +ICQInterestInfo ICQUserInfoRequestTask::interestInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_interestInfoMap[seq]; } -QString ICQUserInfoRequestTask::notesInfoFor( const QString& contact ) +TQString ICQUserInfoRequestTask::notesInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_notesInfoMap[seq]; diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.h b/kopete/protocols/oscar/liboscar/icquserinfotask.h index eba81b57..613608fd 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.h +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.h @@ -19,8 +19,8 @@ #ifndef ICQUSERINFOTASK_H #define ICQUSERINFOTASK_H -#include <qmap.h> -#include <qstring.h> +#include <tqmap.h> +#include <tqstring.h> #include "icqtask.h" #include "icquserinfo.h" @@ -39,37 +39,37 @@ public: enum { Long = 0, Short }; - void setUser( const QString& user ) { m_userToRequestFor = user; } + void setUser( const TQString& user ) { m_userToRequestFor = user; } void setType( unsigned int type ) { m_type = type; } void setInfoToRequest( unsigned int type ); - ICQGeneralUserInfo generalInfoFor( const QString& contact ); - ICQEmailInfo emailInfoFor( const QString& contact ); - ICQMoreUserInfo moreInfoFor( const QString& contact ); - ICQWorkUserInfo workInfoFor( const QString& contact ); - QString notesInfoFor( const QString& contact ); - ICQShortInfo shortInfoFor( const QString& contact ); - ICQInterestInfo interestInfoFor( const QString& contact ); + ICQGeneralUserInfo generalInfoFor( const TQString& contact ); + ICQEmailInfo emailInfoFor( const TQString& contact ); + ICQMoreUserInfo moreInfoFor( const TQString& contact ); + ICQWorkUserInfo workInfoFor( const TQString& contact ); + TQString notesInfoFor( const TQString& contact ); + ICQShortInfo shortInfoFor( const TQString& contact ); + ICQInterestInfo interestInfoFor( const TQString& contact ); virtual bool forMe( const Transfer* transfer ) const; virtual bool take( Transfer* transfer ); virtual void onGo(); signals: - void receivedInfoFor( const QString& contact, unsigned int type ); + void receivedInfoFor( const TQString& contact, unsigned int type ); private: - QMap<int, ICQGeneralUserInfo> m_genInfoMap; - QMap<int, ICQEmailInfo> m_emailInfoMap; - QMap<int, ICQMoreUserInfo> m_moreInfoMap; - QMap<int, ICQWorkUserInfo> m_workInfoMap; - QMap<int, ICQShortInfo> m_shortInfoMap; - QMap<int, ICQInterestInfo> m_interestInfoMap; - QMap<int, QString> m_notesInfoMap; - QMap<int, QString> m_contactSequenceMap; - QMap<QString, int> m_reverseContactMap; + TQMap<int, ICQGeneralUserInfo> m_genInfoMap; + TQMap<int, ICQEmailInfo> m_emailInfoMap; + TQMap<int, ICQMoreUserInfo> m_moreInfoMap; + TQMap<int, ICQWorkUserInfo> m_workInfoMap; + TQMap<int, ICQShortInfo> m_shortInfoMap; + TQMap<int, ICQInterestInfo> m_interestInfoMap; + TQMap<int, TQString> m_notesInfoMap; + TQMap<int, TQString> m_contactSequenceMap; + TQMap<TQString, int> m_reverseContactMap; unsigned int m_type; - QString m_userToRequestFor; + TQString m_userToRequestFor; }; #endif diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp index abd34e53..b93ede3f 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp @@ -18,8 +18,8 @@ #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(QObject *parent, const char *name) - : QObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) + : TQObject(parent, name) { m_state = NeedMore; m_bytes = 0; @@ -35,13 +35,13 @@ uint InputProtocolBase::state() const return m_state; } -bool InputProtocolBase::readString( QString &message ) +bool InputProtocolBase::readString( TQString &message ) { uint len; - QCString rawData; + TQCString rawData; if ( !safeReadBytes( rawData, len ) ) return false; - message = QString::fromUtf8( rawData.data(), len - 1 ); + message = TQString::fromUtf8( rawData.data(), len - 1 ); return true; } @@ -61,7 +61,7 @@ bool InputProtocolBase::okToProceed() return false; } -bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) +bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes Q_UINT32 val; @@ -72,7 +72,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) if ( val > 1024 ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); - QCString temp( val ); + TQCString temp( val ); if ( val != 0 ) { if ( !okToProceed() ) diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.h b/kopete/protocols/oscar/liboscar/inputprotocolbase.h index 7bea895f..94072e00 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.h +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.h @@ -19,7 +19,7 @@ #ifndef INPUTPROTOCOLBASE_H #define INPUTPROTOCOLBASE_H -#include <qobject.h> +#include <tqobject.h> class Transfer; /** @@ -32,7 +32,7 @@ class InputProtocolBase : public QObject Q_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(QObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *parent = 0, const char *name = 0); ~InputProtocolBase(); /** * Returns a value describing the state of the object. @@ -45,13 +45,13 @@ public: * @param bytes this will be set to the number of bytes that were successfully parsed. It is no indication of the success of the whole procedure * @return On success, a Transfer object that the caller is responsible for deleting. It will be either an EventTransfer or a Response, delete as appropriate. On failure, returns 0. */ - virtual Transfer * parse( const QByteArray &, uint & bytes ) = 0 ; + virtual Transfer * parse( const TQByteArray &, uint & bytes ) = 0 ; protected: /** * Reads an arbitrary string * updates the bytes parsed counter */ - bool readString( QString &message ); + bool readString( TQString &message ); /** * Check that there is data to read, and set the protocol's state if there isn't any. */ @@ -61,12 +61,12 @@ protected: * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ - bool safeReadBytes( QCString & data, uint & len ); + bool safeReadBytes( TQCString & data, uint & len ); protected: uint m_state; uint m_bytes; - QDataStream * m_din; + TQDataStream * m_din; }; #endif diff --git a/kopete/protocols/oscar/liboscar/locationrightstask.cpp b/kopete/protocols/oscar/liboscar/locationrightstask.cpp index 5aae9a5e..f019b961 100644 --- a/kopete/protocols/oscar/liboscar/locationrightstask.cpp +++ b/kopete/protocols/oscar/liboscar/locationrightstask.cpp @@ -80,7 +80,7 @@ void LocationRightsTask::sendLocationRightsRequest() void LocationRightsTask::handleLocationRightsResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Ignoring location rights response" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/logintask.cpp b/kopete/protocols/oscar/liboscar/logintask.cpp index 962b2e1a..a153f8f7 100644 --- a/kopete/protocols/oscar/liboscar/logintask.cpp +++ b/kopete/protocols/oscar/liboscar/logintask.cpp @@ -18,7 +18,7 @@ #include "logintask.h" -#include <qtimer.h> +#include <tqtimer.h> #include <kdebug.h> #include <klocale.h> @@ -63,7 +63,7 @@ bool StageOneLoginTask::take( Transfer* transfer ) m_closeTask = new CloseConnectionTask( client()->rootTask() ); //connect finished signal - connect( m_closeTask, SIGNAL( finished() ), this, SLOT( closeTaskFinished() ) ); + connect( m_closeTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeTaskFinished() ) ); m_icqTask->go( true ); } else @@ -80,7 +80,7 @@ bool StageOneLoginTask::take( Transfer* transfer ) send( ft ); m_aimTask = new AimLoginTask( client()->rootTask() ); - connect( m_aimTask, SIGNAL( finished() ), this, SLOT( aimTaskFinished() ) ); + connect( m_aimTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( aimTaskFinished() ) ); m_aimTask->go( true ); } return true; @@ -118,17 +118,17 @@ bool StageOneLoginTask::forMe( Transfer* transfer ) const return ( ft && ft->flapChannel() == 1 ); } -const QByteArray& StageOneLoginTask::loginCookie() const +const TQByteArray& StageOneLoginTask::loginCookie() const { return m_cookie; } -const QString& StageOneLoginTask::bosServer() const +const TQString& StageOneLoginTask::bosServer() const { return m_bosServer; } -const QString& StageOneLoginTask::bosPort() const +const TQString& StageOneLoginTask::bosPort() const { return m_bosPort; } @@ -145,8 +145,8 @@ StageTwoLoginTask::StageTwoLoginTask( Task* parent ) m_versionTask = new ServerVersionsTask( rootTask ); m_rateTask = new RateInfoTask( rootTask ); - QObject::connect( m_versionTask, SIGNAL( finished() ), this, SLOT( versionTaskFinished() ) ); - QObject::connect( m_rateTask, SIGNAL( finished() ), this, SLOT( rateTaskFinished() ) ); + TQObject::connect( m_versionTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( versionTaskFinished() ) ); + TQObject::connect( m_rateTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( rateTaskFinished() ) ); } StageTwoLoginTask::~StageTwoLoginTask() @@ -188,16 +188,16 @@ void StageTwoLoginTask::onGo() send( ft ); } else - setError( -1, QString::null ); + setError( -1, TQString::null ); return; } -void StageTwoLoginTask::setCookie( const QByteArray& newCookie ) +void StageTwoLoginTask::setCookie( const TQByteArray& newCookie ) { m_cookie.duplicate( newCookie ); } -const QByteArray& StageTwoLoginTask::cookie() +const TQByteArray& StageTwoLoginTask::cookie() { return m_cookie; } @@ -210,7 +210,7 @@ void StageTwoLoginTask::versionTaskFinished() void StageTwoLoginTask::rateTaskFinished() { - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "logintask.moc" diff --git a/kopete/protocols/oscar/liboscar/logintask.h b/kopete/protocols/oscar/liboscar/logintask.h index 12061821..83bc8fde 100644 --- a/kopete/protocols/oscar/liboscar/logintask.h +++ b/kopete/protocols/oscar/liboscar/logintask.h @@ -19,7 +19,7 @@ #ifndef _OSCAR_LOGINTASK_H_ #define _OSCAR_LOGINTASK_H_ -#include <qcstring.h> +#include <tqcstring.h> #include "oscartypes.h" #include "task.h" @@ -52,19 +52,19 @@ public: //Protocol specific stuff //! Get the BOS cookie - const QByteArray& loginCookie() const; + const TQByteArray& loginCookie() const; //! Get the BOS server - const QString& bosServer() const; + const TQString& bosServer() const; //! Get the BOS port - const QString& bosPort() const; + const TQString& bosPort() const; //! Get the error code, if there is one int errorCode() const; //! Get the error reason so it can be displayed - const QString& errorReason() const; + const TQString& errorReason() const; public slots: @@ -82,9 +82,9 @@ private: CloseConnectionTask* m_closeTask; //Private data we get from the tasks - QByteArray m_cookie; - QString m_bosServer; - QString m_bosPort; + TQByteArray m_cookie; + TQString m_bosServer; + TQString m_bosPort; }; @@ -111,13 +111,13 @@ public: //protocol specifics //! Set the cookie to send to the server - void setCookie( const QByteArray& newCookie ); + void setCookie( const TQByteArray& newCookie ); //! Get the cookie to send to the server - const QByteArray& cookie(); + const TQByteArray& cookie(); - QString host() const; - QString port() const; + TQString host() const; + TQString port() const; public slots: @@ -131,8 +131,8 @@ protected: bool forMe( Transfer* transfer ) const; private: - QByteArray m_cookie; - QString m_host, m_port; + TQByteArray m_cookie; + TQString m_host, m_port; //tasks ServerVersionsTask* m_versionTask; diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp index 2db05eb1..0dd26e3d 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp @@ -16,7 +16,7 @@ #include "messagereceivertask.h" -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <kdebug.h> #include "transfer.h" #include "buffer.h" @@ -109,7 +109,7 @@ bool MessageReceiverTask::take( Transfer* transfer ) else { int screenNameLength = b->getByte(); - m_fromUser = QString( b->getBlock( screenNameLength ) ); + m_fromUser = TQString( b->getBlock( screenNameLength ) ); setTransfer( transfer ); handleAutoResponse(); setTransfer( 0 ); @@ -122,7 +122,7 @@ bool MessageReceiverTask::take( Transfer* transfer ) void MessageReceiverTask::handleType1Message() { Oscar::Message msg; - QValueList<TLV> messageTLVList = transfer()->buffer()->getTLVList(); + TQValueList<TLV> messageTLVList = transfer()->buffer()->getTLVList(); TLV t = Oscar::findTLV( messageTLVList, 0x0002 ); if ( !t ) { @@ -130,8 +130,8 @@ void MessageReceiverTask::handleType1Message() return; } Buffer messageBuffer( t.data ); - QValueList<TLV> innerTLVList = messageBuffer.getTLVList(); - QValueList<TLV>::iterator it = innerTLVList.begin(), listEnd = innerTLVList.end(); + TQValueList<TLV> innerTLVList = messageBuffer.getTLVList(); + TQValueList<TLV>::iterator it = innerTLVList.begin(), listEnd = innerTLVList.end(); for ( ; (*it); ++it ) { switch ( ( *it ).type ) @@ -154,7 +154,7 @@ void MessageReceiverTask::handleType1Message() //message length is buffer length - length of ( charset + subcharset ) */ int msgLength = ( *it ).length - 4; - QByteArray msgArray( message.getBlock( msgLength ) ); + TQByteArray msgArray( message.getBlock( msgLength ) ); msg.setTextArray( msgArray ); break; @@ -176,7 +176,7 @@ void MessageReceiverTask::handleType1Message() msg.setSender( m_fromUser ); msg.setReceiver( client()->userId() ); - msg.setTimestamp( QDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::currentDateTime() ); msg.setType( 0x01 ); emit receivedMessage( msg ); @@ -187,7 +187,7 @@ void MessageReceiverTask::handleType2Message() kdDebug(14151) << k_funcinfo << "Received Type 2 message. Trying to handle it..." << endl; Oscar::Message msg; - QValueList<TLV> messageTLVList = transfer()->buffer()->getTLVList(); + TQValueList<TLV> messageTLVList = transfer()->buffer()->getTLVList(); TLV t = Oscar::findTLV( messageTLVList, 0x0005 ); if ( !t ) { @@ -280,7 +280,7 @@ void MessageReceiverTask::handleType4Message() Buffer tlv5buffer(tlv5.data, tlv5.length); DWORD uin = tlv5buffer.getLEDWord(); // little endian for no sane reason! - if ( QString::number(uin) != m_fromUser ) + if ( TQString::number(uin) != m_fromUser ) kdWarning(14151) << k_funcinfo << "message uin does not match uin found in packet header!" << endl; BYTE msgType = tlv5buffer.getByte(); @@ -291,7 +291,7 @@ void MessageReceiverTask::handleType4Message() //handle the special user types Oscar::Message msg; - QString msgSender; + TQString msgSender; switch ( msgType ) { case 0x0D: @@ -307,7 +307,7 @@ void MessageReceiverTask::handleType4Message() break; }; - QCString msgText = tlv5buffer.getLNTS(); + TQCString msgText = tlv5buffer.getLNTS(); int msgLength = msgText.size(); if ( msgType == 0x0D || msgType == 0x0E ) { @@ -332,7 +332,7 @@ void MessageReceiverTask::handleType4Message() } msg.setType( 0x04 ); - msg.setTimestamp( QDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::currentDateTime() ); msg.setSender( msgSender ); msg.setReceiver( client()->userId() ); msg.setEncoding( Oscar::Message::UserDefined ); @@ -404,7 +404,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Message type is: " << messageType << endl; - QCString msgText( b->getLELNTS() ); + TQCString msgText( b->getLELNTS() ); Oscar::Message::Encoding encoding = Oscar::Message::UserDefined; int fgcolor = 0x00000000; int bgcolor = 0x00ffffff; @@ -421,7 +421,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) if ( b->length() < capLength ) break; - QByteArray cap( b->getBlock( capLength ) ); + TQByteArray cap( b->getBlock( capLength ) ); if ( qstrncmp ( cap.data(), "{0946134E-4C7F-11D1-8222-444553540000}", capLength ) == 0 ) encoding = Oscar::Message::UTF8; } @@ -437,7 +437,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) msg->setSender( m_fromUser ); msg->setReceiver( client()->userId() ); - msg->setTimestamp( QDateTime::currentDateTime() ); + msg->setTimestamp( TQDateTime::currentDateTime() ); msg->setType( 0x02 ); msg->setIcbmCookie( m_icbmCookie ); msg->setProtocolVersion( protocolVersion ); @@ -451,7 +451,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) } } -QTextCodec* MessageReceiverTask::guessCodec( const QCString& string ) +TQTextCodec* MessageReceiverTask::guessCodec( const TQCString& string ) { Q_UNUSED( string ); return 0; diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.h b/kopete/protocols/oscar/liboscar/messagereceivertask.h index b50a133f..4a129016 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.h +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.h @@ -17,8 +17,8 @@ #define MESSAGERECEIVERTASK_H #include "task.h" -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> #include "oscarmessage.h" #include "oscartypeclasses.h" #include "oscarmessage.h" @@ -61,13 +61,13 @@ private: //!Parses Rendezvous data in Buffer and puts the information into Message void parseRendezvousData( Buffer* b, Oscar::Message* msg ); - QTextCodec* guessCodec( const QCString& string ); + TQTextCodec* guessCodec( const TQCString& string ); private: - QByteArray m_icbmCookie; + TQByteArray m_icbmCookie; int m_channel; - QString m_fromUser; + TQString m_fromUser; int m_currentSnacSubtype; int m_charSet; int m_subCharSet; diff --git a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp index d97da7a3..88d41a84 100644 --- a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp +++ b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp @@ -108,10 +108,10 @@ void OfflineMessagesTask::handleOfflineMessage() BYTE flags = buffer->getByte(); // msg flags WORD msgLength = buffer->getLEWord(); - QByteArray msg = buffer->getBlock( msgLength ); + TQByteArray msg = buffer->getBlock( msgLength ); - QDate date(year, month, day); - QTime time(hour,minute); + TQDate date(year, month, day); + TQTime time(hour,minute); #ifndef HAVE_TM_GMTOFF int tz = -( ::timezone ); #else @@ -125,10 +125,10 @@ void OfflineMessagesTask::handleOfflineMessage() #endif time = time.addSecs( tz ); - QDateTime hackyTime( date, time ); + TQDateTime hackyTime( date, time ); Oscar::Message message( Oscar::Message::UserDefined, msg, type, flags, hackyTime ); - message.setSender( QString::number( senderUin ) ); - message.setReceiver( QString::number( receiverUin ) ); + message.setSender( TQString::number( senderUin ) ); + message.setReceiver( TQString::number( receiverUin ) ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Received offline message '" << msg.data() << "' from " << senderUin << endl; diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp index 785e23f7..6b6b3d05 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp @@ -80,7 +80,7 @@ void OnlineNotifierTask::userOnline() Buffer* buffer = transfer()->buffer(); UserDetails ud; ud.fill( buffer ); - QString user = ud.userId(); + TQString user = ud.userId(); //kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << user << " is now online" << endl; emit userIsOnline( user, ud ); } @@ -90,7 +90,7 @@ void OnlineNotifierTask::userOffline() Buffer* buffer = transfer()->buffer(); UserDetails ud; ud.fill( buffer ); - QString user = ud.userId(); + TQString user = ud.userId(); //kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << user << " is now offline" << endl; emit userIsOffline( user, ud ); } diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h index 2ec58e5a..18bcb5c1 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h @@ -46,8 +46,8 @@ protected: virtual bool forMe( const Transfer* transfer ) const; signals: - void userIsOnline( const QString& user, const UserDetails& ud ); - void userIsOffline( const QString& user, const UserDetails& ud ); + void userIsOnline( const TQString& user, const UserDetails& ud ); + void userIsOffline( const TQString& user, const UserDetails& ud ); private: void userOnline(); diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp index ea090442..5f39d205 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp @@ -17,14 +17,14 @@ * * ***************************************************************************/ -#include <qobject.h> +#include <tqobject.h> #include <kbufferedsocket.h> #include <kdebug.h> #include <kresolver.h> #include "oscarbytestream.h" -KNetworkByteStream::KNetworkByteStream( QObject *parent, const char */*name*/ ) +KNetworkByteStream::KNetworkByteStream( TQObject *parent, const char */*name*/ ) : ByteStream ( parent ) { kdDebug( 14151 ) << k_funcinfo << "Instantiating new KNetwork byte stream." << endl; @@ -38,14 +38,14 @@ KNetworkByteStream::KNetworkByteStream( QObject *parent, const char */*name*/ ) mSocket->enableRead( true ); // connect signals and slots - QObject::connect( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) ); - QObject::connect( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) ); - QObject::connect( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) ); - QObject::connect( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) ); - QObject::connect( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) ); } -bool KNetworkByteStream::connect( QString host, QString service ) +bool KNetworkByteStream::connect( TQString host, TQString service ) { kdDebug( 14151 ) << k_funcinfo << "Connecting to " << host << ", service " << service << endl; @@ -71,7 +71,7 @@ void KNetworkByteStream::close () int KNetworkByteStream::tryWrite () { // send all data from the buffers to the socket - QByteArray writeData = takeWrite(); + TQByteArray writeData = takeWrite(); #ifdef OSCAR_EXCESSIVE_DEBUG kdDebug(14151) << k_funcinfo << "writing " << writeData.size() << " bytes." << endl; #endif @@ -115,7 +115,7 @@ void KNetworkByteStream::slotConnectionClosed() void KNetworkByteStream::slotReadyRead() { // stuff all available data into our buffers - QByteArray readBuffer( socket()->bytesAvailable () ); + TQByteArray readBuffer( socket()->bytesAvailable () ); socket()->readBlock( readBuffer.data (), readBuffer.size () ); diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.h b/kopete/protocols/oscar/liboscar/oscarbytestream.h index bd618666..2ecd92d9 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.h +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.h @@ -37,11 +37,11 @@ class KNetworkByteStream : public ByteStream Q_OBJECT public: - KNetworkByteStream ( QObject *parent = 0, const char *name = 0 ); + KNetworkByteStream ( TQObject *parent = 0, const char *name = 0 ); ~KNetworkByteStream (); - bool connect ( QString host, QString service ); + bool connect ( TQString host, TQString service ); virtual bool isOpen () const; virtual void close (); diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp index e607a24b..87da6020 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp @@ -20,10 +20,10 @@ #include "oscarclientstream.h" -#include <qguardedptr.h> -#include <qobject.h> -#include <qptrqueue.h> -#include <qtimer.h> +#include <tqguardedptr.h> +#include <tqobject.h> +#include <tqptrqueue.h> +#include <tqtimer.h> #include <kdebug.h> @@ -36,7 +36,7 @@ #define LIBOSCAR_DEBUG 0 -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -59,9 +59,9 @@ public: bs = 0; connection = 0; - username = QString::null; - password = QString::null; - server = QString::null; + username = TQString::null; + password = TQString::null; + server = TQString::null; haveLocalAddr = false; doBinding = true; @@ -74,12 +74,12 @@ public: newTransfers = false; } - QString username; - QString password; - QString server; + TQString username; + TQString password; + TQString server; bool doAuth; //send the initial login sequences to get the cookie bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; bool doBinding; @@ -88,7 +88,7 @@ public: CoreProtocol client; Connection* connection; - QString defRealm; + TQString defRealm; int mode; int state; @@ -96,15 +96,15 @@ public: bool newTransfers; int errCond; - QString errText; + TQString errText; - QPtrQueue<Transfer> in; + TQPtrQueue<Transfer> in; - QTimer noopTimer; // used to send icq keepalive + TQTimer noopTimer; // used to send icq keepalive int noop_time; }; -ClientStream::ClientStream(Connector *conn, QObject *parent) +ClientStream::ClientStream(Connector *conn, TQObject *parent) :Stream(parent) { //qDebug("CLIENTSTREAM::ClientStream"); @@ -112,13 +112,13 @@ ClientStream::ClientStream(Connector *conn, QObject *parent) d = new Private; d->mode = ClientMode; d->conn = conn; - connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) ); - connect( d->conn, SIGNAL(error()), SLOT(cr_error()) ); - connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) ); - connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) ); + connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) ); + connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) ); + connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) ); + connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) ); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); } ClientStream::~ClientStream() @@ -151,7 +151,7 @@ void ClientStream::reset(bool all) d->in.clear(); } -void ClientStream::connectToServer(const QString& server, bool auth) +void ClientStream::connectToServer(const TQString& server, bool auth) { reset(true); d->state = Connecting; @@ -205,7 +205,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start( d->noop_time ); } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -217,7 +217,7 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } @@ -263,7 +263,7 @@ void ClientStream::write( Transfer *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { #if 0 qDebug( "contains: %i bytes ", bytes.count() ); @@ -305,7 +305,7 @@ void cs_dump( const QByteArray &bytes ) Q_UNUSED( bytes ); } -void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes ) +void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes ) { // take formatted bytes from CoreProtocol and put them on the wire d->bs->write( outgoingBytes ); @@ -329,19 +329,19 @@ void ClientStream::cp_incomingData() void ClientStream::cr_connected() { d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); - connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); d->state = Active; if ( d->noop_time ) d->noopTimer.start( d->noop_time ); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; emit connected(); if(!self) return; @@ -372,12 +372,12 @@ void ClientStream::bs_error(int) void ClientStream::bs_readyRead() { - QByteArray a; + TQByteArray a; //qDebug( "size of storage for incoming data is %i bytes.", a.size() ); a = d->bs->read(); #if LIBOSCAR_DEBUG - QCString cs(a.data(), a.size()+1); + TQCString cs(a.data(), a.size()+1); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "recv: " << a.size() << "bytes" << endl; cs_dump( a ); #endif @@ -408,7 +408,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.h b/kopete/protocols/oscar/liboscar/oscarclientstream.h index f8b4d2b6..307c0616 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.h +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.h @@ -73,19 +73,19 @@ public: BindConflict // resource in-use }; - ClientStream(Connector *conn, QObject *parent=0); + ClientStream(Connector *conn, TQObject *parent=0); ~ClientStream(); - void connectToServer(const QString& server, bool auth=true); + void connectToServer(const TQString& server, bool auth=true); void accept(); // server bool isActive() const; bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); void close(); @@ -110,10 +110,10 @@ public: void write( Transfer* request ); int errorCondition() const; - QString errorText() const; + TQString errorText() const; // extrahttp://bugs.kde.org/show_bug.cgi?id=85158 -/*# void writeDirect(const QString &s); // must be for debug testing*/ +/*# void writeDirect(const TQString &s); // must be for debug testing*/ void setNoopTime(int mills); signals: @@ -130,7 +130,7 @@ private slots: /** * collects wire ready outgoing data from the core protocol and sends */ - void cp_outgoingData( const QByteArray& ); + void cp_outgoingData( const TQByteArray& ); /** * collects parsed incoming data as a transfer from the core protocol and queues */ diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.cpp b/kopete/protocols/oscar/liboscar/oscarconnector.cpp index 6fcef197..ec649e08 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.cpp +++ b/kopete/protocols/oscar/liboscar/oscarconnector.cpp @@ -24,7 +24,7 @@ #include "oscarconnector.h" #include "oscarbytestream.h" -KNetworkConnector::KNetworkConnector( QObject *parent, const char */*name*/ ) +KNetworkConnector::KNetworkConnector( TQObject *parent, const char */*name*/ ) : Connector( parent ) { kdDebug( 14151 ) << k_funcinfo << "New KNetwork connector." << endl; @@ -33,8 +33,8 @@ KNetworkConnector::KNetworkConnector( QObject *parent, const char */*name*/ ) mByteStream = new KNetworkByteStream( this ); - connect( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - connect( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) ); + connect( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + connect( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); mPort = 0; } @@ -43,7 +43,7 @@ KNetworkConnector::~KNetworkConnector() delete mByteStream; } -void KNetworkConnector::connectToServer( const QString &server ) +void KNetworkConnector::connectToServer( const TQString &server ) { kdDebug( 14151 ) << k_funcinfo << "Initiating connection to " << mHost << endl; Q_ASSERT( !mHost.isNull() ); @@ -51,7 +51,7 @@ void KNetworkConnector::connectToServer( const QString &server ) mErrorCode = KNetwork::KSocketBase::NoError; - if ( !mByteStream->connect ( mHost, QString::number ( mPort ) ) ) + if ( !mByteStream->connect ( mHost, TQString::number ( mPort ) ) ) { // Houston, we have a problem mErrorCode = mByteStream->socket()->error(); @@ -65,7 +65,7 @@ void KNetworkConnector::slotConnected() // FIXME: setPeerAddress() is something different, find out correct usage later //KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 (); - //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); + //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); emit connected (); } @@ -94,7 +94,7 @@ void KNetworkConnector::done() mByteStream->close (); } -void KNetworkConnector::setOptHostPort( const QString &host, Q_UINT16 port ) +void KNetworkConnector::setOptHostPort( const TQString &host, Q_UINT16 port ) { kdDebug ( 14151 ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl; diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.h b/kopete/protocols/oscar/liboscar/oscarconnector.h index d130f7da..39696a35 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.h +++ b/kopete/protocols/oscar/liboscar/oscarconnector.h @@ -39,15 +39,15 @@ class KNetworkConnector : public Connector Q_OBJECT public: - KNetworkConnector( QObject *parent = 0, const char *name = 0 ); + KNetworkConnector( TQObject *parent = 0, const char *name = 0 ); virtual ~KNetworkConnector(); - virtual void connectToServer( const QString &server ); + virtual void connectToServer( const TQString &server ); virtual ByteStream *stream() const; virtual void done(); - void setOptHostPort( const QString &host, Q_UINT16 port ); + void setOptHostPort( const TQString &host, Q_UINT16 port ); int errorCode(); @@ -56,7 +56,7 @@ private slots: void slotError( int ); private: - QString mHost; + TQString mHost; Q_UINT16 mPort; int mErrorCode; diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.cpp b/kopete/protocols/oscar/liboscar/oscarmessage.cpp index f4f512d2..1f263be0 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.cpp +++ b/kopete/protocols/oscar/liboscar/oscarmessage.cpp @@ -19,8 +19,8 @@ #include "oscarmessage.h" -#include <qdeepcopy.h> -#include <qtextcodec.h> +#include <tqdeepcopy.h> +#include <tqtextcodec.h> Oscar::Message::Message() @@ -33,7 +33,7 @@ Oscar::Message::Message() { } -Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQByteArray& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -45,7 +45,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText { } -Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQCString& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -57,7 +57,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, setTextArray( messageText ); } -Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, int channel, int properties, QDateTime timestamp, QTextCodec* codec ) +Oscar::Message::Message( Encoding messageEncoding, const TQString& messageText, int channel, int properties, TQDateTime timestamp, TQTextCodec* codec ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -68,50 +68,50 @@ Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, i setText( messageEncoding, messageText, codec ); } -QString Oscar::Message::sender() const +TQString Oscar::Message::sender() const { return m_sender; } -void Oscar::Message::setSender( const QString& sender ) +void Oscar::Message::setSender( const TQString& sender ) { m_sender = sender; } -QString Oscar::Message::receiver() const +TQString Oscar::Message::receiver() const { return m_receiver; } -void Oscar::Message::setReceiver( const QString& receiver ) +void Oscar::Message::setReceiver( const TQString& receiver ) { m_receiver = receiver; } -QByteArray Oscar::Message::textArray() const +TQByteArray Oscar::Message::textArray() const { return m_textArray; } -QString Oscar::Message::text( QTextCodec *codec ) const +TQString Oscar::Message::text( TQTextCodec *codec ) const { switch ( m_encoding ) { case Oscar::Message::UserDefined: return codec->toUnicode( m_textArray ); case Oscar::Message::UTF8: - return QString::fromUtf8( m_textArray.data(), m_textArray.size() ); + return TQString::fromUtf8( m_textArray.data(), m_textArray.size() ); case Oscar::Message::UCS2: { uint len = m_textArray.size() / 2; - QString result; + TQString result; result.setLength( len ); - QByteArray::ConstIterator p = m_textArray.begin(); + TQByteArray::ConstIterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { char row = *p++; char cell = *p++; - result[i] = QChar( cell, row ); + result[i] = TQChar( cell, row ); } //check if last character isn't null if ( result[len-1].isNull() ) @@ -122,22 +122,22 @@ QString Oscar::Message::text( QTextCodec *codec ) const default: break; // Should never happen. } - return QString::null; + return TQString::null; //FIXME: warn at least with kdWarning if an unrecognised encoding style was seen. } -void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QString& newText, QTextCodec* codec ) +void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const TQString& newText, TQTextCodec* codec ) { uint len; switch ( newEncoding ) { case Oscar::Message::UserDefined: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( codec->fromUnicode( newText ) ); break; case Oscar::Message::UTF8: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( newText.utf8() ); break; @@ -145,7 +145,7 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin { len = newText.length(); m_textArray.resize( len * 2 ); - QByteArray::Iterator p = m_textArray.begin(); + TQByteArray::Iterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { *p++ = newText[i].row(); @@ -159,12 +159,12 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin m_encoding = newEncoding; } -void Oscar::Message::setTextArray( const QByteArray& newTextArray ) +void Oscar::Message::setTextArray( const TQByteArray& newTextArray ) { m_textArray.duplicate( newTextArray ); } -void Oscar::Message::setTextArray( const QCString& newTextArray ) +void Oscar::Message::setTextArray( const TQCString& newTextArray ) { m_textArray.duplicate( newTextArray ); uint len = m_textArray.size(); @@ -212,22 +212,22 @@ void Oscar::Message::setType( int newType ) m_channel = newType; } -QDateTime Oscar::Message::timestamp() const +TQDateTime Oscar::Message::timestamp() const { return m_timestamp; } -void Oscar::Message::setTimestamp( QDateTime ts ) +void Oscar::Message::setTimestamp( TQDateTime ts ) { m_timestamp = ts; } -QByteArray Oscar::Message::icbmCookie() const +TQByteArray Oscar::Message::icbmCookie() const { return m_icbmCookie; } -void Oscar::Message::setIcbmCookie( const QByteArray& cookie ) +void Oscar::Message::setIcbmCookie( const TQByteArray& cookie ) { m_icbmCookie.duplicate( cookie ); } @@ -272,12 +272,12 @@ void Oscar::Message::setExchange( Oscar::WORD exchange ) m_exchange = exchange; } -QString Oscar::Message::chatRoom() const +TQString Oscar::Message::chatRoom() const { return m_chatRoom; } -void Oscar::Message::setChatRoom( const QString& room ) +void Oscar::Message::setChatRoom( const TQString& room ) { m_chatRoom = room; } diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.h b/kopete/protocols/oscar/liboscar/oscarmessage.h index 7f081054..f6f08fd9 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.h +++ b/kopete/protocols/oscar/liboscar/oscarmessage.h @@ -21,10 +21,10 @@ #ifndef _OSCARMESSAGE_H_ #define _OSCARMESSAGE_H_ -#include <qglobal.h> -#include <qstring.h> -#include <qcstring.h> -#include <qdatetime.h> +#include <tqglobal.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqdatetime.h> #include "kopete_export.h" #include "oscartypes.h" @@ -62,36 +62,36 @@ public: Message(); - Message( Encoding messageEncoding, const QByteArray& messageText, int channel, int properties, QDateTime timestamp ); - Message( Encoding messageEncoding, const QCString& messageText, int channel, int properties, QDateTime timestamp ); - Message( Encoding messageEncoding, const QString& messageText, int channel, int properties, QDateTime timestamp, QTextCodec* codec = 0 ); + Message( Encoding messageEncoding, const TQByteArray& messageText, int channel, int properties, TQDateTime timestamp ); + Message( Encoding messageEncoding, const TQCString& messageText, int channel, int properties, TQDateTime timestamp ); + Message( Encoding messageEncoding, const TQString& messageText, int channel, int properties, TQDateTime timestamp, TQTextCodec* codec = 0 ); /** Get the sender of the message */ - QString sender() const; + TQString sender() const; /** Set the sender of the message */ - void setSender( const QString& sender ); + void setSender( const TQString& sender ); /** Get the receiver of the message */ - QString receiver() const; + TQString receiver() const; /** Set the receiver of the message */ - void setReceiver( const QString& receiver); + void setReceiver( const TQString& receiver); /** get the message text */ - QString text( QTextCodec* codec ) const; + TQString text( TQTextCodec* codec ) const; /** set the message text */ - void setText( Encoding newEncoding, const QString& newText, QTextCodec* codec = 0); + void setText( Encoding newEncoding, const TQString& newText, TQTextCodec* codec = 0); /** get the message text as a bytearray for decoding */ - QByteArray textArray() const; + TQByteArray textArray() const; /** set the message text as a bytearray for decoding */ - void setTextArray( const QByteArray& newTextArray ); + void setTextArray( const TQByteArray& newTextArray ); /** set the mesasge text as a bytearray for decoding */ - void setTextArray( const QCString& newTextArray ); + void setTextArray( const TQCString& newTextArray ); /** get the message properties */ int properties() const; @@ -109,16 +109,16 @@ public: void setType( int newType ); /** get the timestamp of the message */ - QDateTime timestamp() const; + TQDateTime timestamp() const; /** set the timestamp of the message */ - void setTimestamp( QDateTime ts ); + void setTimestamp( TQDateTime ts ); /** get the ICBM cookie of the message */ - QByteArray icbmCookie() const; + TQByteArray icbmCookie() const; /** set the ICBM cookie of the message */ - void setIcbmCookie( const QByteArray& cookie ); + void setIcbmCookie( const TQByteArray& cookie ); /** get the protocol version (channel 2 messages only) */ int protocolVersion() const; @@ -145,10 +145,10 @@ public: void setExchange( Oscar::WORD ); /** get the chat room that this message is for */ - QString chatRoom() const; + TQString chatRoom() const; /** set the chat room that this message is for */ - void setChatRoom( const QString& ); + void setChatRoom( const TQString& ); /** get the message encoding */ Encoding encoding() const; @@ -160,18 +160,18 @@ public: private: //TODO d-pointer - QString m_sender; - QString m_receiver; + TQString m_sender; + TQString m_receiver; int m_channel; int m_properties; int m_messageType; int m_protocolVersion; int m_channel2Counter; - QByteArray m_icbmCookie; - QByteArray m_textArray; - QDateTime m_timestamp; + TQByteArray m_icbmCookie; + TQByteArray m_textArray; + TQDateTime m_timestamp; Oscar::WORD m_exchange; - QString m_chatRoom; + TQString m_chatRoom; Encoding m_encoding; }; diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp index cd9e9619..be862872 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp @@ -17,8 +17,8 @@ */ #include "oscartypeclasses.h" -#include <qdeepcopy.h> -#include <qvaluelist.h> +#include <tqdeepcopy.h> +#include <tqvaluelist.h> #include <kdebug.h> #include "oscarutils.h" #include "buffer.h" @@ -40,7 +40,7 @@ Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, char* newData ) data.duplicate( newData, length ); } -Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const QByteArray& newData ) +Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const TQByteArray& newData ) { type = newType; length = newLength; @@ -70,7 +70,7 @@ Oscar::SSI::SSI() m_waitingAuth = false; } -Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueList<TLV> &tlvlist, int tlvLength ) +Oscar::SSI::SSI( const TQString &name, int gid, int bid, int type, const TQValueList<TLV> &tlvlist, int tlvLength ) { m_name = name; m_gid = gid; @@ -79,7 +79,7 @@ Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueLi m_tlvLength = tlvLength; //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList<TLV> >( tlvlist ); + m_tlvList = TQDeepCopy< TQValueList<TLV> >( tlvlist ); if ( m_tlvLength == 0 && !m_tlvList.isEmpty() ) refreshTLVLength(); @@ -98,7 +98,7 @@ Oscar::SSI::SSI( const Oscar::SSI& other ) m_waitingAuth = other.m_waitingAuth; //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList<TLV> >( other.m_tlvList ); + m_tlvList = TQDeepCopy< TQValueList<TLV> >( other.m_tlvList ); if ( m_tlvLength == 0 && !m_tlvList.isEmpty() ) refreshTLVLength(); @@ -109,7 +109,7 @@ bool Oscar::SSI::isValid() const return m_type != 0xFFFF; } -QString Oscar::SSI::name() const +TQString Oscar::SSI::name() const { return m_name; } @@ -129,7 +129,7 @@ Q_UINT16 Oscar::SSI::type() const return m_type; } -const QValueList<TLV>& Oscar::SSI::tlvList() const +const TQValueList<TLV>& Oscar::SSI::tlvList() const { return m_tlvList; } @@ -144,10 +144,10 @@ Q_UINT16 Oscar::SSI::tlvListLength() const return m_tlvLength; } -void Oscar::SSI::setTLVList( QValueList<TLV> list ) +void Oscar::SSI::setTLVList( TQValueList<TLV> list ) { //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList<TLV> >( list ); + m_tlvList = TQDeepCopy< TQValueList<TLV> >( list ); refreshTLVLength(); checkTLVs(); } @@ -155,7 +155,7 @@ void Oscar::SSI::setTLVList( QValueList<TLV> list ) void Oscar::SSI::refreshTLVLength() { m_tlvLength = 0; - QValueList<TLV>::iterator it = m_tlvList.begin(); + TQValueList<TLV>::iterator it = m_tlvList.begin(); for( ; it != m_tlvList.end(); ++it ) { m_tlvLength += 4; @@ -179,7 +179,7 @@ void Oscar::SSI::checkTLVs() TLV aliasTLV = findTLV( m_tlvList, 0x0131 ); if ( aliasTLV ) { - m_alias = QString::fromUtf8( aliasTLV.data, aliasTLV.length ); + m_alias = TQString::fromUtf8( aliasTLV.data, aliasTLV.length ); kdDebug( 14151 ) << k_funcinfo << "Got an alias '" << m_alias << "' for contact '" << m_name << "'" << endl; } @@ -192,12 +192,12 @@ void Oscar::SSI::checkTLVs() kdDebug(14151) << k_funcinfo << "Found 'allow others to see...' options " << infoTLV.data << endl; } -QString Oscar::SSI::alias() const +TQString Oscar::SSI::alias() const { return m_alias; } -void Oscar::SSI::setAlias( const QString& newAlias ) +void Oscar::SSI::setAlias( const TQString& newAlias ) { m_alias = newAlias; } @@ -212,28 +212,28 @@ void Oscar::SSI::setWaitingAuth( bool waiting ) m_waitingAuth = waiting; } -void Oscar::SSI::setIconHash( QByteArray hash ) +void Oscar::SSI::setIconHash( TQByteArray hash ) { m_hash.duplicate( hash ); } -QByteArray Oscar::SSI::iconHash( ) const +TQByteArray Oscar::SSI::iconHash( ) const { return m_hash; } -QString Oscar::SSI::toString() const +TQString Oscar::SSI::toString() const { - QString ssiString = QString::fromLatin1( "name: " ); + TQString ssiString = TQString::fromLatin1( "name: " ); ssiString += m_name; ssiString += " gid: "; - ssiString += QString::number( m_gid ); + ssiString += TQString::number( m_gid ); ssiString += " bid: "; - ssiString += QString::number( m_bid ); + ssiString += TQString::number( m_bid ); ssiString += " type: "; - ssiString += QString::number( m_type ); + ssiString += TQString::number( m_type ); ssiString += " tlv length: "; - ssiString += QString::number( m_tlvLength ); + ssiString += TQString::number( m_tlvLength ); return ssiString; } @@ -250,26 +250,26 @@ Oscar::SSI::operator bool() const return isValid(); } -Oscar::SSI::operator QByteArray() const +Oscar::SSI::operator TQByteArray() const { Buffer b; - QCString name( m_name.utf8() ); + TQCString name( m_name.utf8() ); uint namelen = name.length(); const char *namedata = name; b.addWord( namelen ); // Using namedata instead of name because - // Buffer::addString(QByteArray, DWORD) ignores it's second argument, + // Buffer::addString(TQByteArray, DWORD) ignores it's second argument, // while Buffer::addString(const char*, DWORD) does not ignore it. // We must provide the explicit length argument to addString() because // we don't need trailing null byte to be added when automatic - // conversion from QCString to QByteArray is performed. + // conversion from TQCString to TQByteArray is performed. // This hack will not be needed with Qt 4. b.addString( namedata, namelen ); b.addWord( m_gid ); b.addWord( m_bid ); b.addWord( m_type ); b.addWord( m_tlvLength ); - QValueList<Oscar::TLV>::const_iterator it = m_tlvList.begin(); + TQValueList<Oscar::TLV>::const_iterator it = m_tlvList.begin(); for( ; it != m_tlvList.end(); ++it ) { b.addWord( (*it).type ); @@ -277,7 +277,7 @@ Oscar::SSI::operator QByteArray() const b.addString( (*it).data, (*it).data.size() ); } - return (QByteArray) b; + return (TQByteArray) b; } diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.h b/kopete/protocols/oscar/liboscar/oscartypeclasses.h index 94e0c910..e4ec6ded 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.h +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.h @@ -20,10 +20,10 @@ #ifndef _OSCARTYPECLASSES_H_ #define _OSCARTYPECLASSES_H_ -#include <qglobal.h> -#include <qstring.h> -#include <qcstring.h> -#include <qvaluelist.h> +#include <tqglobal.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqvaluelist.h> #include "kopete_export.h" namespace Oscar @@ -34,14 +34,14 @@ public: TLV(); TLV( Q_UINT16, Q_UINT16, char* data ); - TLV( Q_UINT16, Q_UINT16, const QByteArray& ); + TLV( Q_UINT16, Q_UINT16, const TQByteArray& ); TLV( const TLV& t ); operator bool() const; Q_UINT16 type; Q_UINT16 length; - QByteArray data; + TQByteArray data; }; @@ -49,7 +49,7 @@ class KOPETE_EXPORT SSI { public: SSI(); - SSI( const QString &name, int gid, int bid, int type, const QValueList<TLV>& tlvlist, int tlvLength = 0 ); + SSI( const TQString &name, int gid, int bid, int type, const TQValueList<TLV>& tlvlist, int tlvLength = 0 ); SSI( const SSI& other ); /** Get the validity of this item */ @@ -57,7 +57,7 @@ public: /** \brief The name of this SSI item. * This is usually the screenname, ICQ number, or group name. */ - QString name() const; + TQString name() const; /** \brief The group id of the SSI item */ Q_UINT16 gid() const; @@ -73,10 +73,10 @@ public: Q_UINT16 type() const; /** \brief the TLV list for the item */ - const QValueList<TLV>& tlvList() const; + const TQValueList<TLV>& tlvList() const; /** \brief Set the TLV list for the item */ - void setTLVList( QValueList<TLV> ); + void setTLVList( TQValueList<TLV> ); /** * \brief Set the length of the TLV list @@ -93,14 +93,14 @@ public: * Get the alias for the SSI item * This is TLV 0x0131 in an SSI item */ - QString alias() const; + TQString alias() const; /** * Set the alias for the SSI item * This should be done after a successful modification of the item * on the server */ - void setAlias( const QString& newAlias ); + void setAlias( const TQString& newAlias ); /** \brief Indicates we're awaiting authorization from this item */ bool waitingAuth() const; @@ -108,17 +108,17 @@ public: /** Set whether we are waiting authorization or not from this item */ void setWaitingAuth( bool waiting ); - void setIconHash( QByteArray hash ); + void setIconHash( TQByteArray hash ); - QByteArray iconHash() const; + TQByteArray iconHash() const; /** \brief String representation of our SSI object */ - QString toString() const; + TQString toString() const; bool operator==( const SSI& item ) const; operator bool() const; - operator QByteArray() const; + operator TQByteArray() const; void refreshTLVLength(); @@ -126,15 +126,15 @@ public: void checkTLVs(); private: - QString m_name; + TQString m_name; int m_gid; int m_bid; int m_type; - QValueList<TLV> m_tlvList; + TQValueList<TLV> m_tlvList; int m_tlvLength; bool m_waitingAuth; - QString m_alias; - QByteArray m_hash; + TQString m_alias; + TQByteArray m_hash; }; } diff --git a/kopete/protocols/oscar/liboscar/oscartypes.h b/kopete/protocols/oscar/liboscar/oscartypes.h index b7d4f55b..3819b555 100644 --- a/kopete/protocols/oscar/liboscar/oscartypes.h +++ b/kopete/protocols/oscar/liboscar/oscartypes.h @@ -20,9 +20,9 @@ #define _OSCARTYPES_H_ #include "oscartypeclasses.h" -#include <qglobal.h> -#include <qdatetime.h> -#include <qstring.h> +#include <tqglobal.h> +#include <tqdatetime.h> +#include <tqstring.h> //! Debug Areas const int OSCAR_RAW_DEBUG = 14151; @@ -214,35 +214,35 @@ struct ChatExchangeInfo WORD maxRoomNameLength; WORD maxMsgLength; BYTE flags; - QString description; + TQString description; BYTE canCreate; - QString charset1; - QString charset2; - QString lang1; - QString lang2; + TQString charset1; + TQString charset2; + TQString lang1; + TQString lang2; }; struct ChatRoomInfo { WORD exchange; - QByteArray cookie; + TQByteArray cookie; WORD instance; - QString description; + TQString description; WORD maxMsgLength; - QString name; + TQString name; }; struct ClientVersion { - QString clientString; + TQString clientString; WORD clientId; WORD major; WORD minor; WORD point; WORD build; DWORD other; - QString country; - QString lang; + TQString country; + TQString lang; }; /* ICQ Version Characteristics */ diff --git a/kopete/protocols/oscar/liboscar/oscarutils.cpp b/kopete/protocols/oscar/liboscar/oscarutils.cpp index 13e28d9e..e07e0e12 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.cpp +++ b/kopete/protocols/oscar/liboscar/oscarutils.cpp @@ -17,16 +17,16 @@ */ #include "oscarutils.h" -#include <qhostaddress.h> +#include <tqhostaddress.h> #include <kapplication.h> #include <kdebug.h> using namespace Oscar; -QString Oscar::normalize( const QString& contact ) +TQString Oscar::normalize( const TQString& contact ) { - QString normal = contact.lower(); + TQString normal = contact.lower(); normal.remove( ' ' ); return normal; } @@ -39,10 +39,10 @@ bool Oscar::operator==( TLV a, TLV b ) return false; } -TLV Oscar::findTLV( const QValueList<TLV>& list, int type ) +TLV Oscar::findTLV( const TQValueList<TLV>& list, int type ) { TLV t; - QValueList<TLV>::const_iterator it; + TQValueList<TLV>::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { if ( ( *it ).type == type ) @@ -52,12 +52,12 @@ TLV Oscar::findTLV( const QValueList<TLV>& list, int type ) return t; } -bool Oscar::uptateTLVs( SSI& item, const QValueList<TLV>& list ) +bool Oscar::uptateTLVs( SSI& item, const TQValueList<TLV>& list ) { bool changed = false; - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); - QValueList<TLV>::const_iterator it; + TQValueList<TLV>::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { TLV t = Oscar::findTLV( tList, ( *it ).type ); @@ -92,9 +92,9 @@ int Oscar::parseCap( char* cap ) return capflag; } -const QString Oscar::capToString( char* cap ) +const TQString Oscar::capToString( char* cap ) { - QString dbg; + TQString dbg; dbg.sprintf( "{%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}", cap[0], cap[1], cap[2], cap[3], cap[4], cap[5], cap[6], cap[7], cap[8], cap[9], @@ -103,17 +103,17 @@ const QString Oscar::capToString( char* cap ) return dbg; } -DWORD Oscar::parseCapabilities( Buffer &inbuf, QString &versionString ) +DWORD Oscar::parseCapabilities( Buffer &inbuf, TQString &versionString ) { // // FIXME: port capabilities array to some qt based list class, makes usage of memcmp obsolete // DWORD capflags = 0; - QString dbgCaps = "CAPS: "; + TQString dbgCaps = "CAPS: "; while(inbuf.length() >= 16) { - QByteArray cap; + TQByteArray cap; cap.duplicate( inbuf.getBlock(16) ); for (int i=0; i < CAP_LAST; i++) @@ -184,9 +184,9 @@ DWORD Oscar::parseCapabilities( Buffer &inbuf, QString &versionString ) return capflags; } -const QString Oscar::capName( int capNumber ) +const TQString Oscar::capName( int capNumber ) { - QString capString; + TQString capString; switch ( capNumber ) { @@ -279,18 +279,18 @@ const QString Oscar::capName( int capNumber ) return capString; } -DWORD Oscar::getNumericalIP(const QString &address) +DWORD Oscar::getNumericalIP(const TQString &address) { - QHostAddress addr; + TQHostAddress addr; if ( addr.setAddress( address ) == false ) return 0; return (DWORD)addr.toIPv4Address(); } -QString Oscar::getDottedDecimal( DWORD address ) +TQString Oscar::getDottedDecimal( DWORD address ) { - QHostAddress addr; + TQHostAddress addr; addr.setAddress((Q_UINT32)address); return addr.toString(); } diff --git a/kopete/protocols/oscar/liboscar/oscarutils.h b/kopete/protocols/oscar/liboscar/oscarutils.h index bf8b5aba..a9cd921c 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.h +++ b/kopete/protocols/oscar/liboscar/oscarutils.h @@ -19,9 +19,9 @@ #ifndef _OSCARUTILS_H_ #define _OSCARUTILS_H_ -#include <qglobal.h> -#include <qvaluelist.h> -#include <qstring.h> +#include <tqglobal.h> +#include <tqvaluelist.h> +#include <tqstring.h> #include "oscartypes.h" #include "buffer.h" @@ -29,7 +29,7 @@ namespace Oscar { ///Normalize the contact name to all lowercase and no spaces -KOPETE_EXPORT QString normalize( const QString& ); +KOPETE_EXPORT TQString normalize( const TQString& ); ///compare TLVs for equality KOPETE_EXPORT bool operator==( TLV, TLV ); @@ -37,13 +37,13 @@ KOPETE_EXPORT bool operator==( TLV, TLV ); /** * Find the TLV corresponding to the type in the list */ -KOPETE_EXPORT TLV findTLV( const QValueList<TLV>&, int type ); +KOPETE_EXPORT TLV findTLV( const TQValueList<TLV>&, int type ); /** * Update TLVs of SSI item from TLV list if necessary * \return true if something was updated */ -KOPETE_EXPORT bool uptateTLVs( SSI& item, const QValueList<TLV>& list ); +KOPETE_EXPORT bool uptateTLVs( SSI& item, const TQValueList<TLV>& list ); /** * Get the value of the capability that corresponds to the value @@ -57,34 +57,34 @@ int parseCap( char* cap ); /** * Convert the capability to a string we can print */ -const QString capToString(char *cap); +const TQString capToString(char *cap); /** * Parse the character array for validness and a version string * \param buffer the buffer we'll be parsing for capabilities - * \param versionString a QString reference that will contain the - * version string of the detected client. Will be QString::null if + * \param versionString a TQString reference that will contain the + * version string of the detected client. Will be TQString::null if * no client is found * \return a DWORD containg a bit array of the capabilities we found */ -DWORD parseCapabilities(Buffer &inbuf, QString &versionString); +DWORD parseCapabilities(Buffer &inbuf, TQString &versionString); /** * Get the name of the capability from its number */ -const QString capName( int capNumber ); +const TQString capName( int capNumber ); /** * Convert an IP address in dotted decimal notation to a * numerical constant */ -DWORD getNumericalIP( const QString& address ); +DWORD getNumericalIP( const TQString& address ); /** * Convert a numerical constant that is an IP address to * dotted decimal format */ -QString getDottedDecimal( DWORD address ); +TQString getDottedDecimal( DWORD address ); } diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp index a1baf073..2cf57d53 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ #include "ownuserinfotask.h" -#include <qcstring.h> +#include <tqcstring.h> #include <kdebug.h> #include "buffer.h" #include "connection.h" @@ -70,7 +70,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) ud.fill( b ); m_details = ud; emit gotInfo(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } else @@ -83,7 +83,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) if ( flags == 0x41 ) //we need to do a buddy upload when bit 8 = 1 needUpload = true; - QByteArray qba; + TQByteArray qba; if ( b->length() != 0 ) { //buffer might be empty if flags bit 8 = 1 BYTE checksumLength = b->getByte(); @@ -104,11 +104,11 @@ bool OwnUserInfoTask::take( Transfer* transfer ) if ( infoType == 0x0002 ) { - QString availableMsg( b->getBSTR() ); + TQString availableMsg( b->getBSTR() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "self available message: " << endl; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.h b/kopete/protocols/oscar/liboscar/ownuserinfotask.h index 30a169db..35314df0 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.h +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.h @@ -44,9 +44,9 @@ signals: /** Emitted when user info is recieved. Needed because succeeded() is only emitted once. */ void gotInfo(); - void haveAvailableMessage( const QString& ); + void haveAvailableMessage( const TQString& ); - void haveIconChecksum( const QString& ); + void haveIconChecksum( const TQString& ); void buddyIconUploadRequested(); diff --git a/kopete/protocols/oscar/liboscar/prmparamstask.cpp b/kopete/protocols/oscar/liboscar/prmparamstask.cpp index 3668c73b..43580206 100644 --- a/kopete/protocols/oscar/liboscar/prmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/prmparamstask.cpp @@ -52,7 +52,7 @@ bool PRMParamsTask::take( Transfer* transfer ) if ( forMe( transfer ) ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Ignoring PRM Parameters. We don't use them" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } diff --git a/kopete/protocols/oscar/liboscar/profiletask.cpp b/kopete/protocols/oscar/liboscar/profiletask.cpp index d64d5dbe..4b0949ea 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.cpp +++ b/kopete/protocols/oscar/liboscar/profiletask.cpp @@ -18,7 +18,7 @@ #include "profiletask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "transfer.h" @@ -56,12 +56,12 @@ void ProfileTask::onGo() sendProfileUpdate(); } -void ProfileTask::setProfileText( const QString& text ) +void ProfileTask::setProfileText( const TQString& text ) { m_profileText = text; } -void ProfileTask::setAwayMessage( const QString& text ) +void ProfileTask::setAwayMessage( const TQString& text ) { m_awayMessage = text; } @@ -76,7 +76,7 @@ void ProfileTask::sendProfileUpdate() if ( !m_profileText.isNull() && !client()->isIcq() ) { - static const QString defencoding = "text/aolrtf; charset=\"us-ascii\""; + static const TQString defencoding = "text/aolrtf; charset=\"us-ascii\""; buffer->addTLV(0x0001, defencoding.length(), defencoding.latin1()); buffer->addTLV(0x0002, m_profileText.length(), m_profileText.local8Bit()); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting profile = " << m_profileText << endl; @@ -84,7 +84,7 @@ void ProfileTask::sendProfileUpdate() if ( !m_awayMessage.isNull() && !client()->isIcq() ) { - static const QString defencoding = "text/aolrtf; charset=\"us-ascii\""; + static const TQString defencoding = "text/aolrtf; charset=\"us-ascii\""; buffer->addTLV(0x0003, defencoding.length(), defencoding.latin1()); buffer->addTLV(0x0004, m_awayMessage.length(), m_awayMessage.local8Bit()); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting away message = " << m_awayMessage << endl; @@ -112,7 +112,7 @@ void ProfileTask::sendProfileUpdate() buffer->addTLV(0x0005, capBuf.length(), capBuf.buffer()); Transfer* st = createTransfer( f, s , buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/profiletask.h b/kopete/protocols/oscar/liboscar/profiletask.h index 23555105..a51075a5 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.h +++ b/kopete/protocols/oscar/liboscar/profiletask.h @@ -39,16 +39,16 @@ public: bool take( Transfer* transfer ); void onGo(); - void setProfileText( const QString& text ); - void setAwayMessage( const QString& text ); + void setProfileText( const TQString& text ); + void setAwayMessage( const TQString& text ); private: void sendProfileUpdate(); private: - QString m_profileText; - QString m_awayMessage; + TQString m_profileText; + TQString m_awayMessage; }; #endif diff --git a/kopete/protocols/oscar/liboscar/rateclass.cpp b/kopete/protocols/oscar/liboscar/rateclass.cpp index 7fee4239..d035c810 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.cpp +++ b/kopete/protocols/oscar/liboscar/rateclass.cpp @@ -16,14 +16,14 @@ */ #include "rateclass.h" -#include <qtimer.h> +#include <tqtimer.h> #include <kdebug.h> #include "transfer.h" using namespace Oscar; -RateClass::RateClass( QObject* parent ) -: QObject( parent, 0 ) +RateClass::RateClass( TQObject* parent ) +: TQObject( parent, 0 ) { m_waitingToSend = false; m_packetTimer.start(); @@ -70,8 +70,8 @@ void RateClass::addMember( WORD family, WORD subtype ) bool RateClass::isMember(const SNAC &s) const { - QValueList<SnacPair>::const_iterator it; - QValueList<SnacPair>::const_iterator spEnd = m_members.constEnd(); + TQValueList<SnacPair>::const_iterator it; + TQValueList<SnacPair>::const_iterator spEnd = m_members.constEnd(); for ( it = m_members.constBegin(); it != spEnd; ++it ) { if ( ( *it ).family == s.family && ( *it ).subtype == s.subtype ) @@ -83,8 +83,8 @@ bool RateClass::isMember(const SNAC &s) const bool RateClass::isMember( WORD family, WORD subtype ) const { - QValueList<SnacPair>::const_iterator it; - QValueList<SnacPair>::const_iterator spEnd = m_members.constEnd(); + TQValueList<SnacPair>::const_iterator it; + TQValueList<SnacPair>::const_iterator spEnd = m_members.constEnd(); for ( it = m_members.constBegin(); it != spEnd; ++it ) { if ( ( *it ).family == family && ( *it ).subtype == subtype ) @@ -194,7 +194,7 @@ void RateClass::setupTimer() } else { - QTimer::singleShot( ttns, this, SLOT( slotSend() ) ); //or send later + TQTimer::singleShot( ttns, this, TQT_SLOT( slotSend() ) ); //or send later } } } @@ -232,7 +232,7 @@ void RateClass::updateRateInfo() void RateClass::dumpQueue() { - QValueList<Transfer*>::iterator it = m_packetQueue.begin(); + TQValueList<Transfer*>::iterator it = m_packetQueue.begin(); while ( it != m_packetQueue.end() && m_packetQueue.count() > 0 ) { Transfer* t = ( *it ); diff --git a/kopete/protocols/oscar/liboscar/rateclass.h b/kopete/protocols/oscar/liboscar/rateclass.h index 1bb86f03..78ad8917 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.h +++ b/kopete/protocols/oscar/liboscar/rateclass.h @@ -19,10 +19,10 @@ #define RATECLASS_H #include "oscartypes.h" -#include <qobject.h> -#include <qvaluelist.h> -#include <qdatetime.h> -#include <qpair.h> +#include <tqobject.h> +#include <tqvaluelist.h> +#include <tqdatetime.h> +#include <tqpair.h> const int RATE_SAFETY_TIME = 50; @@ -38,7 +38,7 @@ class RateClass : public QObject { Q_OBJECT public: - RateClass( QObject* parent = 0 ); + RateClass( TQObject* parent = 0 ); ~RateClass(); /** Accessor for classid */ @@ -119,11 +119,11 @@ private slots: private: Oscar::RateInfo m_rateInfo; - QValueList<SnacPair> m_members; - QValueList<Transfer*> m_packetQueue; - QTime m_packetTimer; + TQValueList<SnacPair> m_members; + TQValueList<Transfer*> m_packetQueue; + TQTime m_packetTimer; - // we are waiting for the QTimer::singleShot() to send + // we are waiting for the TQTimer::singleShot() to send bool m_waitingToSend; }; diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp index 8b306c0b..59ef735e 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdebug.h> @@ -30,12 +30,12 @@ class RateClassManagerPrivate { public: //! The list of rate classes owned by this manager - QValueList<RateClass*> classList; + TQValueList<RateClass*> classList; Connection* client; }; RateClassManager::RateClassManager( Connection* parent, const char* name ) -: QObject( parent, name ) +: TQObject( parent, name ) { d = new RateClassManagerPrivate(); d->client = parent; @@ -49,7 +49,7 @@ RateClassManager::~RateClassManager() void RateClassManager::reset() { - QValueList<RateClass*>::iterator it = d->classList.begin(); + TQValueList<RateClass*>::iterator it = d->classList.begin(); while ( it != d->classList.end() && d->classList.count() > 0) { RateClass* rc = ( *it ); @@ -60,7 +60,7 @@ void RateClassManager::reset() void RateClassManager::registerClass( RateClass* rc ) { - QObject::connect( rc, SIGNAL( dataReady( Transfer* ) ), this, SLOT( transferReady( Transfer* ) ) ); + TQObject::connect( rc, TQT_SIGNAL( dataReady( Transfer* ) ), this, TQT_SLOT( transferReady( Transfer* ) ) ); d->classList.append( rc ); } @@ -110,7 +110,7 @@ void RateClassManager::queue( Transfer* t ) transferReady( t ); } -QValueList<RateClass*> RateClassManager::classList() const +TQValueList<RateClass*> RateClassManager::classList() const { return d->classList; } @@ -133,8 +133,8 @@ RateClass* RateClassManager::findRateClass( SnacTransfer* st ) const SNAC s = st->snac(); //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Looking for SNAC " << s.family << ", " << s.subtype << endl; RateClass* rc = 0L; - QValueList<RateClass*>::const_iterator it; - QValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd(); + TQValueList<RateClass*>::const_iterator it; + TQValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd(); for ( it = d->classList.constBegin(); it != rcEnd; ++it ) { @@ -151,16 +151,16 @@ RateClass* RateClassManager::findRateClass( SnacTransfer* st ) const void RateClassManager::recalcRateLevels() { - QValueList<RateClass*>::iterator it; - QValueList<RateClass*>::iterator rcEnd = d->classList.end(); + TQValueList<RateClass*>::iterator it; + TQValueList<RateClass*>::iterator rcEnd = d->classList.end(); for ( it = d->classList.begin(); it != rcEnd; ++it ) ( *it )->updateRateInfo(); } int RateClassManager::timeToInitialLevel( SNAC s ) { - QValueList<RateClass*>::const_iterator it; - QValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd(); + TQValueList<RateClass*>::const_iterator it; + TQValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd(); for ( it = d->classList.constBegin(); it != rcEnd; ++it ) { diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.h b/kopete/protocols/oscar/liboscar/rateclassmanager.h index 4b972ede..b1240f07 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.h +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.h @@ -19,9 +19,9 @@ #ifndef RATECLASSMANAGER_H #define RATECLASSMANAGER_H -#include <qobject.h> -#include <qvaluelist.h> -#include <qmap.h> +#include <tqobject.h> +#include <tqvaluelist.h> +#include <tqmap.h> #include "oscartypes.h" class Transfer; @@ -51,7 +51,7 @@ public: void queue( Transfer* t ); /** Get the list of rate classes */ - QValueList<RateClass*> classList() const; + TQValueList<RateClass*> classList() const; /** Recalculate the rate levels for all the classes */ void recalcRateLevels(); diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.cpp b/kopete/protocols/oscar/liboscar/rateinfotask.cpp index f19cf792..08002b8a 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/rateinfotask.cpp @@ -18,7 +18,7 @@ #include "rateinfotask.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdebug.h> #include "rateclass.h" #include "rateclassmanager.h" @@ -32,7 +32,7 @@ using namespace Oscar; RateInfoTask::RateInfoTask( Task* parent ) : Task( parent ) { - connect( this, SIGNAL( gotRateLimits() ), this, SLOT( sendRateInfoAck() ) ); + connect( this, TQT_SIGNAL( gotRateLimits() ), this, TQT_SLOT( sendRateInfoAck() ) ); } @@ -80,7 +80,7 @@ void RateInfoTask::sendRateInfoRequest() void RateInfoTask::handleRateInfoResponse() { - QValueList<RateClass*> rates; + TQValueList<RateClass*> rates; Oscar::RateInfo ri; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "handling rate info response (SNAC 0x01, 0x07)" << endl; @@ -119,7 +119,7 @@ void RateInfoTask::handleRateInfoResponse() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding snac members to group " << groupNum << endl; RateClass* rc = 0L; - QValueList<RateClass*>::iterator it = rates.begin(); + TQValueList<RateClass*>::iterator it = rates.begin(); for ( ; it != rates.end(); ++it ) { if ( ( *it )->id() == groupNum ) @@ -139,8 +139,8 @@ void RateInfoTask::handleRateInfoResponse() } } - QValueList<RateClass*>::iterator it = rates.begin(); - QValueList<RateClass*>::iterator rcEnd = rates.end(); + TQValueList<RateClass*>::iterator it = rates.begin(); + TQValueList<RateClass*>::iterator rcEnd = rates.end(); for ( ; it != rcEnd; ++it ) client()->rateManager()->registerClass( ( *it ) ); @@ -154,8 +154,8 @@ void RateInfoTask::sendRateInfoAck() SNAC s = { 0x0001, 0x0008, 0x0000, client()->snacSequence() }; Buffer* buffer = new Buffer(); - QValueListConstIterator<int> cit = m_rateGroups.begin(); - QValueListConstIterator<int> end = m_rateGroups.end(); + TQValueListConstIterator<int> cit = m_rateGroups.begin(); + TQValueListConstIterator<int> end = m_rateGroups.end(); for ( cit = m_rateGroups.begin(); cit != end; ++cit ) { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding rate " << (*cit) << " to rate ack" << endl; @@ -164,7 +164,7 @@ void RateInfoTask::sendRateInfoAck() Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "rateinfotask.moc" diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.h b/kopete/protocols/oscar/liboscar/rateinfotask.h index 3964f0ea..013559f6 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.h +++ b/kopete/protocols/oscar/liboscar/rateinfotask.h @@ -20,7 +20,7 @@ #define RATEINFOTASK_H #include "task.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> using namespace Oscar; @@ -56,7 +56,7 @@ private slots: private: bool m_needRateAck; - QValueList<int> m_rateGroups; + TQValueList<int> m_rateGroups; }; //kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/rtf.cc b/kopete/protocols/oscar/liboscar/rtf.cc index bb4d88ee..39c16bc4 100644 --- a/kopete/protocols/oscar/liboscar/rtf.cc +++ b/kopete/protocols/oscar/liboscar/rtf.cc @@ -1627,25 +1627,25 @@ void ParStyle::clearFormatting() // dir is not a formatting item. } -QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) +TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode) { - QString str = _str; - str.replace(QRegExp("&"), "&"); - str.replace(QRegExp("<"), "<"); - str.replace(QRegExp(">"), ">"); - str.replace(QRegExp("\""), """); - str.replace(QRegExp("\r"), ""); + TQString str = _str; + str.replace(TQRegExp("&"), "&"); + str.replace(TQRegExp("<"), "<"); + str.replace(TQRegExp(">"), ">"); + str.replace(TQRegExp("\""), """); + str.replace(TQRegExp("\r"), ""); switch (mode){ case quoteHTML: - str.replace(QRegExp("\n"), "<br>\n"); + str.replace(TQRegExp("\n"), "<br>\n"); break; case quoteXML: - str.replace(QRegExp("\n"), "<br/>\n"); + str.replace(TQRegExp("\n"), "<br/>\n"); break; default: break; } - QRegExp re(" +"); + TQRegExp re(" +"); int len; int pos = 0; @@ -1654,7 +1654,7 @@ QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) if (len == 1) continue; - QString s = " "; + TQString s = " "; for (int i = 1; i < len; i++) s += " "; str.replace(pos, len, s); @@ -1690,7 +1690,7 @@ void RTF2HTML::FlushOutTags() // RTF colors are 1-based; colors[] is a 0-based array. if (t.param > colors.size() || t.param == 0) break; - QColor &c = colors[t.param-1]; + TQColor &c = colors[t.param-1]; PrintUnquoted("<span style=\"color:#%02X%02X%02X\">", c.red(), c.green(), c.blue()); } break; @@ -1707,7 +1707,7 @@ void RTF2HTML::FlushOutTags() case TAG_BG_COLOR:{ if (t.param > colors.size()) break; - QColor &c = colors[t.param]; + TQColor &c = colors[t.param]; PrintUnquoted("<span style=\"background-color:#%02X%02X%02X;\">", c.red(), c.green(), c.blue()); break; } @@ -1878,7 +1878,7 @@ void RTF2HTML::PrintUnquoted(const char *str, ...) sParagraph += buff; } -void RTF2HTML::PrintQuoted(const QString &str) +void RTF2HTML::PrintQuoted(const TQString &str) { sParagraph += quoteString(str); } @@ -2110,7 +2110,7 @@ void Level::reset() resetTag(TAG_ALL); if (m_bColors){ if (m_bColorInit){ - QColor c(m_nRed, m_nGreen, m_nBlue); + TQColor c(m_nRed, m_nGreen, m_nBlue); p->colors.push_back(c); resetColors(); } @@ -2181,7 +2181,7 @@ void Level::flush() if (encoding == NULL) encoding = p->encoding; - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); */ //p->PrintQuoted(codec->toUnicode(text.c_str(), text.length())); p->PrintQuoted(text.c_str()); @@ -2245,7 +2245,7 @@ static char h2d(char c) return 0; } -QString RTF2HTML::Parse(const char *rtf, const char *_encoding) +TQString RTF2HTML::Parse(const char *rtf, const char *_encoding) { encoding = _encoding; YY_BUFFER_STATE yy_current_buffer = yy_scan_string(rtf); @@ -2313,7 +2313,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) break; case UNICODE_CHAR:{ cur_level.flush(); - sParagraph += QChar((unsigned short)(atol(yytext + 2))); + sParagraph += TQChar((unsigned short)(atol(yytext + 2))); break; } case HEX:{ @@ -2412,7 +2412,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) } /* -bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) +bool ICQClient::parseRTF(const char *rtf, const char *encoding, TQString &res) { char _RTF[] = "{\\rtf"; if ((strlen(rtf) > strlen(_RTF)) && !memcmp(rtf, _RTF, strlen(_RTF))){ @@ -2420,7 +2420,7 @@ bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) res = p.Parse(rtf, encoding); return true; } - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); res = codec->toUnicode(rtf, strlen(rtf)); return false; } diff --git a/kopete/protocols/oscar/liboscar/rtf2html.h b/kopete/protocols/oscar/liboscar/rtf2html.h index a305b89d..5685e4a1 100644 --- a/kopete/protocols/oscar/liboscar/rtf2html.h +++ b/kopete/protocols/oscar/liboscar/rtf2html.h @@ -18,12 +18,12 @@ #ifndef RTF2HTML_H #define RTF2HTML_H -#include <qstring.h> +#include <tqstring.h> #include <stdio.h> -#include <qtextcodec.h> -#include <qcolor.h> -#include <qregexp.h> +#include <tqtextcodec.h> +#include <tqcolor.h> +#include <tqregexp.h> #include <kdebug.h> #include <vector> @@ -149,15 +149,15 @@ class RTF2HTML public: RTF2HTML(); - QString Parse(const char *rtf, const char *encoding); + TQString Parse(const char *rtf, const char *encoding); // Paragraph-specific functions: - QString quoteString(const QString &_str, quoteMode mode = quoteHTML); + TQString quoteString(const TQString &_str, quoteMode mode = quoteHTML); // Appends a string with formatting into the paragraph buffer. void PrintUnquoted(const char *str, ...); // Quotes and appends a string to the paragraph buffer. - void PrintQuoted(const QString &str); + void PrintQuoted(const TQString &str); // Writes down the tags from oTags into the paragraph buffer. void FlushOutTags(); // Retrieves the top not-yet-written tag. @@ -179,7 +179,7 @@ protected: // True if the paragraph was opened explicitly. bool bExplicitParagraph; // The paragraph's HTML buffer. - QString sParagraph; + TQString sParagraph; // Defines the paragraph's formatting. ParStyle parStyle; // Tags which weren't yet printed out. @@ -188,11 +188,11 @@ protected: // Document members // The document HTML buffer. - QString s; + TQString s; // Fonts table. vector<FontDef> fonts; // Colors table. - vector<QColor> colors; + vector<TQColor> colors; // Stack of tags (across all levels, not just current level) stack<TagEnum> tags; diff --git a/kopete/protocols/oscar/liboscar/safedelete.cpp b/kopete/protocols/oscar/liboscar/safedelete.cpp index 703e8ed3..5dde3725 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.cpp +++ b/kopete/protocols/oscar/liboscar/safedelete.cpp @@ -19,7 +19,7 @@ #include "safedelete.h" -#include <qtimer.h> +#include <tqtimer.h> //---------------------------------------------------------------------------- // SafeDelete @@ -35,7 +35,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -54,16 +54,16 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -116,7 +116,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -125,7 +125,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/oscar/liboscar/safedelete.h b/kopete/protocols/oscar/liboscar/safedelete.h index e8215c06..0d4150d9 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.h +++ b/kopete/protocols/oscar/liboscar/safedelete.h @@ -20,8 +20,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include<qobject.h> -#include<qobjectlist.h> +#include<tqobject.h> +#include<tqobjectlist.h> class SafeDelete; class SafeDeleteLock @@ -43,13 +43,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -62,7 +62,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -71,7 +71,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp index af80e191..2b5dbbae 100644 --- a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp @@ -100,7 +100,7 @@ void SendDCInfoTask::onGo() Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp index f0601e22..ba753471 100644 --- a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp @@ -45,7 +45,7 @@ void SendIdleTimeTask::onGo() Transfer *t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp index 48509595..1b8cbfbc 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp @@ -344,13 +344,13 @@ void SendMessageTask::addRendezvousMessageData( Buffer* b ) /* Old oscarsocket code, which is here for reference in case this doesn't work -QTextCodec *codec = 0L; +TQTextCodec *codec = 0L; WORD charset = 0x0000; // default to ascii WORD charsubset = 0x0000; int length = message.length(); unsigned char *utfMessage = 0L; -codec=QTextCodec::codecForMib(3); // US-ASCII +codec=TQTextCodec::codecForMib(3); // US-ASCII if(codec) { @@ -360,7 +360,7 @@ if(codec) // We are forcing kopete to send messages using ISO-8859-1 // It's a hack and should be reimplemented in a better way charset=0x0003; - codec=QTextCodec::codecForMib(4); + codec=TQTextCodec::codecForMib(4); //kdDebug(14151) << k_funcinfo << "Now trying ISO-8859-1" << endl; } else @@ -388,7 +388,7 @@ if ( !codec && ( contact->hasCap(CAP_UTF8) || !contact->encoding() ) ) // no codec and no charset and per-contact encoding set if(!codec && charset != 0x0002 && contact->encoding() != 0) { - codec=QTextCodec::codecForMib(contact->encoding()); + codec=TQTextCodec::codecForMib(contact->encoding()); if(codec) charset=0x0003; //send as ISO-8859-1 } @@ -399,7 +399,7 @@ if(!codec && charset != 0x0002) // it's neither unicode nor did we find a codec "Couldn't find suitable encoding for outgoing message, " << "encoding using ISO-8859-1, prepare for receiver getting unreadable text :)" << endl; charset=0x0003; - codec=QTextCodec::codecForMib(4); // ISO-8859-1 + codec=TQTextCodec::codecForMib(4); // ISO-8859-1 } tlv2.addWord(0x0101); //add TLV(0x0101) also known as TLV(257) @@ -416,7 +416,7 @@ if(utfMessage) else { kdDebug(14151) << k_funcinfo << "Outgoing message encoded as '" << codec->name() << "'" << endl; - QCString outgoingMessage=codec->fromUnicode(message); + TQCString outgoingMessage=codec->fromUnicode(message); tlv2.addString(outgoingMessage, length); // the actual message } // ==================================================================================== diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.h b/kopete/protocols/oscar/liboscar/sendmessagetask.h index 0eaff13f..18e03c73 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.h +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.h @@ -18,7 +18,7 @@ #define SENDMESSAGETASK_H #include "task.h" -#include <qstring.h> +#include <tqstring.h> #include "oscarmessage.h" /** @author Kopete Developers diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp index 32cb105f..5875e6a8 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp @@ -36,7 +36,7 @@ void ServerRedirectTask::setService( WORD family ) m_service = family; } -void ServerRedirectTask::setChatParams( WORD exchange, QByteArray cookie, WORD instance ) +void ServerRedirectTask::setChatParams( WORD exchange, TQByteArray cookie, WORD instance ) { m_chatExchange = exchange; m_chatCookie.duplicate( cookie ); @@ -44,7 +44,7 @@ void ServerRedirectTask::setChatParams( WORD exchange, QByteArray cookie, WORD i m_chatInstance = instance; } -void ServerRedirectTask::setChatRoom( const QString& roomName ) +void ServerRedirectTask::setChatRoom( const TQString& roomName ) { m_chatRoom = roomName; } @@ -75,7 +75,7 @@ bool ServerRedirectTask::take( Transfer* transfer ) setTransfer( transfer ); bool value = handleRedirect(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return value; } @@ -126,7 +126,7 @@ bool ServerRedirectTask::handleRedirect() return false; TLV server = b->getTLV(); - m_newHost = QString( server.data ); + m_newHost = TQString( server.data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Host for service " << m_service << " is " << m_newHost << endl; if ( m_newHost.isEmpty() ) @@ -143,12 +143,12 @@ bool ServerRedirectTask::handleRedirect() return true; } -QByteArray ServerRedirectTask::cookie() const +TQByteArray ServerRedirectTask::cookie() const { return m_cookie; } -QString ServerRedirectTask::newHost() const +TQString ServerRedirectTask::newHost() const { return m_newHost; } @@ -163,7 +163,7 @@ WORD ServerRedirectTask::chatExchange() const return m_chatExchange; } -QString ServerRedirectTask::chatRoomName() const +TQString ServerRedirectTask::chatRoomName() const { return m_chatRoom; } diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.h b/kopete/protocols/oscar/liboscar/serverredirecttask.h index 785ac0df..972e28ce 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.h +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.h @@ -23,7 +23,7 @@ #include "task.h" -#include <qcstring.h> +#include <tqcstring.h> #include "oscartypes.h" @@ -36,11 +36,11 @@ public: ServerRedirectTask( Task* parent ); void setService( WORD family ); - void setChatParams( WORD exchange, QByteArray cookie, WORD instance ); - void setChatRoom( const QString& roomName ); + void setChatParams( WORD exchange, TQByteArray cookie, WORD instance ); + void setChatRoom( const TQString& roomName ); WORD chatExchange() const; - QString chatRoomName() const; + TQString chatRoomName() const; //Task implementation void onGo(); @@ -50,22 +50,22 @@ public: void requestNewService(); bool handleRedirect(); - QByteArray cookie() const; - QString newHost() const; + TQByteArray cookie() const; + TQString newHost() const; WORD service() const; signals: - void haveServer( const QString&, const QByteArray&, WORD ); + void haveServer( const TQString&, const TQByteArray&, WORD ); private: WORD m_service; - QString m_newHost; - QByteArray m_cookie; + TQString m_newHost; + TQByteArray m_cookie; WORD m_chatExchange; - QByteArray m_chatCookie; + TQByteArray m_chatCookie; WORD m_chatInstance; - QString m_chatRoom; + TQString m_chatRoom; }; diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.cpp b/kopete/protocols/oscar/liboscar/serverversionstask.cpp index e4186f18..b2e7dfa6 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.cpp +++ b/kopete/protocols/oscar/liboscar/serverversionstask.cpp @@ -101,7 +101,7 @@ void ServerVersionsTask::handleFamilies() Buffer* outbuf = transfer()->buffer(); if ( outbuf->length() % 2 != 0 ) { - setError( -1, QString::null ); + setError( -1, TQString::null ); return; } @@ -163,7 +163,7 @@ void ServerVersionsTask::handleServerVersions() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "server version=" << buffer->getWord() << ", server family=" << buffer->getWord() << endl; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "serverversionstask.moc" diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.h b/kopete/protocols/oscar/liboscar/serverversionstask.h index a9c56f35..f3a72a38 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.h +++ b/kopete/protocols/oscar/liboscar/serverversionstask.h @@ -20,7 +20,7 @@ #define SERVERVERSIONSTASK_H #include "task.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "oscartypes.h" class Transfer; @@ -52,7 +52,7 @@ private: void requestFamilyVersions(); private: - QValueList<int> m_familiesList; + TQValueList<int> m_familiesList; WORD m_family; }; diff --git a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp index 13e30101..61f53279 100644 --- a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp +++ b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp @@ -47,14 +47,14 @@ ServiceSetupTask::ServiceSetupTask( Task* parent ) m_ssiListTask = new SSIListTask( parent ); m_ssiActivateTask = new SSIActivateTask( parent ); - QObject::connect( m_ssiListTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_ssiParamTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_prmTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_icbmTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_blmLimitsTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_profileTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_locRightsTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_ssiActivateTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiListTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiParamTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_prmTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_icbmTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_blmLimitsTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_profileTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_locRightsTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiActivateTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); } @@ -95,7 +95,7 @@ void ServiceSetupTask::childTaskFinished() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Sending DC info and client ready" << endl; SendIdleTimeTask* sitt = new SendIdleTimeTask( client()->rootTask() ); - QValueList<int> familyList; + TQValueList<int> familyList; familyList.append( 0x0001 ); familyList.append( 0x0002 ); familyList.append( 0x0003 ); @@ -114,7 +114,7 @@ void ServiceSetupTask::childTaskFinished() if ( m_finishedTaskCount == 8 ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Service setup finished" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } } diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.cpp b/kopete/protocols/oscar/liboscar/snacprotocol.cpp index 3bf16bbc..3ec5c348 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/snacprotocol.cpp @@ -19,9 +19,9 @@ #include "snacprotocol.h" -#include <qcstring.h> -#include <qdatastream.h> -#include <qobject.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqobject.h> #include <kdebug.h> #include <stdlib.h> #include "transfer.h" @@ -29,7 +29,7 @@ using namespace Oscar; -SnacProtocol::SnacProtocol(QObject *parent, const char *name) +SnacProtocol::SnacProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -38,7 +38,7 @@ SnacProtocol::~SnacProtocol() { } -Transfer* SnacProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* SnacProtocol::parse( const TQByteArray & packet, uint& bytes ) { BYTE b; WORD w; @@ -47,7 +47,7 @@ Transfer* SnacProtocol::parse( const QByteArray & packet, uint& bytes ) FLAP f; SNAC s; SnacTransfer *st; - QDataStream* m_din = new QDataStream( packet, IO_ReadOnly ); + TQDataStream* m_din = new TQDataStream( packet, IO_ReadOnly ); //flap parsing *m_din >> b; //this should be the start byte diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.h b/kopete/protocols/oscar/liboscar/snacprotocol.h index eea5c032..18c6aaaa 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.h +++ b/kopete/protocols/oscar/liboscar/snacprotocol.h @@ -29,7 +29,7 @@ class SnacProtocol : public InputProtocolBase { Q_OBJECT public: - SnacProtocol( QObject *parent = 0, const char *name = 0 ); + SnacProtocol( TQObject *parent = 0, const char *name = 0 ); ~SnacProtocol(); /** @@ -39,7 +39,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an EventTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; diff --git a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp index 1e7a17d6..795d9999 100644 --- a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp @@ -44,7 +44,7 @@ void SSIActivateTask::onGo() Buffer* buffer = new Buffer(); Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp index 59188d2b..bccb754e 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp @@ -86,7 +86,7 @@ bool SSIAuthTask::take( Transfer* t ) return false; } -void SSIAuthTask::grantFutureAuth( const QString& uin, const QString& reason ) +void SSIAuthTask::grantFutureAuth( const TQString& uin, const TQString& reason ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x0014, 0x0000, client()->snacSequence() }; @@ -100,7 +100,7 @@ void SSIAuthTask::grantFutureAuth( const QString& uin, const QString& reason ) send( t ); } -void SSIAuthTask::sendAuthRequest( const QString& uin, const QString& reason ) +void SSIAuthTask::sendAuthRequest( const TQString& uin, const TQString& reason ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x0018, 0x0000, client()->snacSequence() }; @@ -114,7 +114,7 @@ void SSIAuthTask::sendAuthRequest( const QString& uin, const QString& reason ) send( t ); } -void SSIAuthTask::sendAuthReply( const QString& uin, const QString& reason, bool auth ) +void SSIAuthTask::sendAuthReply( const TQString& uin, const TQString& reason, bool auth ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x001A, 0x0000, client()->snacSequence() }; @@ -132,38 +132,38 @@ void SSIAuthTask::handleFutureAuthGranted() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); - QByteArray reason = buf->getBSTR(); + TQString uin = Oscar::normalize( buf->getBUIN() ); + TQByteArray reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Future authorization granted from " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit futureAuthGranted( uin, QString::fromUtf8( reason.data(), reason.size() ) ); + emit futureAuthGranted( uin, TQString::fromUtf8( reason.data(), reason.size() ) ); } void SSIAuthTask::handleAuthRequested() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); - QByteArray reason = buf->getBSTR(); + TQString uin = Oscar::normalize( buf->getBUIN() ); + TQByteArray reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization requested from " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit authRequested( uin, QString::fromUtf8( reason.data(), reason.size() ) ); + emit authRequested( uin, TQString::fromUtf8( reason.data(), reason.size() ) ); } void SSIAuthTask::handleAuthReplied() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); + TQString uin = Oscar::normalize( buf->getBUIN() ); bool accepted = buf->getByte(); - QByteArray reason = buf->getBSTR(); + TQByteArray reason = buf->getBSTR(); if ( accepted ) kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization request accepted by " << uin << endl; @@ -171,14 +171,14 @@ void SSIAuthTask::handleAuthReplied() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization request declined by " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit authReplied( uin, QString::fromUtf8( reason.data(), reason.size() ), accepted ); + emit authReplied( uin, TQString::fromUtf8( reason.data(), reason.size() ), accepted ); } void SSIAuthTask::handleAddedMessage() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); + TQString uin = Oscar::normalize( buf->getBUIN() ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "User " << uin << " added you to the contact list" << endl; emit contactAddedYou( uin ); diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.h b/kopete/protocols/oscar/liboscar/ssiauthtask.h index d470cfe9..1760f344 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.h +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.h @@ -37,14 +37,14 @@ public: virtual bool forMe( const Transfer* t ) const; virtual bool take( Transfer* t ); - void grantFutureAuth( const QString& uin, const QString& reason ); - void sendAuthRequest( const QString& uin, const QString& reason ); - void sendAuthReply( const QString& uin, const QString& reason, bool auth ); + void grantFutureAuth( const TQString& uin, const TQString& reason ); + void sendAuthRequest( const TQString& uin, const TQString& reason ); + void sendAuthReply( const TQString& uin, const TQString& reason, bool auth ); signals: - void futureAuthGranted( const QString& uin, const QString& reason ); - void authRequested( const QString& uin, const QString& reason ); - void authReplied( const QString& uin, const QString& reason, bool auth ); - void contactAddedYou( const QString& uin ); + void futureAuthGranted( const TQString& uin, const TQString& reason ); + void authRequested( const TQString& uin, const TQString& reason ); + void authReplied( const TQString& uin, const TQString& reason, bool auth ); + void contactAddedYou( const TQString& uin ); private: void handleFutureAuthGranted(); void handleAuthRequested(); diff --git a/kopete/protocols/oscar/liboscar/ssilisttask.cpp b/kopete/protocols/oscar/liboscar/ssilisttask.cpp index fe2a981d..d52f7f4e 100644 --- a/kopete/protocols/oscar/liboscar/ssilisttask.cpp +++ b/kopete/protocols/oscar/liboscar/ssilisttask.cpp @@ -26,9 +26,9 @@ SSIListTask::SSIListTask( Task* parent ) : Task( parent ) { m_ssiManager = client()->ssiManager(); - QObject::connect( this, SIGNAL( newContact( const Oscar::SSI& ) ), m_ssiManager, SLOT( newContact( const Oscar::SSI& ) ) ); - QObject::connect( this, SIGNAL( newGroup( const Oscar::SSI& ) ), m_ssiManager, SLOT( newGroup( const Oscar::SSI& ) ) ); - QObject::connect( this, SIGNAL( newItem( const Oscar::SSI& ) ), m_ssiManager, SLOT( newItem( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newContact( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newContact( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newGroup( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newGroup( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newItem( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newItem( const Oscar::SSI& ) ) ); } @@ -87,7 +87,7 @@ void SSIListTask::onGo() void SSIListTask::handleSSIListReply() { - QValueList<TLV> tlvList; + TQValueList<TLV> tlvList; Buffer* buffer = transfer()->buffer(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "SSI Protocol version: " << buffer->getByte() << endl; @@ -98,7 +98,7 @@ void SSIListTask::handleSSIListReply() { tlvList.clear(); WORD strlength = buffer->getWord(); - QString itemName = QString::fromUtf8( buffer->getBlock( strlength ), strlength ); + TQString itemName = TQString::fromUtf8( buffer->getBlock( strlength ), strlength ); WORD groupId = buffer->getWord(); WORD itemId = buffer->getWord(); WORD itemType = buffer->getWord(); @@ -136,7 +136,7 @@ void SSIListTask::handleSSIListReply() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "SSI List complete" << endl; client()->ssiManager()->setListComplete( true ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } else kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Awaiting another SSI packet" << endl; @@ -154,7 +154,7 @@ void SSIListTask::handleSSIUpToDate() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Number of items in SSI list: " << ssiItems << endl; client()->ssiManager()->setListComplete( true ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void SSIListTask::checkSSITimestamp() 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++ ) { diff --git a/kopete/protocols/oscar/liboscar/ssimanager.h b/kopete/protocols/oscar/liboscar/ssimanager.h index 24e87c6a..df39268c 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.h +++ b/kopete/protocols/oscar/liboscar/ssimanager.h @@ -22,8 +22,8 @@ #ifndef SSIMANAGER_H #define SSIMANAGER_H -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> #include "oscartypes.h" #include "oscartypeclasses.h" @@ -42,7 +42,7 @@ class KOPETE_EXPORT SSIManager : public QObject { Q_OBJECT public: - SSIManager( QObject* parent = 0, const char* name = 0 ); + SSIManager( TQObject* parent = 0, const char* name = 0 ); ~SSIManager(); @@ -73,29 +73,29 @@ public: * The current SSI list will be overwritten and it's contents * replaced with the data from the new list */ - void loadFromExisting( const QValueList<Oscar::SSI*>& newList ); + void loadFromExisting( const TQValueList<Oscar::SSI*>& newList ); bool hasItem( const Oscar::SSI& item ) const; - Oscar::SSI findGroup( const QString& group ) const; + Oscar::SSI findGroup( const TQString& group ) const; Oscar::SSI findGroup( int groupId ) const; - Oscar::SSI findContact( const QString& contact, const QString& group ) const; - Oscar::SSI findContact( const QString& contact ) const; + Oscar::SSI findContact( const TQString& contact, const TQString& group ) const; + Oscar::SSI findContact( const TQString& contact ) const; Oscar::SSI findContact( int contactId ) const; - Oscar::SSI findItemForIcon( QByteArray iconHash ) const; + Oscar::SSI findItemForIcon( TQByteArray iconHash ) const; Oscar::SSI findItemForIconByRef( int ) const; - Oscar::SSI findItem( const QString &contact, int type ) const; + Oscar::SSI findItem( const TQString &contact, int type ) const; - QValueList<Oscar::SSI> groupList() const; - QValueList<Oscar::SSI> contactList() const; - QValueList<Oscar::SSI> visibleList() const; - QValueList<Oscar::SSI> invisibleList() const; - QValueList<Oscar::SSI> contactsFromGroup( const QString& group ) const; - QValueList<Oscar::SSI> contactsFromGroup( int groupId ) const; + TQValueList<Oscar::SSI> groupList() const; + TQValueList<Oscar::SSI> contactList() const; + TQValueList<Oscar::SSI> visibleList() const; + TQValueList<Oscar::SSI> invisibleList() const; + TQValueList<Oscar::SSI> contactsFromGroup( const TQString& group ) const; + TQValueList<Oscar::SSI> contactsFromGroup( int groupId ) const; Oscar::SSI visibilityItem() const; @@ -106,12 +106,12 @@ public slots: bool newGroup( const Oscar::SSI& group ); bool updateGroup( const Oscar::SSI& group ); bool removeGroup( const Oscar::SSI& group ); - bool removeGroup( const QString& group ); + bool removeGroup( const TQString& group ); bool newContact( const Oscar::SSI& contact ); bool updateContact( const Oscar::SSI& contact ); bool removeContact( const Oscar::SSI& contact ); - bool removeContact( const QString& contact ); + bool removeContact( const TQString& contact ); bool newItem( const Oscar::SSI& item ); bool updateItem( const Oscar::SSI& item ); @@ -129,7 +129,7 @@ signals: void contactUpdated( const Oscar::SSI& ); //! Emitted when we've removed a contact from the list - void contactRemoved( const QString& contactName ); + void contactRemoved( const TQString& contactName ); //! Emitted when we've added a new group to the list void groupAdded( const Oscar::SSI& ); @@ -138,12 +138,12 @@ signals: void groupUpdated( const Oscar::SSI& ); //! Emitted when we've removed a group from the ssi list - void groupRemoved( const QString& groupName ); + void groupRemoved( const TQString& groupName ); - void modifyError( const QString& error ); + void modifyError( const TQString& error ); private: - WORD findFreeId( const QValueList<WORD>& idList, WORD fromId ) const; + WORD findFreeId( const TQValueList<WORD>& idList, WORD fromId ) const; SSIManagerPrivate* d; Oscar::SSI m_dummyItem; diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp index 2091fca8..b4194b5e 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp @@ -22,7 +22,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> #include "connection.h" #include "oscarutils.h" #include "transfer.h" @@ -73,12 +73,12 @@ bool SSIModifyTask::take( Transfer* transfer ) return false; } -bool SSIModifyTask::addContact( const QString& contact, const QString& group, bool requiresAuth ) +bool SSIModifyTask::addContact( const TQString& contact, const TQString& group, bool requiresAuth ) { m_opType = Add; m_opSubject = Contact; - QString newContact = Oscar::normalize( contact ); + TQString newContact = Oscar::normalize( contact ); Oscar::SSI oldItem = m_ssiManager->findContact( newContact ); Oscar::SSI groupItem = m_ssiManager->findGroup( group ); @@ -90,7 +90,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo } //create new SSI item and populate the TLV list - QValueList<TLV> tlvList; + TQValueList<TLV> tlvList; if ( requiresAuth ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "This contact requires auth. adding appropriate tlv" << endl; @@ -104,7 +104,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo return true; } -bool SSIModifyTask::removeContact( const QString& contact ) +bool SSIModifyTask::removeContact( const TQString& contact ) { m_opType = Remove; m_opSubject = Contact; @@ -113,7 +113,7 @@ bool SSIModifyTask::removeContact( const QString& contact ) return true; } -bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup ) +bool SSIModifyTask::changeGroup( const TQString& contact, const TQString& newGroup ) { m_opType = Change; m_opSubject = Group; @@ -144,19 +144,19 @@ bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup return true; } -bool SSIModifyTask::addGroup( const QString& groupName ) +bool SSIModifyTask::addGroup( const TQString& groupName ) { m_opType = Add; m_opSubject = Group; m_newItem = m_ssiManager->findGroup( groupName ); - QValueList<TLV> dummy; + TQValueList<TLV> dummy; Oscar::SSI newItem( groupName, m_ssiManager->nextGroupId(), 0, ROSTER_GROUP, dummy ); m_newItem = newItem; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding group '" << m_newItem.name() << "' to SSI" << endl; return true; } -bool SSIModifyTask::removeGroup( const QString& groupName ) +bool SSIModifyTask::removeGroup( const TQString& groupName ) { m_opType = Remove; m_opSubject = Group; @@ -165,7 +165,7 @@ bool SSIModifyTask::removeGroup( const QString& groupName ) return true; } -bool SSIModifyTask::renameGroup( const QString& oldName, const QString & newName ) +bool SSIModifyTask::renameGroup( const TQString& oldName, const TQString & newName ) { m_opType = Rename; m_opSubject = Group; @@ -254,36 +254,36 @@ void SSIModifyTask::handleSSIAck() break; case 0x0002: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item to modify not found in list" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x0003: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item already exists in SSI" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000A: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Error adding item ( invalid id, already in list, invalid data )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000C: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item. Limit exceeded." << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000D: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add ICQ item to AIM list ( and vice versa )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000E: { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item because contact requires authorization" << endl; Oscar::SSI groupItem = m_ssiManager->findGroup( m_newItem.gid() ); - QString groupName = groupItem.name(); + TQString groupName = groupItem.name(); addContact( m_newItem.name(), groupName, true ); go(); break; } default: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Unknown acknowledgement code" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; } }; @@ -391,7 +391,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the old group item to remove the bid we're //moving to a different group - QValueList<TLV> list = oldGroupItem.tlvList(); + TQValueList<TLV> list = oldGroupItem.tlvList(); TLV oldIds = Oscar::findTLV( list, 0x00C8 ); if ( oldIds.type == 0x00C8 ) { @@ -414,7 +414,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the new group item to add the bid we're //adding to this group - QValueList<TLV> list2 = m_groupItem.tlvList(); + TQValueList<TLV> list2 = m_groupItem.tlvList(); TLV oldIds2 = Oscar::findTLV( list2, 0x00C8 ); TLV newGroupTLV; if ( oldIds2.type == 0x00C8 ) @@ -466,7 +466,7 @@ void SSIModifyTask::updateSSIManager() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "and adding " << m_newItem.name() << " to SSI manager" << endl; m_ssiManager->newItem( m_newItem ); } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -479,7 +479,7 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->removeContact( m_oldItem.name() ); else if ( m_opSubject == NoSubject ) m_ssiManager->removeItem( m_oldItem ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -492,11 +492,11 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->newContact( m_newItem ); else if ( m_opSubject == NoSubject ) m_ssiManager->newItem( m_newItem ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void SSIModifyTask::freeIdOnError() @@ -550,18 +550,18 @@ void SSIModifyTask::addItemToBuffer( Oscar::SSI item, Buffer* buffer ) buffer->addWord( item.type() ); buffer->addWord( item.tlvListLength() ); - QValueList<TLV>::const_iterator it = item.tlvList().begin(); - QValueList<TLV>::const_iterator listEnd = item.tlvList().end(); + TQValueList<TLV>::const_iterator it = item.tlvList().begin(); + TQValueList<TLV>::const_iterator listEnd = item.tlvList().end(); for( ; it != listEnd; ++it ) buffer->addTLV( ( *it ) ); } Oscar::SSI SSIModifyTask::getItemFromBuffer( Buffer* buffer ) const { - QValueList<TLV> tlvList; + TQValueList<TLV> tlvList; WORD strlength = buffer->getWord(); - QString itemName = QString::fromUtf8( buffer->getBlock( strlength ), strlength ); + TQString itemName = TQString::fromUtf8( buffer->getBlock( strlength ), strlength ); WORD groupId = buffer->getWord(); WORD itemId = buffer->getWord(); WORD itemType = buffer->getWord(); diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.h b/kopete/protocols/oscar/liboscar/ssimodifytask.h index 2c32dda3..70486cbc 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.h +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.h @@ -63,29 +63,29 @@ public: //! Set up the stuff needed to add a contact. //! @return true if we can send the packet - bool addContact( const QString& contact, const QString& group, bool requiresAuth = false ); + bool addContact( const TQString& contact, const TQString& group, bool requiresAuth = false ); //! Set up the stuff needed to remove a contact. //! @return true if we can send the packet - bool removeContact( const QString& contact ); + bool removeContact( const TQString& contact ); //! Set up the stuff needed to change groups //! @return true if we can send the packet - bool changeGroup( const QString& contact, const QString& newGroup ); + bool changeGroup( const TQString& contact, const TQString& newGroup ); /* Group properties */ //! Add a new group to the SSI list //! @return true if we can send the packet - bool addGroup( const QString& groupName ); + bool addGroup( const TQString& groupName ); //! Remove a group from the SSI list //! @return true if we can send the packet - bool removeGroup( const QString& groupName ); + bool removeGroup( const TQString& groupName ); //! Rename a group on the SSI list //! @return true if we can send the packet - bool renameGroup( const QString& oldName, const QString& newName ); + bool renameGroup( const TQString& oldName, const TQString& newName ); //! Add an item to the SSI list //! Should be used for other items we don't have explicit functions for diff --git a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp index 0be172e8..d279061c 100644 --- a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp @@ -81,7 +81,7 @@ void SSIParamsTask::handleParamReply() //manually parse the TLV out of the packet, since we only want certain things if ( buf->getWord() != 0x0004 ) { - setError( -1, QString::null ); + setError( -1, TQString::null ); return; //no TLV of type 0x0004, bad packet. do nothing. } else @@ -95,7 +95,7 @@ void SSIParamsTask::handleParamReply() WORD maxIgnore = buf->getWord(); client()->ssiManager()->setParameters( maxContacts, maxGroups, maxVisible, maxInvisible, maxIgnore ); } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/stream.cpp b/kopete/protocols/oscar/liboscar/stream.cpp index 02967416..2fb302c1 100644 --- a/kopete/protocols/oscar/liboscar/stream.cpp +++ b/kopete/protocols/oscar/liboscar/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/oscar/liboscar/stream.h b/kopete/protocols/oscar/liboscar/stream.h index 9fbacbda..d5bfabad 100644 --- a/kopete/protocols/oscar/liboscar/stream.h +++ b/kopete/protocols/oscar/liboscar/stream.h @@ -18,7 +18,7 @@ ************************************************************************* */ -#include <qobject.h> +#include <tqobject.h> #ifndef OSCAR_STREAM_H #define OSCAR_STREAM_H @@ -42,12 +42,12 @@ public: SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); virtual void close()=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; + virtual TQString errorText() const=0; /** * Are there any messages waiting to be read diff --git a/kopete/protocols/oscar/liboscar/task.cpp b/kopete/protocols/oscar/liboscar/task.cpp index 2c7628d7..2ec342ac 100644 --- a/kopete/protocols/oscar/liboscar/task.cpp +++ b/kopete/protocols/oscar/liboscar/task.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qtimer.h> +#include <tqtimer.h> #include "connection.h" #include "transfer.h" @@ -34,7 +34,7 @@ public: Q_UINT32 id; bool success; int statusCode; - QString statusString; + TQString statusString; Connection* client; bool insignificant, deleteme, autoDelete; bool done; @@ -42,19 +42,19 @@ public: }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->client = parent->client(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Connection* parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -77,7 +77,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Connection *Task::client() const @@ -110,7 +110,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -124,15 +124,15 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the transfer to our children - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("Task")) continue; @@ -173,7 +173,7 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } @@ -182,7 +182,7 @@ void Task::send( Transfer * request ) client()->send( request ); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -192,7 +192,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -245,7 +245,7 @@ Transfer* Task::createTransfer( Buffer* buffer ) // void Task::debug(const char *fmt, ...) // { // char *buf; -// QString str; +// TQString str; // int size = 1024; // int r; // @@ -257,7 +257,7 @@ Transfer* Task::createTransfer( Buffer* buffer ) // va_end(ap); // // if(r != -1) -// str = QString(buf); +// str = TQString(buf); // // delete [] buf; // @@ -267,11 +267,11 @@ Transfer* Task::createTransfer( Buffer* buffer ) // debug(str); // } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { //black hole Q_UNUSED( str ); - //client()->debug(QString("%1: ").arg(className()) + str); + //client()->debug(TQString("%1: ").arg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const diff --git a/kopete/protocols/oscar/liboscar/task.h b/kopete/protocols/oscar/liboscar/task.h index e48e02de..04513824 100644 --- a/kopete/protocols/oscar/liboscar/task.h +++ b/kopete/protocols/oscar/liboscar/task.h @@ -21,7 +21,7 @@ #ifndef OSCAR_TASK_H #define OSCAR_TASK_H -#include <qobject.h> +#include <tqobject.h> #include "oscartypes.h" @@ -52,7 +52,7 @@ public: bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go( bool autoDelete = false ); @@ -76,10 +76,10 @@ protected: virtual void onDisconnect(); void setId( Q_UINT32 id ); void send( Transfer * request ); - void setSuccess( int code=0, const QString &str="" ); - void setError( int code=0, const QString &str="" ); + void setSuccess( int code=0, const TQString &str="" ); + void setError( int code=0, const TQString &str="" ); // void debug( const char *, ... ); - void debug( const QString & ); + void debug( const TQString & ); /** * Used in take() to check if the offered transfer is for this Task diff --git a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp index 59f392de..a7c16cea 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp @@ -2,7 +2,7 @@ #include "clientstream_test.h" -ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, argv ) +ClientStreamTest::ClientStreamTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,12 +10,12 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, myConnector->setOptHostPort( "login.oscar.aol.com", 5190 ); myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); // notify and start sending - //connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) ); + //connect( myTestObject, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotWarning(int) ) ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -27,7 +27,7 @@ ClientStreamTest::~ClientStreamTest() void ClientStreamTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myTestObject->connectToServer( server, true ); // fine up to here... diff --git a/kopete/protocols/oscar/liboscar/tests/clientstream_test.h b/kopete/protocols/oscar/liboscar/tests/clientstream_test.h index 32a0e3a9..47aeac86 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.h +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.h @@ -10,9 +10,9 @@ #ifndef clientstream_test_h #define clientstream_test_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp index 4f4e8df2..0f37f614 100644 --- a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp @@ -2,11 +2,11 @@ #include <iostream> #include "ipaddrtest.h" -#include <qstring.h> +#include <tqstring.h> using namespace std; IPAddrTest::IPAddrTest(int argc, char ** argv) -: QApplication( argc, argv ) +: TQApplication( argc, argv ) { } @@ -28,13 +28,13 @@ bool IPAddrTest::testAllZeroDotted() bool IPAddrTest::testNumericalIP() { - QString address = "65.93.151.168"; + TQString address = "65.93.151.168"; return ( Oscar::getNumericalIP( address ) == 1096652712 ); } bool IPAddrTest::testAllZeroNumerical() { - QString address = "0.0.0.0"; + TQString address = "0.0.0.0"; return ( Oscar::getNumericalIP( address ) == 0 ); } diff --git a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h index 9452ad82..f2fa0fec 100644 --- a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h +++ b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h @@ -10,9 +10,9 @@ #ifndef IPADDRTEST_H #define IPADDRTEST_H -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarutils.h" diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp index 9f7ba693..2181fda3 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp @@ -29,8 +29,8 @@ #include "tester.h" #include "chatnavtests.h" -#include <qapplication.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqtimer.h> #include <iostream> using namespace std; @@ -51,7 +51,7 @@ void KUnitTest::registerTests() KUnitTest::KUnitTest() { - QTimer::singleShot( 0, this, SLOT(checkRun()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(checkRun()) ); m_tests.setAutoDelete( TRUE ); // m_qtests.setAutoDelete( TRUE ); @@ -75,7 +75,7 @@ int KUnitTest::runTests() int globalSkipped = 0; cout << "# Running normal tests... #" << endl << endl; - QAsciiDictIterator<Tester> it( m_tests ); + TQAsciiDictIterator<Tester> it( m_tests ); for( ; it.current(); ++it ) { Tester* test = it.current(); @@ -109,29 +109,29 @@ int KUnitTest::runTests() if ( 0 < numXPass ) { cout << " Unexpected pass" << ( ( 1 == numXPass )?"":"es") << ":" << endl; - QStringList list = test->xpassList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->xpassList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < (numFail - numXFail) ) { cout << " Unexpected failure" << ( ( 1 == numFail )?"":"s") << ":" << endl; - QStringList list = test->errorList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->errorList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < numXFail ) { cout << " Expected failure" << ( ( 1 == numXFail)?"":"s") << ":" << endl; - QStringList list = test->xfailList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->xfailList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < numSkip ) { cout << " Skipped test" << ( ( 1 == numSkip )?"":"s") << ":" << endl; - QStringList list = test->skipList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->skipList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } @@ -153,11 +153,11 @@ int KUnitTest::runTests() //void KUnitTest::addTester( QTester *test ) //{ // m_qtests.insert( test, test ); -// connect( test, SIGNAL(destroyed(QObject*)), -// SLOT(qtesterDone(QObject* )) ); +// connect( test, TQT_SIGNAL(destroyed(TQObject*)), +// TQT_SLOT(qtesterDone(TQObject* )) ); //} -void KUnitTest::qtesterDone( QObject *obj ) +void KUnitTest::qtesterDone( TQObject *obj ) { // m_qtests.remove( obj ); // if ( m_qtests.isEmpty() ) diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.h b/kopete/protocols/oscar/liboscar/tests/kunittest.h index 5148a82a..d2d6a04a 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.h +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.h @@ -29,9 +29,9 @@ #include "tester.h" -#include <qobject.h> -#include <qasciidict.h> -#include <qptrdict.h> +#include <tqobject.h> +#include <tqasciidict.h> +#include <tqptrdict.h> #define ADD_TEST(x) addTester( #x, new x ) #define ADD_QTEST(x) addTester( new x ) @@ -51,15 +51,15 @@ public: // void addTester( QTester *test ); private slots: - void qtesterDone( QObject *obj ); + void qtesterDone( TQObject *obj ); void checkRun(); private: void registerTests(); private: - QAsciiDict<Tester> m_tests; -// QPtrDict<QTester> m_qtests; + TQAsciiDict<Tester> m_tests; +// TQPtrDict<QTester> m_qtests; int globalTests; int globalPasses; int globalFails; diff --git a/kopete/protocols/oscar/liboscar/tests/logintest.cpp b/kopete/protocols/oscar/liboscar/tests/logintest.cpp index 6dbc9646..1d3728aa 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/logintest.cpp @@ -2,7 +2,7 @@ #include "logintest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,7 +29,7 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); diff --git a/kopete/protocols/oscar/liboscar/tests/logintest.h b/kopete/protocols/oscar/liboscar/tests/logintest.h index 898a3d99..d97c336d 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.h +++ b/kopete/protocols/oscar/liboscar/tests/logintest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp b/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp index a220e13e..3086ca64 100644 --- a/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp @@ -2,11 +2,11 @@ #include <iostream> #include "redirecttest.h" -#include <qcstring.h> +#include <tqcstring.h> using namespace std; RedirectTest::RedirectTest(int argc, char ** argv) -: QApplication( argc, argv ), +: TQApplication( argc, argv ), m_transfer(0), m_task(0) { @@ -73,7 +73,7 @@ bool RedirectTest::testCookieIsSet() return !m_task->cookie().isEmpty(); } -Buffer* RedirectTest::SetupBuffer(WORD Service, QString Cookie) +Buffer* RedirectTest::SetupBuffer(WORD Service, TQString Cookie) { Buffer* b = new Buffer; b->addTLV16(0x000D, Service); diff --git a/kopete/protocols/oscar/liboscar/tests/redirecttest.h b/kopete/protocols/oscar/liboscar/tests/redirecttest.h index eda5d67a..785d61c8 100644 --- a/kopete/protocols/oscar/liboscar/tests/redirecttest.h +++ b/kopete/protocols/oscar/liboscar/tests/redirecttest.h @@ -10,9 +10,9 @@ #ifndef RedirectTest_h #define RedirectTest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "transfer.h" #include "oscartypes.h" @@ -39,7 +39,7 @@ public: private: //Helper functions - Buffer* SetupBuffer(WORD Service, QString Cookie); + Buffer* SetupBuffer(WORD Service, TQString Cookie); Task *m_root; SnacTransfer * m_transfer; diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp index a1a9e754..6ca733cc 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp @@ -2,7 +2,7 @@ #include "ssigrouptest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,14 +29,14 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myClient->setIsIcq( true ); myClient->start( server, 5190, "userid", "password" ); myClient->connectToServer( myConnection, server, true ); - QTimer::singleShot( 10000, this, SLOT(runAddGroupTest() ) ); + TQTimer::singleShot( 10000, this, TQT_SLOT(runAddGroupTest() ) ); connected = true; } @@ -57,15 +57,15 @@ int main(int argc, char ** argv) void LoginTest::runAddGroupTest() { qDebug( "running ssi group add test" ); - QString group = QString::fromLatin1( "dummygroup" ); + TQString group = TQString::fromLatin1( "dummygroup" ); myClient->addGroup( group ); - QTimer::singleShot( 5000, this, SLOT( runDelGroupTest() ) ); + TQTimer::singleShot( 5000, this, TQT_SLOT( runDelGroupTest() ) ); } void LoginTest::runDelGroupTest() { qDebug( "running ssi group del test" ); - QString group = QString::fromLatin1( "dummygroup" ); + TQString group = TQString::fromLatin1( "dummygroup" ); myClient->removeGroup( group ); } diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h index 361c053b..291698ec 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp index d8e05b36..7669a945 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp @@ -2,9 +2,9 @@ #include "ssitest.h" -#include <qstring.h> +#include <tqstring.h> -SSITest::SSITest(int argc, char ** argv) : QApplication( argc, argv ) +SSITest::SSITest(int argc, char ** argv) : TQApplication( argc, argv ) { m_manager = new SSIManager(this); @@ -19,7 +19,7 @@ SSITest::~SSITest() void SSITest::testIt() { - QPtrList<TLV> tlvs; + TQPtrList<TLV> tlvs; //add three groups SSI *ssi = new SSI( "FirstGroup", 1, 1, ROSTER_GROUP, tlvs); @@ -53,28 +53,28 @@ void SSITest::testIt() //try to find a group by name ssi = m_manager->findGroup("SecondGroup"); if ( ssi ) - qDebug( QString("Found group SecondGroup with gid=%1").arg( ssi->gid() ).latin1()); + qDebug( TQString("Found group SecondGroup with gid=%1").arg( ssi->gid() ).latin1()); else qDebug( "Oops, group SecondGroup not found" ); //try to find a group by gid ssi = m_manager->findGroup( 3 ); if ( ssi ) - qDebug( QString("Found group 3 with name=%1").arg( ssi->name() ).latin1() ); + qDebug( TQString("Found group 3 with name=%1").arg( ssi->name() ).latin1() ); else qDebug( "Oops, group 3 not found" ); //try to find a contact by name ssi = m_manager->findContact("ThirdContact"); if ( ssi ) - qDebug( QString( "Found contact ThirdContact with gid=%1" ).arg( ssi->gid() ).latin1() ); + qDebug( TQString( "Found contact ThirdContact with gid=%1" ).arg( ssi->gid() ).latin1() ); else qDebug( "Oops, contact ThirdContact not found" ); //try to find a contact using the name and the group name ssi = m_manager->findContact("FourthContact","SecondGroup"); if ( ssi ) - qDebug( QString("Found contact FourthContact with bid=%1").arg( ssi->bid() ).latin1() ); + qDebug( TQString("Found contact FourthContact with bid=%1").arg( ssi->bid() ).latin1() ); else qDebug( "Oops, contact FourthContact not found" ); @@ -85,17 +85,17 @@ void SSITest::testIt() qDebug( "Good! It has detected the group is invalid :)" ); //contacts from a group - QValueList<SSI*> list = m_manager->contactsFromGroup("FirstGroup"); - QValueList<SSI*>::iterator it; + TQValueList<SSI*> list = m_manager->contactsFromGroup("FirstGroup"); + TQValueList<SSI*>::iterator it; qDebug( "Contacts from group FirtsGroup:" ); for ( it = list.begin(); it != list.end(); ++it) - qDebug( QString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").arg( (*it)->name() ).latin1() ); //the group list - QValueList<SSI*> list2 = m_manager->groupList(); + TQValueList<SSI*> list2 = m_manager->groupList(); qDebug( "Group list:" ); for ( it = list2.begin(); it != list2.end(); ++it) - qDebug( QString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").arg( (*it)->name() ).latin1() ); //remove a group - this shouldn't report any debug line m_manager->removeGroup( "SecondGroup" ); diff --git a/kopete/protocols/oscar/liboscar/tests/ssitest.h b/kopete/protocols/oscar/liboscar/tests/ssitest.h index 19206465..fbdcf2fb 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.h @@ -10,9 +10,9 @@ #ifndef ssitest_h #define ssitest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "ssimanager.h" diff --git a/kopete/protocols/oscar/liboscar/tests/tester.h b/kopete/protocols/oscar/liboscar/tests/tester.h index 2cb1f3af..162473dd 100644 --- a/kopete/protocols/oscar/liboscar/tests/tester.h +++ b/kopete/protocols/oscar/liboscar/tests/tester.h @@ -27,7 +27,7 @@ #ifndef TESTER_H #define TESTER_H -#include <qstringlist.h> +#include <tqstringlist.h> #define CHECK( x, y ) check( __FILE__, __LINE__, #x, x, y, false ) #define XFAIL( x, y ) check( __FILE__, __LINE__, #x, x, y, true ) @@ -50,26 +50,26 @@ public: return m_tests; } - QStringList errorList() const { + TQStringList errorList() const { return m_errorList; } - QStringList xfailList() const { + TQStringList xfailList() const { return m_xfailList; } - QStringList xpassList() const { + TQStringList xpassList() const { return m_xpassList; } - QStringList skipList() const { + TQStringList skipList() const { return m_skipList; } - void skip( const char *file, int line, QString msg ) + void skip( const char *file, int line, TQString msg ) { - QString skipEntry; - QTextStream ts( &skipEntry, IO_WriteOnly ); + TQString skipEntry; + TQTextStream ts( &skipEntry, IO_WriteOnly ); ts << file << "["<< line <<"]: " << msg; m_skipList.append( skipEntry ); @@ -83,8 +83,8 @@ protected: bool expectedFailure ) { if ( result != expectedResult ) { - QString error; - QTextStream ts( &error, IO_WriteOnly ); + TQString error; + TQTextStream ts( &error, IO_WriteOnly ); ts << file << "["<< line <<"]:" <<" failed on \""<< str <<"\"" << "\n\t\t result = '" @@ -99,8 +99,8 @@ protected: // then the test passed, but we want to record it if // we were expecting a failure if (expectedFailure) { - QString error; - QTextStream ts( &error, IO_WriteOnly ); + TQString error; + TQTextStream ts( &error, IO_WriteOnly ); ts << file << "["<< line <<"]:" <<" unexpectedly passed on \"" << str <<"\""; @@ -111,10 +111,10 @@ protected: } private: - QStringList m_errorList; - QStringList m_xfailList; - QStringList m_xpassList; - QStringList m_skipList; + TQStringList m_errorList; + TQStringList m_xfailList; + TQStringList m_xpassList; + TQStringList m_skipList; int m_tests; }; diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp index 72ef5acb..fb346d26 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp @@ -2,7 +2,7 @@ #include "userinfotest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,15 +29,15 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myClient->setIsIcq( true ); myClient->start( server, 5190, "userid", "password" ); myClient->connectToServer( myConnection, server, true ); - //QObject::connect( myClient, SIGNAL( userIsOnline( const QString& ) ), this, SLOT( runUserInfoTest())); - //QTimer::singleShot( 6000, this, SLOT(runUserInfoTest() ) ); + //TQObject::connect( myClient, TQT_SIGNAL( userIsOnline( const TQString& ) ), this, TQT_SLOT( runUserInfoTest())); + //TQTimer::singleShot( 6000, this, TQT_SLOT(runUserInfoTest() ) ); connected = true; } @@ -58,7 +58,7 @@ int main(int argc, char ** argv) void LoginTest::runUserInfoTest() { qDebug( "running user info test" ); - QString contact = QString::fromLatin1( "userid" ); + TQString contact = TQString::fromLatin1( "userid" ); myClient->requestFullInfo( contact ); } diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.h b/kopete/protocols/oscar/liboscar/tests/userinfotest.h index 433a6c48..76450466 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.h +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/transfer.cpp b/kopete/protocols/oscar/liboscar/transfer.cpp index b442a97c..ac83ac06 100644 --- a/kopete/protocols/oscar/liboscar/transfer.cpp +++ b/kopete/protocols/oscar/liboscar/transfer.cpp @@ -19,7 +19,7 @@ #include "transfer.h" #include <ctype.h> -#include <qdeepcopy.h> +#include <tqdeepcopy.h> #include <kdebug.h> Transfer::Transfer() @@ -38,10 +38,10 @@ Transfer::TransferType Transfer::type() const return Transfer::RawTransfer; } -QByteArray Transfer::toWire() +TQByteArray Transfer::toWire() { m_wireFormat.duplicate( m_buffer->buffer(), m_buffer->length() ); - QByteArray wire = QDeepCopy<QByteArray>( m_wireFormat ); + TQByteArray wire = TQDeepCopy<TQByteArray>( m_wireFormat ); return wire; } @@ -71,17 +71,17 @@ bool Transfer::dataValid() const return m_isBufferValid; } -QString Transfer::toString() const +TQString Transfer::toString() const { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; - QByteArray::ConstIterator end = m_wireFormat.end(); + TQByteArray::ConstIterator it; + TQByteArray::ConstIterator end = m_wireFormat.end(); for ( it = m_wireFormat.begin(); it != end; ++it ) { i++; @@ -90,7 +90,7 @@ QString Transfer::toString() const if(c < 0x10) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -98,8 +98,8 @@ QString Transfer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -110,7 +110,7 @@ QString Transfer::toString() const return output; } -void Transfer::populateWireBuffer( int offset, const QByteArray& buffer ) +void Transfer::populateWireBuffer( int offset, const TQByteArray& buffer ) { int j; for ( uint i = 0; i < buffer.size(); ++i ) @@ -159,13 +159,13 @@ FlapTransfer::~FlapTransfer() } -QByteArray FlapTransfer::toWire() +TQByteArray FlapTransfer::toWire() { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Buffer length is " << m_buffer.length() << endl; //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Buffer is " << m_buffer.toString() << endl; m_wireFormat.truncate( 0 ); - QByteArray useBuf; + TQByteArray useBuf; useBuf.duplicate( m_buffer->buffer(), m_buffer->length() ); m_flapLength = useBuf.size(); m_wireFormat.resize( 6 + m_flapLength ); @@ -178,7 +178,7 @@ QByteArray FlapTransfer::toWire() //deepcopy the high-level buffer to the wire format buffer populateWireBuffer( 6, useBuf ); - QByteArray wire = QDeepCopy<QByteArray>( m_wireFormat ); + TQByteArray wire = TQDeepCopy<TQByteArray>( m_wireFormat ); return wire; } @@ -273,11 +273,11 @@ SnacTransfer::~SnacTransfer() } -QByteArray SnacTransfer::toWire() +TQByteArray SnacTransfer::toWire() { m_wireFormat.truncate( 0 ); - QByteArray useBuf; + TQByteArray useBuf; useBuf.duplicate( m_buffer->buffer(), m_buffer->length() ); setFlapLength( useBuf.size() + 10 ); m_wireFormat.resize( 16 + useBuf.size() ); @@ -304,7 +304,7 @@ QByteArray SnacTransfer::toWire() //deepcopy the high-level buffer to the wire format buffer populateWireBuffer( 16, useBuf ); - QByteArray wire = QDeepCopy<QByteArray>( m_wireFormat ); + TQByteArray wire = TQDeepCopy<TQByteArray>( m_wireFormat ); return wire; } diff --git a/kopete/protocols/oscar/liboscar/transfer.h b/kopete/protocols/oscar/liboscar/transfer.h index f42b1e83..0ec4fc41 100644 --- a/kopete/protocols/oscar/liboscar/transfer.h +++ b/kopete/protocols/oscar/liboscar/transfer.h @@ -34,7 +34,7 @@ public: virtual TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the data buffer void setBuffer( Buffer* buffer ); @@ -47,13 +47,13 @@ public: //! Get the validity of the data after the flap header bool dataValid() const; - QString toString() const; + TQString toString() const; - void populateWireBuffer( int offset, const QByteArray& buffer ); + void populateWireBuffer( int offset, const TQByteArray& buffer ); protected: //! The wire-format representation of our buffer - QByteArray m_wireFormat; + TQByteArray m_wireFormat; //! The high-level representation of our data Buffer* m_buffer; @@ -75,7 +75,7 @@ public: virtual ~FlapTransfer(); virtual TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the FLAP channel @@ -123,7 +123,7 @@ public: virtual ~SnacTransfer(); TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the SNAC service diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp index 76503116..f3c34f96 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp @@ -16,7 +16,7 @@ #include "typingnotifytask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "transfer.h" #include "buffer.h" @@ -79,7 +79,7 @@ void TypingNotifyTask::onGo() Transfer* t = createTransfer( f, s, b ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void TypingNotifyTask::handleNotification() @@ -90,7 +90,7 @@ void TypingNotifyTask::handleNotification() //I don't care about the QWORD or the channel b->skipBytes( 10 ); - QString contact( b->getBUIN() ); + TQString contact( b->getBUIN() ); Q_UINT32 word = b->getWord(); switch ( word ) @@ -112,7 +112,7 @@ void TypingNotifyTask::handleNotification() } } -void TypingNotifyTask::setParams( const QString& contact, int notifyType ) +void TypingNotifyTask::setParams( const TQString& contact, int notifyType ) { m_contact = contact; m_notificationType = notifyType; diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.h b/kopete/protocols/oscar/liboscar/typingnotifytask.h index b2c9bfef..34c5d86a 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.h +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.h @@ -18,7 +18,7 @@ #define _TYPINGNOTIFYTASK_H_ #include "task.h" -#include <qstring.h> +#include <tqstring.h> #include "oscartypeclasses.h" /** @@ -38,14 +38,14 @@ public: virtual bool take( Transfer* transfer ); virtual void onGo(); - void setParams( const QString & contact, int notifyType ); + void setParams( const TQString & contact, int notifyType ); signals: //! somebody started typing on the other end - void typingStarted( const QString& contact ); + void typingStarted( const TQString& contact ); //! somebody finished typing - void typingFinished( const QString& contact ); + void typingFinished( const TQString& contact ); private: @@ -54,7 +54,7 @@ private: private: WORD m_notificationType; - QString m_contact; + TQString m_contact; }; #endif diff --git a/kopete/protocols/oscar/liboscar/userdetails.cpp b/kopete/protocols/oscar/liboscar/userdetails.cpp index db7d4d1d..8a1b6c4e 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.cpp +++ b/kopete/protocols/oscar/liboscar/userdetails.cpp @@ -23,7 +23,7 @@ #include <netinet/in.h> #include <kdebug.h> #include <klocale.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include "oscarutils.h" #include "oscardebug.h" @@ -67,7 +67,7 @@ int UserDetails::warningLevel() const return m_warningLevel; } -QString UserDetails::userId() const +TQString UserDetails::userId() const { return m_userId; } @@ -92,12 +92,12 @@ DWORD UserDetails::dcPort() const return m_dcPort; } -QDateTime UserDetails::onlineSinceTime() const +TQDateTime UserDetails::onlineSinceTime() const { return m_onlineSince; } -QDateTime UserDetails::memberSinceTime() const +TQDateTime UserDetails::memberSinceTime() const { return m_memberSince; } @@ -117,12 +117,12 @@ BYTE UserDetails::iconCheckSumType() const return m_iconChecksumType; } -QByteArray UserDetails::buddyIconHash() const +TQByteArray UserDetails::buddyIconHash() const { return m_md5IconHash; } -QString UserDetails::clientName() const +TQString UserDetails::clientName() const { if ( !m_clientVersion.isEmpty() ) return i18n("Translators: client-name client-version", @@ -134,7 +134,7 @@ QString UserDetails::clientName() const void UserDetails::fill( Buffer * buffer ) { BYTE snLen = buffer->getByte(); - QString user = QString( buffer->getBlock( snLen ) ); + TQString user = TQString( buffer->getBlock( snLen ) ); if ( !user.isEmpty() ) m_userId = user; m_warningLevel = buffer->getWord(); @@ -186,7 +186,7 @@ void UserDetails::fill( Buffer * buffer ) m_extendedStatus = b.getDWord(); m_extendedStatusSpecified = true; #ifdef OSCAR_USERINFO_DEBUG - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << QString::number( m_extendedStatus, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << TQString::number( m_extendedStatus, 16 ) << endl; #endif break; case 0x000A: //external IP address @@ -270,7 +270,7 @@ void UserDetails::fill( Buffer * buffer ) case 0x0002: if ( length > 0 ) { - m_availableMessage = QString( b.getBSTR() ); + m_availableMessage = TQString( b.getBSTR() ); #ifdef OSCAR_USERINFO_DEBUG kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "available message:" << m_availableMessage << endl; #endif @@ -366,9 +366,9 @@ void UserDetails::detectClient() case 0xFFFFFFFFL: //gaim behaves like official AIM so we can't detect them, only look for miranda { if (m_dcLastExtStatusUpdateTime & 0x80000000) - m_clientName=QString::fromLatin1("Miranda alpha"); + m_clientName=TQString::fromLatin1("Miranda alpha"); else - m_clientName=QString::fromLatin1("Miranda"); + m_clientName=TQString::fromLatin1("Miranda"); DWORD version = (m_dcLastExtInfoUpdateTime & 0xFFFFFF); BYTE major1 = ((version >> 24) & 0xFF); @@ -391,25 +391,25 @@ void UserDetails::detectClient() } break; case 0xFFFFFF8FL: - m_clientName = QString::fromLatin1("StrICQ"); + m_clientName = TQString::fromLatin1("StrICQ"); break; case 0xFFFFFF42L: - m_clientName = QString::fromLatin1("mICQ"); + m_clientName = TQString::fromLatin1("mICQ"); break; case 0xFFFFFFBEL: - m_clientName = QString::fromLatin1("alicq"); + m_clientName = TQString::fromLatin1("alicq"); break; case 0xFFFFFF7FL: - m_clientName = QString::fromLatin1("&RQ"); + m_clientName = TQString::fromLatin1("&RQ"); break; case 0xFFFFFFABL: - m_clientName = QString::fromLatin1("YSM"); + m_clientName = TQString::fromLatin1("YSM"); break; case 0x3AA773EEL: if ((m_dcLastExtStatusUpdateTime == 0x3AA66380L) && (m_dcLastExtInfoUpdateTime == 0x3A877A42L)) { - m_clientName=QString::fromLatin1("libicq2000"); + m_clientName=TQString::fromLatin1("libicq2000"); } break; default: @@ -427,48 +427,48 @@ void UserDetails::detectClient() switch (m_dcProtoVersion) { case 10: - m_clientName=QString::fromLatin1("ICQ 2003b"); + m_clientName=TQString::fromLatin1("ICQ 2003b"); break; case 9: - m_clientName=QString::fromLatin1("ICQ Lite"); + m_clientName=TQString::fromLatin1("ICQ Lite"); break; case 8: - m_clientName=QString::fromLatin1("Miranda"); + m_clientName=TQString::fromLatin1("Miranda"); break; default: - m_clientName=QString::fromLatin1("ICQ2go"); + m_clientName=TQString::fromLatin1("ICQ2go"); } } else if (hasCap(CAP_BUDDYICON)) // only gaim seems to advertize this on ICQ { - m_clientName = QString::fromLatin1("Gaim"); + m_clientName = TQString::fromLatin1("Gaim"); } else if (hasCap(CAP_XTRAZ)) { - m_clientName = QString::fromLatin1("ICQ 4.0 Lite"); + m_clientName = TQString::fromLatin1("ICQ 4.0 Lite"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_IS_2001)) { - m_clientName = QString::fromLatin1( "ICQ 2001"); + m_clientName = TQString::fromLatin1( "ICQ 2001"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_STR_2002)) { - m_clientName = QString::fromLatin1("ICQ 2002"); + m_clientName = TQString::fromLatin1("ICQ 2002"); } else if (hasCap(CAP_RTFMSGS) && hasCap(CAP_UTF8) && hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName = QString::fromLatin1("ICQ 2003a"); + m_clientName = TQString::fromLatin1("ICQ 2003a"); } else if (hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName =QString::fromLatin1("ICQ 2001b"); + m_clientName =TQString::fromLatin1("ICQ 2001b"); } else if ((m_dcProtoVersion == 7) && hasCap(CAP_RTFMSGS)) { - m_clientName = QString::fromLatin1("GnomeICU"); + m_clientName = TQString::fromLatin1("GnomeICU"); } } diff --git a/kopete/protocols/oscar/liboscar/userdetails.h b/kopete/protocols/oscar/liboscar/userdetails.h index fad79172..8835f6f9 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.h +++ b/kopete/protocols/oscar/liboscar/userdetails.h @@ -35,19 +35,19 @@ public: UserDetails(); ~UserDetails(); - QString userId() const; //! User ID accessor + TQString userId() const; //! User ID accessor int warningLevel() const; //! Warning level accessor WORD idleTime() const; //! Idle time accessor KNetwork::KIpAddress dcInternalIp() const; //! DC local IP accessor KNetwork::KIpAddress dcExternalIp() const; //! DC outside IP accessor DWORD dcPort() const; //! DC port number - QDateTime onlineSinceTime() const; //! Online since accessor - QDateTime memberSinceTime() const; //! Member since accessor + TQDateTime onlineSinceTime() const; //! Online since accessor + TQDateTime memberSinceTime() const; //! Member since accessor int userClass() const; //! User class accessor DWORD extendedStatus() const; //!User status accessor BYTE iconCheckSumType() const; //!Buddy icon hash type - QByteArray buddyIconHash() const; //! Buddy icon md5 hash accessor - QString clientName() const; //! Client name and version + TQByteArray buddyIconHash() const; //! Buddy icon md5 hash accessor + TQString clientName() const; //! Client name and version bool hasCap( int capNumber ) const; //! Tell if we have this capability /** @@ -78,17 +78,17 @@ private: private: - QString m_userId; /// the screename/uin of the contact + TQString m_userId; /// the screename/uin of the contact int m_warningLevel; /// the warning level of the contact int m_userClass; /// the class of the user - TLV 0x01 - QDateTime m_memberSince; /// how long the user's been a member - TLV 0x05 - QDateTime m_onlineSince; /// how long the contact's been online - TLV 0x03 + TQDateTime m_memberSince; /// how long the user's been a member - TLV 0x05 + TQDateTime m_onlineSince; /// how long the contact's been online - TLV 0x03 DWORD m_numSecondsOnline; /// how long the contact's been online in seconds WORD m_idleTime; /// the idle time of the contact - TLV 0x0F DWORD m_extendedStatus; /// the extended status of the contact - TLV 0x06 DWORD m_capabilities; //TLV 0x05 - QString m_clientVersion; /// the version of client they're using - QString m_clientName; /// the name of the client they're using + TQString m_clientVersion; /// the version of client they're using + TQString m_clientName; /// the name of the client they're using KNetwork::KIpAddress m_dcOutsideIp; /// DC Real IP Address - TLV 0x0A KNetwork::KIpAddress m_dcInsideIp; /// DC Internal IP Address - TLV 0x0C DWORD m_dcPort; /// DC Port - TLV 0x0C @@ -101,8 +101,8 @@ private: DWORD m_dcLastExtInfoUpdateTime; /// DC last exteneded info update time - TLV 0x0C DWORD m_dcLastExtStatusUpdateTime; /// DC last extended status update time - TLV 0x0C BYTE m_iconChecksumType; /// The OSCAR checksum type for the buddy icon TLV 0x1D - QByteArray m_md5IconHash; /// Buddy Icon MD5 Hash - TLV 0x1D - QString m_availableMessage; /// Message a person can have when available - TLV 0x0D + TQByteArray m_md5IconHash; /// Buddy Icon MD5 Hash - TLV 0x1D + TQString m_availableMessage; /// Message a person can have when available - TLV 0x0D bool m_userClassSpecified; bool m_memberSinceSpecified; diff --git a/kopete/protocols/oscar/liboscar/userinfotask.cpp b/kopete/protocols/oscar/liboscar/userinfotask.cpp index a204c475..66197316 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/userinfotask.cpp @@ -75,28 +75,28 @@ bool UserInfoTask::take( Transfer * transfer ) m_sequenceInfoMap[seq] = ud; emit gotInfo( seq ); - QValueList<TLV> list = b->getTLVList(); - QValueList<TLV>::iterator it = list.begin(); - QString profile; - QString away; + TQValueList<TLV> list = b->getTLVList(); + TQValueList<TLV>::iterator it = list.begin(); + TQString profile; + TQString away; for ( ; ( *it ); ++it ) { switch( ( *it ).type ) { case 0x0001: //profile text encoding - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "text encoding is " << QString( ( *it ).data )<< endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "text encoding is " << TQString( ( *it ).data )<< endl; break; case 0x0002: //profile text - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "The profile is '" << QString( ( *it ).data ) << "'" << endl; - profile = QString( ( *it ).data ); // aim always seems to use us-ascii encoding + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "The profile is '" << TQString( ( *it ).data ) << "'" << endl; + profile = TQString( ( *it ).data ); // aim always seems to use us-ascii encoding emit receivedProfile( m_contactSequenceMap[seq], profile ); break; case 0x0003: //away message encoding - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message encoding is " << QString( ( *it ).data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message encoding is " << TQString( ( *it ).data ) << endl; break; case 0x0004: //away message - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message is '" << QString( ( *it ).data ) << "'" << endl; - away = QString( (*it ).data ); // aim always seems to use us-ascii encoding + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message is '" << TQString( ( *it ).data ) << "'" << endl; + away = TQString( (*it ).data ); // aim always seems to use us-ascii encoding emit receivedAwayMessage( m_contactSequenceMap[seq], away ); break; case 0x0005: //capabilities @@ -133,7 +133,7 @@ void UserInfoTask::onGo() send( t ); } -void UserInfoTask::requestInfoFor( const QString& contact, unsigned int types ) +void UserInfoTask::requestInfoFor( const TQString& contact, unsigned int types ) { Q_UINT16 seq = client()->snacSequence(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting sequence " << seq << " for contact " << contact << endl; diff --git a/kopete/protocols/oscar/liboscar/userinfotask.h b/kopete/protocols/oscar/liboscar/userinfotask.h index 063eedd7..4b973a04 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.h +++ b/kopete/protocols/oscar/liboscar/userinfotask.h @@ -20,7 +20,7 @@ #include "task.h" -#include <qstring.h> +#include <tqstring.h> #include "userdetails.h" class Transfer; @@ -44,20 +44,20 @@ public: bool take( Transfer* transfer ); void onGo(); - void requestInfoFor( const QString& userId, unsigned int types ); + void requestInfoFor( const TQString& userId, unsigned int types ); UserDetails getInfoFor( Q_UINT16 sequence ) const; - QString contactForSequence( Q_UINT16 sequence ) const; + TQString contactForSequence( Q_UINT16 sequence ) const; signals: void gotInfo( Q_UINT16 seqNumber ); - void receivedProfile( const QString& contact, const QString& profile ); - void receivedAwayMessage( const QString& contact, const QString& message ); + void receivedProfile( const TQString& contact, const TQString& profile ); + void receivedAwayMessage( const TQString& contact, const TQString& message ); private: - QMap<Q_UINT16, UserDetails> m_sequenceInfoMap; - QMap<Q_UINT16, QString> m_contactSequenceMap; - QMap<Q_UINT16, unsigned int> m_typesSequenceMap; + TQMap<Q_UINT16, UserDetails> m_sequenceInfoMap; + TQMap<Q_UINT16, TQString> m_contactSequenceMap; + TQMap<Q_UINT16, unsigned int> m_typesSequenceMap; Q_UINT16 m_seq; }; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.cpp b/kopete/protocols/oscar/liboscar/usersearchtask.cpp index 3fd31010..545706a5 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.cpp +++ b/kopete/protocols/oscar/liboscar/usersearchtask.cpp @@ -98,14 +98,14 @@ bool UserSearchTask::take( Transfer* t ) { int moreUsersCount = buffer->getLEDWord(); emit searchFinished( moreUsersCount ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } setTransfer( 0 ); } return true; } -void UserSearchTask::searchUserByUIN( const QString& uin ) +void UserSearchTask::searchUserByUIN( const TQString& uin ) { //create a new result list m_type = UINSearch; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.h b/kopete/protocols/oscar/liboscar/usersearchtask.h index 239efe36..781a311a 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.h +++ b/kopete/protocols/oscar/liboscar/usersearchtask.h @@ -20,7 +20,7 @@ #define USERSEARCHTASK_H #include "icqtask.h" -#include <qstring.h> +#include <tqstring.h> #include "icquserinfo.h" /** @@ -43,7 +43,7 @@ public: virtual bool take( Transfer* t ); /** Search by UIN */ - void searchUserByUIN( const QString& uin ); + void searchUserByUIN( const TQString& uin ); void searchWhitePages( const ICQWPSearchInfo& info ); @@ -52,8 +52,8 @@ signals: void searchFinished( int ); private: - QValueList<ICQSearchResult> m_results; - QString m_uin; + TQValueList<ICQSearchResult> m_results; + TQString m_uin; Q_UINT16 m_seq; SearchType m_type; }; diff --git a/kopete/protocols/oscar/liboscar/warningtask.cpp b/kopete/protocols/oscar/liboscar/warningtask.cpp index 56051dc8..7b895b5c 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.cpp +++ b/kopete/protocols/oscar/liboscar/warningtask.cpp @@ -18,7 +18,7 @@ #include "warningtask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "transfer.h" #include "connection.h" @@ -32,7 +32,7 @@ WarningTask::~WarningTask() { } -void WarningTask::setContact( const QString& contact ) +void WarningTask::setContact( const TQString& contact ) { m_contact = contact; } @@ -65,13 +65,13 @@ bool WarningTask::take( Transfer* transfer ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Warning level increased " << m_increase << " to " << m_newLevel << endl; emit userWarned( m_contact, m_increase, m_newLevel ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } else { - setError( 0, QString::null ); + setError( 0, TQString::null ); return false; } } diff --git a/kopete/protocols/oscar/liboscar/warningtask.h b/kopete/protocols/oscar/liboscar/warningtask.h index 1280fab9..af56968c 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.h +++ b/kopete/protocols/oscar/liboscar/warningtask.h @@ -20,7 +20,7 @@ #define WARNINGTASK_H #include "task.h" -#include <qmap.h> +#include <tqmap.h> #include "oscartypes.h" /** @@ -33,7 +33,7 @@ public: WarningTask( Task* parent ); ~WarningTask(); - void setContact( const QString& contact ); + void setContact( const TQString& contact ); void setAnonymous( bool anon ); WORD levelIncrease(); @@ -44,10 +44,10 @@ public: virtual void onGo(); signals: - void userWarned( const QString&, Q_UINT16, Q_UINT16 ); + void userWarned( const TQString&, Q_UINT16, Q_UINT16 ); private: - QString m_contact; + TQString m_contact; bool m_sendAnon; WORD m_sequence; WORD m_increase; 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 <assert.h> -#include <qapplication.h> -#include <qregexp.h> -#include <qstylesheet.h> -#include <qtimer.h> -#include <qptrlist.h> -#include <qtextcodec.h> -#include <qimage.h> -#include <qfile.h> +#include <tqapplication.h> +#include <tqregexp.h> +#include <tqstylesheet.h> +#include <tqtimer.h> +#include <tqptrlist.h> +#include <tqtextcodec.h> +#include <tqimage.h> +#include <tqfile.h> #include <kdebug.h> #include <kconfig.h> @@ -72,29 +72,29 @@ public: Q_UINT32 ssiLastModTime; //contacts waiting on SSI add ack and their metacontact - QMap<QString, Kopete::MetaContact*> addContactMap; + TQMap<TQString, Kopete::MetaContact*> addContactMap; //contacts waiting on their group to be added - QMap<QString, QString> contactAddQueue; - QMap<QString, QString> contactChangeQueue; + TQMap<TQString, TQString> contactAddQueue; + TQMap<TQString, TQString> 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<SSI> groupList = listManager->groupList(); - QValueList<SSI>::const_iterator git = groupList.constBegin(); - QValueList<SSI>::const_iterator listEnd = groupList.constEnd(); + TQValueList<SSI> groupList = listManager->groupList(); + TQValueList<SSI>::const_iterator git = groupList.constBegin(); + TQValueList<SSI>::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<SSI> contactList = listManager->contactList(); - QValueList<SSI>::const_iterator bit = contactList.constBegin(); - QValueList<SSI>::const_iterator blistEnd = contactList.constEnd(); + TQValueList<SSI> contactList = listManager->contactList(); + TQValueList<SSI>::const_iterator bit = contactList.constBegin(); + TQValueList<SSI>::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<Kopete::Contact> nonServerContacts = contacts(); - QDictIterator<Kopete::Contact> it( nonServerContacts ); - QStringList nonServerContactList; + TQDict<Kopete::Contact> nonServerContacts = contacts(); + TQDictIterator<Kopete::Contact> it( nonServerContacts ); + TQStringList nonServerContactList; for ( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast<OscarContact*>( ( *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<OscarContact*>( 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<OscarContact *> ( 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<TLV> dummyList; + TQValueList<TLV> 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<QString,QString>::iterator it; + TQMap<TQString,TQString>::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 diff --git a/kopete/protocols/oscar/oscaraccount.h b/kopete/protocols/oscar/oscaraccount.h index aa8e806d..d135df3a 100644 --- a/kopete/protocols/oscar/oscaraccount.h +++ b/kopete/protocols/oscar/oscaraccount.h @@ -18,9 +18,9 @@ #ifndef OSCARACCOUNT_H #define OSCARACCOUNT_H -#include <qdict.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqwidget.h> #include "kopetepasswordedaccount.h" #include "oscartypeclasses.h" @@ -44,7 +44,7 @@ class KDE_EXPORT OscarAccount : public Kopete::PasswordedAccount Q_OBJECT public: - OscarAccount(Kopete::Protocol *parent, const QString &accountID, const char *name=0L, bool isICQ=false); + OscarAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name=0L, bool isICQ=false); virtual ~OscarAccount(); /** Provide the derived accounts and contacts with access to the backend */ @@ -67,7 +67,7 @@ public: /** * Sets the account away */ - virtual void setAway( bool away, const QString &awayMessage = QString::null ) = 0; + virtual void setAway( bool away, const TQString &awayMessage = TQString::null ) = 0; /** * Accessor method for the action menu @@ -75,25 +75,25 @@ public: virtual KActionMenu* actionMenu() = 0; /** Set the server address */ - void setServerAddress( const QString& server ); + void setServerAddress( const TQString& server ); /** Set the server port */ void setServerPort( int port ); /** Returns codec for account's default encoding */ - QTextCodec* defaultCodec() const; + TQTextCodec* defaultCodec() const; /** * Returns codec for given contact's encoding or default one * if contact has no encoding */ - QTextCodec* contactCodec( const OscarContact* contact ) const; + TQTextCodec* contactCodec( const OscarContact* contact ) const; /** * Returns codec for given contact's encoding or default one * if contact has no encoding */ - QTextCodec* contactCodec( const QString& contactName ) const; + TQTextCodec* contactCodec( const TQString& contactName ) const; /** * Sets buddy icon @@ -107,7 +107,7 @@ public: * \param autoAddGroup if the group doesn't exist add that group * \return true if the contact will be added */ - bool addContactToSSI( const QString& contactName, const QString& groupName, bool autoAddGroup ); + bool addContactToSSI( const TQString& contactName, const TQString& groupName, bool autoAddGroup ); /** * Change a contact's group on the server @@ -116,7 +116,7 @@ public: * \param autoAddGroup if the new group doesn't exist add that group * \return true if the contact will be added */ - bool changeContactGroupInSSI( const QString& contact, const QString& newGroupName, bool autoAddGroup ); + bool changeContactGroupInSSI( const TQString& contact, const TQString& newGroupName, bool autoAddGroup ); public slots: void slotGoOffline(); @@ -127,12 +127,12 @@ protected: /** * Setup a connection for a derived account based on the host and port */ - Connection* setupConnection( const QString& server, uint port ); + Connection* setupConnection( const TQString& server, uint port ); /** * Adds a contact to a meta contact */ - virtual bool createContact(const QString &contactId, + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact ); /** @@ -142,9 +142,9 @@ protected: * @param parentContact the parent metacontact * @return whether the creation succeeded or not */ - virtual OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) = 0; + virtual OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) = 0; - virtual QString sanitizedMessage( const QString& message ) = 0; + virtual TQString sanitizedMessage( const TQString& message ) = 0; void updateVersionUpdaterStamp(); @@ -157,7 +157,7 @@ protected slots: void kopeteGroupRemoved( Kopete::Group* g ); void kopeteGroupAdded( Kopete::Group* g ); - void kopeteGroupRenamed( Kopete::Group* g, const QString& oldName ); + void kopeteGroupRenamed( Kopete::Group* g, const TQString& oldName ); virtual void messageReceived( const Oscar::Message& message ); @@ -169,8 +169,8 @@ protected slots: void ssiContactRemoved( const Oscar::SSI& ) {} /* slots for receiving typing notifications, and notify the appropriate OscarContact */ - void userStartedTyping( const QString & contact ); - void userStoppedTyping( const QString & contact ); + void userStartedTyping( const TQString & contact ); + void userStoppedTyping( const TQString & contact ); void nonServerAddContactDialogClosed(); @@ -181,11 +181,11 @@ signals: void buddyIconChanged(); private: - QString getFLAPErrorMessage( int code ); + TQString getFLAPErrorMessage( int code ); private slots: /** Handler from socket errors from a connection */ - void slotSocketError( int, const QString& ); + void slotSocketError( int, const TQString& ); /** Handle task errors from the client */ void slotTaskError( const Oscar::SNAC& s, int errCode, bool fatal ) ; diff --git a/kopete/protocols/oscar/oscarcontact.cpp b/kopete/protocols/oscar/oscarcontact.cpp index 660a82e6..cb9f06c6 100644 --- a/kopete/protocols/oscar/oscarcontact.cpp +++ b/kopete/protocols/oscar/oscarcontact.cpp @@ -18,8 +18,8 @@ #include <time.h> -#include <qapplication.h> -#include <qtextcodec.h> +#include <tqapplication.h> +#include <tqtextcodec.h> #include <kaction.h> #include <kdebug.h> @@ -43,30 +43,30 @@ #include <assert.h> -OscarContact::OscarContact( Kopete::Account* account, const QString& name, - Kopete::MetaContact* parent, const QString& icon, const SSI& ssiItem ) +OscarContact::OscarContact( Kopete::Account* account, const TQString& name, + Kopete::MetaContact* parent, const TQString& icon, const SSI& ssiItem ) : Kopete::Contact( account, name, parent, icon ) { mAccount = static_cast<OscarAccount*>(account); mName = name; mMsgManager = 0L; m_ssiItem = ssiItem; - connect( this, SIGNAL( updatedSSI() ), this, SLOT( updateSSIItem() ) ); + connect( this, TQT_SIGNAL( updatedSSI() ), this, TQT_SLOT( updateSSIItem() ) ); } OscarContact::~OscarContact() { } -void OscarContact::serialize(QMap<QString, QString> &serializedData, - QMap<QString, QString> &/*addressBookData*/) +void OscarContact::serialize(TQMap<TQString, TQString> &serializedData, + TQMap<TQString, TQString> &/*addressBookData*/) { serializedData["ssi_name"] = m_ssiItem.name(); - serializedData["ssi_type"] = QString::number( m_ssiItem.type() ); - serializedData["ssi_gid"] = QString::number( m_ssiItem.gid() ); - serializedData["ssi_bid"] = QString::number( m_ssiItem.bid() ); + serializedData["ssi_type"] = TQString::number( m_ssiItem.type() ); + serializedData["ssi_gid"] = TQString::number( m_ssiItem.gid() ); + serializedData["ssi_bid"] = TQString::number( m_ssiItem.bid() ); serializedData["ssi_alias"] = m_ssiItem.alias(); - serializedData["ssi_waitingAuth"] = m_ssiItem.waitingAuth() ? QString::fromLatin1( "true" ) : QString::fromLatin1( "false" ); + serializedData["ssi_waitingAuth"] = m_ssiItem.waitingAuth() ? TQString::fromLatin1( "true" ) : TQString::fromLatin1( "false" ); } bool OscarContact::isOnServer() const @@ -99,21 +99,21 @@ Kopete::ChatSession* OscarContact::manager( CanCreateFlags canCreate ) /*kdDebug(14190) << k_funcinfo << "Creating new ChatSession for contact '" << displayName() << "'" << endl;*/ - QPtrList<Kopete::Contact> theContact; + TQPtrList<Kopete::Contact> theContact; theContact.append(this); mMsgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), theContact, protocol()); // This is for when the user types a message and presses send - connect(mMsgManager, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession * ) ), - this, SLOT( slotSendMsg( Kopete::Message&, Kopete::ChatSession * ) ) ); + connect(mMsgManager, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession * ) ), + this, TQT_SLOT( slotSendMsg( Kopete::Message&, Kopete::ChatSession * ) ) ); // For when the message manager is destroyed - connect(mMsgManager, SIGNAL( destroyed() ), - this, SLOT( chatSessionDestroyed() ) ); + connect(mMsgManager, TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( chatSessionDestroyed() ) ); - connect(mMsgManager, SIGNAL( myselfTyping( bool ) ), - this, SLOT( slotTyping( bool ) ) ); + connect(mMsgManager, TQT_SIGNAL( myselfTyping( bool ) ), + this, TQT_SLOT( slotTyping( bool ) ) ); } return mMsgManager; } @@ -160,7 +160,7 @@ void OscarContact::sync(unsigned int flags) return; } -void OscarContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void OscarContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { Q_UNUSED( contact ); setProperty( Kopete::Global::Properties::self()->onlineSince(), details.onlineSinceTime() ); @@ -168,7 +168,7 @@ void OscarContact::userInfoUpdated( const QString& contact, const UserDetails& d m_warningLevel = details.warningLevel(); m_details.merge( details ); - QStringList capList; + TQStringList capList; // Append client name and version in case we found one if ( m_details.userClass() & 0x0080 /* WIRELESS */ ) capList << i18n( "Mobile AIM Client" ); @@ -225,10 +225,10 @@ void OscarContact::slotTyping( bool typing ) account()->engine()->sendTyping( contactId(), typing ); } -QTextCodec* OscarContact::contactCodec() const +TQTextCodec* OscarContact::contactCodec() const { if ( hasProperty( "contactEncoding" ) ) - return QTextCodec::codecForMib( property( "contactEncoding" ).value().toInt() ); + return TQTextCodec::codecForMib( property( "contactEncoding" ).value().toInt() ); else return mAccount->defaultCodec(); } diff --git a/kopete/protocols/oscar/oscarcontact.h b/kopete/protocols/oscar/oscarcontact.h index 51c31dd2..659e649e 100644 --- a/kopete/protocols/oscar/oscarcontact.h +++ b/kopete/protocols/oscar/oscarcontact.h @@ -18,8 +18,8 @@ #ifndef OSCARCONTACT_H #define OSCARCONTACT_H -#include <qwidget.h> -#include <qdatetime.h> +#include <tqwidget.h> +#include <tqdatetime.h> #include "kopetecontact.h" #include "kopetemessage.h" #include "userdetails.h" @@ -62,16 +62,16 @@ class KDE_EXPORT OscarContact : public Kopete::Contact Q_OBJECT public: - OscarContact( Kopete::Account* account, const QString& name, - Kopete::MetaContact* parent, const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + OscarContact( Kopete::Account* account, const TQString& name, + Kopete::MetaContact* parent, const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~OscarContact(); - virtual void serialize(QMap<QString, QString>&, QMap<QString, QString>&); + virtual void serialize(TQMap<TQString, TQString>&, TQMap<TQString, TQString>&); virtual Kopete::ChatSession *manager( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CanCreate ); - const QString &contactName() const { return mName; }; + const TQString &contactName() const { return mName; }; OscarAccount *account() const { return mAccount; }; bool isOnServer() const; @@ -87,7 +87,7 @@ public: * Returns codec for contact's encoding or default one * if contact has no encoding */ - QTextCodec *contactCodec() const; + TQTextCodec *contactCodec() const; public slots: /** slot so that properties can be updated based on a new SSI item */ @@ -100,13 +100,13 @@ public slots: virtual void sync(unsigned int flags); /** our user info has been updated */ - virtual void userInfoUpdated( const QString& contact, const UserDetails& details ); + virtual void userInfoUpdated( const TQString& contact, const UserDetails& details ); /** a user is online */ - virtual void userOnline( const QString& ) = 0; + virtual void userOnline( const TQString& ) = 0; /** a user is offline */ - virtual void userOffline( const QString& ) = 0; + virtual void userOffline( const TQString& ) = 0; protected slots: void slotTyping( bool typing ); @@ -118,12 +118,12 @@ signals: protected: OscarAccount *mAccount; - QString mName; + TQString mName; Kopete::ChatSession *mMsgManager; UserDetails m_details; SSI m_ssiItem; int m_warningLevel; - QString m_clientFeatures; + TQString m_clientFeatures; private: void initActions(); diff --git a/kopete/protocols/oscar/oscarencodingselectiondialog.cpp b/kopete/protocols/oscar/oscarencodingselectiondialog.cpp index 72e9081a..7a1826cb 100644 --- a/kopete/protocols/oscar/oscarencodingselectiondialog.cpp +++ b/kopete/protocols/oscar/oscarencodingselectiondialog.cpp @@ -21,15 +21,15 @@ #include "oscarencodingselectiondialog.h" #include <kdebug.h> -#include <qcombobox.h> +#include <tqcombobox.h> #include <klocale.h> -OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( QWidget* parent, int initialEncoding ) +OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( TQWidget* parent, int initialEncoding ) : KDialogBase( parent, 0, false, i18n( "Select Encoding" ), Ok | Cancel ) { int initialEncodingIndex; - clearWFlags( QWidget::WDestructiveClose ); + clearWFlags( TQWidget::WDestructiveClose ); m_encodingUI = new OscarEncodingBaseUI( this ); //fill the encoding combo boxes m_encodings.insert(0, i18n("Default")); @@ -99,7 +99,7 @@ OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( QWidget* parent, int int OscarEncodingSelectionDialog::selectedEncoding() const { - QString encoding = m_encodingUI->encodingCombo->currentText(); + TQString encoding = m_encodingUI->encodingCombo->currentText(); int mib = m_encodings.keys()[ m_encodings.values().findIndex(encoding) ]; if( mib == -1 ) @@ -109,12 +109,12 @@ int OscarEncodingSelectionDialog::selectedEncoding() const void OscarEncodingSelectionDialog::slotOk() { - emit closing( QDialog::Accepted ); + emit closing( TQDialog::Accepted ); } void OscarEncodingSelectionDialog::slotCancel() { - emit closing( QDialog::Rejected ); + emit closing( TQDialog::Rejected ); } #include "oscarencodingselectiondialog.moc" diff --git a/kopete/protocols/oscar/oscarencodingselectiondialog.h b/kopete/protocols/oscar/oscarencodingselectiondialog.h index f99655e4..2ab8d529 100644 --- a/kopete/protocols/oscar/oscarencodingselectiondialog.h +++ b/kopete/protocols/oscar/oscarencodingselectiondialog.h @@ -28,7 +28,7 @@ class KOPETE_EXPORT OscarEncodingSelectionDialog : public KDialogBase { Q_OBJECT public: - OscarEncodingSelectionDialog( QWidget* parent = 0, int initialEncoding = 4); + OscarEncodingSelectionDialog( TQWidget* parent = 0, int initialEncoding = 4); ~OscarEncodingSelectionDialog() {} int selectedEncoding() const; @@ -42,7 +42,7 @@ protected slots: private: OscarEncodingBaseUI* m_encodingUI; - QMap<int, QString> m_encodings; + TQMap<int, TQString> m_encodings; }; #endif diff --git a/kopete/protocols/oscar/oscarlistnonservercontacts.cpp b/kopete/protocols/oscar/oscarlistnonservercontacts.cpp index 804849a4..4529f562 100644 --- a/kopete/protocols/oscar/oscarlistnonservercontacts.cpp +++ b/kopete/protocols/oscar/oscarlistnonservercontacts.cpp @@ -20,11 +20,11 @@ #include "oscarlistnonservercontacts.h" #include "oscarlistcontactsbase.h" -#include <qstringlist.h> -#include <qcheckbox.h> +#include <tqstringlist.h> +#include <tqcheckbox.h> #include <klocale.h> -OscarListNonServerContacts::OscarListNonServerContacts(QWidget* parent) +OscarListNonServerContacts::OscarListNonServerContacts(TQWidget* parent) : KDialogBase( parent, 0, false, i18n( "Add Contacts to Server List" ), Ok | Cancel ) { @@ -39,13 +39,13 @@ OscarListNonServerContacts::~OscarListNonServerContacts() } -void OscarListNonServerContacts::addContacts( const QStringList& contactList ) +void OscarListNonServerContacts::addContacts( const TQStringList& contactList ) { m_nonServerContacts = contactList; m_contactsList->notServerContacts->insertStringList( contactList ); } -QStringList OscarListNonServerContacts::nonServerContactList() const +TQStringList OscarListNonServerContacts::nonServerContactList() const { return m_nonServerContacts; } diff --git a/kopete/protocols/oscar/oscarlistnonservercontacts.h b/kopete/protocols/oscar/oscarlistnonservercontacts.h index 7f3fb4f8..e7db0848 100644 --- a/kopete/protocols/oscar/oscarlistnonservercontacts.h +++ b/kopete/protocols/oscar/oscarlistnonservercontacts.h @@ -29,11 +29,11 @@ class KOPETE_EXPORT OscarListNonServerContacts : public KDialogBase { Q_OBJECT public: - OscarListNonServerContacts( QWidget* parent ); + OscarListNonServerContacts( TQWidget* parent ); ~OscarListNonServerContacts(); - void addContacts( const QStringList& contactList ); - QStringList nonServerContactList() const; + void addContacts( const TQStringList& contactList ); + TQStringList nonServerContactList() const; bool onlyShowOnce(); @@ -46,7 +46,7 @@ signals: private: OscarListContactsBase* m_contactsList; - QStringList m_nonServerContacts; + TQStringList m_nonServerContacts; }; #endif diff --git a/kopete/protocols/oscar/oscarmyselfcontact.cpp b/kopete/protocols/oscar/oscarmyselfcontact.cpp index e234cf0f..28aeb8f2 100644 --- a/kopete/protocols/oscar/oscarmyselfcontact.cpp +++ b/kopete/protocols/oscar/oscarmyselfcontact.cpp @@ -27,7 +27,7 @@ OscarMyselfContact::OscarMyselfContact( OscarAccount* account ) : Kopete::Contact( account, account->accountId(), Kopete::ContactList::self()->myself() ) { - QObject::connect( account->engine(), SIGNAL( haveOwnInfo() ), this, SLOT( userInfoUpdated() ) ); + TQObject::connect( account->engine(), TQT_SIGNAL( haveOwnInfo() ), this, TQT_SLOT( userInfoUpdated() ) ); } OscarMyselfContact::~OscarMyselfContact() diff --git a/kopete/protocols/oscar/oscarversionupdater.cpp b/kopete/protocols/oscar/oscarversionupdater.cpp index 6e2cea09..75f38b74 100644 --- a/kopete/protocols/oscar/oscarversionupdater.cpp +++ b/kopete/protocols/oscar/oscarversionupdater.cpp @@ -16,8 +16,8 @@ #include "oscarversionupdater.h" -#include <qdom.h> -#include <qmutex.h> +#include <tqdom.h> +#include <tqmutex.h> #include <kdebug.h> #include <kio/job.h> @@ -25,7 +25,7 @@ #include <kglobal.h> -QMutex updateMutex; +TQMutex updateMutex; OscarVersionUpdater *OscarVersionUpdater::versionUpdaterStatic = 0L; OscarVersionUpdater::OscarVersionUpdater() @@ -67,14 +67,14 @@ bool OscarVersionUpdater::update( unsigned int stamp ) mVersionData.resize( 0 ); KConfigGroup config( KGlobal::config(), "Oscar" ); - QString url = config.readEntry( "NewVersionURL", "http://kopete.kde.org/oscarversions.xml" ); + TQString url = config.readEntry( "NewVersionURL", "http://kopete.kde.org/oscarversions.xml" ); mTransferJob = KIO::get ( url ); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Download version info from server."<< endl; - connect ( mTransferJob, SIGNAL ( result ( KIO::Job* ) ), - this, SLOT ( slotTransferResult ( KIO::Job* ) ) ); - connect ( mTransferJob, SIGNAL ( data ( KIO::Job*, const QByteArray& ) ), - this, SLOT ( slotTransferData ( KIO::Job*, const QByteArray& ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( result ( KIO::Job* ) ), + this, TQT_SLOT ( slotTransferResult ( KIO::Job* ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( data ( KIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT ( slotTransferData ( KIO::Job*, const TQByteArray& ) ) ); } return isUpdating; } @@ -121,30 +121,30 @@ void OscarVersionUpdater::printDebug() { kdDebug(OSCAR_RAW_DEBUG) << "*************** AIM VERSION INFO ***************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mAIMVersion.clientString << endl; - kdDebug(OSCAR_RAW_DEBUG) << "client id: " << QString::number( mAIMVersion.clientId, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "major: " << QString::number( mAIMVersion.major, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "minor: " << QString::number( mAIMVersion.minor, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "point: " << QString::number( mAIMVersion.point, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "build: " << QString::number( mAIMVersion.build, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "other: " << QString::number( mAIMVersion.other, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mAIMVersion.clientId, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "major: " << TQString::number( mAIMVersion.major, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "minor: " << TQString::number( mAIMVersion.minor, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "point: " << TQString::number( mAIMVersion.point, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "build: " << TQString::number( mAIMVersion.build, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "other: " << TQString::number( mAIMVersion.other, 16 ) << endl; kdDebug(OSCAR_RAW_DEBUG) << "country: " << mAIMVersion.country << endl; kdDebug(OSCAR_RAW_DEBUG) << "lang: " << mAIMVersion.lang << endl; kdDebug(OSCAR_RAW_DEBUG) << "************************************************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "*************** ICQ VERSION INFO ***************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mICQVersion.clientString << endl; - kdDebug(OSCAR_RAW_DEBUG) << "client id: " << QString::number( mICQVersion.clientId, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "major: " << QString::number( mICQVersion.major, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "minor: " << QString::number( mICQVersion.minor, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "point: " << QString::number( mICQVersion.point, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "build: " << QString::number( mICQVersion.build, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "other: " << QString::number( mICQVersion.other, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mICQVersion.clientId, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "major: " << TQString::number( mICQVersion.major, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "minor: " << TQString::number( mICQVersion.minor, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "point: " << TQString::number( mICQVersion.point, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "build: " << TQString::number( mICQVersion.build, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "other: " << TQString::number( mICQVersion.other, 16 ) << endl; kdDebug(OSCAR_RAW_DEBUG) << "country: " << mICQVersion.country << endl; kdDebug(OSCAR_RAW_DEBUG) << "lang: " << mICQVersion.lang << endl; kdDebug(OSCAR_RAW_DEBUG) << "************************************************" << endl; } -void OscarVersionUpdater::slotTransferData ( KIO::Job */*job*/, const QByteArray &data ) +void OscarVersionUpdater::slotTransferData ( KIO::Job */*job*/, const TQByteArray &data ) { unsigned oldSize = mVersionData.size(); mVersionData.resize ( oldSize + data.size() ); @@ -165,7 +165,7 @@ void OscarVersionUpdater::slotTransferResult ( KIO::Job *job ) { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Updating version info" << endl; - QDomDocument doc; + TQDomDocument doc; if ( doc.setContent ( mVersionData ) ) { Oscar::ClientVersion tmpICQ = mICQVersion; @@ -198,15 +198,15 @@ void OscarVersionUpdater::slotTransferResult ( KIO::Job *job ) updateMutex.unlock(); } -void OscarVersionUpdater::parseDocument( QDomDocument& doc ) +void OscarVersionUpdater::parseDocument( TQDomDocument& doc ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; - QDomElement root = doc.documentElement(); + TQDomElement root = doc.documentElement(); if ( root.tagName() != "oscar" ) return; - QDomElement versionElement = root.firstChild().toElement(); + TQDomElement versionElement = root.firstChild().toElement(); while( !versionElement.isNull() ) { if ( versionElement.tagName() == "icq" ) @@ -218,22 +218,22 @@ void OscarVersionUpdater::parseDocument( QDomDocument& doc ) } } -bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, QDomElement& element ) +bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, TQDomElement& element ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; // clear structure - version.clientString = QString::null; + version.clientString = TQString::null; version.clientId = 0x0000; version.major = 0x0000; version.minor = 0x0000; version.point = 0x0000; version.build = 0x0000; version.other = 0x00000000; - version.country = QString::null; - version.lang = QString::null; + version.country = TQString::null; + version.lang = TQString::null; - QDomElement versionChild = element.firstChild().toElement(); + TQDomElement versionChild = element.firstChild().toElement(); while ( !versionChild.isNull() ) { if ( versionChild.tagName() == "client" ) @@ -261,7 +261,7 @@ bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, QDomEleme return true; } -void OscarVersionUpdater::storeVersionInfo( const QString& group, const Oscar::ClientVersion& version ) const +void OscarVersionUpdater::storeVersionInfo( const TQString& group, const Oscar::ClientVersion& version ) const { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Storing version info to group: " << group << endl; KConfigGroup config( KGlobal::config(), group ); diff --git a/kopete/protocols/oscar/oscarversionupdater.h b/kopete/protocols/oscar/oscarversionupdater.h index d6851f73..bb51cc9b 100644 --- a/kopete/protocols/oscar/oscarversionupdater.h +++ b/kopete/protocols/oscar/oscarversionupdater.h @@ -17,7 +17,7 @@ #ifndef OSCARVERSIONUPDATER_H #define OSCARVERSIONUPDATER_H -#include <qobject.h> +#include <tqobject.h> #include <oscartypes.h> @@ -84,19 +84,19 @@ public: void printDebug(); private slots: - void slotTransferData( KIO::Job *job, const QByteArray &data ); + void slotTransferData( KIO::Job *job, const TQByteArray &data ); void slotTransferResult( KIO::Job *job ); private: - void parseDocument( QDomDocument& doc ); - bool parseVersion( Oscar::ClientVersion& version, QDomElement& element ); + void parseDocument( TQDomDocument& doc ); + bool parseVersion( Oscar::ClientVersion& version, TQDomElement& element ); /** * Store version info structure to KConfigGroup * @param group is the group name. * @param version is version info structure. */ - void storeVersionInfo( const QString& group, const Oscar::ClientVersion& version ) const; + void storeVersionInfo( const TQString& group, const Oscar::ClientVersion& version ) const; /** * Compare two versions. @@ -111,7 +111,7 @@ private: Oscar::ClientVersion mAIMVersion; KIO::TransferJob *mTransferJob; - QByteArray mVersionData; + TQByteArray mVersionData; unsigned int mStamp; bool mUpdating; diff --git a/kopete/protocols/oscar/oscarvisibilitydialog.cpp b/kopete/protocols/oscar/oscarvisibilitydialog.cpp index 7958432c..77f3894a 100644 --- a/kopete/protocols/oscar/oscarvisibilitydialog.cpp +++ b/kopete/protocols/oscar/oscarvisibilitydialog.cpp @@ -16,8 +16,8 @@ #include "oscarvisibilitydialog.h" -#include <qstringlist.h> -#include <qpushbutton.h> +#include <tqstringlist.h> +#include <tqpushbutton.h> #include <klocale.h> @@ -25,21 +25,21 @@ #include "client.h" -OscarVisibilityDialog::OscarVisibilityDialog( Client* client, QWidget* parent ) +OscarVisibilityDialog::OscarVisibilityDialog( Client* client, TQWidget* parent ) : KDialogBase( parent, 0, false, i18n( "Add Contacts to Visible or Invisible List" ), Ok | Cancel ), m_client( client ) { m_visibilityUI = new OscarVisibilityBase( this ); setMainWidget( m_visibilityUI ); - QObject::connect(m_visibilityUI->visibleAdd, SIGNAL(clicked()), - this, SLOT(slotAddToVisible())); - QObject::connect(m_visibilityUI->visibleRemove, SIGNAL(clicked()), - this, SLOT(slotRemoveFromVisible())); - QObject::connect(m_visibilityUI->invisibleAdd, SIGNAL(clicked()), - this, SLOT(slotAddToInvisible())); - QObject::connect(m_visibilityUI->invisibleRemove, SIGNAL(clicked()), - this, SLOT(slotRemoveFromInvisible())); + TQObject::connect(m_visibilityUI->visibleAdd, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddToVisible())); + TQObject::connect(m_visibilityUI->visibleRemove, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveFromVisible())); + TQObject::connect(m_visibilityUI->invisibleAdd, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddToInvisible())); + TQObject::connect(m_visibilityUI->invisibleRemove, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveFromInvisible())); } void OscarVisibilityDialog::addContacts( const ContactMap& contacts ) @@ -52,22 +52,22 @@ void OscarVisibilityDialog::addContacts( const ContactMap& contacts ) } -void OscarVisibilityDialog::addVisibleContacts( const QStringList& contactList ) +void OscarVisibilityDialog::addVisibleContacts( const TQStringList& contactList ) { m_visibilityUI->visibleContacts->insertStringList( contactList ); } -void OscarVisibilityDialog::addInvisibleContacts( const QStringList& contactList ) +void OscarVisibilityDialog::addInvisibleContacts( const TQStringList& contactList ) { m_visibilityUI->invisibleContacts->insertStringList( contactList ); } void OscarVisibilityDialog::slotAddToVisible() { - QListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_visibleListChangesMap[contactId] = Add; if ( !m_visibilityUI->visibleContacts->findItem( itm->text(), Qt::CaseSensitive | Qt::ExactMatch ) ) @@ -76,10 +76,10 @@ void OscarVisibilityDialog::slotAddToVisible() void OscarVisibilityDialog::slotRemoveFromVisible() { - QListBoxItem *itm = m_visibilityUI->visibleContacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->visibleContacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_visibleListChangesMap[contactId] = Remove; int visIdx = m_visibilityUI->visibleContacts->index( itm ); @@ -88,10 +88,10 @@ void OscarVisibilityDialog::slotRemoveFromVisible() void OscarVisibilityDialog::slotAddToInvisible() { - QListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_invisibleListChangesMap[contactId] = Add; if ( !m_visibilityUI->invisibleContacts->findItem( itm->text(), Qt::CaseSensitive | Qt::ExactMatch ) ) @@ -100,10 +100,10 @@ void OscarVisibilityDialog::slotAddToInvisible() void OscarVisibilityDialog::slotRemoveFromInvisible() { - QListBoxItem *itm = m_visibilityUI->invisibleContacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->invisibleContacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_invisibleListChangesMap[contactId] = Remove; int visIdx = m_visibilityUI->invisibleContacts->index( itm ); diff --git a/kopete/protocols/oscar/oscarvisibilitydialog.h b/kopete/protocols/oscar/oscarvisibilitydialog.h index fc45039f..719243d3 100644 --- a/kopete/protocols/oscar/oscarvisibilitydialog.h +++ b/kopete/protocols/oscar/oscarvisibilitydialog.h @@ -31,14 +31,14 @@ class KOPETE_EXPORT OscarVisibilityDialog : public KDialogBase { Q_OBJECT public: - typedef QMap<QString, QString> ContactMap; + typedef TQMap<TQString, TQString> ContactMap; - OscarVisibilityDialog( Client* client, QWidget* parent ); + OscarVisibilityDialog( Client* client, TQWidget* parent ); ~OscarVisibilityDialog() {} void addContacts( const ContactMap& contacts ); - void addVisibleContacts( const QStringList& contactList ); - void addInvisibleContacts( const QStringList& contactList ); + void addVisibleContacts( const TQStringList& contactList ); + void addInvisibleContacts( const TQStringList& contactList ); signals: void closing(); @@ -55,7 +55,7 @@ protected slots: private: enum Action{ Remove = 0, Add }; - typedef QMap<QString, Action> ChangeMap; + typedef TQMap<TQString, Action> ChangeMap; //maps with changes that should be send to server ChangeMap m_visibleListChangesMap; diff --git a/kopete/protocols/sms/serviceloader.cpp b/kopete/protocols/sms/serviceloader.cpp index 8a64a6c0..0ebbe7fa 100644 --- a/kopete/protocols/sms/serviceloader.cpp +++ b/kopete/protocols/sms/serviceloader.cpp @@ -28,7 +28,7 @@ #endif #include "kopeteuiglobal.h" -SMSService* ServiceLoader::loadService(const QString& name, Kopete::Account* account) +SMSService* ServiceLoader::loadService(const TQString& name, Kopete::Account* account) { kdWarning( 14160 ) << k_funcinfo << endl; @@ -51,9 +51,9 @@ SMSService* ServiceLoader::loadService(const QString& name, Kopete::Account* acc return s; } -QStringList ServiceLoader::services() +TQStringList ServiceLoader::services() { - QStringList toReturn; + TQStringList toReturn; toReturn.append("SMSSend"); toReturn.append("SMSClient"); #ifdef INCLUDE_SMSGSM diff --git a/kopete/protocols/sms/serviceloader.h b/kopete/protocols/sms/serviceloader.h index fe29ebcc..b341a499 100644 --- a/kopete/protocols/sms/serviceloader.h +++ b/kopete/protocols/sms/serviceloader.h @@ -18,16 +18,16 @@ #define SERVICELOADER_H #include "smsservice.h" -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> class SMSContact; class ServiceLoader { public: - static SMSService* loadService(const QString& name, Kopete::Account* account); - static QStringList services(); + static SMSService* loadService(const TQString& name, Kopete::Account* account); + static TQStringList services(); } ; #endif //SERVICELOADER_H diff --git a/kopete/protocols/sms/services/gsmlib.cpp b/kopete/protocols/sms/services/gsmlib.cpp index e9b0542b..7f129473 100644 --- a/kopete/protocols/sms/services/gsmlib.cpp +++ b/kopete/protocols/sms/services/gsmlib.cpp @@ -15,13 +15,13 @@ #include "config.h" #ifdef INCLUDE_SMSGSM -#include <qcombobox.h> -#include <qlayout.h> -#include <qapplication.h> -#include <qevent.h> -#include <qmutex.h> -#include <qthread.h> -#include <qcheckbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqapplication.h> +#include <tqevent.h> +#include <tqmutex.h> +#include <tqthread.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kurlrequester.h> @@ -51,7 +51,7 @@ ///////////////////////////////////////////////////////////////////// #define GSMLIB_EVENT_ID 245 -GSMLibEvent::GSMLibEvent(SubType t) : QCustomEvent(QEvent::User+GSMLIB_EVENT_ID) +GSMLibEvent::GSMLibEvent(SubType t) : TQCustomEvent(TQEvent::User+GSMLIB_EVENT_ID) { setSubType(t); } @@ -67,7 +67,7 @@ void GSMLibEvent::setSubType(GSMLibEvent::SubType t) } ///////////////////////////////////////////////////////////////////// -GSMLibThread::GSMLibThread(QString dev, GSMLib* parent) +GSMLibThread::GSMLibThread(TQString dev, GSMLib* parent) { m_device = dev; m_parent = parent; @@ -100,7 +100,7 @@ void GSMLibThread::run() delete m_MeTa; m_MeTa = NULL; - QApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::DISCONNECTED)); + TQApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::DISCONNECTED)); kdDebug( 14160 ) << "GSMLibThread exited"<<endl; } @@ -115,9 +115,9 @@ void GSMLibThread::send(const Kopete::Message& msg) else { GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT ); - e->Reason = QString("GSMLib: Not Connected"); + e->Reason = TQString("GSMLib: Not Connected"); e->Message = msg; - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } } @@ -144,7 +144,7 @@ bool GSMLibThread::doConnect() m_MeTa->setSMSRoutingToTA(true, false, false, true); m_MeTa->setEventHandler(this); - QApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::CONNECTED)); + TQApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::CONNECTED)); return true; } catch(gsmlib::GsmException &e) @@ -225,7 +225,7 @@ void GSMLibThread::pollForMessages( ) e->Text = m.Message->userData().c_str(); e->Number = m.Message->address().toString().c_str(); - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } m_newMessages.clear(); @@ -239,7 +239,7 @@ void GSMLibThread::pollForMessages( ) void GSMLibThread::sendMessageQueue() { - QMutexLocker _(&m_outMessagesMutex); + TQMutexLocker _(&m_outMessagesMutex); if(m_outMessages.size() == 0 ) return; @@ -252,18 +252,18 @@ void GSMLibThread::sendMessageQueue() void GSMLibThread::sendMessage(const Kopete::Message& msg) { - QString reason; + TQString reason; if (!m_MeTa) { GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT ); - e->Reason = QString("GSMLib: Not Connected"); + e->Reason = TQString("GSMLib: Not Connected"); e->Message = msg; - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } - QString message = msg.plainBody(); - QString nr = msg.to().first()->contactId(); + TQString message = msg.plainBody(); + TQString nr = msg.to().first()->contactId(); // send SMS try @@ -275,14 +275,14 @@ void GSMLibThread::sendMessage(const Kopete::Message& msg) GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_SENT ); e->Message = msg; - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } catch(gsmlib::GsmException &e) { GSMLibEvent* ev = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT ); - ev->Reason = QString("GSMLib: ") + e.what(); + ev->Reason = TQString("GSMLib: ") + e.what(); ev->Message = msg; - QApplication::postEvent(m_parent, ev); + TQApplication::postEvent(m_parent, ev); } } @@ -308,7 +308,7 @@ void GSMLib::saveConfig() { KConfigGroup* c = m_account->configGroup(); - c->writeEntry(QString("%1:%2").arg("GSMLib").arg("Device"), m_device); + c->writeEntry(TQString("%1:%2").arg("GSMLib").arg("Device"), m_device); } } @@ -317,11 +317,11 @@ void GSMLib::loadConfig() m_device = "/dev/bluetooth/rfcomm0"; if( m_account != NULL ) { - QString temp; + TQString temp; KConfigGroup* c = m_account->configGroup(); - temp = c->readEntry(QString("%1:%2").arg("GSMLib").arg("Device"), QString::null); - if( temp != QString::null ) + temp = c->readEntry(TQString("%1:%2").arg("GSMLib").arg("Device"), TQString::null); + if( temp != TQString::null ) m_device = temp; } } @@ -348,11 +348,11 @@ void GSMLib::disconnect() } -void GSMLib::setWidgetContainer(QWidget* parent, QGridLayout* layout) +void GSMLib::setWidgetContainer(TQWidget* parent, TQGridLayout* layout) { m_parent = parent; m_layout = layout; - QWidget *configWidget = configureWidget(parent); + TQWidget *configWidget = configureWidget(parent); layout->addMultiCellWidget(configWidget, 0, 1, 0, 1); configWidget->show(); } @@ -362,7 +362,7 @@ void GSMLib::send(const Kopete::Message& msg) m_thread->send(msg); } -QWidget* GSMLib::configureWidget(QWidget* parent) +TQWidget* GSMLib::configureWidget(TQWidget* parent) { if (prefWidget == 0L) @@ -388,9 +388,9 @@ int GSMLib::maxSize() return 160; } -void GSMLib::customEvent(QCustomEvent* e) +void GSMLib::customEvent(TQCustomEvent* e) { - if( e->type() != QEvent::User+GSMLIB_EVENT_ID ) + if( e->type() != TQEvent::User+GSMLIB_EVENT_ID ) return; if( m_account == NULL ) @@ -415,8 +415,8 @@ void GSMLib::customEvent(QCustomEvent* e) break; case GSMLibEvent::NEW_MESSAGE: { - QString nr = ge->Number; - QString text = ge->Text; + TQString nr = ge->Number; + TQString text = ge->Text; // Locate a contact SMSContact* contact = static_cast<SMSContact*>( m_account->contacts().find( nr )); @@ -441,9 +441,9 @@ void GSMLib::customEvent(QCustomEvent* e) -const QString& GSMLib::description() +const TQString& GSMLib::description() { - QString url = "http://www.pxh.de/fs/gsmlib/"; + TQString url = "http://www.pxh.de/fs/gsmlib/"; m_description = i18n("<qt>GSMLib is a library (and utilities) for sending SMS via a GSM device. The program can be found on <a href=\"%1\">%1</a></qt>").arg(url).arg(url); return m_description; } diff --git a/kopete/protocols/sms/services/gsmlib.h b/kopete/protocols/sms/services/gsmlib.h index fa9ef1d2..e4f7f8c8 100644 --- a/kopete/protocols/sms/services/gsmlib.h +++ b/kopete/protocols/sms/services/gsmlib.h @@ -30,12 +30,12 @@ #include "smsservice.h" #include "kopetemessage.h" -#include <qobject.h> -#include <qevent.h> -#include <qthread.h> -#include <qmutex.h> -#include <qvaluelist.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqevent.h> +#include <tqthread.h> +#include <tqmutex.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> class GSMLibPrefsUI; class SMSContact; @@ -51,10 +51,10 @@ public: ~GSMLib(); void send(const Kopete::Message& msg); - void setWidgetContainer(QWidget* parent, QGridLayout* container); + void setWidgetContainer(TQWidget* parent, TQGridLayout* container); int maxSize(); - const QString& description(); + const TQString& description(); public slots: void savePreferences(); @@ -64,18 +64,18 @@ public slots: //signals: // void messageSent(const Kopete::Message &); protected: - virtual void customEvent(QCustomEvent* e); + virtual void customEvent(TQCustomEvent* e); - QWidget* configureWidget(QWidget* parent); + TQWidget* configureWidget(TQWidget* parent); void saveConfig(); void loadConfig(); GSMLibPrefsUI* prefWidget; - QStringList output; + TQStringList output; - QString m_device; + TQString m_device; - QString m_description; + TQString m_description; GSMLibThread* m_thread; @@ -93,10 +93,10 @@ public: SubType subType(); void setSubType(SubType t); - QString Text; - QString Number; + TQString Text; + TQString Number; - QString Reason; + TQString Reason; Kopete::Message Message; protected: @@ -104,10 +104,10 @@ protected: }; /// Thread to deal with GsmLib's blocking -class GSMLibThread : public QThread, gsmlib::GsmEvent +class GSMLibThread : public TQThread, gsmlib::GsmEvent { public: - GSMLibThread(QString dev, GSMLib* parent); + GSMLibThread(TQString dev, GSMLib* parent); virtual ~GSMLibThread(); virtual void run(); @@ -122,7 +122,7 @@ protected: void SMSReceptionIndication(std::string storeName, unsigned int index, SMSMessageType messageType); GSMLib* m_parent; - QString m_device; + TQString m_device; gsmlib::MeTa* m_MeTa; @@ -131,7 +131,7 @@ protected: struct IncomingMessage { int Index; - QString StoreName; + TQString StoreName; gsmlib::SMSMessageRef Message; GsmEvent::SMSMessageType Type; @@ -139,12 +139,12 @@ protected: {} }; - typedef QValueList<IncomingMessage> MessageList; + typedef TQValueList<IncomingMessage> MessageList; MessageList m_newMessages; - typedef QValueList<Kopete::Message> KopeteMessageList; + typedef TQValueList<Kopete::Message> KopeteMessageList; KopeteMessageList m_outMessages; - QMutex m_outMessagesMutex; + TQMutex m_outMessagesMutex; }; #endif diff --git a/kopete/protocols/sms/services/kopete_unix_serial.cpp b/kopete/protocols/sms/services/kopete_unix_serial.cpp index b694ab22..c40f831b 100644 --- a/kopete/protocols/sms/services/kopete_unix_serial.cpp +++ b/kopete/protocols/sms/services/kopete_unix_serial.cpp @@ -27,7 +27,7 @@ #include <cassert> #include <assert.h> -#include <qsocketnotifier.h> +#include <tqsocketnotifier.h> #include "kopete_unix_serial.h" @@ -304,8 +304,8 @@ KopeteUnixSerialPort::KopeteUnixSerialPort(string device, speed_t lineSpeed, if (s.find("OK") != string::npos || s.find("CABLE: GSM") != string::npos) { - _readNotifier = new QSocketNotifier(_fd, QSocketNotifier::Read); - connect( _readNotifier, SIGNAL(activated(int)), this, SIGNAL(activated())); + _readNotifier = new TQSocketNotifier(_fd, TQSocketNotifier::Read); + connect( _readNotifier, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated())); return; // found OK, return } } diff --git a/kopete/protocols/sms/services/kopete_unix_serial.h b/kopete/protocols/sms/services/kopete_unix_serial.h index 0248556b..beb0592a 100644 --- a/kopete/protocols/sms/services/kopete_unix_serial.h +++ b/kopete/protocols/sms/services/kopete_unix_serial.h @@ -24,13 +24,13 @@ #include <sys/types.h> #include <termios.h> -#include <qobject.h> +#include <tqobject.h> class QSocketNotifier; namespace gsmlib { -class KopeteUnixSerialPort : public QObject, public Port +class KopeteUnixSerialPort : public TQObject, public Port { Q_OBJECT; @@ -39,7 +39,7 @@ protected: int _oldChar; // character set by putBack() (-1 == none) long int _timeoutVal; // timeout for getLine/readByte - QSocketNotifier* _readNotifier; + TQSocketNotifier* _readNotifier; // throw GsmException include UNIX errno void throwModemException(std::string message) throw(GsmException); diff --git a/kopete/protocols/sms/services/smsclient.cpp b/kopete/protocols/sms/services/smsclient.cpp index 96c04818..17a27066 100644 --- a/kopete/protocols/sms/services/smsclient.cpp +++ b/kopete/protocols/sms/services/smsclient.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include <qcombobox.h> -#include <qlayout.h> +#include <tqcombobox.h> +#include <tqlayout.h> #include <klocale.h> #include <kurlrequester.h> @@ -41,12 +41,12 @@ SMSClient::~SMSClient() { } -void SMSClient::setWidgetContainer(QWidget* parent, QGridLayout* layout) +void SMSClient::setWidgetContainer(TQWidget* parent, TQGridLayout* layout) { kdWarning( 14160 ) << k_funcinfo << "ml: " << layout << ", " << "mp: " << parent << endl; m_parent = parent; m_layout = layout; - QWidget *configWidget = configureWidget(parent); + TQWidget *configWidget = configureWidget(parent); layout->addMultiCellWidget(configWidget, 0, 1, 0, 1); configWidget->show(); } @@ -59,7 +59,7 @@ void SMSClient::send(const Kopete::Message& msg) m_msg = msg; KConfigGroup* c = m_account->configGroup(); - QString provider = c->readEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName"), QString::null); + TQString provider = c->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName"), TQString::null); if (provider.isNull()) { @@ -67,27 +67,27 @@ void SMSClient::send(const Kopete::Message& msg) return; } - QString programName = c->readEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"). QString::null); + TQString programName = c->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"). TQString::null); if (programName.isNull()) programName = "/usr/bin/sms_client"; KProcess* p = new KProcess; - QString message = msg.plainBody(); - QString nr = msg.to().first()->contactId(); + TQString message = msg.plainBody(); + TQString nr = msg.to().first()->contactId(); *p << programName; *p << provider + ":" + nr; *p << message; - QObject::connect(p, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendFinished(KProcess*))); - QObject::connect(p, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotReceivedOutput(KProcess*, char*, int))); - QObject::connect(p, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotReceivedOutput(KProcess*, char*, int))); + TQObject::connect(p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess*))); + TQObject::connect(p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int))); + TQObject::connect(p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int))); p->start(KProcess::Block, KProcess::AllOutput); } -QWidget* SMSClient::configureWidget(QWidget* parent) +TQWidget* SMSClient::configureWidget(TQWidget* parent) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero!!)" << endl; @@ -95,17 +95,17 @@ QWidget* SMSClient::configureWidget(QWidget* parent) prefWidget = new SMSClientPrefsUI(parent); prefWidget->configDir->setMode(KFile::Directory); - QString configDir; + TQString configDir; if (m_account) - configDir = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ConfigDir"), QString::null); + configDir = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ConfigDir"), TQString::null); if (configDir.isNull()) configDir = "/etc/sms"; prefWidget->configDir->setURL(configDir); - QString programName; + TQString programName; if (m_account) - programName = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"), - QString::null); + programName = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"), + TQString::null); if (programName.isNull()) programName = "/usr/bin/sms_client"; prefWidget->program->setURL(programName); @@ -114,7 +114,7 @@ QWidget* SMSClient::configureWidget(QWidget* parent) if (m_account) { - QString pName = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName")); + TQString pName = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName")); for (int i=0; i < prefWidget->provider->count(); i++) { if (prefWidget->provider->text(i) == pName) @@ -136,27 +136,27 @@ void SMSClient::savePreferences() { KConfigGroup* c = m_account->configGroup(); - c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"), prefWidget->program->url()); - c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ConfigDir"), prefWidget->configDir->url()); - c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName"), prefWidget->provider->currentText()); + c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"), prefWidget->program->url()); + c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ConfigDir"), prefWidget->configDir->url()); + c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName"), prefWidget->provider->currentText()); } } -QStringList SMSClient::providers() +TQStringList SMSClient::providers() { - QStringList p; + TQStringList p; - QDir d; - d.setPath(QString("%1/services/").arg(prefWidget->configDir->url())); - p += d.entryList("*", QDir::Files); + TQDir d; + d.setPath(TQString("%1/services/").arg(prefWidget->configDir->url())); + p += d.entryList("*", TQDir::Files); return p; } void SMSClient::slotReceivedOutput(KProcess*, char *buffer, int buflen) { - QStringList lines = QStringList::split("\n", QString::fromLocal8Bit(buffer, buflen)); - for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) + TQStringList lines = TQStringList::split("\n", TQString::fromLocal8Bit(buffer, buflen)); + for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) output.append(*it); } @@ -173,9 +173,9 @@ int SMSClient::maxSize() return 160; } -const QString& SMSClient::description() +const TQString& SMSClient::description() { - QString url = "http://www.smsclient.org"; + TQString url = "http://www.smsclient.org"; m_description = i18n("<qt>SMSClient is a program for sending SMS with the modem. The program can be found on <a href=\"%1\">%1</a></qt>").arg(url).arg(url); return m_description; } diff --git a/kopete/protocols/sms/services/smsclient.h b/kopete/protocols/sms/services/smsclient.h index bc260228..1f8bfdce 100644 --- a/kopete/protocols/sms/services/smsclient.h +++ b/kopete/protocols/sms/services/smsclient.h @@ -20,8 +20,8 @@ #include "smsservice.h" #include "kopetemessage.h" -#include <qobject.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstringlist.h> class SMSClientPrefsUI; class SMSContact; @@ -36,10 +36,10 @@ public: ~SMSClient(); void send(const Kopete::Message& msg); - void setWidgetContainer(QWidget* parent, QGridLayout* container); + void setWidgetContainer(TQWidget* parent, TQGridLayout* container); int maxSize(); - const QString& description(); + const TQString& description(); public slots: void savePreferences(); @@ -51,15 +51,15 @@ signals: void messageSent(const Kopete::Message &); private: - QWidget* configureWidget(QWidget* parent); + TQWidget* configureWidget(TQWidget* parent); SMSClientPrefsUI* prefWidget; - QStringList providers(); - QStringList output; + TQStringList providers(); + TQStringList output; Kopete::Message m_msg; - QString m_description; + TQString m_description; } ; #endif //SMSCLIENT_H diff --git a/kopete/protocols/sms/services/smssend.cpp b/kopete/protocols/sms/services/smssend.cpp index f3ea258c..2e843dea 100644 --- a/kopete/protocols/sms/services/smssend.cpp +++ b/kopete/protocols/sms/services/smssend.cpp @@ -14,11 +14,11 @@ ************************************************************************* */ -#include <qcombobox.h> -#include <qvgroupbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtooltip.h> +#include <tqcombobox.h> +#include <tqvgroupbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtooltip.h> #include <kconfigbase.h> #include <klineedit.h> @@ -50,7 +50,7 @@ SMSSend::~SMSSend() void SMSSend::send(const Kopete::Message& msg) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl; - QString provider = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null); + TQString provider = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null); if (provider.length() < 1) { @@ -58,7 +58,7 @@ void SMSSend::send(const Kopete::Message& msg) return; } - QString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null); + TQString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null); if (prefix.isNull()) { KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("No prefix set for SMSSend, please change it in the configuration dialog."), i18n("No Prefix")); @@ -67,13 +67,13 @@ void SMSSend::send(const Kopete::Message& msg) m_provider = new SMSSendProvider(provider, prefix, m_account, this); - QObject::connect( m_provider, SIGNAL(messageSent(const Kopete::Message &)), this, SIGNAL(messageSent(const Kopete::Message &))); - QObject::connect( m_provider, SIGNAL(messageNotSent(const Kopete::Message &, const QString &)), this, SIGNAL(messageNotSent(const Kopete::Message &, const QString &))); + TQObject::connect( m_provider, TQT_SIGNAL(messageSent(const Kopete::Message &)), this, TQT_SIGNAL(messageSent(const Kopete::Message &))); + TQObject::connect( m_provider, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &)), this, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &))); m_provider->send(msg); } -void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout) +void SMSSend::setWidgetContainer(TQWidget* parent, TQGridLayout* layout) { kdWarning( 14160 ) << k_funcinfo << "ml: " << layout << ", " << "mp: " << parent << endl; m_parent = parent; @@ -86,13 +86,13 @@ void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout) prefWidget->program->setMode(KFile::Directory); - QString prefix = QString::null; + TQString prefix = TQString::null; if (m_account) - prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null); + prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null); if (prefix.isNull()) { - QDir d("/usr/share/smssend"); + TQDir d("/usr/share/smssend"); if (d.exists()) { prefix = "/usr"; @@ -108,13 +108,13 @@ void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout) } } - QObject::connect (prefWidget->program, SIGNAL(textChanged(const QString &)), - this, SLOT(loadProviders(const QString&))); + TQObject::connect (prefWidget->program, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(loadProviders(const TQString&))); prefWidget->program->setURL(prefix); - QObject::connect(prefWidget->provider, SIGNAL(activated(const QString &)), - this, SLOT(setOptions(const QString &))); + TQObject::connect(prefWidget->provider, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(setOptions(const TQString &))); prefWidget->show(); } @@ -129,38 +129,38 @@ void SMSSend::savePreferences() } } -void SMSSend::loadProviders(const QString &prefix) +void SMSSend::loadProviders(const TQString &prefix) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero)" << endl; - QStringList p; + TQStringList p; prefWidget->provider->clear(); - QDir d(prefix + "/share/smssend"); + TQDir d(prefix + "/share/smssend"); if (!d.exists()) { - setOptions(QString::null); + setOptions(TQString::null); return; } p = d.entryList("*.sms"); - d = QDir::homeDirPath()+"/.smssend/"; + d = TQDir::homeDirPath()+"/.smssend/"; - QStringList tmp(d.entryList("*.sms")); + TQStringList tmp(d.entryList("*.sms")); - for (QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) + for (TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) p.prepend(*it); - for (QStringList::iterator it = p.begin(); it != p.end(); ++it) + for (TQStringList::iterator it = p.begin(); it != p.end(); ++it) (*it).truncate((*it).length()-4); prefWidget->provider->insertStringList(p); bool found = false; if (m_account) - { QString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null); + { TQString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null); for (int i=0; i < prefWidget->provider->count(); i++) { if (prefWidget->provider->text(i) == pName) @@ -176,7 +176,7 @@ void SMSSend::loadProviders(const QString &prefix) setOptions(prefWidget->provider->currentText()); } -void SMSSend::setOptions(const QString& name) +void SMSSend::setOptions(const TQString& name) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero!!)" << endl; if(!prefWidget) return; // sanity check @@ -195,9 +195,9 @@ void SMSSend::setOptions(const QString& name) { if (!m_provider->name(i).isNull()) { - QLabel *l = new QLabel(m_parent); + TQLabel *l = new TQLabel(m_parent); l->setText("&" + m_provider->name(i) + ":"); - QToolTip::add(l, m_provider->description(i)); + TQToolTip::add(l, m_provider->description(i)); m_layout->addWidget(l, i+2, 0); KLineEdit *e = new KLineEdit(m_parent); e->setText(m_provider->value(i)); @@ -206,7 +206,7 @@ void SMSSend::setOptions(const QString& name) labels.append(l); l->setBuddy(e); if(m_provider->isHidden(i)) - e->setEchoMode(QLineEdit::Password); + e->setEchoMode(TQLineEdit::Password); e->show(); l->show(); } @@ -222,10 +222,10 @@ int SMSSend::maxSize() { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl; - QString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null); + TQString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null); if (pName.length() < 1) return 160; - QString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null); + TQString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null); if (prefix.isNull()) prefix = "/usr"; // quick sanity check @@ -234,9 +234,9 @@ int SMSSend::maxSize() return m_provider->maxSize(); } -const QString& SMSSend::description() +const TQString& SMSSend::description() { - QString url = "http://zekiller.skytech.org/smssend_en.php"; + TQString url = "http://zekiller.skytech.org/smssend_en.php"; m_description = i18n("<qt>SMSSend is a program for sending SMS through gateways on the web. It can be found on <a href=\"%1\">%2</a></qt>").arg(url).arg(url); return m_description; } diff --git a/kopete/protocols/sms/services/smssend.h b/kopete/protocols/sms/services/smssend.h index 556a21ea..2eefb014 100644 --- a/kopete/protocols/sms/services/smssend.h +++ b/kopete/protocols/sms/services/smssend.h @@ -17,9 +17,9 @@ #ifndef SMSSEND_H #define SMSSEND_H -#include <qobject.h> -#include <qmap.h> -#include <qlabel.h> +#include <tqobject.h> +#include <tqmap.h> +#include <tqlabel.h> #include <klineedit.h> @@ -40,27 +40,27 @@ public: virtual void setAccount(Kopete::Account* account); void send(const Kopete::Message& msg); - void setWidgetContainer(QWidget* parent, QGridLayout* container); + void setWidgetContainer(TQWidget* parent, TQGridLayout* container); int maxSize(); - const QString& description(); + const TQString& description(); public slots: void savePreferences(); private slots: - void setOptions(const QString& name); - void loadProviders(const QString& prefix); + void setOptions(const TQString& name); + void loadProviders(const TQString& prefix); //signals: // void messageSent(const Kopete::Message&); private: - QGridLayout *settingsBoxLayout; + TQGridLayout *settingsBoxLayout; SMSSendProvider* m_provider; SMSSendPrefsUI* prefWidget; - QPtrList<KLineEdit> args; - QPtrList<QLabel> labels; - QString m_description; + TQPtrList<KLineEdit> args; + TQPtrList<TQLabel> labels; + TQString m_description; } ; #endif //SMSSEND_H diff --git a/kopete/protocols/sms/services/smssendprovider.cpp b/kopete/protocols/sms/services/smssendprovider.cpp index 82827aab..5f0f37ee 100644 --- a/kopete/protocols/sms/services/smssendprovider.cpp +++ b/kopete/protocols/sms/services/smssendprovider.cpp @@ -14,9 +14,9 @@ ************************************************************************* */ -#include <qvaluelist.h> -#include <qlabel.h> -#include <qfile.h> +#include <tqvaluelist.h> +#include <tqlabel.h> +#include <tqfile.h> #include <kconfigbase.h> #include <kprocess.h> @@ -32,8 +32,8 @@ #include "smsprotocol.h" #include "smscontact.h" -SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& prefixValue, Kopete::Account* account, QObject* parent, const char *name) - : QObject( parent, name ), m_account(account) +SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent, const char *name) + : TQObject( parent, name ), m_account(account) { kdWarning( 14160 ) << k_funcinfo << "this = " << this << ", m_account = " << m_account << " (should be ok if zero!!)" << endl; @@ -44,14 +44,14 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre messagePos = -1; telPos = -1; - QString file = prefix + "/share/smssend/" + provider + ".sms"; - QFile f(file); + TQString file = prefix + "/share/smssend/" + provider + ".sms"; + TQFile f(file); if (f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString group = QString("SMSSend-%1").arg(provider); + TQTextStream t(&f); + TQString group = TQString("SMSSend-%1").arg(provider); bool exactNumberMatch = false; - QStringList numberWords; + TQStringList numberWords; numberWords.append("Tel"); numberWords.append("Number"); numberWords.append("number"); @@ -65,11 +65,11 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre while( !t.eof()) { - QString s = t.readLine(); + TQString s = t.readLine(); if( s[0] == '%') { - QStringList args = QStringList::split(':',s); - QStringList options = QStringList::split(' ', args[0]); + TQStringList args = TQStringList::split(':',s); + TQStringList options = TQStringList::split(' ', args[0]); names.append(options[0].replace(0,1,"")); @@ -87,8 +87,8 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre descriptions.append(args[1]); if (m_account) - values.append(m_account->configGroup()->readEntry(QString("%1:%2").arg(group).arg(names[names.count()-1]), - QString::null)); + values.append(m_account->configGroup()->readEntry(TQString("%1:%2").arg(group).arg(names[names.count()-1]), + TQString::null)); else values.append(""); @@ -100,7 +100,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre { if (options[i].contains("Size=")) { - QString option = options[i]; + TQString option = options[i]; option.replace(0,5,""); m_maxSize = option.toInt(); } @@ -109,7 +109,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre } else if (!exactNumberMatch) { - for (QStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it) + for (TQStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it) { if (args[0].contains(*it)) { @@ -147,20 +147,20 @@ void SMSSendProvider::setAccount(Kopete::Account *account) m_account = account; } -const QString& SMSSendProvider::name(int i) +const TQString& SMSSendProvider::name(int i) { if ( telPos == i || messagePos == i) - return QString::null; + return TQString::null; else return names[i]; } -const QString& SMSSendProvider::value(int i) +const TQString& SMSSendProvider::value(int i) { return values[i]; } -const QString& SMSSendProvider::description(int i) +const TQString& SMSSendProvider::description(int i) { return descriptions[i]; } @@ -170,12 +170,12 @@ const bool SMSSendProvider::isHidden(int i) return isHiddens[i]; } -void SMSSendProvider::save(QPtrList<KLineEdit>& args) +void SMSSendProvider::save(TQPtrList<KLineEdit>& args) { kdDebug( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl; if (!m_account) return; // prevent crash in worst case - QString group = QString("SMSSend-%1").arg(provider); + TQString group = TQString("SMSSend-%1").arg(provider); int namesI=0; for (unsigned i=0; i < args.count(); i++) @@ -194,7 +194,7 @@ void SMSSendProvider::save(QPtrList<KLineEdit>& args) // kdDebug(14160) << k_funcinfo << "saving " << args.at(i) << " to " << names[namesI] << endl; if (!args.at(i)->text().isEmpty()) { values[namesI] = args.at(i)->text(); - m_account->configGroup()->writeEntry(QString("%1:%2").arg(group).arg(names[namesI]), values[namesI]); + m_account->configGroup()->writeEntry(TQString("%1:%2").arg(group).arg(names[namesI]), values[namesI]); } namesI++; } @@ -228,8 +228,8 @@ void SMSSendProvider::send(const Kopete::Message& msg) m_msg = msg; - QString message = msg.plainBody(); - QString nr = dynamic_cast<SMSContact *>(msg.to().first())->qualifiedNumber(); + TQString message = msg.plainBody(); + TQString nr = dynamic_cast<SMSContact *>(msg.to().first())->qualifiedNumber(); if (canSend = false) return; @@ -239,14 +239,14 @@ void SMSSendProvider::send(const Kopete::Message& msg) KProcess* p = new KProcess; - kdWarning( 14160 ) << "Executing " << QString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl; + kdWarning( 14160 ) << "Executing " << TQString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl; - *p << QString("%1/bin/smssend").arg(prefix) << provider << values; + *p << TQString("%1/bin/smssend").arg(prefix) << provider << values; output = ""; - connect( p, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendFinished(KProcess *))); - connect( p, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int))); -// connect( p, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int))); + connect( p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess *))); + connect( p, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int))); +// connect( p, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int))); p->start(KProcess::NotifyOnExit, KProcess::AllOutput); } @@ -257,15 +257,15 @@ void SMSSendProvider::slotSendFinished(KProcess *p) if (p->exitStatus() == 0) emit messageSent(m_msg); else - emit messageNotSent(m_msg, QString().setLatin1(output)); + emit messageNotSent(m_msg, TQString().setLatin1(output)); p->deleteLater(); } void SMSSendProvider::slotReceivedOutput(KProcess *, char *buffer, int buflen) { -// QStringList lines = QStringList::split("\n", QString::fromLocal8Bit(buffer, buflen)); -// for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) +// TQStringList lines = TQStringList::split("\n", TQString::fromLocal8Bit(buffer, buflen)); +// for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) for(int i = 0; i < buflen; i++) output += buffer[i]; kdWarning( 14160 ) << k_funcinfo << " output now = " << output << endl; diff --git a/kopete/protocols/sms/services/smssendprovider.h b/kopete/protocols/sms/services/smssendprovider.h index 8560be15..bd046104 100644 --- a/kopete/protocols/sms/services/smssendprovider.h +++ b/kopete/protocols/sms/services/smssendprovider.h @@ -17,11 +17,11 @@ #ifndef SMSSENDPROVIDER_H #define SMSSENDPROVIDER_H -#include <qstring.h> -#include <qstringlist.h> -#include <qptrlist.h> -#include <qlabel.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqptrlist.h> +#include <tqlabel.h> +#include <tqvaluelist.h> #include <klineedit.h> @@ -37,18 +37,18 @@ class SMSSendProvider : public QObject { Q_OBJECT public: - SMSSendProvider(const QString& providerName, const QString& prefixValue, Kopete::Account* account, QObject* parent = 0, const char* name = 0); + SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent = 0, const char* name = 0); ~SMSSendProvider(); void setAccount(Kopete::Account *account); int count(); - const QString& name(int i); - const QString& value(int i); - const QString& description(int i); + const TQString& name(int i); + const TQString& value(int i); + const TQString& description(int i); const bool isHidden(int i); - void save(QPtrList<KLineEdit>& args); + void save(TQPtrList<KLineEdit>& args); void send(const Kopete::Message& msg); int maxSize(); @@ -56,18 +56,18 @@ private slots: void slotReceivedOutput(KProcess*, char *buffer, int buflen); void slotSendFinished(KProcess*); private: - QStringList names; - QStringList descriptions; - QStringList values; - QValueList<bool> isHiddens; + TQStringList names; + TQStringList descriptions; + TQStringList values; + TQValueList<bool> isHiddens; int messagePos; int telPos; int m_maxSize; - QString provider; - QString prefix; - QCString output; + TQString provider; + TQString prefix; + TQCString output; Kopete::Account* m_account; @@ -76,7 +76,7 @@ private: bool canSend; signals: void messageSent(const Kopete::Message& msg); - void messageNotSent(const Kopete::Message& msg, const QString &error); + void messageNotSent(const Kopete::Message& msg, const TQString &error); } ; #endif //SMSSENDPROVIDER_H diff --git a/kopete/protocols/sms/smsaccount.cpp b/kopete/protocols/sms/smsaccount.cpp index 5a13dca2..8fea6a12 100644 --- a/kopete/protocols/sms/smsaccount.cpp +++ b/kopete/protocols/sms/smsaccount.cpp @@ -34,24 +34,24 @@ #include "smsprotocol.h" #include "smscontact.h" -SMSAccount::SMSAccount( SMSProtocol *parent, const QString &accountID, const char *name ) +SMSAccount::SMSAccount( SMSProtocol *parent, const TQString &accountID, const char *name ) : Kopete::Account( parent, accountID, name ) { setMyself( new SMSContact(this, accountID, accountID, Kopete::ContactList::self()->myself()) ); loadConfig(); myself()->setOnlineStatus( SMSProtocol::protocol()->SMSOffline ); - QString sName = configGroup()->readEntry("ServiceName", QString::null); + TQString sName = configGroup()->readEntry("ServiceName", TQString::null); theService = ServiceLoader::loadService(sName, this); if( theService ) { - QObject::connect (theService, SIGNAL(messageSent(const Kopete::Message &)), - this, SLOT(slotSendingSuccess(const Kopete::Message &))); - QObject::connect (theService, SIGNAL(messageNotSent(const Kopete::Message &, const QString &)), - this, SLOT(slotSendingFailure(const Kopete::Message &, const QString &))); - QObject::connect (theService, SIGNAL(connected()), this, SLOT(slotConnected())); - QObject::connect (theService, SIGNAL(disconnected()), this, SLOT(slotDisconnected())); + TQObject::connect (theService, TQT_SIGNAL(messageSent(const Kopete::Message &)), + this, TQT_SLOT(slotSendingSuccess(const Kopete::Message &))); + TQObject::connect (theService, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &)), + this, TQT_SLOT(slotSendingFailure(const Kopete::Message &, const TQString &))); + TQObject::connect (theService, TQT_SIGNAL(connected()), this, TQT_SLOT(slotConnected())); + TQObject::connect (theService, TQT_SIGNAL(disconnected()), this, TQT_SLOT(slotDisconnected())); } } @@ -65,13 +65,13 @@ SMSAccount::~SMSAccount() void SMSAccount::loadConfig() { theSubEnable = configGroup()->readBoolEntry("SubEnable", false); - theSubCode = configGroup()->readEntry("SubCode", QString::null); + theSubCode = configGroup()->readEntry("SubCode", TQString::null); theLongMsgAction = (SMSMsgAction)configGroup()->readNumEntry("MsgAction", 0); } -void SMSAccount::translateNumber(QString &theNumber) +void SMSAccount::translateNumber(TQString &theNumber) { - if(theNumber[0] == QChar('0') && theSubEnable) + if(theNumber[0] == TQChar('0') && theSubEnable) theNumber.replace(0, 1, theSubCode); } @@ -90,7 +90,7 @@ const bool SMSAccount::splitNowMsgTooLong(int msgLength) return false; } -void SMSAccount::setAway( bool /*away*/, const QString &) +void SMSAccount::setAway( bool /*away*/, const TQString &) { } @@ -138,7 +138,7 @@ void SMSAccount::slotSendMessage(Kopete::Message &msg) { for (int i=0; i < msgLength / theService->maxSize() + 1; i++) { - QString text = msg.plainBody(); + TQString text = msg.plainBody(); text = text.mid( theService->maxSize() * i, theService->maxSize() ); Kopete::Message m( msg.from(), msg.to(), text, Kopete::Message::Outbound); @@ -162,14 +162,14 @@ void SMSAccount::slotSendingSuccess(const Kopete::Message &msg) c->slotSendingSuccess(msg); } -void SMSAccount::slotSendingFailure(const Kopete::Message &msg, const QString &error) +void SMSAccount::slotSendingFailure(const Kopete::Message &msg, const TQString &error) { SMSContact* c = dynamic_cast<SMSContact*>(msg.to().first()); if( c ) c->slotSendingFailure(msg, error); } -bool SMSAccount::createContact( const QString &contactId, +bool SMSAccount::createContact( const TQString &contactId, Kopete::MetaContact * parentContact ) { if (new SMSContact(this, contactId, parentContact->displayName(), parentContact)) @@ -184,7 +184,7 @@ KActionMenu* SMSAccount::actionMenu() return theActionMenu; } -void SMSAccount::setOnlineStatus( const Kopete::OnlineStatus & status , const QString &reason) +void SMSAccount::setOnlineStatus( const Kopete::OnlineStatus & status , const TQString &reason) { if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Online ) connect(); diff --git a/kopete/protocols/sms/smsaccount.h b/kopete/protocols/sms/smsaccount.h index 2547fe6c..1df8a63f 100644 --- a/kopete/protocols/sms/smsaccount.h +++ b/kopete/protocols/sms/smsaccount.h @@ -32,14 +32,14 @@ class SMSAccount : public Kopete::Account Q_OBJECT public: - SMSAccount( SMSProtocol *parent, const QString &accountID, const char *name = 0L ); + SMSAccount( SMSProtocol *parent, const TQString &accountID, const char *name = 0L ); ~SMSAccount(); virtual KActionMenu* actionMenu(); // Per-protocol actions for the systray and the status bar - virtual void setAway( bool away, const QString & ); + virtual void setAway( bool away, const TQString & ); - void translateNumber(QString &theNumber); + void translateNumber(TQString &theNumber); /** * Checks to see if the message should be split or not, in case it is too long. @@ -52,7 +52,7 @@ public: public slots: void loadConfig(); - void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); public slots: virtual void connect(const Kopete::OnlineStatus& initial= Kopete::OnlineStatus()); @@ -61,17 +61,17 @@ public slots: protected slots: virtual void slotSendingSuccess(const Kopete::Message &msg); - virtual void slotSendingFailure(const Kopete::Message &msg, const QString &error); + virtual void slotSendingFailure(const Kopete::Message &msg, const TQString &error); virtual void slotConnected(); virtual void slotDisconnected(); protected: - bool createContact(const QString &contactId, Kopete::MetaContact *parentContact); + bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); private: bool theSubEnable; - QString theSubCode; + TQString theSubCode; SMSMsgAction theLongMsgAction; SMSService* theService; }; diff --git a/kopete/protocols/sms/smsaddcontactpage.cpp b/kopete/protocols/sms/smsaddcontactpage.cpp index 55921b49..c18e5866 100644 --- a/kopete/protocols/sms/smsaddcontactpage.cpp +++ b/kopete/protocols/sms/smsaddcontactpage.cpp @@ -17,15 +17,15 @@ #include "smsaddcontactpage.h" #include "kopeteaccount.h" -#include <qlayout.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqlineedit.h> -SMSAddContactPage::SMSAddContactPage(QWidget *parent, const char *name ) +SMSAddContactPage::SMSAddContactPage(TQWidget *parent, const char *name ) : AddContactPage(parent,name) { - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); smsdata = new smsAddUI(this); } @@ -38,8 +38,8 @@ bool SMSAddContactPage::apply(Kopete::Account* a, Kopete::MetaContact* m) { if ( validateData() ) { - QString nr = smsdata->addNr->text(); - QString name = smsdata->addName->text(); + TQString nr = smsdata->addNr->text(); + TQString name = smsdata->addName->text(); return a->addContact( nr, m, Kopete::Account::ChangeKABC ); } diff --git a/kopete/protocols/sms/smsaddcontactpage.h b/kopete/protocols/sms/smsaddcontactpage.h index 37843bc9..6f6f4290 100644 --- a/kopete/protocols/sms/smsaddcontactpage.h +++ b/kopete/protocols/sms/smsaddcontactpage.h @@ -16,9 +16,9 @@ #ifndef SMSADDCONTACTPAGE_H #define SMSADDCONTACTPAGE_H -#include <qwidget.h> +#include <tqwidget.h> #include <addcontactpage.h> -#include <qlabel.h> +#include <tqlabel.h> class smsAddUI; class SMSProtocol; @@ -27,7 +27,7 @@ class SMSAddContactPage : public AddContactPage { Q_OBJECT public: - SMSAddContactPage(QWidget *parent=0, const char *name=0); + SMSAddContactPage(TQWidget *parent=0, const char *name=0); ~SMSAddContactPage(); smsAddUI *smsdata; virtual bool validateData(); diff --git a/kopete/protocols/sms/smscontact.cpp b/kopete/protocols/sms/smscontact.cpp index d220b380..f47a0b46 100644 --- a/kopete/protocols/sms/smscontact.cpp +++ b/kopete/protocols/sms/smscontact.cpp @@ -31,8 +31,8 @@ #include "smsaccount.h" #include "smsuserpreferences.h" -SMSContact::SMSContact( Kopete::Account* _account, const QString &phoneNumber, - const QString &displayName, Kopete::MetaContact *parent ) +SMSContact::SMSContact( Kopete::Account* _account, const TQString &phoneNumber, + const TQString &displayName, Kopete::MetaContact *parent ) : Kopete::Contact( _account, phoneNumber, parent ), m_phoneNumber( phoneNumber ) { // kdWarning( 14160 ) << k_funcinfo << " this = " << this << ", phone = " << phoneNumber << endl; @@ -51,7 +51,7 @@ void SMSContact::slotSendingSuccess(const Kopete::Message &msg) manager(Kopete::Contact::CanCreate)->appendMessage((Kopete::Message &)msg); } -void SMSContact::slotSendingFailure(const Kopete::Message &/*msg*/, const QString &error) +void SMSContact::slotSendingFailure(const Kopete::Message &/*msg*/, const TQString &error) { KMessageBox::detailedError(Kopete::UI::Global::mainWidget(), i18n("Something went wrong when sending message."), error, i18n("Could Not Send Message")); @@ -60,8 +60,8 @@ void SMSContact::slotSendingFailure(const Kopete::Message &/*msg*/, const QStrin manager(Kopete::Contact::CanCreate)->messageSucceeded(); } -void SMSContact::serialize( QMap<QString, QString> &serializedData, - QMap<QString, QString> & /* addressBookData */ ) +void SMSContact::serialize( TQMap<TQString, TQString> &serializedData, + TQMap<TQString, TQString> & /* addressBookData */ ) { // Contact id and display name are already set for us if (m_phoneNumber != contactId()) @@ -76,12 +76,12 @@ Kopete::ChatSession* SMSContact::manager( Kopete::Contact::CanCreateFlags canCre } else { - QPtrList<Kopete::Contact> contacts; + TQPtrList<Kopete::Contact> contacts; contacts.append(this); m_msgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), contacts, protocol()); - connect(m_msgManager, SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), - account(), SLOT(slotSendMessage(Kopete::Message&))); - connect(m_msgManager, SIGNAL(destroyed()), this, SLOT(slotChatSessionDestroyed())); + connect(m_msgManager, TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), + account(), TQT_SLOT(slotSendMessage(Kopete::Message&))); + connect(m_msgManager, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotChatSessionDestroyed())); return m_msgManager; } } @@ -101,29 +101,29 @@ void SMSContact::deleteContact() deleteLater(); } -const QString SMSContact::qualifiedNumber() +const TQString SMSContact::qualifiedNumber() { - QString number = m_phoneNumber; + TQString number = m_phoneNumber; dynamic_cast<SMSAccount *>(account())->translateNumber(number); return number; } -const QString &SMSContact::phoneNumber() +const TQString &SMSContact::phoneNumber() { return m_phoneNumber; } -void SMSContact::setPhoneNumber( const QString phoneNumber ) +void SMSContact::setPhoneNumber( const TQString phoneNumber ) { deleteLater(); new SMSContact(account(), phoneNumber, nickName(), metaContact()); } -QPtrList<KAction>* SMSContact::customContextMenuActions() +TQPtrList<KAction>* SMSContact::customContextMenuActions() { - QPtrList<KAction> *m_actionCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *m_actionCollection = new TQPtrList<KAction>(); if( !m_actionPrefs ) - m_actionPrefs = new KAction(i18n("&Contact Settings"), 0, this, SLOT(userPrefs()), this, "userPrefs"); + m_actionPrefs = new KAction(i18n("&Contact Settings"), 0, this, TQT_SLOT(userPrefs()), this, "userPrefs"); m_actionCollection->append( m_actionPrefs ); diff --git a/kopete/protocols/sms/smscontact.h b/kopete/protocols/sms/smscontact.h index b47d2bd9..548aa063 100644 --- a/kopete/protocols/sms/smscontact.h +++ b/kopete/protocols/sms/smscontact.h @@ -20,7 +20,7 @@ #include "kopetecontact.h" #include "kopetemessage.h" -#include <qstring.h> +#include <tqstring.h> class SMSAccount; namespace Kopete { class ChatSession; } @@ -33,20 +33,20 @@ class SMSContact : public Kopete::Contact { Q_OBJECT public: - SMSContact( Kopete::Account* _account, const QString &phoneNumber, - const QString &displayName, Kopete::MetaContact *parent ); + SMSContact( Kopete::Account* _account, const TQString &phoneNumber, + const TQString &displayName, Kopete::MetaContact *parent ); - QPtrList<KAction>* customContextMenuActions(); + TQPtrList<KAction>* customContextMenuActions(); - const QString &phoneNumber(); - void setPhoneNumber( const QString phoneNumber ); - const QString qualifiedNumber(); + const TQString &phoneNumber(); + void setPhoneNumber( const TQString phoneNumber ); + const TQString qualifiedNumber(); /** * Serialize contact */ - virtual void serialize( QMap<QString, QString> &serializedData, - QMap<QString, QString> &addressBookData ); + virtual void serialize( TQMap<TQString, TQString> &serializedData, + TQMap<TQString, TQString> &addressBookData ); Kopete::ChatSession* manager( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CanCreate ); @@ -54,7 +54,7 @@ public slots: virtual void slotUserInfo(); virtual void deleteContact(); void slotSendingSuccess(const Kopete::Message &msg); - void slotSendingFailure(const Kopete::Message &msg, const QString &error); + void slotSendingFailure(const Kopete::Message &msg, const TQString &error); private slots: void userPrefs(); @@ -63,7 +63,7 @@ private slots: private: KAction* m_actionPrefs; - QString m_phoneNumber; + TQString m_phoneNumber; Kopete::ChatSession* m_msgManager; }; diff --git a/kopete/protocols/sms/smseditaccountwidget.cpp b/kopete/protocols/sms/smseditaccountwidget.cpp index b74c24f4..97379e75 100644 --- a/kopete/protocols/sms/smseditaccountwidget.cpp +++ b/kopete/protocols/sms/smseditaccountwidget.cpp @@ -14,13 +14,13 @@ ************************************************************************* */ -#include <qvgroupbox.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqvgroupbox.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> #include <kconfigbase.h> #include <klocale.h> @@ -35,10 +35,10 @@ #include "smsprotocol.h" #include "smsaccount.h" -SMSEditAccountWidget::SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *account, QWidget *parent, const char */*name*/) - : QWidget(parent), KopeteEditAccountWidget(account) +SMSEditAccountWidget::SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *account, TQWidget *parent, const char */*name*/) + : TQWidget(parent), KopeteEditAccountWidget(account) { - QVBoxLayout *l = new QVBoxLayout(this, QBoxLayout::Down); + TQVBoxLayout *l = new TQVBoxLayout(this, TQBoxLayout::Down); preferencesDialog = new smsActPrefsUI(this); l->addWidget(preferencesDialog); @@ -48,25 +48,25 @@ SMSEditAccountWidget::SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Accoun m_protocol = protocol; - QString sName; + TQString sName; if (account) { preferencesDialog->accountId->setText(account->accountId()); //Disable changing the account ID for now //FIXME: Remove this when we can safely change the account ID (Matt) preferencesDialog->accountId->setDisabled(true); - sName = account->configGroup()->readEntry("ServiceName", QString::null); + sName = account->configGroup()->readEntry("ServiceName", TQString::null); preferencesDialog->subEnable->setChecked(account->configGroup()->readBoolEntry("SubEnable", false)); - preferencesDialog->subCode->setText(account->configGroup()->readEntry("SubCode", QString::null)); + preferencesDialog->subCode->setText(account->configGroup()->readEntry("SubCode", TQString::null)); preferencesDialog->ifMessageTooLong->setCurrentItem(SMSMsgAction(account->configGroup()->readNumEntry("MsgAction", 0))); } preferencesDialog->serviceName->insertStringList(ServiceLoader::services()); - connect (preferencesDialog->serviceName, SIGNAL(activated(const QString &)), - this, SLOT(setServicePreferences(const QString &))); - connect (preferencesDialog->descButton, SIGNAL(clicked()), - this, SLOT(showDescription())); + connect (preferencesDialog->serviceName, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(setServicePreferences(const TQString &))); + connect (preferencesDialog->descButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(showDescription())); for (int i=0; i < preferencesDialog->serviceName->count(); i++) @@ -108,7 +108,7 @@ Kopete::Account* SMSEditAccountWidget::apply() return account(); } -void SMSEditAccountWidget::setServicePreferences(const QString& serviceName) +void SMSEditAccountWidget::setServicePreferences(const TQString& serviceName) { delete service; delete configWidget; @@ -118,10 +118,10 @@ void SMSEditAccountWidget::setServicePreferences(const QString& serviceName) if (service == 0L) return; - connect (this, SIGNAL(saved()), service, SLOT(savePreferences())); + connect (this, TQT_SIGNAL(saved()), service, TQT_SLOT(savePreferences())); delete middleFrameLayout; - middleFrameLayout = new QGridLayout(preferencesDialog->middleFrame, 1, 2, 0, 6, "middleFrameLayout"); + middleFrameLayout = new TQGridLayout(preferencesDialog->middleFrame, 1, 2, 0, 6, "middleFrameLayout"); service->setWidgetContainer(preferencesDialog->middleFrame, middleFrameLayout); } @@ -129,7 +129,7 @@ void SMSEditAccountWidget::showDescription() { SMSService* s = ServiceLoader::loadService(preferencesDialog->serviceName->currentText(), 0L); - QString d = s->description(); + TQString d = s->description(); KMessageBox::information(Kopete::UI::Global::mainWidget(), d, i18n("Description")); } diff --git a/kopete/protocols/sms/smseditaccountwidget.h b/kopete/protocols/sms/smseditaccountwidget.h index eaf83d42..12d1bc68 100644 --- a/kopete/protocols/sms/smseditaccountwidget.h +++ b/kopete/protocols/sms/smseditaccountwidget.h @@ -17,7 +17,7 @@ #ifndef SMSEDITACCOUNTWIDGET_H #define SMSEDITACCOUNTWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include "editaccountwidget.h" class SMSProtocol; @@ -26,24 +26,24 @@ class smsActPrefsUI; namespace Kopete { class Account; } class QGridLayout; -class SMSEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class SMSEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: - SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *theAccount, QWidget *parent = 0, const char *name = 0); + SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *theAccount, TQWidget *parent = 0, const char *name = 0); ~SMSEditAccountWidget(); bool validateData(); Kopete::Account* apply(); public slots: - void setServicePreferences(const QString& serviceName); + void setServicePreferences(const TQString& serviceName); void showDescription(); protected: smsActPrefsUI *preferencesDialog; - QWidget *configWidget; + TQWidget *configWidget; SMSService *service; SMSProtocol *m_protocol; - QGridLayout *middleFrameLayout; + TQGridLayout *middleFrameLayout; signals: void saved(); diff --git a/kopete/protocols/sms/smsprotocol.cpp b/kopete/protocols/sms/smsprotocol.cpp index 6b6cd838..361eba57 100644 --- a/kopete/protocols/sms/smsprotocol.cpp +++ b/kopete/protocols/sms/smsprotocol.cpp @@ -32,11 +32,11 @@ K_EXPORT_COMPONENT_FACTORY( kopete_sms, SMSProtocolFactory( "kopete_sms" ) ) SMSProtocol* SMSProtocol::s_protocol = 0L; -SMSProtocol::SMSProtocol(QObject *parent, const char *name, const QStringList &/*args*/) +SMSProtocol::SMSProtocol(TQObject *parent, const char *name, const TQStringList &/*args*/) : Kopete::Protocol( SMSProtocolFactory::instance(), parent, name ), - SMSOnline( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online ), - SMSConnecting( Kopete::OnlineStatus::Connecting,2, this, 3, QString::null, i18n( "Connecting" ) ), - SMSOffline( Kopete::OnlineStatus::Offline, 0, this, 2, QString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ) + SMSOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online ), + SMSConnecting( Kopete::OnlineStatus::Connecting,2, this, 3, TQString::null, i18n( "Connecting" ) ), + SMSOffline( Kopete::OnlineStatus::Offline, 0, this, 2, TQString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ) { if (s_protocol) kdWarning( 14160 ) << k_funcinfo << "s_protocol already defined!" << endl; @@ -51,12 +51,12 @@ SMSProtocol::~SMSProtocol() s_protocol = 0L; } -AddContactPage *SMSProtocol::createAddContactWidget(QWidget *parent, Kopete::Account */*i*/) +AddContactPage *SMSProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account */*i*/) { return new SMSAddContactPage(parent); } -KopeteEditAccountWidget* SMSProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget* SMSProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new SMSEditAccountWidget(this, account, parent); } @@ -67,14 +67,14 @@ SMSProtocol* SMSProtocol::protocol() } Kopete::Contact *SMSProtocol::deserializeContact(Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &/* addressBookData */) + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &/* addressBookData */) { - QString contactId = serializedData["contactId"]; - QString accountId = serializedData["accountId"]; - QString displayName = serializedData["displayName"]; + TQString contactId = serializedData["contactId"]; + TQString accountId = serializedData["accountId"]; + TQString displayName = serializedData["displayName"]; - QDict<Kopete::Account> accounts=Kopete::AccountManager::self()->accounts(this); + TQDict<Kopete::Account> accounts=Kopete::AccountManager::self()->accounts(this); Kopete::Account *account = accounts[accountId]; if (!account) @@ -86,7 +86,7 @@ Kopete::Contact *SMSProtocol::deserializeContact(Kopete::MetaContact *metaContac return new SMSContact(account, contactId, displayName, metaContact); } -Kopete::Account* SMSProtocol::createNewAccount(const QString &accountId) +Kopete::Account* SMSProtocol::createNewAccount(const TQString &accountId) { return new SMSAccount(this, accountId); } diff --git a/kopete/protocols/sms/smsprotocol.h b/kopete/protocols/sms/smsprotocol.h index 1d4aaa40..411fa934 100644 --- a/kopete/protocols/sms/smsprotocol.h +++ b/kopete/protocols/sms/smsprotocol.h @@ -17,12 +17,12 @@ #ifndef SMSPROTOCOL_H #define SMSPROTOCOL_H -#include <qmap.h> -#include <qmovie.h> -#include <qpixmap.h> -#include <qptrdict.h> -#include <qptrlist.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqmovie.h> +#include <tqpixmap.h> +#include <tqptrdict.h> +#include <tqptrlist.h> +#include <tqstringlist.h> #include "kopeteprotocol.h" #include "kopeteonlinestatus.h" @@ -42,7 +42,7 @@ class SMSProtocol : public Kopete::Protocol Q_OBJECT public: - SMSProtocol(QObject *parent, const char *name, const QStringList &args); + SMSProtocol(TQObject *parent, const char *name, const TQStringList &args); ~SMSProtocol(); static SMSProtocol *protocol(); @@ -51,11 +51,11 @@ public: * Deserialize contact data */ virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, const QMap<QString, QString> &addressBookData ); + const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> &addressBookData ); - virtual AddContactPage *createAddContactWidget(QWidget *parent , Kopete::Account *i); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget(TQWidget *parent , Kopete::Account *i); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); const Kopete::OnlineStatus SMSOnline; const Kopete::OnlineStatus SMSOffline; diff --git a/kopete/protocols/sms/smsservice.cpp b/kopete/protocols/sms/smsservice.cpp index 81b46533..5fe4bb1a 100644 --- a/kopete/protocols/sms/smsservice.cpp +++ b/kopete/protocols/sms/smsservice.cpp @@ -14,14 +14,14 @@ ************************************************************************* */ -#include <qlayout.h> +#include <tqlayout.h> #include <kdebug.h> #include "smsservice.h" SMSService::SMSService(Kopete::Account* account) - : QObject(), m_account(account) + : TQObject(), m_account(account) { } diff --git a/kopete/protocols/sms/smsservice.h b/kopete/protocols/sms/smsservice.h index f1c04470..5a1b0561 100644 --- a/kopete/protocols/sms/smsservice.h +++ b/kopete/protocols/sms/smsservice.h @@ -17,9 +17,9 @@ #ifndef SMSSERVICE_H #define SMSSERVICE_H -#include <qstring.h> -#include <qwidget.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqobject.h> #include "kopetemessage.h" @@ -48,11 +48,11 @@ public: * settings widget's parent and @param layout is the 2xn grid layout it may * use. */ - virtual void setWidgetContainer(QWidget* parent, QGridLayout* layout) = 0; + virtual void setWidgetContainer(TQWidget* parent, TQGridLayout* layout) = 0; virtual void send(const Kopete::Message& msg) = 0; virtual int maxSize() = 0; - virtual const QString& description() = 0; + virtual const TQString& description() = 0; public slots: virtual void savePreferences() = 0; @@ -61,14 +61,14 @@ public slots: signals: void messageSent(const Kopete::Message &); - void messageNotSent(const Kopete::Message &, const QString &); + void messageNotSent(const Kopete::Message &, const TQString &); void connected(); void disconnected(); protected: Kopete::Account* m_account; - QGridLayout* m_layout; - QWidget* m_parent; + TQGridLayout* m_layout; + TQWidget* m_parent; }; #endif //SMSSERVICE_H diff --git a/kopete/protocols/sms/smsuserpreferences.cpp b/kopete/protocols/sms/smsuserpreferences.cpp index 89677080..7c3e799c 100644 --- a/kopete/protocols/sms/smsuserpreferences.cpp +++ b/kopete/protocols/sms/smsuserpreferences.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include <qlabel.h> +#include <tqlabel.h> #include <klocale.h> #include <klineedit.h> diff --git a/kopete/protocols/sms/smsuserpreferences.h b/kopete/protocols/sms/smsuserpreferences.h index 29fb6dd2..7331c53a 100644 --- a/kopete/protocols/sms/smsuserpreferences.h +++ b/kopete/protocols/sms/smsuserpreferences.h @@ -18,7 +18,7 @@ #define SMSUSERPREFERENCES_H #include <kdialogbase.h> -#include <qvbox.h> +#include <tqvbox.h> class SMSPreferencesBase; class SMSUserPrefsUI; @@ -33,7 +33,7 @@ public: private: SMSPreferencesBase* prefBase; SMSUserPrefsUI* userPrefs; - QVBox* topWidget; + TQVBox* topWidget; SMSContact* m_contact; public slots: diff --git a/kopete/protocols/testbed/testbedaccount.cpp b/kopete/protocols/testbed/testbedaccount.cpp index fbb3462a..cc906447 100644 --- a/kopete/protocols/testbed/testbedaccount.cpp +++ b/kopete/protocols/testbed/testbedaccount.cpp @@ -29,7 +29,7 @@ #include "testbedprotocol.h" -TestbedAccount::TestbedAccount( TestbedProtocol *parent, const QString& accountID, const char *name ) +TestbedAccount::TestbedAccount( TestbedProtocol *parent, const TQString& accountID, const char *name ) : Kopete::Account ( parent, accountID , name ) { // Init the myself contact @@ -51,20 +51,20 @@ KActionMenu* TestbedAccount::actionMenu() KAction *action; - action = new KAction (i18n ("Show my own video..."), "testbed_showvideo", 0, this, SLOT (slotShowVideo ()), this, "actionShowVideo"); + action = new KAction (i18n ("Show my own video..."), "testbed_showvideo", 0, this, TQT_SLOT (slotShowVideo ()), this, "actionShowVideo"); mActionMenu->insert(action); action->setEnabled( isConnected() ); return mActionMenu; } -bool TestbedAccount::createContact(const QString& contactId, Kopete::MetaContact* parentContact) +bool TestbedAccount::createContact(const TQString& contactId, Kopete::MetaContact* parentContact) { TestbedContact* newContact = new TestbedContact( this, contactId, TestbedContact::Echo, parentContact->displayName(), parentContact ); return newContact != 0L; } -void TestbedAccount::setAway( bool away, const QString & /* reason */ ) +void TestbedAccount::setAway( bool away, const TQString & /* reason */ ) { if ( away ) slotGoAway(); @@ -72,7 +72,7 @@ void TestbedAccount::setAway( bool away, const QString & /* reason */ ) slotGoOnline(); } -void TestbedAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const QString &reason ) +void TestbedAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const TQString &reason ) { if ( status.status() == Kopete::OnlineStatus::Online && myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline ) @@ -90,15 +90,15 @@ void TestbedAccount::connect( const Kopete::OnlineStatus& /* initialStatus */ ) { kdDebug ( 14210 ) << k_funcinfo << endl; myself()->setOnlineStatus( TestbedProtocol::protocol()->testbedOnline ); - QObject::connect ( m_server, SIGNAL ( messageReceived( const QString & ) ), - this, SLOT ( receivedMessage( const QString & ) ) ); + TQObject::connect ( m_server, TQT_SIGNAL ( messageReceived( const TQString & ) ), + this, TQT_SLOT ( receivedMessage( const TQString & ) ) ); } void TestbedAccount::disconnect() { kdDebug ( 14210 ) << k_funcinfo << endl; myself()->setOnlineStatus( TestbedProtocol::protocol()->testbedOffline ); - QObject::disconnect ( m_server, 0, 0, 0 ); + TQObject::disconnect ( m_server, 0, 0, 0 ); } TestbedFakeServer * TestbedAccount::server() @@ -147,10 +147,10 @@ void TestbedAccount::slotShowVideo () updateContactStatus(); } -void TestbedAccount::receivedMessage( const QString &message ) +void TestbedAccount::receivedMessage( const TQString &message ) { // Look up the contact the message is from - QString from; + TQString from; TestbedContact* messageSender; from = message.section( ':', 0, 0 ); @@ -167,7 +167,7 @@ void TestbedAccount::receivedMessage( const QString &message ) void TestbedAccount::updateContactStatus() { - QDictIterator<Kopete::Contact> itr( contacts() ); + TQDictIterator<Kopete::Contact> itr( contacts() ); for ( ; itr.current(); ++itr ) itr.current()->setOnlineStatus( myself()->onlineStatus() ); } diff --git a/kopete/protocols/testbed/testbedaccount.h b/kopete/protocols/testbed/testbedaccount.h index 34429300..52261cb7 100644 --- a/kopete/protocols/testbed/testbedaccount.h +++ b/kopete/protocols/testbed/testbedaccount.h @@ -36,7 +36,7 @@ class TestbedAccount : public Kopete::Account { Q_OBJECT public: - TestbedAccount( TestbedProtocol *parent, const QString& accountID, const char *name = 0 ); + TestbedAccount( TestbedProtocol *parent, const TQString& accountID, const char *name = 0 ); ~TestbedAccount(); /** * Construct the context menu used for the status bar icon @@ -47,15 +47,15 @@ public: * Creates a protocol specific Kopete::Contact subclass and adds it to the supplie * Kopete::MetaContact */ - virtual bool createContact(const QString& contactId, Kopete::MetaContact* parentContact); + virtual bool createContact(const TQString& contactId, Kopete::MetaContact* parentContact); /** * Called when Kopete is set globally away */ - virtual void setAway(bool away, const QString& reason); + virtual void setAway(bool away, const TQString& reason); /** * Called when Kopete status is changed globally */ - virtual void setOnlineStatus(const Kopete::OnlineStatus& status , const QString &reason = QString::null); + virtual void setOnlineStatus(const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); /** * 'Connect' to the testbed server. Only sets myself() online. */ @@ -73,7 +73,7 @@ public slots: * Called by the server when it has a message for us. * This identifies the sending Kopete::Contact and passes it a Kopete::Message */ - void receivedMessage( const QString &message ); + void receivedMessage( const TQString &message ); protected: /** diff --git a/kopete/protocols/testbed/testbedaddcontactpage.cpp b/kopete/protocols/testbed/testbedaddcontactpage.cpp index 5327b5b4..bb016453 100644 --- a/kopete/protocols/testbed/testbedaddcontactpage.cpp +++ b/kopete/protocols/testbed/testbedaddcontactpage.cpp @@ -16,9 +16,9 @@ #include "testbedaddcontactpage.h" -#include <qlayout.h> -#include <qradiobutton.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> #include <kdebug.h> #include "kopeteaccount.h" @@ -26,11 +26,11 @@ #include "testbedaddui.h" -TestbedAddContactPage::TestbedAddContactPage( QWidget* parent, const char* name ) +TestbedAddContactPage::TestbedAddContactPage( TQWidget* parent, const char* name ) : AddContactPage(parent, name) { kdDebug(14210) << k_funcinfo << endl; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); m_testbedAddUI = new TestbedAddUI( this ); } @@ -43,12 +43,12 @@ bool TestbedAddContactPage::apply( Kopete::Account* a, Kopete::MetaContact* m ) if ( validateData() ) { bool ok = false; - QString type; - QString name; + TQString type; + TQString name; if ( m_testbedAddUI->m_rbEcho->isOn() ) { type = m_testbedAddUI->m_uniqueName->text(); - name = QString::fromLatin1( "Echo Contact" ); + name = TQString::fromLatin1( "Echo Contact" ); ok = true; } if ( ok ) diff --git a/kopete/protocols/testbed/testbedaddcontactpage.h b/kopete/protocols/testbed/testbedaddcontactpage.h index fd7642f3..f430f559 100644 --- a/kopete/protocols/testbed/testbedaddcontactpage.h +++ b/kopete/protocols/testbed/testbedaddcontactpage.h @@ -31,7 +31,7 @@ class TestbedAddContactPage : public AddContactPage { Q_OBJECT public: - TestbedAddContactPage( QWidget* parent = 0, const char* name = 0 ); + TestbedAddContactPage( TQWidget* parent = 0, const char* name = 0 ); ~TestbedAddContactPage(); /** diff --git a/kopete/protocols/testbed/testbedcontact.cpp b/kopete/protocols/testbed/testbedcontact.cpp index b5fc1c2c..bf110872 100644 --- a/kopete/protocols/testbed/testbedcontact.cpp +++ b/kopete/protocols/testbed/testbedcontact.cpp @@ -28,8 +28,8 @@ #include "testbedfakeserver.h" #include "testbedprotocol.h" -TestbedContact::TestbedContact( Kopete::Account* _account, const QString &uniqueName, - const TestbedContactType type, const QString &displayName, Kopete::MetaContact *parent ) +TestbedContact::TestbedContact( Kopete::Account* _account, const TQString &uniqueName, + const TestbedContactType type, const TQString &displayName, Kopete::MetaContact *parent ) : Kopete::Contact( _account, uniqueName, parent ) { kdDebug( 14210 ) << k_funcinfo << " uniqueName: " << uniqueName << ", displayName: " << displayName << endl; @@ -49,9 +49,9 @@ bool TestbedContact::isReachable() return true; } -void TestbedContact::serialize( QMap< QString, QString > &serializedData, QMap< QString, QString > & /* addressBookData */ ) +void TestbedContact::serialize( TQMap< TQString, TQString > &serializedData, TQMap< TQString, TQString > & /* addressBookData */ ) { - QString value; + TQString value; switch ( m_type ) { case Null: @@ -71,23 +71,23 @@ Kopete::ChatSession* TestbedContact::manager( CanCreateFlags ) } else { - QPtrList<Kopete::Contact> contacts; + TQPtrList<Kopete::Contact> contacts; contacts.append(this); m_msgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), contacts, protocol()); - connect(m_msgManager, SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), - this, SLOT( sendMessage( Kopete::Message& ) ) ); - connect(m_msgManager, SIGNAL(destroyed()), this, SLOT(slotChatSessionDestroyed())); + connect(m_msgManager, TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), + this, TQT_SLOT( sendMessage( Kopete::Message& ) ) ); + connect(m_msgManager, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotChatSessionDestroyed())); return m_msgManager; } } -QPtrList<KAction> *TestbedContact::customContextMenuActions() //OBSOLETE +TQPtrList<KAction> *TestbedContact::customContextMenuActions() //OBSOLETE { //FIXME!!! this function is obsolete, we should use XMLGUI instead /*m_actionCollection = new KActionCollection( this, "userColl" ); m_actionPrefs = new KAction(i18n( "&Contact Settings" ), 0, this, - SLOT( showContactSettings( )), m_actionCollection, "contactSettings" ); + TQT_SLOT( showContactSettings( )), m_actionCollection, "contactSettings" ); return m_actionCollection;*/ return 0L; @@ -114,7 +114,7 @@ void TestbedContact::sendMessage( Kopete::Message &message ) manager()->messageSucceeded(); } -void TestbedContact::receivedMessage( const QString &message ) +void TestbedContact::receivedMessage( const TQString &message ) { // Create a Kopete::Message Kopete::Message *newMessage; diff --git a/kopete/protocols/testbed/testbedcontact.h b/kopete/protocols/testbed/testbedcontact.h index 7f7c168a..f6efa7ee 100644 --- a/kopete/protocols/testbed/testbedcontact.h +++ b/kopete/protocols/testbed/testbedcontact.h @@ -17,7 +17,7 @@ #ifndef TESTBEDCONTACT_H #define TESTBEDCONTACT_H -#include <qmap.h> +#include <tqmap.h> #include "kopetecontact.h" #include "kopetemessage.h" @@ -39,8 +39,8 @@ public: */ enum TestbedContactType { Null, Echo }; - TestbedContact( Kopete::Account* _account, const QString &uniqueName, - const TestbedContact::TestbedContactType type, const QString &displayName, + TestbedContact( Kopete::Account* _account, const TQString &uniqueName, + const TestbedContact::TestbedContactType type, const TQString &displayName, Kopete::MetaContact *parent ); ~TestbedContact(); @@ -50,12 +50,12 @@ public: * Serialize the contact's data into a key-value map * suitable for writing to a file */ - virtual void serialize(QMap< QString, QString >& serializedData, - QMap< QString, QString >& addressBookData); + virtual void serialize(TQMap< TQString, TQString >& serializedData, + TQMap< TQString, TQString >& addressBookData); /** * Return the actions for this contact */ - virtual QPtrList<KAction> *customContextMenuActions(); + virtual TQPtrList<KAction> *customContextMenuActions(); /** * Returns a Kopete::ChatSession associated with this contact */ @@ -72,7 +72,7 @@ public slots: * Called when an incoming message arrived * This displays it in the chatwindow */ - void receivedMessage( const QString &message ); + void receivedMessage( const TQString &message ); protected slots: /** diff --git a/kopete/protocols/testbed/testbededitaccountwidget.cpp b/kopete/protocols/testbed/testbededitaccountwidget.cpp index 270b887a..98a52dfc 100644 --- a/kopete/protocols/testbed/testbededitaccountwidget.cpp +++ b/kopete/protocols/testbed/testbededitaccountwidget.cpp @@ -16,18 +16,18 @@ #include "testbededitaccountwidget.h" -#include <qlayout.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqlineedit.h> #include <kdebug.h> #include "kopeteaccount.h" #include "testbedaccountpreferences.h" #include "testbedaccount.h" #include "testbedprotocol.h" -TestbedEditAccountWidget::TestbedEditAccountWidget( QWidget* parent, Kopete::Account* account) -: QWidget( parent ), KopeteEditAccountWidget( account ) +TestbedEditAccountWidget::TestbedEditAccountWidget( TQWidget* parent, Kopete::Account* account) +: TQWidget( parent ), KopeteEditAccountWidget( account ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); kdDebug(14210) << k_funcinfo << endl; m_preferencesWidget = new TestbedAccountPreferences( this ); } @@ -38,7 +38,7 @@ TestbedEditAccountWidget::~TestbedEditAccountWidget() Kopete::Account* TestbedEditAccountWidget::apply() { - QString accountName; + TQString accountName; if ( m_preferencesWidget->m_acctName->text().isEmpty() ) accountName = "Testbed Account"; else diff --git a/kopete/protocols/testbed/testbededitaccountwidget.h b/kopete/protocols/testbed/testbededitaccountwidget.h index 9d2e6089..cbd0722a 100644 --- a/kopete/protocols/testbed/testbededitaccountwidget.h +++ b/kopete/protocols/testbed/testbededitaccountwidget.h @@ -17,7 +17,7 @@ #ifndef TESTBEDEDITACCOUNTWIDGET_H #define TESTBEDEDITACCOUNTWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <editaccountwidget.h> class QVBoxLayout; @@ -28,11 +28,11 @@ class TestbedAccountPreferences; * A widget for editing this protocol's accounts * @author Will Stephenson */ -class TestbedEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class TestbedEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: - TestbedEditAccountWidget( QWidget* parent, Kopete::Account* account); + TestbedEditAccountWidget( TQWidget* parent, Kopete::Account* account); ~TestbedEditAccountWidget(); diff --git a/kopete/protocols/testbed/testbedfakeserver.cpp b/kopete/protocols/testbed/testbedfakeserver.cpp index b1bb3e1e..9a4116ca 100644 --- a/kopete/protocols/testbed/testbedfakeserver.cpp +++ b/kopete/protocols/testbed/testbedfakeserver.cpp @@ -15,7 +15,7 @@ */ #include "testbedfakeserver.h" -#include <qtimer.h> +#include <tqtimer.h> #include <kdebug.h> #include "testbedincomingmessage.h" @@ -29,24 +29,24 @@ TestbedFakeServer::~TestbedFakeServer() { } -void TestbedFakeServer::sendMessage( QString contactId, QString message ) +void TestbedFakeServer::sendMessage( TQString contactId, TQString message ) { // see what contact the message is for // if it's for Echo, respond immediately kdDebug( 14210 ) << k_funcinfo << "Message for: " << contactId << ", is: " << message << endl; kdDebug( 14210 ) << "recipient is echo, coming back at you." << endl; // put the message in a map and start a timer to tell it to deliver itself. - //emit messageReceived( QString::fromLatin1( "echo: " ) + message ); - QString messageId = contactId + QString::fromLatin1(": "); + //emit messageReceived( TQString::fromLatin1( "echo: " ) + message ); + TQString messageId = contactId + TQString::fromLatin1(": "); TestbedIncomingMessage* msg = new TestbedIncomingMessage( this, messageId + message ); m_incomingMessages.append( msg ); - QTimer::singleShot( 1000, msg, SLOT( deliver() ) ); + TQTimer::singleShot( 1000, msg, TQT_SLOT( deliver() ) ); // This removes any delivered messages purgeMessages(); } -void TestbedFakeServer::incomingMessage( QString message ) +void TestbedFakeServer::incomingMessage( TQString message ) { emit messageReceived( message ); } diff --git a/kopete/protocols/testbed/testbedfakeserver.h b/kopete/protocols/testbed/testbedfakeserver.h index c5daabe4..1e58031a 100644 --- a/kopete/protocols/testbed/testbedfakeserver.h +++ b/kopete/protocols/testbed/testbedfakeserver.h @@ -17,8 +17,8 @@ #ifndef TESTBEDFAKESERVER_H #define TESTBEDFAKESERVER_H -#include "qobject.h" -#include <qptrlist.h> +#include "tqobject.h" +#include <tqptrlist.h> class TestbedIncomingMessage; @@ -35,7 +35,7 @@ public: /** * Called to simulate sending a message to a remote contact */ - void sendMessage( QString contactId, QString message ); + void sendMessage( TQString contactId, TQString message ); public slots: /** @@ -43,13 +43,13 @@ public slots: * In reality, a message on the incoming message list * connects to this slot when it's time to 'arrive' */ - void incomingMessage( QString message ); + void incomingMessage( TQString message ); signals: /** * Tells the account that a message arrived */ - void messageReceived( const QString &message ); + void messageReceived( const TQString &message ); protected: /** @@ -60,7 +60,7 @@ protected: /** * List of incoming messages */ - QPtrList<TestbedIncomingMessage> m_incomingMessages; + TQPtrList<TestbedIncomingMessage> m_incomingMessages; }; #endif diff --git a/kopete/protocols/testbed/testbedincomingmessage.cpp b/kopete/protocols/testbed/testbedincomingmessage.cpp index fbbd4c83..576e6c12 100644 --- a/kopete/protocols/testbed/testbedincomingmessage.cpp +++ b/kopete/protocols/testbed/testbedincomingmessage.cpp @@ -16,7 +16,7 @@ #include "testbedincomingmessage.h" -TestbedIncomingMessage::TestbedIncomingMessage( TestbedFakeServer* const server , QString message ) +TestbedIncomingMessage::TestbedIncomingMessage( TestbedFakeServer* const server , TQString message ) { m_server = server; m_message = message; diff --git a/kopete/protocols/testbed/testbedincomingmessage.h b/kopete/protocols/testbed/testbedincomingmessage.h index 226368d9..3f27510a 100644 --- a/kopete/protocols/testbed/testbedincomingmessage.h +++ b/kopete/protocols/testbed/testbedincomingmessage.h @@ -17,7 +17,7 @@ #ifndef TESTBEDINCOMINGMESSAGE_H #define TESTBEDINCOMINGMESSAGE_H -#include <qobject.h> +#include <tqobject.h> #include "testbedfakeserver.h" /** @@ -34,7 +34,7 @@ public: * @param server The simulated Kopete side 'client' of the IM system where the message will arrive when 'delivered' * @param message The simulated message */ - TestbedIncomingMessage( TestbedFakeServer* const server , QString message ); + TestbedIncomingMessage( TestbedFakeServer* const server , TQString message ); virtual ~TestbedIncomingMessage(); /** * Has this message already been delivered? @@ -47,7 +47,7 @@ public slots: */ void deliver(); protected: - QString m_message; + TQString m_message; TestbedFakeServer* m_server; bool m_delivered; }; diff --git a/kopete/protocols/testbed/testbedprotocol.cpp b/kopete/protocols/testbed/testbedprotocol.cpp index 838a74b4..97ecaf02 100644 --- a/kopete/protocols/testbed/testbedprotocol.cpp +++ b/kopete/protocols/testbed/testbedprotocol.cpp @@ -29,11 +29,11 @@ K_EXPORT_COMPONENT_FACTORY( kopete_testbed, TestbedProtocolFactory( "kopete_test TestbedProtocol *TestbedProtocol::s_protocol = 0L; -TestbedProtocol::TestbedProtocol( QObject* parent, const char *name, const QStringList &/*args*/ ) +TestbedProtocol::TestbedProtocol( TQObject* parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Protocol( TestbedProtocolFactory::instance(), parent, name ), - testbedOnline( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n( "Online" ), i18n( "O&nline" ) ), + testbedOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "O&nline" ) ), testbedAway( Kopete::OnlineStatus::Away, 25, this, 1, "msn_away", i18n( "Away" ), i18n( "&Away" ) ), - testbedOffline( Kopete::OnlineStatus::Offline, 25, this, 2, QString::null, i18n( "Offline" ), i18n( "O&ffline" ) ) + testbedOffline( Kopete::OnlineStatus::Offline, 25, this, 2, TQString::null, i18n( "Offline" ), i18n( "O&ffline" ) ) { kdDebug( 14210 ) << k_funcinfo << endl; @@ -46,23 +46,23 @@ TestbedProtocol::~TestbedProtocol() } Kopete::Contact *TestbedProtocol::deserializeContact( - Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &/* addressBookData */) + Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &/* addressBookData */) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; - QString displayName = serializedData[ "displayName" ]; - QString type = serializedData[ "contactType" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; + TQString displayName = serializedData[ "displayName" ]; + TQString type = serializedData[ "contactType" ]; TestbedContact::TestbedContactType tbcType; - if ( type == QString::fromLatin1( "echo" ) ) + if ( type == TQString::fromLatin1( "echo" ) ) tbcType = TestbedContact::Echo; - if ( type == QString::fromLatin1( "null" ) ) + if ( type == TQString::fromLatin1( "null" ) ) tbcType = TestbedContact::Null; else tbcType = TestbedContact::Null; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[ accountId ]; if ( !account ) @@ -74,19 +74,19 @@ Kopete::Contact *TestbedProtocol::deserializeContact( return new TestbedContact(account, contactId, tbcType, displayName, metaContact); } -AddContactPage * TestbedProtocol::createAddContactWidget( QWidget *parent, Kopete::Account * /* account */ ) +AddContactPage * TestbedProtocol::createAddContactWidget( TQWidget *parent, Kopete::Account * /* account */ ) { kdDebug( 14210 ) << "Creating Add Contact Page" << endl; return new TestbedAddContactPage( parent ); } -KopeteEditAccountWidget * TestbedProtocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent ) +KopeteEditAccountWidget * TestbedProtocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) { kdDebug(14210) << "Creating Edit Account Page" << endl; return new TestbedEditAccountWidget( parent, account ); } -Kopete::Account *TestbedProtocol::createNewAccount( const QString &accountId ) +Kopete::Account *TestbedProtocol::createNewAccount( const TQString &accountId ) { return new TestbedAccount( this, accountId ); } diff --git a/kopete/protocols/testbed/testbedprotocol.h b/kopete/protocols/testbed/testbedprotocol.h index 7ee04b7d..d688e130 100644 --- a/kopete/protocols/testbed/testbedprotocol.h +++ b/kopete/protocols/testbed/testbedprotocol.h @@ -28,7 +28,7 @@ class TestbedProtocol : public Kopete::Protocol { Q_OBJECT public: - TestbedProtocol(QObject *parent, const char *name, const QStringList &args); + TestbedProtocol(TQObject *parent, const char *name, const TQStringList &args); ~TestbedProtocol(); /** * Convert the serialised data back into a TestbedContact and add this @@ -36,21 +36,21 @@ public: */ virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap< QString, QString > & serializedData, - const QMap< QString, QString > & addressBookData + const TQMap< TQString, TQString > & serializedData, + const TQMap< TQString, TQString > & addressBookData ); /** * Generate the widget needed to add TestbedContacts */ - virtual AddContactPage * createAddContactWidget( QWidget *parent, Kopete::Account *account ); + virtual AddContactPage * createAddContactWidget( TQWidget *parent, Kopete::Account *account ); /** * Generate the widget needed to add/edit accounts for this protocol */ - virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent ); + virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); /** * Generate a TestbedAccount */ - virtual Kopete::Account * createNewAccount( const QString &accountId ); + virtual Kopete::Account * createNewAccount( const TQString &accountId ); /** * Access the instance of this protocol */ diff --git a/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp b/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp index 22884036..b6a5a3b6 100644 --- a/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp +++ b/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp @@ -18,32 +18,32 @@ #include <webcamwidget.h> #include "avdevice/videodevicepool.h" -#include <qframe.h> -#include <qobject.h> -#include <qwidget.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> +#include <tqframe.h> +#include <tqobject.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> #include <kdebug.h> #include <klocale.h> -TestbedWebcamDialog::TestbedWebcamDialog( const QString &contactId, QWidget * parent, const char * name ) +TestbedWebcamDialog::TestbedWebcamDialog( const TQString &contactId, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::Plain, Qt::WDestructiveClose, parent, name, false, i18n( "Webcam for %1" ).arg( contactId ), KDialogBase::Close, KDialogBase::Close, true /*seperator*/ ) { - setInitialSize( QSize(320,290), false ); + setInitialSize( TQSize(320,290), false ); setEscapeButton( KDialogBase::Close ); -// QObject::connect( this, SIGNAL( closeClicked() ), this, SIGNAL( closingWebcamDialog() ) ); +// TQObject::connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SIGNAL( closingWebcamDialog() ) ); - QWidget *page = plainPage(); + TQWidget *page = plainPage(); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); mImageContainer = new Kopete::WebcamWidget( page ); mImageContainer->setMinimumSize(320,240); mImageContainer->setText( i18n( "No webcam image received" ) ); - mImageContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + mImageContainer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); topLayout->add( mImageContainer ); show(); @@ -56,10 +56,10 @@ TestbedWebcamDialog::TestbedWebcamDialog( const QString &contactId, QWidget * pa mVideoDevicePool->getImage(&mImage); kdDebug() << "Just captured 1st frame" << endl; - mPixmap=QPixmap(320,240,-1, QPixmap::DefaultOptim); + mPixmap=TQPixmap(320,240,-1, TQPixmap::DefaultOptim); if (mPixmap.convertFromImage(mImage,0) == true) mImageContainer->updatePixmap(mPixmap); - connect(&qtimer, SIGNAL(timeout()), this, SLOT(slotUpdateImage()) ); + connect(&qtimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateImage()) ); qtimer.start(0,FALSE); } @@ -73,7 +73,7 @@ void TestbedWebcamDialog::slotUpdateImage() { mVideoDevicePool->getFrame(); mVideoDevicePool->getImage(&mImage); - mImageContainer->updatePixmap( QPixmap( mImage ) ); + mImageContainer->updatePixmap( TQPixmap( mImage ) ); } diff --git a/kopete/protocols/testbed/ui/testbedwebcamdialog.h b/kopete/protocols/testbed/ui/testbedwebcamdialog.h index 59f43e68..4f7e85ab 100644 --- a/kopete/protocols/testbed/ui/testbedwebcamdialog.h +++ b/kopete/protocols/testbed/ui/testbedwebcamdialog.h @@ -17,10 +17,10 @@ #ifndef TESTBEDWEBCAMDIALOG_H #define TESTBEDWEBCAMDIALOG_H -#include <qstring.h> -#include <qimage.h> -#include <qtimer.h> -#include <qpixmap.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqtimer.h> +#include <tqpixmap.h> #include <kdialogbase.h> /** @@ -41,7 +41,7 @@ class TestbedWebcamDialog : public KDialogBase { Q_OBJECT public: - TestbedWebcamDialog( const QString &, QWidget* parent = 0, const char* name = 0 ); + TestbedWebcamDialog( const TQString &, TQWidget* parent = 0, const char* name = 0 ); ~TestbedWebcamDialog(); public slots: @@ -51,9 +51,9 @@ public slots: private: Kopete::WebcamWidget *mImageContainer; - QImage mImage; - QTimer qtimer; - QPixmap mPixmap; + TQImage mImage; + TQTimer qtimer; + TQPixmap mPixmap; Kopete::AV::VideoDevicePool *mVideoDevicePool; }; diff --git a/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp b/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp index d26e461c..9bdbee27 100644 --- a/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp +++ b/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ // QT Includes -#include <qdir.h> -#include <qfileinfo.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqregexp.h> // KDE Includes #include <kapplication.h> @@ -33,13 +33,13 @@ // Local Includes #include "libwinpopup.h" -WinPopupLib::WinPopupLib(const QString &smbClient,int groupFreq) +WinPopupLib::WinPopupLib(const TQString &smbClient,int groupFreq) : smbClientBin(smbClient), groupCheckFreq(groupFreq) { - connect(&updateGroupDataTimer, SIGNAL(timeout()), this, SLOT(slotUpdateGroupData())); + connect(&updateGroupDataTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateGroupData())); updateGroupDataTimer.start(1, true); - QTimer::singleShot(1, this, SLOT(slotStartDirLister())); + TQTimer::singleShot(1, this, TQT_SLOT(slotStartDirLister())); } WinPopupLib::~WinPopupLib() @@ -51,8 +51,8 @@ void WinPopupLib::slotStartDirLister() if (checkMessageDir()) { dirLister = new KDirLister(); dirLister->setAutoUpdate(true); - connect(dirLister, SIGNAL(newItems(const KFileItemList &)), this, SLOT(slotNewMessages(const KFileItemList &))); - connect(dirLister, SIGNAL(completed()), this, SLOT(slotListCompleted())); + connect(dirLister, TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(slotNewMessages(const KFileItemList &))); + connect(dirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotListCompleted())); dirLister->openURL(KURL::fromPathOrURL(WP_POPUP_DIR)); } } @@ -60,11 +60,11 @@ void WinPopupLib::slotStartDirLister() /** * return the group list */ -const QStringList WinPopupLib::getGroups() +const TQStringList WinPopupLib::getGroups() { - QStringList ret; - QMap<QString, WorkGroup>::ConstIterator end = theGroups.end(); - for(QMap<QString, WorkGroup>::ConstIterator i = theGroups.begin(); i != end; i++) + TQStringList ret; + TQMap<TQString, WorkGroup>::ConstIterator end = theGroups.end(); + for(TQMap<TQString, WorkGroup>::ConstIterator i = theGroups.begin(); i != end; i++) ret += i.key(); return ret; @@ -73,7 +73,7 @@ const QStringList WinPopupLib::getGroups() /** * return the host list */ -const QStringList WinPopupLib::getHosts(const QString &Group) +const TQStringList WinPopupLib::getHosts(const TQString &Group) { return theGroups[Group].Hosts(); } @@ -81,13 +81,13 @@ const QStringList WinPopupLib::getHosts(const QString &Group) /** * return if a host is in the host list */ -bool WinPopupLib::checkHost(const QString &Name) +bool WinPopupLib::checkHost(const TQString &Name) { // kdDebug() << "WP checkHost: " << Name << endl; bool ret = false; - QMap<QString, WorkGroup>::Iterator end = theGroups.end(); - for(QMap<QString, WorkGroup>::Iterator i = theGroups.begin(); i != end && !ret; i++) { + TQMap<TQString, WorkGroup>::Iterator end = theGroups.end(); + for(TQMap<TQString, WorkGroup>::Iterator i = theGroups.begin(); i != end && !ret; i++) { if ((*i).Hosts().contains(Name.upper())) { ret = true; break; @@ -100,7 +100,7 @@ bool WinPopupLib::checkHost(const QString &Name) bool WinPopupLib::checkMessageDir() { - QDir dir(WP_POPUP_DIR); + TQDir dir(WP_POPUP_DIR); if (! dir.exists()) { int tmpYesNo = KMessageBox::warningYesNo(Kopete::UI::Global::mainWidget(), i18n("Working directory %1 does not exist.\n" @@ -108,9 +108,9 @@ bool WinPopupLib::checkMessageDir() "Install Into Samba (Configure... -> Account -> Edit) information\n" "on how to do this.\n" "Should the directory be created? (May need root password)").arg(WP_POPUP_DIR), - QString::fromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create")); + TQString::fromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create")); if (tmpYesNo == KMessageBox::Yes) { - QStringList kdesuArgs = QStringList(QString("-c mkdir -p -m 0777 " + WP_POPUP_DIR)); + TQStringList kdesuArgs = TQStringList(TQString("-c mkdir -p -m 0777 " + WP_POPUP_DIR)); if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) return true; } } else { @@ -127,9 +127,9 @@ bool WinPopupLib::checkMessageDir() "You will not receive messages if you say no.\n" "You can also correct it manually (chmod 0777 %1) and restart kopete.\n" "Fix? (May need root password)").arg(WP_POPUP_DIR), - QString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); + TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); if (tmpYesNo == KMessageBox::Yes) { - QStringList kdesuArgs = QStringList(QString("-c chmod 0777 " + WP_POPUP_DIR)); + TQStringList kdesuArgs = TQStringList(TQString("-c chmod 0777 " + WP_POPUP_DIR)); if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) return true; } } else { @@ -148,22 +148,22 @@ void WinPopupLib::slotUpdateGroupData() passedInitialHost = false; todo.clear(); currentGroupsMap.clear(); - currentHost = QString::fromLatin1("LOCALHOST"); + currentHost = TQString::fromLatin1("LOCALHOST"); startReadProcess(currentHost); } -void WinPopupLib::startReadProcess(const QString &Host) +void WinPopupLib::startReadProcess(const TQString &Host) { currentHosts.clear(); currentGroups.clear(); - currentGroup = QString(); + currentGroup = TQString(); // for Samba 3 KProcIO *reader = new KProcIO; *reader << smbClientBin << "-N" << "-E" << "-g" << "-L" << Host << "-"; - connect(reader, SIGNAL(readReady(KProcIO *)), this, SLOT(slotReadProcessReady(KProcIO *))); - connect(reader, SIGNAL(processExited(KProcess *)), this, SLOT(slotReadProcessExited(KProcess *))); + connect(reader, TQT_SIGNAL(readReady(KProcIO *)), this, TQT_SLOT(slotReadProcessReady(KProcIO *))); + connect(reader, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotReadProcessExited(KProcess *))); if (!reader->start(KProcess::NotifyOnExit, true)) { // still to come @@ -173,8 +173,8 @@ void WinPopupLib::startReadProcess(const QString &Host) void WinPopupLib::slotReadProcessReady(KProcIO *r) { - QString tmpLine = QString::null; - QRegExp group("^Workgroup\\|(.*)\\|(.*)$"), host("^Server\\|(.*)\\|(.*)$"), + TQString tmpLine = TQString::null; + TQRegExp group("^Workgroup\\|(.*)\\|(.*)$"), host("^Server\\|(.*)\\|(.*)$"), info("^Domain=\\[([^\\]]+)\\] OS=\\[([^\\]]+)\\] Server=\\[([^\\]]+)\\]"), error("Connection.*failed"); @@ -184,7 +184,7 @@ void WinPopupLib::slotReadProcessReady(KProcIO *r) if (group.search(tmpLine) != -1) currentGroups[group.cap(1)] = group.cap(2); if (error.search(tmpLine) != -1) { kdDebug(14170) << "Connection to " << currentHost << " failed!" << endl; - if (currentHost == QString::fromLatin1("LOCALHOST")) currentHost = QString::fromLatin1("failed"); // to be sure + if (currentHost == TQString::fromLatin1("LOCALHOST")) currentHost = TQString::fromLatin1("failed"); // to be sure } } } @@ -203,11 +203,11 @@ void WinPopupLib::slotReadProcessExited(KProcess *r) done += currentHost; if (!currentGroups.isEmpty()) { - QMap<QString, WorkGroup> newGroups; + TQMap<TQString, WorkGroup> newGroups; //loop through the read groups and check for new ones - QMap<QString, QString>::ConstIterator end = currentGroups.end(); - for (QMap<QString, QString>::ConstIterator i = currentGroups.begin(); i != end; i++) { - QString groupMaster = i.data(); + TQMap<TQString, TQString>::ConstIterator end = currentGroups.end(); + for (TQMap<TQString, TQString>::ConstIterator i = currentGroups.begin(); i != end; i++) { + TQString groupMaster = i.data(); if (!done.contains(groupMaster)) todo += groupMaster; } } @@ -223,17 +223,17 @@ void WinPopupLib::slotReadProcessExited(KProcess *r) } else { passedInitialHost = true; if (!currentGroups.isEmpty()) { - QMap<QString, QString>::ConstIterator end = currentGroups.end(); - for (QMap<QString, QString>::ConstIterator i = currentGroups.begin(); i != end; i++) { - QString groupMaster = i.data(); + TQMap<TQString, TQString>::ConstIterator end = currentGroups.end(); + for (TQMap<TQString, TQString>::ConstIterator i = currentGroups.begin(); i != end; i++) { + TQString groupMaster = i.data(); todo += groupMaster; } } else { - if (currentHost == QString::fromLatin1("failed")) + if (currentHost == TQString::fromLatin1("failed")) KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Connection to localhost failed!\n" "Is your samba server running?"), - QString::fromLatin1("Winpopup")); + TQString::fromLatin1("Winpopup")); } } @@ -250,7 +250,7 @@ void WinPopupLib::slotReadProcessExited(KProcess *r) void WinPopupLib::slotListCompleted() { /// only to check received messages during start up, then we use newItems. GF - disconnect(dirLister, SIGNAL(completed()), this, SLOT(slotListCompleted())); + disconnect(dirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotListCompleted())); readMessages(dirLister->items()); } @@ -264,25 +264,25 @@ void WinPopupLib::slotNewMessages(const KFileItemList &items) */ void WinPopupLib::readMessages(const KFileItemList &items) { - QPtrListIterator<KFileItem> it(items); + TQPtrListIterator<KFileItem> it(items); KFileItem *tmpItem; while ((tmpItem = it.current()) != 0) { if (tmpItem->isFile()) { - QFile messageFile(tmpItem->url().path()); + TQFile messageFile(tmpItem->url().path()); if (messageFile.open(IO_ReadOnly)) { - QTextStream stream(&messageFile); - QString sender; - QDateTime time; - QString text; + TQTextStream stream(&messageFile); + TQString sender; + TQDateTime time; + TQString text; // first line is sender, can this really be empty? GF sender = stream.readLine(); sender = sender.upper(); // second line is time - QString tmpTime = stream.readLine(); - time = QDateTime::fromString(tmpTime, Qt::ISODate); + TQString tmpTime = stream.readLine(); + time = TQDateTime::fromString(tmpTime, Qt::ISODate); while (!stream.atEnd()) { text.append(stream.readLine()); @@ -296,16 +296,16 @@ void WinPopupLib::readMessages(const KFileItemList &items) // delete file if (!messageFile.remove()) { - // QFile::remove() seems to be very persistent, it removes even files with 0444 owned by root + // TQFile::remove() seems to be very persistent, it removes even files with 0444 owned by root // if the directory permissions are 0777 - so this is just for safety. GF kdDebug(14170) << "Message file not removed - how that?" << endl; int tmpYesNo = KMessageBox::warningYesNo(Kopete::UI::Global::mainWidget(), i18n("A message file could not be removed; " "maybe the permissions are wrong.\n" "Fix? (May need root password)"), - QString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); + TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); if (tmpYesNo == KMessageBox::Yes) { - QStringList kdesuArgs = QStringList(QString("-c chmod 0666 " + tmpItem->url().path())); + TQStringList kdesuArgs = TQStringList(TQString("-c chmod 0666 " + tmpItem->url().path())); if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) { if (!messageFile.remove()) KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Still cannot remove it; please fix manually.")); @@ -325,13 +325,13 @@ void WinPopupLib::readMessages(const KFileItemList &items) /** * send a message */ -void WinPopupLib::sendMessage(const QString &Body, const QString &Destination) +void WinPopupLib::sendMessage(const TQString &Body, const TQString &Destination) { KProcess *sender = new KProcess(this); *sender << smbClientBin << "-M" << Destination; *sender << "-N" << "-"; - connect(sender, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendProcessExited(KProcess *))); + connect(sender, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendProcessExited(KProcess *))); if (sender->start(KProcess::NotifyOnExit, KProcess::Stdin)) { sender->writeStdin(Body.local8Bit(), Body.local8Bit().length()); @@ -349,7 +349,7 @@ void WinPopupLib::slotSendProcessExited(KProcess *p) delete p; } -void WinPopupLib::settingsChanged(const QString &smbClient, int groupFreq) +void WinPopupLib::settingsChanged(const TQString &smbClient, int groupFreq) { smbClientBin = smbClient; groupCheckFreq = groupFreq; diff --git a/kopete/protocols/winpopup/libwinpopup/libwinpopup.h b/kopete/protocols/winpopup/libwinpopup/libwinpopup.h index 77f8b8a6..0e594932 100644 --- a/kopete/protocols/winpopup/libwinpopup/libwinpopup.h +++ b/kopete/protocols/winpopup/libwinpopup/libwinpopup.h @@ -19,29 +19,29 @@ #define LIBWINPOPUP_H //QT includes -#include <qobject.h> -#include <qmap.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qdatetime.h> +#include <tqobject.h> +#include <tqmap.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqdatetime.h> // KDE Includes #include <kprocio.h> #include <kfileitem.h> -const QString WP_POPUP_DIR = QString::fromLatin1("/var/lib/winpopup"); +const TQString WP_POPUP_DIR = TQString::fromLatin1("/var/lib/winpopup"); class KDirLister; -typedef QMap<QString, QString> stringMap; +typedef TQMap<TQString, TQString> stringMap; class WorkGroup { - QStringList groupHosts; + TQStringList groupHosts; public: - const QStringList &Hosts() { return groupHosts; } - void addHosts(const QStringList &newHosts) { groupHosts = newHosts; } + const TQStringList &Hosts() { return groupHosts; } + void addHosts(const TQStringList &newHosts) { groupHosts = newHosts; } }; class WinPopupLib : public QObject @@ -49,23 +49,23 @@ class WinPopupLib : public QObject Q_OBJECT public: - WinPopupLib(const QString &smbClient,int groupFreq); + WinPopupLib(const TQString &smbClient,int groupFreq); ~WinPopupLib(); - const QStringList getGroups(); - const QStringList getHosts(const QString &Group); - bool checkHost(const QString &Name); - void settingsChanged(const QString &smbClient, int groupFreq); - void sendMessage(const QString &Body, const QString &Destination); + const TQStringList getGroups(); + const TQStringList getHosts(const TQString &Group); + bool checkHost(const TQString &Name); + void settingsChanged(const TQString &smbClient, int groupFreq); + void sendMessage(const TQString &Body, const TQString &Destination); private: bool passedInitialHost; - QMap<QString, WorkGroup> theGroups, currentGroupsMap; - QString currentGroup, currentHost; - QStringList todo, done, currentHosts; + TQMap<TQString, WorkGroup> theGroups, currentGroupsMap; + TQString currentGroup, currentHost; + TQStringList todo, done, currentHosts; stringMap currentGroups; - QTimer updateGroupDataTimer; - QString smbClientBin; + TQTimer updateGroupDataTimer; + TQString smbClientBin; int groupCheckFreq; KDirLister *dirLister; @@ -74,7 +74,7 @@ private: private slots: void slotUpdateGroupData(); - void startReadProcess(const QString &Host); + void startReadProcess(const TQString &Host); void slotReadProcessReady(KProcIO *r); void slotReadProcessExited(KProcess *r); void slotSendProcessExited(KProcess *p); @@ -83,7 +83,7 @@ private slots: void slotNewMessages(const KFileItemList &items); signals: - void signalNewMessage(const QString &, const QDateTime &, const QString &); + void signalNewMessage(const TQString &, const TQDateTime &, const TQString &); }; #endif diff --git a/kopete/protocols/winpopup/wpaccount.cpp b/kopete/protocols/winpopup/wpaccount.cpp index 4b1342ff..d7439628 100644 --- a/kopete/protocols/winpopup/wpaccount.cpp +++ b/kopete/protocols/winpopup/wpaccount.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ // QT Includes -#include <qregexp.h> +#include <tqregexp.h> // KDE Includes #include <kdebug.h> @@ -34,7 +34,7 @@ class KPopupMenu; -WPAccount::WPAccount(WPProtocol *parent, const QString &accountID, const char *name) +WPAccount::WPAccount(WPProtocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name) { // kdDebug(14170) << "WPAccount::WPAccount()" << endl; @@ -53,20 +53,20 @@ WPAccount::~WPAccount() { } -const QStringList WPAccount::getGroups() +const TQStringList WPAccount::getGroups() { return mProtocol->getGroups(); } -const QStringList WPAccount::getHosts(const QString &Group) +const TQStringList WPAccount::getHosts(const TQString &Group) { return mProtocol->getHosts(Group); } -bool WPAccount::checkHost(const QString &Name) +bool WPAccount::checkHost(const TQString &Name) { // kdDebug() << "WPAccount::checkHost: " << Name << endl; - if (Name.upper() == QString::fromLatin1("LOCALHOST")) { + if (Name.upper() == TQString::fromLatin1("LOCALHOST")) { // Assume localhost is always there, but it will not appear in the samba output. // Should never happen as localhost is now forbidden as contact, just for safety. GF return true; @@ -75,7 +75,7 @@ bool WPAccount::checkHost(const QString &Name) } } -bool WPAccount::createContact(const QString &contactId, Kopete::MetaContact *parentContact ) +bool WPAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact ) { // kdDebug(14170) << "[WPAccount::createContact] contactId: " << contactId << endl; @@ -89,7 +89,7 @@ bool WPAccount::createContact(const QString &contactId, Kopete::MetaContact *par return false; } -void WPAccount::slotGotNewMessage(const QString &Body, const QDateTime &Arrival, const QString &From) +void WPAccount::slotGotNewMessage(const TQString &Body, const TQDateTime &Arrival, const TQString &From) { // kdDebug(14170) << "WPAccount::slotGotNewMessage(" << Body << ", " << Arrival.toString() << ", " << From << ")" << endl; @@ -97,7 +97,7 @@ void WPAccount::slotGotNewMessage(const QString &Body, const QDateTime &Arrival, // IPs can not be matched to an account anyway. // This should happen rarely but they make kopete crash. // The reason for this seems to be in ChatSessionManager? GF - QRegExp ip("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); + TQRegExp ip("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); // kdDebug(14170) << "ip.search: " << From << " match: " << ip.search(From) << endl; @@ -142,7 +142,7 @@ void WPAccount::updateAccountId() myself() = new WPContact(this, accountId(), accountId(), 0); }*/ -void WPAccount::setAway(bool status, const QString &awayMessage) +void WPAccount::setAway(bool status, const TQString &awayMessage) { // kdDebug(14170) << "WPAccount::setAway()" << endl; @@ -164,13 +164,13 @@ KActionMenu* WPAccount::actionMenu() if (mProtocol) { - KAction *goOnline = new KAction("Online", QIconSet(mProtocol->WPOnline.iconFor(this)), 0, - this, SLOT(connect()), theActionMenu, "actionGoAvailable"); + KAction *goOnline = new KAction("Online", TQIconSet(mProtocol->WPOnline.iconFor(this)), 0, + this, TQT_SLOT(connect()), theActionMenu, "actionGoAvailable"); goOnline->setEnabled(isConnected() && isAway()); theActionMenu->insert(goOnline); - KAction *goAway = new KAction("Away", QIconSet(mProtocol->WPAway.iconFor(this)), 0, - this, SLOT(goAway()), theActionMenu, "actionGoAway"); + KAction *goAway = new KAction("Away", TQIconSet(mProtocol->WPAway.iconFor(this)), 0, + this, TQT_SLOT(goAway()), theActionMenu, "actionGoAway"); goAway->setEnabled(isConnected() && !isAway()); theActionMenu->insert(goAway); @@ -178,14 +178,14 @@ KActionMenu* WPAccount::actionMenu() theActionMenu->popupMenu()->insertSeparator(); theActionMenu->insert(new KAction(i18n("Properties"), 0, - this, SLOT(editAccount()), theActionMenu, "actionAccountProperties")); + this, TQT_SLOT(editAccount()), theActionMenu, "actionAccountProperties")); } return theActionMenu; } -void WPAccount::slotSendMessage(const QString &Body, const QString &Destination) +void WPAccount::slotSendMessage(const TQString &Body, const TQString &Destination) { kdDebug(14170) << "WPAccount::slotSendMessage(" << Body << ", " << Destination << ")" << endl; @@ -193,7 +193,7 @@ void WPAccount::slotSendMessage(const QString &Body, const QString &Destination) mProtocol->sendMessage(Body, Destination); } -void WPAccount::setOnlineStatus(const Kopete::OnlineStatus &status, const QString &reason) +void WPAccount::setOnlineStatus(const Kopete::OnlineStatus &status, const TQString &reason) { if (myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Online) connect( status ); diff --git a/kopete/protocols/winpopup/wpaccount.h b/kopete/protocols/winpopup/wpaccount.h index f916ca86..ae3744de 100644 --- a/kopete/protocols/winpopup/wpaccount.h +++ b/kopete/protocols/winpopup/wpaccount.h @@ -23,7 +23,7 @@ // QT Includes -#include <qpixmap.h> +#include <tqpixmap.h> // KDE Includes @@ -51,54 +51,54 @@ class WPAccount : public Kopete::Account // Kopete::Account overloading public: - WPAccount(WPProtocol *parent, const QString& accountID, const char *name = 0); + WPAccount(WPProtocol *parent, const TQString& accountID, const char *name = 0); ~WPAccount(); virtual KActionMenu* actionMenu(); // Per-protocol actions for the systray and the status bar - virtual void setAway(bool status, const QString &); // Set user away + virtual void setAway(bool status, const TQString &); // Set user away public slots: virtual void connect(const Kopete::OnlineStatus &); // Connect to server virtual void disconnect(); // Disconnect from server - void goAvailable() { setAway(false, QString::null); } // Two convenience slots - void goAway() { setAway(true, QString::null); } // for available and away + void goAvailable() { setAway(false, TQString::null); } // Two convenience slots + void goAway() { setAway(true, TQString::null); } // for available and away // Stuff used internally & by colleague classes public: - const QStringList getGroups(); - const QStringList getHosts(const QString &Group); + const TQStringList getGroups(); + const TQStringList getHosts(const TQString &Group); // Stuff used by WPContact public: /** * Returns whether or not the named host is online. */ - bool checkHost(const QString &Name); + bool checkHost(const TQString &Name); public slots: /** * Dispatches said message to the destination. */ - void slotSendMessage(const QString &Body, const QString &Destination); + void slotSendMessage(const TQString &Body, const TQString &Destination); /** * Called when a new message arrives with the message's data. */ - void slotGotNewMessage(const QString &Body, const QDateTime &Arrival, const QString &From); + void slotGotNewMessage(const TQString &Body, const TQDateTime &Arrival, const TQString &From); /* Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus &status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus &status , const TQString &reason = TQString::null); protected: - virtual bool createContact(const QString &contactId, Kopete::MetaContact *parentContact); + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); private slots: // void updateAccountId(); private: WPProtocol *mProtocol; - QString theAwayMessage; // The message to give when the user is away + TQString theAwayMessage; // The message to give when the user is away }; #endif diff --git a/kopete/protocols/winpopup/wpaddcontact.cpp b/kopete/protocols/winpopup/wpaddcontact.cpp index 6187c644..e5912c14 100644 --- a/kopete/protocols/winpopup/wpaddcontact.cpp +++ b/kopete/protocols/winpopup/wpaddcontact.cpp @@ -18,7 +18,7 @@ * * ***************************************************************************/ // QT Includes -#include <qlayout.h> +#include <tqlayout.h> // KDE Includes #include <kcombobox.h> @@ -36,14 +36,14 @@ #include "wpaccount.h" #include "wpaddcontact.h" -WPAddContact::WPAddContact(QWidget *parent, WPAccount *newAccount, const char *name) : AddContactPage(parent, name) +WPAddContact::WPAddContact(TQWidget *parent, WPAccount *newAccount, const char *name) : AddContactPage(parent, name) { // kdDebug(14170) << "WPAddContact::WPAddContact(<owner>, " << newAccount << ", <parent>, " << name << ")" << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); theDialog = new WPAddContactBase(this); - connect(theDialog->mHostGroup, SIGNAL(activated(const QString &)), this, SLOT(slotSelected(const QString &))); - connect(theDialog->mRefresh, SIGNAL(clicked()), this, SLOT(slotUpdateGroups())); + connect(theDialog->mHostGroup, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSelected(const TQString &))); + connect(theDialog->mRefresh, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdateGroups())); theDialog->show(); theAccount = newAccount; @@ -61,22 +61,22 @@ void WPAddContact::slotUpdateGroups() kdDebug(14170) << "WPAddContact::slotUpdateGroups()" << endl; theDialog->mHostGroup->clear(); - QStringList Groups = theAccount->getGroups(); - QStringList::ConstIterator end = Groups.end(); - for (QStringList::ConstIterator i = Groups.begin(); i != end; i++) + TQStringList Groups = theAccount->getGroups(); + TQStringList::ConstIterator end = Groups.end(); + for (TQStringList::ConstIterator i = Groups.begin(); i != end; i++) theDialog->mHostGroup->insertItem(SmallIcon("network"), *i); slotSelected(theDialog->mHostGroup->currentText()); } -void WPAddContact::slotSelected(const QString &Group) +void WPAddContact::slotSelected(const TQString &Group) { kdDebug(14170) << "WPAddContact::slotSelected(" << Group << ")" << endl; theDialog->mHostName->clear(); - QStringList Hosts = theAccount->getHosts(Group); - QString ownHost = theAccount->myself()->contactId(); - QStringList::ConstIterator end = Hosts.end(); - for (QStringList::ConstIterator i = Hosts.begin(); i != end; i++) + TQStringList Hosts = theAccount->getHosts(Group); + TQString ownHost = theAccount->myself()->contactId(); + TQStringList::ConstIterator end = Hosts.end(); + for (TQStringList::ConstIterator i = Hosts.begin(); i != end; i++) if (*i != ownHost) theDialog->mHostName->insertItem(SmallIcon("personal"), *i); } @@ -84,7 +84,7 @@ bool WPAddContact::validateData() { kdDebug(14170) << "WPAddContact::validateData()" << endl; - QString tmpHostName = theDialog->mHostName->currentText(); + TQString tmpHostName = theDialog->mHostName->currentText(); if (tmpHostName.isEmpty()) { KMessageBox::sorry(this, i18n("<qt>You must enter a valid hostname.</qt>"), i18n("WinPopup")); @@ -93,7 +93,7 @@ bool WPAddContact::validateData() // If our own host is not allowed as contact localhost should be forbidden as well, // additionally somehow localhost as contact crashes when receiving a message from it?? GF - if (tmpHostName.upper() == QString::fromLatin1("LOCALHOST")) { + if (tmpHostName.upper() == TQString::fromLatin1("LOCALHOST")) { KMessageBox::sorry(this, i18n("<qt>LOCALHOST is not allowed as contact.</qt>"), i18n("WinPopup")); return false; } diff --git a/kopete/protocols/winpopup/wpaddcontact.h b/kopete/protocols/winpopup/wpaddcontact.h index 4d593cba..156e7db9 100644 --- a/kopete/protocols/winpopup/wpaddcontact.h +++ b/kopete/protocols/winpopup/wpaddcontact.h @@ -40,7 +40,7 @@ private: WPAddContactBase *theDialog; public: - WPAddContact(QWidget *parent, WPAccount *newAccount, const char *name = 0); + WPAddContact(TQWidget *parent, WPAccount *newAccount, const char *name = 0); ~WPAddContact(); virtual bool validateData(); @@ -48,7 +48,7 @@ public: public slots: virtual bool apply(Kopete::Account *theAccount, Kopete::MetaContact *theMetaContact); - void slotSelected(const QString &Group); + void slotSelected(const TQString &Group); void slotUpdateGroups(); }; diff --git a/kopete/protocols/winpopup/wpcontact.cpp b/kopete/protocols/winpopup/wpcontact.cpp index 7cf2529c..801b9865 100644 --- a/kopete/protocols/winpopup/wpcontact.cpp +++ b/kopete/protocols/winpopup/wpcontact.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ // Qt Includes -#include <qregexp.h> +#include <tqregexp.h> // KDE Includes #include <kdebug.h> @@ -27,13 +27,13 @@ #include "wpcontact.h" #include "wpaccount.h" -WPContact::WPContact(Kopete::Account *account, const QString &newHostName, const QString &nickName, Kopete::MetaContact *metaContact) +WPContact::WPContact(Kopete::Account *account, const TQString &newHostName, const TQString &nickName, Kopete::MetaContact *metaContact) : Kopete::Contact(account, newHostName, metaContact) { // kdDebug(14170) << "WPContact::WPContact(<account>, " << newHostName << ", " << nickName << ", <parent>)" << endl; kdDebug(14170) << "WPContact::WPContact: " << this << endl; - QString theNickName = nickName; + TQString theNickName = nickName; if (theNickName.isEmpty()) { // Construct nickname from hostname with first letter to upper. GF @@ -51,17 +51,17 @@ WPContact::WPContact(Kopete::Account *account, const QString &newHostName, const // Initialise and start the periodical checking for contact's status setOnlineStatus(static_cast<WPProtocol *>(protocol())->WPOffline); - connect(&checkStatus, SIGNAL(timeout()), this, SLOT(slotCheckStatus())); + connect(&checkStatus, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus())); checkStatus.start(1000, false); } -QPtrList<KAction> * WPContact::customContextMenuActions() +TQPtrList<KAction> * WPContact::customContextMenuActions() { //myActionCollection = new KActionCollection(parent); return 0; } -void WPContact::serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData) +void WPContact::serialize(TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData) { // kdDebug(14170) << "WP::serialize(...)" << endl; @@ -72,14 +72,14 @@ Kopete::ChatSession* WPContact::manager( Kopete::Contact::CanCreateFlags /*canCr { if (m_manager == 0) { // Set up the message managers - QPtrList<Kopete::Contact> singleContact; + TQPtrList<Kopete::Contact> singleContact; singleContact.append(this); m_manager = Kopete::ChatSessionManager::self()->create( account()->myself(), singleContact, protocol() ); - connect(m_manager, SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), this, SLOT(slotSendMessage(Kopete::Message &))); - connect(m_manager, SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), m_manager, SLOT(appendMessage(Kopete::Message &))); - connect(m_manager, SIGNAL(destroyed()), this, SLOT(slotChatSessionDestroyed())); + connect(m_manager, TQT_SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), this, TQT_SLOT(slotSendMessage(Kopete::Message &))); + connect(m_manager, TQT_SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), m_manager, TQT_SLOT(appendMessage(Kopete::Message &))); + connect(m_manager, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotChatSessionDestroyed())); } return m_manager; @@ -111,7 +111,7 @@ void WPContact::slotUserInfo() if (!m_infoDialog) { m_infoDialog = new WPUserInfo( this, static_cast<WPAccount*>( account() ) ); if (!m_infoDialog) return; - connect( m_infoDialog, SIGNAL( closing() ), this, SLOT( slotCloseUserInfoDialog() ) ); + connect( m_infoDialog, TQT_SIGNAL( closing() ), this, TQT_SLOT( slotCloseUserInfoDialog() ) ); m_infoDialog->show(); } else { m_infoDialog->raise(); @@ -149,14 +149,14 @@ void WPContact::slotCheckStatus() } } -void WPContact::slotNewMessage(const QString &Body, const QDateTime &Arrival) +void WPContact::slotNewMessage(const TQString &Body, const TQDateTime &Arrival) { kdDebug(14170) << "WPContact::slotNewMessage(" << Body << ", " << Arrival.toString() << ")" << endl; - QPtrList<Kopete::Contact> contactList; + TQPtrList<Kopete::Contact> contactList; contactList.append(account()->myself()); - QRegExp subj("^Subject: ([^\n]*)\n(.*)$"); + TQRegExp subj("^Subject: ([^\n]*)\n(.*)$"); Kopete::Message msg; if(subj.search(Body) == -1) { @@ -174,7 +174,7 @@ void WPContact::slotSendMessage( Kopete::Message& message ) // Warning: this could crash kdDebug(14170) << message.to().first() << " is " << dynamic_cast<WPContact *>( message.to().first() )->contactId() << endl; - QString Message = (!message.subject().isEmpty() ? "Subject: " + message.subject() + "\n" : QString("")) + message.plainBody(); + TQString Message = (!message.subject().isEmpty() ? "Subject: " + message.subject() + "\n" : TQString("")) + message.plainBody(); WPAccount *acct = dynamic_cast<WPAccount *>(account()); WPContact *contact = dynamic_cast<WPContact *>( message.to().first() ); if (acct && contact) { diff --git a/kopete/protocols/winpopup/wpcontact.h b/kopete/protocols/winpopup/wpcontact.h index 343e07f7..d3e13251 100644 --- a/kopete/protocols/winpopup/wpcontact.h +++ b/kopete/protocols/winpopup/wpcontact.h @@ -22,11 +22,11 @@ #include <kaction.h> // Qt Includes -//#include <qvaluestack.h> -#include <qdatetime.h> -#include <qptrlist.h> -#include <qtimer.h> -#include <qstringlist.h> +//#include <tqvaluestack.h> +#include <tqdatetime.h> +#include <tqptrlist.h> +#include <tqtimer.h> +#include <tqstringlist.h> // Kopete Includes #include "kopetecontact.h" @@ -51,18 +51,18 @@ class WPContact: public Kopete::Contact Q_OBJECT public: - WPContact(Kopete::Account *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact); + WPContact(Kopete::Account *account, const TQString &userId, const TQString &fullName, Kopete::MetaContact *metaContact); // virtual bool isOnline() const; virtual bool isReachable(); - virtual QPtrList<KAction> *customContextMenuActions(); + virtual TQPtrList<KAction> *customContextMenuActions(); virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate); - virtual void serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData); + virtual void serialize(TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData); public slots: virtual void slotUserInfo(); void slotCheckStatus(); // the call back for the checkStatus timer - void slotNewMessage(const QString &Body, const QDateTime &Arrival); + void slotNewMessage(const TQString &Body, const TQDateTime &Arrival); private slots: void slotChatSessionDestroyed(); @@ -72,7 +72,7 @@ private slots: private: bool myWasConnected; // true if protocol connected at last check - QTimer checkStatus; // checks the status of this contact every second or so + TQTimer checkStatus; // checks the status of this contact every second or so // KActionCollection *myActionCollection; // holds all the protocol specific actions (not many!) Kopete::ChatSession *m_manager; diff --git a/kopete/protocols/winpopup/wpeditaccount.cpp b/kopete/protocols/winpopup/wpeditaccount.cpp index 454f5d6f..6e1d1aba 100644 --- a/kopete/protocols/winpopup/wpeditaccount.cpp +++ b/kopete/protocols/winpopup/wpeditaccount.cpp @@ -22,8 +22,8 @@ #include <unistd.h> // QT Includes -#include <qcheckbox.h> -#include <qfile.h> +#include <tqcheckbox.h> +#include <tqfile.h> // KDE Includes #include <kdebug.h> @@ -45,14 +45,14 @@ #include "wpeditaccount.h" #include "wpprotocol.h" -WPEditAccount::WPEditAccount(QWidget *parent, Kopete::Account *theAccount) +WPEditAccount::WPEditAccount(TQWidget *parent, Kopete::Account *theAccount) : WPEditAccountBase(parent), KopeteEditAccountWidget(theAccount) { kdDebug(14170) << "WPEditAccount::WPEditAccount(<parent>, <theAccount>)"; mProtocol = WPProtocol::protocol(); - QString tmpSmbcPath = KStandardDirs::findExe("smbclient"); + TQString tmpSmbcPath = KStandardDirs::findExe("smbclient"); if(account()) { mHostName->setText(account()->accountId()); @@ -65,7 +65,7 @@ WPEditAccount::WPEditAccount(QWidget *parent, Kopete::Account *theAccount) } else { // no QT/KDE function? GF - QString theHostName = QString::null; + TQString theHostName = TQString::null; char *tmp = new char[255]; if (tmp != 0) { @@ -101,7 +101,7 @@ bool WPEditAccount::validateData() return false; } - QFile smbc(mSmbcPath->url()); + TQFile smbc(mSmbcPath->url()); if (!smbc.exists()) { KMessageBox::sorry(this, i18n("<qt>You must enter a valid smbclient path.</qt>"), i18n("WinPopup")); return false; diff --git a/kopete/protocols/winpopup/wpeditaccount.h b/kopete/protocols/winpopup/wpeditaccount.h index afa521a7..4714e197 100644 --- a/kopete/protocols/winpopup/wpeditaccount.h +++ b/kopete/protocols/winpopup/wpeditaccount.h @@ -41,7 +41,7 @@ private: WPAccount *mAccount; public: - WPEditAccount(QWidget *parent, Kopete::Account *theAccount); + WPEditAccount(TQWidget *parent, Kopete::Account *theAccount); virtual bool validateData(); void writeConfig(); diff --git a/kopete/protocols/winpopup/wpprotocol.cpp b/kopete/protocols/winpopup/wpprotocol.cpp index b765438c..71d4a76a 100644 --- a/kopete/protocols/winpopup/wpprotocol.cpp +++ b/kopete/protocols/winpopup/wpprotocol.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ // QT Includes -#include <qmap.h> -#include <qdict.h> +#include <tqmap.h> +#include <tqdict.h> // KDE Includes #include <kapplication.h> @@ -48,11 +48,11 @@ typedef KGenericFactory<WPProtocol> WPProtocolFactory; K_EXPORT_COMPONENT_FACTORY( kopete_wp, WPProtocolFactory( "kopete_wp" ) ) // WP Protocol -WPProtocol::WPProtocol( QObject *parent, const char *name, const QStringList & /* args */ ) +WPProtocol::WPProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Protocol( WPProtocolFactory::instance(), parent, name ), - WPOnline( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n("Online"), i18n("Online")), + WPOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n("Online"), i18n("Online")), WPAway( Kopete::OnlineStatus::Away, 20, this, 1, "wp_away", i18n("Away"), i18n("Away")), - WPOffline( Kopete::OnlineStatus::Offline, 0, this, 2, QString::null, i18n("Offline"), i18n("Offline")) + WPOffline( Kopete::OnlineStatus::Offline, 0, this, 2, TQString::null, i18n("Offline"), i18n("Offline")) { // kdDebug(14170) << "WPProtocol::WPProtocol()" << endl; @@ -67,8 +67,8 @@ WPProtocol::WPProtocol( QObject *parent, const char *name, const QStringList & / readConfig(); popupClient = new WinPopupLib(smbClientBin, groupCheckFreq); - QObject::connect(popupClient, SIGNAL(signalNewMessage(const QString &, const QDateTime &, const QString &)), - this, SLOT(slotReceivedMessage(const QString &, const QDateTime &, const QString &))); + TQObject::connect(popupClient, TQT_SIGNAL(signalNewMessage(const TQString &, const TQDateTime &, const TQString &)), + this, TQT_SLOT(slotReceivedMessage(const TQString &, const TQDateTime &, const TQString &))); } // Destructor @@ -79,7 +79,7 @@ WPProtocol::~WPProtocol() sProtocol = 0; } -AddContactPage *WPProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *theAccount) +AddContactPage *WPProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *theAccount) { // kdDebug(14170) << "WPProtocol::createAddContactWidget(<parent>, " << theAccount << ")" << endl; @@ -87,11 +87,11 @@ AddContactPage *WPProtocol::createAddContactWidget(QWidget *parent, Kopete::Acco } Kopete::Contact *WPProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> & /* addressBookData */ ) + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> & /* addressBookData */ ) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; WPAccount *theAccount = static_cast<WPAccount *>(Kopete::AccountManager::self()->findAccount(protocol()->pluginId(), accountId)); if(!theAccount) { @@ -108,12 +108,12 @@ Kopete::Contact *WPProtocol::deserializeContact( Kopete::MetaContact *metaContac return theAccount->contacts()[contactId]; } -KopeteEditAccountWidget *WPProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *WPProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new WPEditAccount(parent, account); } -Kopete::Account *WPProtocol::createNewAccount(const QString &accountId) +Kopete::Account *WPProtocol::createNewAccount(const TQString &accountId) { return new WPAccount(this, accountId); } @@ -137,7 +137,7 @@ void WPProtocol::installSamba() { // kdDebug(14170) << "WPProtocol::installSamba()" endl; - QStringList args; + TQStringList args; args += KStandardDirs::findExe("winpopup-install.sh"); args += KStandardDirs::findExe("winpopup-send.sh"); if (KApplication::kdeinitExecWait("kdesu", args) == 0) @@ -149,13 +149,13 @@ void WPProtocol::installSamba() /** * search the contact for the new message and give it to its account */ -void WPProtocol::slotReceivedMessage(const QString &Body, const QDateTime &Time, const QString &From) +void WPProtocol::slotReceivedMessage(const TQString &Body, const TQDateTime &Time, const TQString &From) { bool foundContact = false; - QString accountKey = QString::null; - QDict<Kopete::Account> Accounts = Kopete::AccountManager::self()->accounts(protocol()); - for (QDictIterator<Kopete::Account> it(Accounts); it.current(); ++it) { - QDict<Kopete::Contact> Contacts = it.current()->contacts(); + TQString accountKey = TQString::null; + TQDict<Kopete::Account> Accounts = Kopete::AccountManager::self()->accounts(protocol()); + for (TQDictIterator<Kopete::Account> it(Accounts); it.current(); ++it) { + TQDict<Kopete::Contact> Contacts = it.current()->contacts(); Kopete::Contact *theContact = Contacts[From]; if (theContact != 0) { foundContact = true; @@ -176,7 +176,7 @@ void WPProtocol::slotReceivedMessage(const QString &Body, const QDateTime &Time, } } -void WPProtocol::sendMessage(const QString &Body, const QString &Destination) +void WPProtocol::sendMessage(const TQString &Body, const TQString &Destination) { popupClient->sendMessage(Body, Destination); } diff --git a/kopete/protocols/winpopup/wpprotocol.h b/kopete/protocols/winpopup/wpprotocol.h index 92a9e434..b54f4972 100644 --- a/kopete/protocols/winpopup/wpprotocol.h +++ b/kopete/protocols/winpopup/wpprotocol.h @@ -22,9 +22,9 @@ #define WPPROTOCOL_H // QT Includes -#include <qpixmap.h> -#include <qptrlist.h> -#include <qdatetime.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqdatetime.h> // Kopete Includes #include "kopetemetacontact.h" @@ -51,20 +51,20 @@ class WPProtocol : public Kopete::Protocol // Kopete::Protocol overloading public: - WPProtocol( QObject *parent, const char *name, const QStringList &args ); + WPProtocol( TQObject *parent, const char *name, const TQStringList &args ); ~WPProtocol(); - virtual AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *theAccount); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *theAccount); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); - const QStringList getGroups() {return popupClient->getGroups(); } - const QStringList getHosts(const QString &Group) { return popupClient->getHosts(Group); } - bool checkHost(const QString &Name) { return popupClient->checkHost(Name); } + const TQStringList getGroups() {return popupClient->getGroups(); } + const TQStringList getHosts(const TQString &Group) { return popupClient->getHosts(Group); } + bool checkHost(const TQString &Name) { return popupClient->checkHost(Name); } // Kopete::Plugin overloading public: - virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData, const QMap<QString, QString> &addressBookData); + virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> &addressBookData); // Stuff used internally & by colleague classes public: @@ -73,15 +73,15 @@ public: const Kopete::OnlineStatus WPOnline; const Kopete::OnlineStatus WPAway; const Kopete::OnlineStatus WPOffline; - void sendMessage(const QString &Body, const QString &Destination); + void sendMessage(const TQString &Body, const TQString &Destination); void settingsChanged(void); // Callback when settings changed public slots: void installSamba(); // Modify smb.conf to use winpopup-send.sh script - void slotReceivedMessage(const QString &Body, const QDateTime &Time, const QString &From); + void slotReceivedMessage(const TQString &Body, const TQDateTime &Time, const TQString &From); private: - QString smbClientBin; + TQString smbClientBin; int groupCheckFreq; void readConfig(); WinPopupLib *popupClient; diff --git a/kopete/protocols/winpopup/wpuserinfo.cpp b/kopete/protocols/winpopup/wpuserinfo.cpp index 7e4348d4..e50805f5 100644 --- a/kopete/protocols/winpopup/wpuserinfo.cpp +++ b/kopete/protocols/winpopup/wpuserinfo.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ // QT Includes -#include <qregexp.h> +#include <tqregexp.h> // KDE Includes #include <kdebug.h> @@ -32,8 +32,8 @@ #include "wpaccount.h" #include "wpcontact.h" -WPUserInfo::WPUserInfo( WPContact *contact, WPAccount */*account*/, QWidget *parent, const char* name ) - : KDialogBase( parent, name, false, QString::null, Close, Close, false ), m_contact(contact), +WPUserInfo::WPUserInfo( WPContact *contact, WPAccount */*account*/, TQWidget *parent, const char* name ) + : KDialogBase( parent, name, false, TQString::null, Close, Close, false ), m_contact(contact), Comment(i18n("N/A")), Workgroup(i18n("N/A")), OS(i18n("N/A")), Software(i18n("N/A")) { // kdDebug( 14170 ) << k_funcinfo << endl; @@ -50,23 +50,23 @@ WPUserInfo::WPUserInfo( WPContact *contact, WPAccount */*account*/, QWidget *par m_mainWidget->sOS->setText(i18n("Looking")); m_mainWidget->sServer->setText(i18n("Looking")); - connect( this, SIGNAL( closeClicked() ), this, SLOT( slotCloseClicked() ) ); + connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( slotCloseClicked() ) ); startDetailsProcess(m_contact->contactId()); } // I decided to do this direct here to avoid "Handstände" with signals and stuff // if we would do this in libwinpopup. GF -void WPUserInfo::startDetailsProcess(const QString &host) +void WPUserInfo::startDetailsProcess(const TQString &host) { KGlobal::config()->setGroup("WinPopup"); - QString theSMBClientPath = KGlobal::config()->readEntry("SMBClientPath", "/usr/bin/smbclient"); + TQString theSMBClientPath = KGlobal::config()->readEntry("SMBClientPath", "/usr/bin/smbclient"); KProcIO *details = new KProcIO; *details << theSMBClientPath << "-N" << "-E" << "-g" << "-L" << host << "-"; - connect(details, SIGNAL(readReady(KProcIO *)), this, SLOT(slotDetailsProcessReady(KProcIO *))); - connect(details, SIGNAL(processExited(KProcess *)), this, SLOT(slotDetailsProcessExited(KProcess *))); + connect(details, TQT_SIGNAL(readReady(KProcIO *)), this, TQT_SLOT(slotDetailsProcessReady(KProcIO *))); + connect(details, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotDetailsProcessExited(KProcess *))); if (!details->start(KProcess::NotifyOnExit, KProcess::Stderr)) { slotDetailsProcessExited(details); @@ -76,8 +76,8 @@ void WPUserInfo::startDetailsProcess(const QString &host) void WPUserInfo::slotDetailsProcessReady(KProcIO *d) { - QString tmpLine = QString::null; - QRegExp info("^Domain=\\[(.*)\\]\\sOS=\\[(.*)\\]\\sServer=\\[(.*)\\]$"), host("^Server\\|(.*)\\|(.*)$"); + TQString tmpLine = TQString::null; + TQRegExp info("^Domain=\\[(.*)\\]\\sOS=\\[(.*)\\]\\sServer=\\[(.*)\\]$"), host("^Server\\|(.*)\\|(.*)$"); while (d->readln(tmpLine) > -1) { if (info.search(tmpLine) != -1) { diff --git a/kopete/protocols/winpopup/wpuserinfo.h b/kopete/protocols/winpopup/wpuserinfo.h index 1c4ce0e9..2059ba2c 100644 --- a/kopete/protocols/winpopup/wpuserinfo.h +++ b/kopete/protocols/winpopup/wpuserinfo.h @@ -36,9 +36,9 @@ class WPUserInfo : public KDialogBase Q_OBJECT public: - WPUserInfo( WPContact *, WPAccount *, QWidget *parent = 0, const char* name = "WPUserInfo" ); + WPUserInfo( WPContact *, WPAccount *, TQWidget *parent = 0, const char* name = "WPUserInfo" ); - void startDetailsProcess(const QString &host); + void startDetailsProcess(const TQString &host); private slots: void slotDetailsProcessReady(KProcIO *d); @@ -52,7 +52,7 @@ class WPUserInfo : public KDialogBase WPContact *m_contact; WPUserInfoWidget *m_mainWidget; - QString Comment, Workgroup, OS, Software; + TQString Comment, Workgroup, OS, Software; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/bytestream.cpp b/kopete/protocols/yahoo/libkyahoo/bytestream.cpp index ad299bf8..8ca3a4cd 100644 --- a/kopete/protocols/yahoo/libkyahoo/bytestream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/bytestream.cpp @@ -36,7 +36,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>. +//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -60,13 +60,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { // kdDebug(14181) << k_funcinfo << endl; d = new Private; @@ -97,7 +97,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { // kdDebug(14181) << k_funcinfo << "[data size: " << a.size() << "]" << endl; @@ -115,7 +115,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { // kdDebug(14181) << k_funcinfo << " " << bytes <<" [bytes]"<< endl; return takeRead(bytes); @@ -138,11 +138,11 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { // kdDebug(14181) << k_funcinfo << "[data size: " << cs.length() << "]" << endl; - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -163,7 +163,7 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { // kdDebug(14181) << k_funcinfo << endl; appendArray(&d->readBuf, block); @@ -171,7 +171,7 @@ void ByteStream::appendRead(const QByteArray &block) //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { // kdDebug(14181) << k_funcinfo << "[data size: " << block.size() << "]" << endl; @@ -182,7 +182,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { // kdDebug(14181) << k_funcinfo << "[data size: " << size << "][ delete :" << del << " ]" << endl; return takeArray(&d->readBuf, size, del); @@ -192,7 +192,7 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { // kdDebug(14181) << k_funcinfo << "[data size: " << size << "][ delete :" << del << " ]" << endl; return takeArray(&d->writeBuf, size, del); @@ -200,14 +200,14 @@ QByteArray ByteStream::takeWrite(int size, bool del) //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { // kdDebug(14181) << k_funcinfo << endl; return d->writeBuf; @@ -224,7 +224,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { // kdDebug(14181) << k_funcinfo << endl; int oldsize = a->size(); @@ -236,11 +236,11 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { // kdDebug(14181) << k_funcinfo << "[int size] : " << size << " [bool del] " << del << endl; - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/yahoo/libkyahoo/bytestream.h b/kopete/protocols/yahoo/libkyahoo/bytestream.h index 1c2dfa15..a990a940 100644 --- a/kopete/protocols/yahoo/libkyahoo/bytestream.h +++ b/kopete/protocols/yahoo/libkyahoo/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include <qobject.h> -#include <qcstring.h> +#include <tqobject.h> +#include <tqcstring.h> // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp b/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp index 3d73920c..1943aa6b 100644 --- a/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp @@ -69,7 +69,7 @@ void ChangeStatusTask::sendVisibility( Visibility visible ) send( t ); } -void ChangeStatusTask::setMessage( const QString &msg ) +void ChangeStatusTask::setMessage( const TQString &msg ) { m_message = msg; } diff --git a/kopete/protocols/yahoo/libkyahoo/changestatustask.h b/kopete/protocols/yahoo/libkyahoo/changestatustask.h index 22c48031..a70007df 100644 --- a/kopete/protocols/yahoo/libkyahoo/changestatustask.h +++ b/kopete/protocols/yahoo/libkyahoo/changestatustask.h @@ -35,12 +35,12 @@ public: virtual void onGo(); - void setMessage( const QString &msg ); + void setMessage( const TQString &msg ); void setStatus( Yahoo::Status status ); void setType( Yahoo::StatusType type ); private: enum Visibility { Visible = 1, Invisible = 2 }; - QString m_message; + TQString m_message; Yahoo::Status m_status; Yahoo::StatusType m_type; diff --git a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp index cacd7f80..3be83a79 100644 --- a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp @@ -21,7 +21,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> ChatSessionTask::ChatSessionTask(Task* parent) : Task(parent) @@ -55,7 +55,7 @@ void ChatSessionTask::onGo() setSuccess(); } -void ChatSessionTask::setTarget( const QString &to ) +void ChatSessionTask::setTarget( const TQString &to ) { m_target = to; } diff --git a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h index 964ff411..fc5e02ce 100644 --- a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h +++ b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h @@ -35,10 +35,10 @@ public: virtual void onGo(); - void setTarget( const QString &to ); + void setTarget( const TQString &to ); void setType( Type type ); private: - QString m_target; + TQString m_target; Type m_type; }; diff --git a/kopete/protocols/yahoo/libkyahoo/client.cpp b/kopete/protocols/yahoo/libkyahoo/client.cpp index 710da771..d2a4b8dd 100644 --- a/kopete/protocols/yahoo/libkyahoo/client.cpp +++ b/kopete/protocols/yahoo/libkyahoo/client.cpp @@ -19,8 +19,8 @@ ************************************************************************* */ -#include <qtimer.h> -#include <qpixmap.h> +#include <tqtimer.h> +#include <tqpixmap.h> #include <kdebug.h> #include <ksocketbase.h> @@ -67,13 +67,13 @@ public: ClientStream *stream; int id_seed; Task *root; - QString host, user, pass; + TQString host, user, pass; uint port; bool active; YahooBuddyIconLoader *iconLoader; int error; - QString errorString; - QString errorInformation; + TQString errorString; + TQString errorInformation; // tasks bool tasksInitialized; @@ -92,19 +92,19 @@ public: // Connection data uint sessionID; - QString yCookie; - QString tCookie; - QString cCookie; + TQString yCookie; + TQString tCookie; + TQString cCookie; Yahoo::Status status; Yahoo::Status statusOnConnect; - QString statusMessageOnConnect; + TQString statusMessageOnConnect; Yahoo::PictureStatus pictureFlag; int pictureChecksum; bool buddyListReady; - QStringList pictureRequestQueue; + TQStringList pictureRequestQueue; }; -Client::Client(QObject *par) :QObject(par, "yahooclient") +Client::Client(TQObject *par) :TQObject(par, "yahooclient") { d = new ClientPrivate; /* d->tzoffset = 0;*/ @@ -122,18 +122,18 @@ Client::Client(QObject *par) :QObject(par, "yahooclient") d->buddyListReady = false; m_connector = 0L; - m_pingTimer = new QTimer( this ); - QObject::connect( m_pingTimer, SIGNAL( timeout() ), this, SLOT( sendPing() ) ); + m_pingTimer = new TQTimer( this ); + TQObject::connect( m_pingTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( sendPing() ) ); - QObject::connect( d->loginTask, SIGNAL( haveSessionID( uint ) ), SLOT( lt_gotSessionID( uint ) ) ); - QObject::connect( d->loginTask, SIGNAL( buddyListReady() ), SLOT( processPictureQueue() ) ); - QObject::connect( d->loginTask, SIGNAL( loginResponse( int, const QString& ) ), - SLOT( slotLoginResponse( int, const QString& ) ) ); - QObject::connect( d->loginTask, SIGNAL( haveCookies() ), SLOT( slotGotCookies() ) ); - QObject::connect( d->listTask, SIGNAL( gotBuddy(const QString &, const QString &, const QString &) ), - SIGNAL( gotBuddy(const QString &, const QString &, const QString &) ) ); - QObject::connect( d->listTask, SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ), - SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( haveSessionID( uint ) ), TQT_SLOT( lt_gotSessionID( uint ) ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( buddyListReady() ), TQT_SLOT( processPictureQueue() ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( loginResponse( int, const TQString& ) ), + TQT_SLOT( slotLoginResponse( int, const TQString& ) ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( haveCookies() ), TQT_SLOT( slotGotCookies() ) ); + TQObject::connect( d->listTask, TQT_SIGNAL( gotBuddy(const TQString &, const TQString &, const TQString &) ), + TQT_SIGNAL( gotBuddy(const TQString &, const TQString &, const TQString &) ) ); + TQObject::connect( d->listTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ), + TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ) ); } Client::~Client() @@ -144,7 +144,7 @@ Client::~Client() delete d; } -void Client::connect( const QString &host, const uint port, const QString &userId, const QString &pass ) +void Client::connect( const TQString &host, const uint port, const TQString &userId, const TQString &pass ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; d->host = host; @@ -156,10 +156,10 @@ void Client::connect( const QString &host, const uint port, const QString &userI m_connector = new KNetworkConnector; m_connector->setOptHostPort( host, port ); d->stream = new ClientStream( m_connector, this ); - QObject::connect( d->stream, SIGNAL( connected() ), this, SLOT( cs_connected() ) ); - QObject::connect( d->stream, SIGNAL( error(int) ), this, SLOT( streamError(int) ) ); - QObject::connect( d->stream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); - QObject::connect( d->stream, SIGNAL( connectionClosed() ), this, SLOT( streamDisconnected() ) ); + TQObject::connect( d->stream, TQT_SIGNAL( connected() ), this, TQT_SLOT( cs_connected() ) ); + TQObject::connect( d->stream, TQT_SIGNAL( error(int) ), this, TQT_SLOT( streamError(int) ) ); + TQObject::connect( d->stream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); + TQObject::connect( d->stream, TQT_SIGNAL( connectionClosed() ), this, TQT_SLOT( streamDisconnected() ) ); d->stream->connectToServer( host, false ); } @@ -193,7 +193,7 @@ void Client::close() deleteTasks(); d->loginTask->reset(); if( d->stream ) { - QObject::disconnect( d->stream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); + TQObject::disconnect( d->stream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); d->stream->deleteLater(); } d->stream = 0L; @@ -209,12 +209,12 @@ int Client::error() return d->error; } -QString Client::errorString() +TQString Client::errorString() { return d->errorString; } -QString Client::errorInformation() +TQString Client::errorInformation() { return d->errorInformation; } @@ -223,7 +223,7 @@ QString Client::errorInformation() void Client::streamError( int error ) { kdDebug(YAHOO_RAW_DEBUG) << "CLIENT ERROR (Error " << error << ")" << endl; - QString msg; + TQString msg; d->active = false; @@ -265,7 +265,7 @@ void Client::lt_loginFinished() slotLoginResponse( d->loginTask->statusCode(), d->loginTask->statusString() ); } -void Client::slotLoginResponse( int response, const QString &msg ) +void Client::slotLoginResponse( int response, const TQString &msg ) { if( response == Yahoo::LoginOk ) { @@ -273,7 +273,7 @@ void Client::slotLoginResponse( int response, const QString &msg ) d->statusOnConnect == Yahoo::StatusInvisible) || !d->statusMessageOnConnect.isEmpty() ) changeStatus( d->statusOnConnect, d->statusMessageOnConnect, Yahoo::StatusTypeAway ); - d->statusMessageOnConnect = QString::null; + d->statusMessageOnConnect = TQString::null; setStatus( d->statusOnConnect ); /* only send a ping every hour. we get disconnected otherwise */ m_pingTimer->start( 60 * 60 * 1000 ); @@ -306,7 +306,7 @@ void Client::slotGotCookies() // INTERNALS // // ***** Messaging handling ***** -void Client::sendTyping( const QString &who, bool typing ) +void Client::sendTyping( const TQString &who, bool typing ) { SendNotifyTask *snt = new SendNotifyTask( d->root ); snt->setTarget( who ); @@ -315,7 +315,7 @@ void Client::sendTyping( const QString &who, bool typing ) snt->go( true ); } -void Client::sendWebcamInvite( const QString &who ) +void Client::sendWebcamInvite( const TQString &who ) { if( !d->webcamTask->transmitting() ) d->webcamTask->registerWebcam(); @@ -323,7 +323,7 @@ void Client::sendWebcamInvite( const QString &who ) d->webcamTask->addPendingInvitation( who ); } -void Client::sendMessage( const QString &to, const QString &msg ) +void Client::sendMessage( const TQString &to, const TQString &msg ) { SendMessageTask *smt = new SendMessageTask( d->root ); smt->setTarget( to ); @@ -332,7 +332,7 @@ void Client::sendMessage( const QString &to, const QString &msg ) smt->go( true ); } -void Client::setChatSessionState( const QString &to, bool close ) +void Client::setChatSessionState( const TQString &to, bool close ) { ChatSessionTask *cst = new ChatSessionTask( d->root ); cst->setTarget( to ); @@ -340,24 +340,24 @@ void Client::setChatSessionState( const QString &to, bool close ) cst->go( true ); } -void Client::sendBuzz( const QString &to ) +void Client::sendBuzz( const TQString &to ) { SendMessageTask *smt = new SendMessageTask( d->root ); smt->setTarget( to ); - smt->setText( QString::fromLatin1( "<ding>" ) ); + smt->setText( TQString::fromLatin1( "<ding>" ) ); smt->setPicureFlag( pictureFlag() ); smt->go( true ); } -void Client::sendFile( unsigned int transferId, const QString &to, const QString &msg, KURL url ) +void Client::sendFile( unsigned int transferId, const TQString &to, const TQString &msg, KURL url ) { SendFileTask *sft = new SendFileTask( d->root ); - QObject::connect( sft, SIGNAL(complete(unsigned int)), SIGNAL(fileTransferComplete(unsigned int)) ); - QObject::connect( sft, SIGNAL(bytesProcessed(unsigned int, unsigned int)), SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); - QObject::connect( sft, SIGNAL(error(unsigned int, int, const QString &)), SIGNAL(fileTransferError(unsigned int, int, const QString &)) ); + TQObject::connect( sft, TQT_SIGNAL(complete(unsigned int)), TQT_SIGNAL(fileTransferComplete(unsigned int)) ); + TQObject::connect( sft, TQT_SIGNAL(bytesProcessed(unsigned int, unsigned int)), TQT_SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); + TQObject::connect( sft, TQT_SIGNAL(error(unsigned int, int, const TQString &)), TQT_SIGNAL(fileTransferError(unsigned int, int, const TQString &)) ); - QObject::connect( this, SIGNAL(fileTransferCanceled( unsigned int )), sft, SLOT(canceled( unsigned int )) ); + TQObject::connect( this, TQT_SIGNAL(fileTransferCanceled( unsigned int )), sft, TQT_SLOT(canceled( unsigned int )) ); sft->setTarget( to ); sft->setMessage( msg ); @@ -366,14 +366,14 @@ void Client::sendFile( unsigned int transferId, const QString &to, const QString sft->go( true ); } -void Client::receiveFile( unsigned int transferId, const QString &userId, KURL remoteURL, KURL localURL ) +void Client::receiveFile( unsigned int transferId, const TQString &userId, KURL remoteURL, KURL localURL ) { ReceiveFileTask *rft = new ReceiveFileTask( d->root ); - QObject::connect( rft, SIGNAL(complete(unsigned int)), SIGNAL(fileTransferComplete(unsigned int)) ); - QObject::connect( rft, SIGNAL(bytesProcessed(unsigned int, unsigned int)), SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); - QObject::connect( rft, SIGNAL(error(unsigned int, int, const QString &)), SIGNAL(fileTransferError(unsigned int, int, const QString &)) ); - QObject::connect( this, SIGNAL(fileTransferCanceled( unsigned int )), rft, SLOT(canceled( unsigned int )) ); + TQObject::connect( rft, TQT_SIGNAL(complete(unsigned int)), TQT_SIGNAL(fileTransferComplete(unsigned int)) ); + TQObject::connect( rft, TQT_SIGNAL(bytesProcessed(unsigned int, unsigned int)), TQT_SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); + TQObject::connect( rft, TQT_SIGNAL(error(unsigned int, int, const TQString &)), TQT_SIGNAL(fileTransferError(unsigned int, int, const TQString &)) ); + TQObject::connect( this, TQT_SIGNAL(fileTransferCanceled( unsigned int )), rft, TQT_SLOT(canceled( unsigned int )) ); rft->setRemoteUrl( remoteURL ); rft->setLocalUrl( localURL ); @@ -386,7 +386,7 @@ void Client::receiveFile( unsigned int transferId, const QString &userId, KURL r rft->go( true ); } -void Client::rejectFile( const QString &userId, KURL remoteURL ) +void Client::rejectFile( const TQString &userId, KURL remoteURL ) { if( remoteURL.url().startsWith( "http://" ) ) return; @@ -404,7 +404,7 @@ void Client::cancelFileTransfer( unsigned int transferId ) emit fileTransferCanceled( transferId ); } -void Client::changeStatus( Yahoo::Status status, const QString &message, Yahoo::StatusType type ) +void Client::changeStatus( Yahoo::Status status, const TQString &message, Yahoo::StatusType type ) { kdDebug(YAHOO_RAW_DEBUG) << "status: " << status << " message: " << message @@ -416,12 +416,12 @@ void Client::changeStatus( Yahoo::Status status, const QString &message, Yahoo:: cst->go( true ); if( status == Yahoo::StatusInvisible ) - stealthContact( QString(), Yahoo::StealthOnline, Yahoo::StealthClear ); + stealthContact( TQString(), Yahoo::StealthOnline, Yahoo::StealthClear ); setStatus( status ); } -void Client::sendAuthReply( const QString &userId, bool accept, const QString &msg ) +void Client::sendAuthReply( const TQString &userId, bool accept, const TQString &msg ) { SendAuthRespTask *sarp = new SendAuthRespTask( d->root ); sarp->setGranted( accept ); @@ -444,7 +444,7 @@ void Client::sendPing() // ***** Contactlist handling ***** -void Client::stealthContact(QString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state) +void Client::stealthContact(TQString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state) { StealthTask *st = new StealthTask( d->root ); st->setTarget( userId ); @@ -453,12 +453,12 @@ void Client::stealthContact(QString const &userId, Yahoo::StealthMode mode, Yaho st->go( true ); } -void Client::addBuddy( const QString &userId, const QString &group, const QString &message ) +void Client::addBuddy( const TQString &userId, const TQString &group, const TQString &message ) { ModifyBuddyTask *mbt = new ModifyBuddyTask( d->root ); - QObject::connect(mbt, SIGNAL(buddyAddResult( const QString &, const QString &, bool )), - SIGNAL(buddyAddResult( const QString &, const QString &, bool))); + TQObject::connect(mbt, TQT_SIGNAL(buddyAddResult( const TQString &, const TQString &, bool )), + TQT_SIGNAL(buddyAddResult( const TQString &, const TQString &, bool))); mbt->setType( ModifyBuddyTask::AddBuddy ); mbt->setTarget( userId ); @@ -467,12 +467,12 @@ void Client::addBuddy( const QString &userId, const QString &group, const QStrin mbt->go( true ); } -void Client::removeBuddy( const QString &userId, const QString &group ) +void Client::removeBuddy( const TQString &userId, const TQString &group ) { ModifyBuddyTask *mbt = new ModifyBuddyTask( d->root ); - QObject::connect(mbt, SIGNAL(buddyRemoveResult( const QString &, const QString &, bool )), - SIGNAL(buddyRemoveResult( const QString &, const QString &, bool))); + TQObject::connect(mbt, TQT_SIGNAL(buddyRemoveResult( const TQString &, const TQString &, bool )), + TQT_SIGNAL(buddyRemoveResult( const TQString &, const TQString &, bool))); mbt->setType( ModifyBuddyTask::RemoveBuddy ); mbt->setTarget( userId ); @@ -480,12 +480,12 @@ void Client::removeBuddy( const QString &userId, const QString &group ) mbt->go( true ); } -void Client::moveBuddy( const QString &userId, const QString &oldGroup, const QString &newGroup ) +void Client::moveBuddy( const TQString &userId, const TQString &oldGroup, const TQString &newGroup ) { ModifyBuddyTask *mbt = new ModifyBuddyTask( d->root ); - QObject::connect(mbt, SIGNAL(buddyChangeGroupResult( const QString &, const QString &, bool )), - SIGNAL(buddyChangeGroupResult( const QString &, const QString &, bool))); + TQObject::connect(mbt, TQT_SIGNAL(buddyChangeGroupResult( const TQString &, const TQString &, bool )), + TQT_SIGNAL(buddyChangeGroupResult( const TQString &, const TQString &, bool))); mbt->setType( ModifyBuddyTask::MoveBuddy ); mbt->setTarget( userId ); @@ -511,11 +511,11 @@ void Client::processPictureQueue() if( !d->pictureRequestQueue.isEmpty() ) { - QTimer::singleShot( 1000, this, SLOT(processPictureQueue()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(processPictureQueue()) ); } } -void Client::requestPicture( const QString &userId ) +void Client::requestPicture( const TQString &userId ) { if( !d->buddyListReady ) { @@ -528,16 +528,16 @@ void Client::requestPicture( const QString &userId ) rpt->go( true ); } -void Client::downloadPicture( const QString &userId, KURL url, int checksum ) +void Client::downloadPicture( const TQString &userId, KURL url, int checksum ) { if( !d->iconLoader ) { d->iconLoader = new YahooBuddyIconLoader( this ); - QObject::connect( d->iconLoader, SIGNAL(fetchedBuddyIcon(const QString&, const QByteArray &, int )), - SIGNAL(pictureDownloaded(const QString&, const QByteArray &, int ) ) ); + TQObject::connect( d->iconLoader, TQT_SIGNAL(fetchedBuddyIcon(const TQString&, const TQByteArray &, int )), + TQT_SIGNAL(pictureDownloaded(const TQString&, const TQByteArray &, int ) ) ); } - d->iconLoader->fetchBuddyIcon( QString(userId), KURL(url), checksum ); + d->iconLoader->fetchBuddyIcon( TQString(userId), KURL(url), checksum ); } void Client::uploadPicture( KURL url ) @@ -553,7 +553,7 @@ void Client::uploadPicture( KURL url ) spt->go( true ); } -void Client::sendPictureChecksum( const QString &userId, int checksum ) +void Client::sendPictureChecksum( const TQString &userId, int checksum ) { kdDebug(YAHOO_RAW_DEBUG) << "checksum: " << checksum << endl; SendPictureTask *spt = new SendPictureTask( d->root ); @@ -564,7 +564,7 @@ void Client::sendPictureChecksum( const QString &userId, int checksum ) spt->go( true ); } -void Client::sendPictureInformation( const QString &userId, const QString &url, int checksum ) +void Client::sendPictureInformation( const TQString &userId, const TQString &url, int checksum ) { kdDebug(YAHOO_RAW_DEBUG) << "checksum: " << checksum << endl; SendPictureTask *spt = new SendPictureTask( d->root ); @@ -590,17 +590,17 @@ void Client::setPictureStatus( Yahoo::PictureStatus status ) // ***** Webcam handling ***** -void Client::requestWebcam( const QString &userId ) +void Client::requestWebcam( const TQString &userId ) { d->webcamTask->requestWebcam( userId ); } -void Client::closeWebcam( const QString &userId ) +void Client::closeWebcam( const TQString &userId ) { d->webcamTask->closeWebcam( userId ); } -void Client::sendWebcamImage( const QByteArray &ar ) +void Client::sendWebcamImage( const TQByteArray &ar ) { d->webcamTask->sendWebcamImage( ar ); } @@ -611,38 +611,38 @@ void Client::closeOutgoingWebcam() } -void Client::grantWebcamAccess( const QString &userId ) +void Client::grantWebcamAccess( const TQString &userId ) { d->webcamTask->grantAccess( userId ); } // ***** Conferences ***** -void Client::inviteConference( const QString &room, const QStringList &members, const QString &msg ) +void Client::inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ) { d->conferenceTask->inviteConference( room, members, msg ); } -void Client::addInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ) +void Client::addInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ) { d->conferenceTask->addInvite( room, who, members, msg ); } -void Client::joinConference( const QString &room, const QStringList &members ) +void Client::joinConference( const TQString &room, const TQStringList &members ) { d->conferenceTask->joinConference( room, members ); } -void Client::declineConference( const QString &room, const QStringList &members, const QString &msg ) +void Client::declineConference( const TQString &room, const TQStringList &members, const TQString &msg ) { d->conferenceTask->declineConference( room, members, msg ); } -void Client::leaveConference( const QString &room, const QStringList &members ) +void Client::leaveConference( const TQString &room, const TQStringList &members ) { d->conferenceTask->leaveConference( room, members ); } -void Client::sendConferenceMessage( const QString &room, const QStringList &members, const QString &msg ) +void Client::sendConferenceMessage( const TQString &room, const TQStringList &members, const TQString &msg ) { d->conferenceTask->sendMessage( room, members, msg ); } @@ -658,8 +658,8 @@ void Client::saveYABEntry( YABEntry &entry ) ModifyYABTask *myt = new ModifyYABTask( d->root ); myt->setAction( ModifyYABTask::EditEntry ); myt->setEntry( entry ); - QObject::connect( myt, SIGNAL(gotEntry( YABEntry * )), this, SIGNAL( gotYABEntry( YABEntry * ) ) ); - QObject::connect( myt, SIGNAL(error( YABEntry *, const QString &)), this, SIGNAL(modifyYABEntryError( YABEntry *, const QString & ))); + TQObject::connect( myt, TQT_SIGNAL(gotEntry( YABEntry * )), this, TQT_SIGNAL( gotYABEntry( YABEntry * ) ) ); + TQObject::connect( myt, TQT_SIGNAL(error( YABEntry *, const TQString &)), this, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & ))); myt->go(true); } @@ -668,8 +668,8 @@ void Client::addYABEntry( YABEntry &entry ) ModifyYABTask *myt = new ModifyYABTask( d->root ); myt->setAction( ModifyYABTask::AddEntry ); myt->setEntry( entry ); - QObject::connect( myt, SIGNAL(gotEntry( YABEntry * )), this, SIGNAL( gotYABEntry( YABEntry * ) ) ); - QObject::connect( myt, SIGNAL(error( YABEntry *, const QString &)), this, SIGNAL(modifyYABEntryError( YABEntry *, const QString & ))); + TQObject::connect( myt, TQT_SIGNAL(gotEntry( YABEntry * )), this, TQT_SIGNAL( gotYABEntry( YABEntry * ) ) ); + TQObject::connect( myt, TQT_SIGNAL(error( YABEntry *, const TQString &)), this, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & ))); myt->go(true); } @@ -697,7 +697,7 @@ void Client::joinYahooChatRoom( const Yahoo::ChatRoom &room ) d->yahooChatTask->joinRoom( room ); } -void Client::sendYahooChatMessage( const QString &msg, const QString &handle ) +void Client::sendYahooChatMessage( const TQString &msg, const TQString &handle ) { d->yahooChatTask->sendYahooChatMessage( msg, handle ); } @@ -708,21 +708,21 @@ void Client::leaveChat() } // ***** other ***** -void Client::notifyError( const QString &info, const QString & errorString, LogLevel level ) +void Client::notifyError( const TQString &info, const TQString & errorString, LogLevel level ) { - kdDebug(YAHOO_RAW_DEBUG) << QString::fromLatin1("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3") + kdDebug(YAHOO_RAW_DEBUG) << TQString::fromLatin1("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3") .arg(info).arg(errorString).arg(level) << endl; d->errorString = errorString; d->errorInformation = info; emit error( level ); } -QString Client::userId() +TQString Client::userId() { return d->user; } -void Client::setUserId( const QString & userId ) +void Client::setUserId( const TQString & userId ) { d->user = userId; } @@ -743,22 +743,22 @@ void Client::setStatusOnConnect( Yahoo::Status status ) d->statusOnConnect = status; } -void Client::setStatusMessageOnConnect( const QString &msg ) +void Client::setStatusMessageOnConnect( const TQString &msg ) { d->statusMessageOnConnect = msg; } -void Client::setVerificationWord( const QString &word ) +void Client::setVerificationWord( const TQString &word ) { d->loginTask->setVerificationWord( word ); } -QString Client::password() +TQString Client::password() { return d->pass; } -QString Client::host() +TQString Client::host() { return d->host; } @@ -788,17 +788,17 @@ void Client::setPictureChecksum( int cs ) d->pictureChecksum = cs; } -QString Client::yCookie() +TQString Client::yCookie() { return d->yCookie; } -QString Client::tCookie() +TQString Client::tCookie() { return d->tCookie; } -QString Client::cCookie() +TQString Client::cCookie() { return d->cCookie; } @@ -823,7 +823,7 @@ void Client::send( Transfer* request ) d->stream->write( request ); } -void Client::debug(const QString &str) +void Client::debug(const TQString &str) { qDebug( "CLIENT: %s", str.ascii() ); } @@ -839,104 +839,104 @@ void Client::initTasks() return; d->statusTask = new StatusNotifierTask( d->root ); - QObject::connect( d->statusTask, SIGNAL( statusChanged(const QString&,int,const QString&,int,int,int) ), - SIGNAL( statusChanged(const QString&,int,const QString&,int,int,int) ) ); - QObject::connect( d->statusTask, SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ), - SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) ); - QObject::connect( d->statusTask, SIGNAL( loginResponse( int, const QString& ) ), - SLOT( slotLoginResponse( int, const QString& ) ) ); - QObject::connect( d->statusTask, SIGNAL( authorizationRejected( const QString&, const QString& ) ), - SIGNAL( authorizationRejected( const QString&, const QString& ) ) ); - QObject::connect( d->statusTask, SIGNAL( authorizationAccepted( const QString& ) ), - SIGNAL( authorizationAccepted( const QString& ) ) ); - QObject::connect( d->statusTask, SIGNAL( gotAuthorizationRequest( const QString &, const QString &, const QString & ) ), - SIGNAL( gotAuthorizationRequest( const QString &, const QString &, const QString & ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( statusChanged(const TQString&,int,const TQString&,int,int,int) ), + TQT_SIGNAL( statusChanged(const TQString&,int,const TQString&,int,int,int) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ), + TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( loginResponse( int, const TQString& ) ), + TQT_SLOT( slotLoginResponse( int, const TQString& ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( authorizationRejected( const TQString&, const TQString& ) ), + TQT_SIGNAL( authorizationRejected( const TQString&, const TQString& ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( authorizationAccepted( const TQString& ) ), + TQT_SIGNAL( authorizationAccepted( const TQString& ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL( gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ) ) ); d->mailTask = new MailNotifierTask( d->root ); - QObject::connect( d->mailTask, SIGNAL( mailNotify(const QString&, const QString&, int) ), - SIGNAL( mailNotify(const QString&, const QString&, int) ) ); + TQObject::connect( d->mailTask, TQT_SIGNAL( mailNotify(const TQString&, const TQString&, int) ), + TQT_SIGNAL( mailNotify(const TQString&, const TQString&, int) ) ); d->messageReceiverTask = new MessageReceiverTask( d->root ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotIm(const QString&, const QString&, long, int) ), - SIGNAL( gotIm(const QString&, const QString&, long, int) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( systemMessage(const QString&) ), - SIGNAL( systemMessage(const QString&) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotTypingNotify(const QString &, int) ), - SIGNAL( typingNotify(const QString &, int) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotBuzz( const QString &, long ) ), - SIGNAL( gotBuzz( const QString &, long ) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotWebcamInvite(const QString &) ), - SIGNAL( gotWebcamInvite(const QString &) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotIm(const TQString&, const TQString&, long, int) ), + TQT_SIGNAL( gotIm(const TQString&, const TQString&, long, int) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( systemMessage(const TQString&) ), + TQT_SIGNAL( systemMessage(const TQString&) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotTypingNotify(const TQString &, int) ), + TQT_SIGNAL( typingNotify(const TQString &, int) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotBuzz( const TQString &, long ) ), + TQT_SIGNAL( gotBuzz( const TQString &, long ) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotWebcamInvite(const TQString &) ), + TQT_SIGNAL( gotWebcamInvite(const TQString &) ) ); d->pictureNotifierTask = new PictureNotifierTask( d->root ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureStatusNotify( const QString &, int ) ), - SIGNAL( pictureStatusNotify( const QString &, int ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureChecksumNotify( const QString &, int ) ), - SIGNAL( pictureChecksumNotify( const QString &, int ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureInfoNotify( const QString &, KURL, int ) ), - SIGNAL( pictureInfoNotify( const QString &, KURL, int ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureRequest( const QString & ) ), - SIGNAL( pictureRequest( const QString & ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureUploaded( const QString &, int ) ), - SIGNAL( pictureUploaded( const QString &, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureStatusNotify( const TQString &, int ) ), + TQT_SIGNAL( pictureStatusNotify( const TQString &, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureChecksumNotify( const TQString &, int ) ), + TQT_SIGNAL( pictureChecksumNotify( const TQString &, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureInfoNotify( const TQString &, KURL, int ) ), + TQT_SIGNAL( pictureInfoNotify( const TQString &, KURL, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureRequest( const TQString & ) ), + TQT_SIGNAL( pictureRequest( const TQString & ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureUploaded( const TQString &, int ) ), + TQT_SIGNAL( pictureUploaded( const TQString &, int ) ) ); d->webcamTask = new WebcamTask( d->root ); - QObject::connect( d->webcamTask, SIGNAL( webcamImageReceived( const QString &, const QPixmap &) ), - SIGNAL( webcamImageReceived( const QString &, const QPixmap &) ) ); - QObject::connect( d->webcamTask, SIGNAL( webcamNotAvailable( const QString & ) ), - SIGNAL( webcamNotAvailable( const QString & ) ) ); - QObject::connect( d->webcamTask, SIGNAL( webcamClosed( const QString &, int ) ), - SIGNAL( webcamClosed( const QString &, int ) ) ); - QObject::connect( d->webcamTask, SIGNAL( webcamPaused(const QString&) ), - SIGNAL( webcamPaused(const QString&) ) ); - QObject::connect( d->webcamTask, SIGNAL( readyForTransmission() ), - SIGNAL( webcamReadyForTransmission() ) ); - QObject::connect( d->webcamTask, SIGNAL( stopTransmission() ), - SIGNAL( webcamStopTransmission() ) ); - QObject::connect( d->webcamTask, SIGNAL( viewerJoined( const QString &) ), - SIGNAL( webcamViewerJoined( const QString &) ) ); - QObject::connect( d->webcamTask, SIGNAL( viewerLeft( const QString &) ), - SIGNAL( webcamViewerLeft( const QString &) ) ); - QObject::connect( d->webcamTask, SIGNAL( viewerRequest( const QString &) ), - SIGNAL( webcamViewerRequest( const QString &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamImageReceived( const TQString &, const TQPixmap &) ), + TQT_SIGNAL( webcamImageReceived( const TQString &, const TQPixmap &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamNotAvailable( const TQString & ) ), + TQT_SIGNAL( webcamNotAvailable( const TQString & ) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamClosed( const TQString &, int ) ), + TQT_SIGNAL( webcamClosed( const TQString &, int ) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamPaused(const TQString&) ), + TQT_SIGNAL( webcamPaused(const TQString&) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( readyForTransmission() ), + TQT_SIGNAL( webcamReadyForTransmission() ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( stopTransmission() ), + TQT_SIGNAL( webcamStopTransmission() ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( viewerJoined( const TQString &) ), + TQT_SIGNAL( webcamViewerJoined( const TQString &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( viewerLeft( const TQString &) ), + TQT_SIGNAL( webcamViewerLeft( const TQString &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( viewerRequest( const TQString &) ), + TQT_SIGNAL( webcamViewerRequest( const TQString &) ) ); d->conferenceTask = new ConferenceTask( d->root ); - QObject::connect( d->conferenceTask, SIGNAL( gotInvite( const QString &, const QString &, const QString &, const QStringList & ) ), - SIGNAL( gotConferenceInvite( const QString &, const QString &, const QString &, const QStringList & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( gotMessage( const QString &, const QString &, const QString & ) ), - SIGNAL( gotConferenceMessage( const QString &, const QString &, const QString & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( userJoined( const QString &, const QString & ) ), - SIGNAL( confUserJoined( const QString &, const QString & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( userLeft( const QString &, const QString & ) ), - SIGNAL( confUserLeft( const QString &, const QString & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( userDeclined( const QString &, const QString &, const QString & ) ), - SIGNAL( confUserDeclined( const QString &, const QString &, const QString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( gotInvite( const TQString &, const TQString &, const TQString &, const TQStringList & ) ), + TQT_SIGNAL( gotConferenceInvite( const TQString &, const TQString &, const TQString &, const TQStringList & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( gotMessage( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL( gotConferenceMessage( const TQString &, const TQString &, const TQString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( userJoined( const TQString &, const TQString & ) ), + TQT_SIGNAL( confUserJoined( const TQString &, const TQString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( userLeft( const TQString &, const TQString & ) ), + TQT_SIGNAL( confUserLeft( const TQString &, const TQString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( userDeclined( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL( confUserDeclined( const TQString &, const TQString &, const TQString & ) ) ); d->yabTask = new YABTask( d->root ); - QObject::connect( d->yabTask, SIGNAL( gotEntry( YABEntry * ) ), - SIGNAL( gotYABEntry( YABEntry * ) ) ); - QObject::connect( d->yabTask, SIGNAL( gotRevision( long, bool ) ), - SIGNAL( gotYABRevision( long, bool ) ) ); + TQObject::connect( d->yabTask, TQT_SIGNAL( gotEntry( YABEntry * ) ), + TQT_SIGNAL( gotYABEntry( YABEntry * ) ) ); + TQObject::connect( d->yabTask, TQT_SIGNAL( gotRevision( long, bool ) ), + TQT_SIGNAL( gotYABRevision( long, bool ) ) ); d->fileTransferTask = new FileTransferNotifierTask( d->root ); - QObject::connect( d->fileTransferTask, SIGNAL(incomingFileTransfer( const QString &, const QString &, - long, const QString &, const QString &, unsigned long, const QPixmap & )), - SIGNAL(incomingFileTransfer( const QString &, const QString &, - long, const QString &, const QString &, unsigned long, const QPixmap & )) ); + TQObject::connect( d->fileTransferTask, TQT_SIGNAL(incomingFileTransfer( const TQString &, const TQString &, + long, const TQString &, const TQString &, unsigned long, const TQPixmap & )), + TQT_SIGNAL(incomingFileTransfer( const TQString &, const TQString &, + long, const TQString &, const TQString &, unsigned long, const TQPixmap & )) ); d->yahooChatTask = new YahooChatTask( d->root ); - QObject::connect( d->yahooChatTask, SIGNAL(gotYahooChatCategories( const QDomDocument & )), - SIGNAL(gotYahooChatCategories( const QDomDocument & )) ); - QObject::connect( d->yahooChatTask, SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )), - SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatRoomJoined( int , int , const QString &, const QString & ) ), - SIGNAL(chatRoomJoined( int , int , const QString &, const QString & ) ) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatBuddyHasJoined( const QString &, const QString &, bool ) ), - SIGNAL(chatBuddyHasJoined( const QString &, const QString &, bool ) ) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatBuddyHasLeft(QString,QString) ), - SIGNAL(chatBuddyHasLeft(QString,QString) ) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatMessageReceived( const QString &, const QString &, const QString & ) ), - SIGNAL(chatMessageReceived( const QString &, const QString &, const QString & ) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(gotYahooChatCategories( const TQDomDocument & )), + TQT_SIGNAL(gotYahooChatCategories( const TQDomDocument & )) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )), + TQT_SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatRoomJoined( int , int , const TQString &, const TQString & ) ), + TQT_SIGNAL(chatRoomJoined( int , int , const TQString &, const TQString & ) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatBuddyHasJoined( const TQString &, const TQString &, bool ) ), + TQT_SIGNAL(chatBuddyHasJoined( const TQString &, const TQString &, bool ) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatBuddyHasLeft(TQString,TQString) ), + TQT_SIGNAL(chatBuddyHasLeft(TQString,TQString) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatMessageReceived( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL(chatMessageReceived( const TQString &, const TQString &, const TQString & ) ) ); } void Client::deleteTasks() diff --git a/kopete/protocols/yahoo/libkyahoo/client.h b/kopete/protocols/yahoo/libkyahoo/client.h index f4a3fef5..662c81ff 100644 --- a/kopete/protocols/yahoo/libkyahoo/client.h +++ b/kopete/protocols/yahoo/libkyahoo/client.h @@ -22,7 +22,7 @@ #ifndef LIBYAHOO_CLIENT_H #define LIBYAHOO_CLIENT_H -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> #include "transfer.h" @@ -52,14 +52,14 @@ Q_OBJECT enum LogLevel { Debug, Info, Notice, Warning, Error, Critical }; - Client(QObject *parent=0); + Client(TQObject *parent=0); ~Client(); /** * Set the Yahoo Id of the account * @param username The Yahoo Id */ - void setUserId( const QString& userName ); + void setUserId( const TQString& userName ); /** * Set the picture checksum @@ -76,7 +76,7 @@ Q_OBJECT * @param userId The yahoo ID that will be connected. * @param pass The password. */ - void connect( const QString &host, const uint port, const QString &userId, const QString &pass ); + void connect( const TQString &host, const uint port, const TQString &userId, const TQString &pass ); /** Cancel active login attemps */ void cancelConnect(); @@ -88,10 +88,10 @@ Q_OBJECT int error(); /** Returns a description of the error */ - QString errorString(); + TQString errorString(); /** Returns information about what went wrong */ - QString errorInformation(); + TQString errorInformation(); /** * Specifies the status we connect with. @@ -107,10 +107,10 @@ Q_OBJECT * will change the status message after the login. * @param msg the status message to connect with */ - void setStatusMessageOnConnect( const QString &msg ); + void setStatusMessageOnConnect( const TQString &msg ); /** Accessors needed for login */ - QString host(); + TQString host(); int port(); /** @@ -118,27 +118,27 @@ Q_OBJECT * @param to the buddy that should be notified * @param typing true if there is typing activity, false if not */ - void sendTyping( const QString &to, bool typing ); + void sendTyping( const TQString &to, bool typing ); /** * Send a Message * @param to the buddy that should receive the message * @param msg the message */ - void sendMessage( const QString &to, const QString &msg ); + void sendMessage( const TQString &to, const TQString &msg ); /** * Register / Unregister a chatsession * @param to the buddy, the chatsession belongs to * @param close if true, the chatsession will be closed, if false, it will be opened */ - void setChatSessionState( const QString &to, bool close ); + void setChatSessionState( const TQString &to, bool close ); /** * Send a Buzz * @param to the buddy that should receive the buzz */ - void sendBuzz( const QString &to ); + void sendBuzz( const TQString &to ); /** * Change our status @@ -146,14 +146,14 @@ Q_OBJECT * @param message the status message that will be set * @param type Yahoo::StatusTypeAvailable means that the user is available, Yahoo::StatusTypeAway means that the user is away from the keyboard */ - void changeStatus(Yahoo::Status status, const QString &message, Yahoo::StatusType type); + void changeStatus(Yahoo::Status status, const TQString &message, Yahoo::StatusType type); /** * Set the verification word that is needed for a account verification after * too many wrong login attempts. * @param word the verification word */ - void setVerificationWord( const QString &word ); + void setVerificationWord( const TQString &word ); /** * Add a buddy to the contact list @@ -161,14 +161,14 @@ Q_OBJECT * @param group the group where the buddy will be placed * @param message the message that will be sent to the buddy along the authorization request */ - void addBuddy( const QString &userId, const QString &group, const QString &message = QString::fromLatin1("Please add me") ); + void addBuddy( const TQString &userId, const TQString &group, const TQString &message = TQString::fromLatin1("Please add me") ); /** * Remove a buddy from the contact list * @param userId the yahoo ID of the buddy that should be removed * @param group the group where the buddy belongs to */ - void removeBuddy( const QString &userId, const QString &group ); + void removeBuddy( const TQString &userId, const TQString &group ); /** * Move a buddy into another group @@ -176,7 +176,7 @@ Q_OBJECT * @param oldGroup the group where the buddy belongs to * @param newGroup the group where the buddy will be placed */ - void moveBuddy( const QString &userId, const QString &oldGroup, const QString &newGroup ); + void moveBuddy( const TQString &userId, const TQString &oldGroup, const TQString &newGroup ); /** * Change the stealth status of a buddy @@ -184,13 +184,13 @@ Q_OBJECT * @param mode defines the Stealth mode that is changed. That can be "Appear Offline", "Appear Online" or "Apper permanently offline" * @param state the status of the specified Stealth mode. Active, Not Active or Clear */ - void stealthContact( QString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state ); + void stealthContact( TQString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state ); /** * Request the buddy's picture * @param userId the yahoo ID of the buddy */ - void requestPicture( const QString &userId ); + void requestPicture( const TQString &userId ); /** * Download the buddy's picture @@ -198,7 +198,7 @@ Q_OBJECT * @param url the url of the picture * @param checksum the checksum of the picture */ - void downloadPicture( const QString &userId, KURL url, int checksum ); + void downloadPicture( const TQString &userId, KURL url, int checksum ); /** * Send our picture @@ -211,7 +211,7 @@ Q_OBJECT * @param userId the yahoo ID of the buddy. Can be a null string if the picture has changed. * @param checksum the checksum of the picture */ - void sendPictureChecksum( const QString &userId, int checksum ); + void sendPictureChecksum( const TQString &userId, int checksum ); /** * Send information about our picture @@ -219,7 +219,7 @@ Q_OBJECT * @param url the url of our picture * @param checksum the checksum of the picture */ - void sendPictureInformation( const QString &userId, const QString &url, int checksum ); + void sendPictureInformation( const TQString &userId, const TQString &url, int checksum ); /** * Notify the buddies about our new status @@ -231,25 +231,25 @@ Q_OBJECT * Send a response to the webcam invite ( Accept / Decline ) * @param userId the yahoo ID of the sender */ - void requestWebcam( const QString &userId ); + void requestWebcam( const TQString &userId ); /** * Stop receiving of webcam * @param userId the yahoo ID of the sender */ - void closeWebcam( const QString &userId ); + void closeWebcam( const TQString &userId ); /** * Invite the user to view your Webcam * @param userId the yahoo ID of the receiver */ - void sendWebcamInvite( const QString &userId ); + void sendWebcamInvite( const TQString &userId ); /** * transmit a new image to the watchers * @param image the image data */ - void sendWebcamImage( const QByteArray &image ); + void sendWebcamImage( const TQByteArray &image ); /** Stop the webcam transmission */ void closeOutgoingWebcam(); @@ -258,7 +258,7 @@ Q_OBJECT * Allow a buddy to watch the cam * @param userId the yahoo ID of the receiver */ - void grantWebcamAccess( const QString &userId ); + void grantWebcamAccess( const TQString &userId ); /** * Invite buddies to a conference @@ -266,7 +266,7 @@ Q_OBJECT * @param members a list of members that are invited to the conference * @param msg the invite message */ - void inviteConference( const QString &room, const QStringList &members, const QString &msg ); + void inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ); /** * Invite buddies to a already existing conference @@ -275,14 +275,14 @@ Q_OBJECT * @param members a list of members that are already in the conference * @param msg the invite message */ - void addInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); + void addInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); /** * Join a conference * @param room the name of the conference * @param members a list of members that are already in the conference */ - void joinConference( const QString &room, const QStringList &members ); + void joinConference( const TQString &room, const TQStringList &members ); /** * Decline to join a conference @@ -290,14 +290,14 @@ Q_OBJECT * @param members a list of members that are in the conference * @param msg the reason why we don't want to join */ - void declineConference( const QString &room, const QStringList &members, const QString &msg ); + void declineConference( const TQString &room, const TQStringList &members, const TQString &msg ); /** * Leave the conference * @param room the name of the conference * @param members a list of members that are in the conference */ - void leaveConference( const QString &room, const QStringList &members ); + void leaveConference( const TQString &room, const TQStringList &members ); /** * Send a message to the conference @@ -305,7 +305,7 @@ Q_OBJECT * @param members a list of members that are in the conference * @param msg the message */ - void sendConferenceMessage( const QString &room, const QStringList &members, const QString &msg ); + void sendConferenceMessage( const TQString &room, const TQStringList &members, const TQString &msg ); /** * Send a authorization request response @@ -313,7 +313,7 @@ Q_OBJECT * @param accept true, if the user is allowed to see our status, false if not * @param msg the reason for our decision */ - void sendAuthReply( const QString &userId, bool accept, const QString &msg ); + void sendAuthReply( const TQString &userId, bool accept, const TQString &msg ); /** * Fetches all entries of the YAB @@ -347,7 +347,7 @@ Q_OBJECT * @param msg a description of the file to be sent * @param url the location of the file to be sent */ - void sendFile( unsigned int transferId, const QString &userId, const QString &msg, KURL url ); + void sendFile( unsigned int transferId, const TQString &userId, const TQString &msg, KURL url ); /** * Receive a file from a buddy @@ -356,14 +356,14 @@ Q_OBJECT * @param remoteURL the url of the file * @param localURL the location where the file should be stored */ - void receiveFile( unsigned int transferId, const QString &userId, KURL remoteURL, KURL localURL ); + void receiveFile( unsigned int transferId, const TQString &userId, KURL remoteURL, KURL localURL ); /** * Reject a file offered by a buddy * @param userId yahoo ID of the sender * @param remoteURL the url of the file */ - void rejectFile( const QString &userId, KURL remoteURL ); + void rejectFile( const TQString &userId, KURL remoteURL ); /** * Canceled a filetransfer @@ -394,7 +394,7 @@ Q_OBJECT /** * Send a chat message */ - void sendYahooChatMessage( const QString &msg, const QString &handle ); + void sendYahooChatMessage( const TQString &msg, const TQString &handle ); /************* INTERNAL (FOR USE BY TASKS) METHODS @@ -408,13 +408,13 @@ Q_OBJECT /** * Print a debug statement */ - void debug( const QString &str ); + void debug( const TQString &str ); /** The current user's user ID */ - QString userId(); + TQString userId(); /** The current user's password */ - QString password(); + TQString password(); /** current Session ID */ uint sessionID(); @@ -445,20 +445,20 @@ Q_OBJECT /** * Accessors to the cookies */ - QString yCookie(); - QString tCookie(); - QString cCookie(); + TQString yCookie(); + TQString tCookie(); + TQString cCookie(); /** * Error */ - void notifyError( const QString &info, const QString &errorString, LogLevel level ); + void notifyError( const TQString &info, const TQString &errorString, LogLevel level ); signals: /** CONNECTION EVENTS */ /** * Notifies that the login process has succeeded. */ - void loggedIn( int, const QString& ); + void loggedIn( int, const TQString& ); /** * Notifies that the login process has failed @@ -482,91 +482,91 @@ Q_OBJECT /** * Notifies about our buddies and groups */ - void gotBuddy( const QString &, const QString &, const QString & ); + void gotBuddy( const TQString &, const TQString &, const TQString & ); /** * Notifies about adding buddies */ - void buddyAddResult( const QString &, const QString &, bool ); + void buddyAddResult( const TQString &, const TQString &, bool ); /** * Notifies about removing buddies */ - void buddyRemoveResult( const QString &, const QString &, bool ); + void buddyRemoveResult( const TQString &, const TQString &, bool ); /** * Notifies about buddies changing groups */ - void buddyChangeGroupResult( const QString &, const QString &, bool ); + void buddyChangeGroupResult( const TQString &, const TQString &, bool ); /** * Notifies about the status of online buddies */ - void statusChanged( const QString&, int, const QString&, int, int, int ); + void statusChanged( const TQString&, int, const TQString&, int, int, int ); /** * Notifies about the stealth status of buddies */ - void stealthStatusChanged( const QString &, Yahoo::StealthStatus ); + void stealthStatusChanged( const TQString &, Yahoo::StealthStatus ); /** * Notifies about mails */ - void mailNotify( const QString&, const QString&, int ); + void mailNotify( const TQString&, const TQString&, int ); /** * We got a new message */ - void gotIm( const QString&, const QString&, long, int ); + void gotIm( const TQString&, const TQString&, long, int ); /** * We got a new system message */ - void systemMessage( const QString& ); + void systemMessage( const TQString& ); /** * The buddy is typing a message */ - void typingNotify( const QString &, int ); + void typingNotify( const TQString &, int ); /** * The buddy has invited us to view his webcam */ - void gotWebcamInvite(const QString &); + void gotWebcamInvite(const TQString &); /** * Notifies about a BUZZ notification */ - void gotBuzz( const QString &, long ); + void gotBuzz( const TQString &, long ); /** * Notifies about a changed picture status */ - void pictureStatusNotify( const QString &, int ); + void pictureStatusNotify( const TQString &, int ); /** * Notifies about a picture checksum */ - void pictureChecksumNotify( const QString &, int ); + void pictureChecksumNotify( const TQString &, int ); /** * Notifies about a picture */ - void pictureInfoNotify( const QString &, KURL, int ); + void pictureInfoNotify( const TQString &, KURL, int ); /** * The iconLoader has successfully downloaded a picutre */ - void pictureDownloaded( const QString &, const QByteArray &, int ); + void pictureDownloaded( const TQString &, const TQByteArray &, int ); /** * A Buddy asks for our picture */ - void pictureRequest( const QString & ); + void pictureRequest( const TQString & ); /** * Information about the picture upload */ - void pictureUploaded( const QString &, int ); + void pictureUploaded( const TQString &, int ); /** * We've received a webcam image from a buddy */ - void webcamImageReceived( const QString &, const QPixmap &); + void webcamImageReceived( const TQString &, const TQPixmap &); /** * The requested Webcam is not available */ - void webcamNotAvailable( const QString & ); + void webcamNotAvailable( const TQString & ); /** * The connection to the webcam was closed */ - void webcamClosed( const QString &, int ); + void webcamClosed( const TQString &, int ); /** * The webcamtransmission is paused */ - void webcamPaused(const QString&); + void webcamPaused(const TQString&); /** * The webcam connection is ready for transmission */ @@ -578,47 +578,47 @@ Q_OBJECT /** * A new buddy watches the cam */ - void webcamViewerJoined( const QString & ); + void webcamViewerJoined( const TQString & ); /** * A buddy no longer watches the cam */ - void webcamViewerLeft( const QString & ); + void webcamViewerLeft( const TQString & ); /** * A buddy wants to watch the cam */ - void webcamViewerRequest( const QString & ); + void webcamViewerRequest( const TQString & ); /** * A buddy invited us to a conference */ - void gotConferenceInvite( const QString &, const QString &, const QString &, const QStringList & ); + void gotConferenceInvite( const TQString &, const TQString &, const TQString &, const TQStringList & ); /** * A conference message was received */ - void gotConferenceMessage( const QString &, const QString &, const QString & ); + void gotConferenceMessage( const TQString &, const TQString &, const TQString & ); /** * A buddy joined the conference */ - void confUserJoined( const QString &, const QString & ); + void confUserJoined( const TQString &, const TQString & ); /** * A buddy left the conference */ - void confUserLeft( const QString &, const QString & ); + void confUserLeft( const TQString &, const TQString & ); /** * A buddy declined to join the conference */ - void confUserDeclined( const QString &, const QString &, const QString & ); + void confUserDeclined( const TQString &, const TQString &, const TQString & ); /** * A buddy accepted our authorization request */ - void authorizationAccepted( const QString & ); + void authorizationAccepted( const TQString & ); /** * A buddy rejected our authorization request */ - void authorizationRejected( const QString &, const QString & ); + void authorizationRejected( const TQString &, const TQString & ); /** * A buddy requests authorization */ - void gotAuthorizationRequest( const QString &, const QString &, const QString & ); + void gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ); /** * A revision of the Yahoo Addressbook was received */ @@ -630,7 +630,7 @@ Q_OBJECT /** * An error occurred while saving a Yahoo Addressbook entry */ - void modifyYABEntryError( YABEntry *, const QString & ); + void modifyYABEntryError( YABEntry *, const TQString & ); /** * number of Bytes transferred for FileTransfer id */ @@ -642,7 +642,7 @@ Q_OBJECT /** * An error occurred during the filetransfer */ - void fileTransferError( unsigned int, int, const QString & ); + void fileTransferError( unsigned int, int, const TQString & ); /** * filetransfer canceled */ @@ -650,32 +650,32 @@ Q_OBJECT /** * A buddy is trying to send us a file */ - void incomingFileTransfer( const QString &, const QString &, long, const QString &, - const QString &, unsigned long, const QPixmap & ); + void incomingFileTransfer( const TQString &, const TQString &, long, const TQString &, + const TQString &, unsigned long, const TQPixmap & ); /** * We have received the list of yahoo chat categories */ - void gotYahooChatCategories( const QDomDocument & ); + void gotYahooChatCategories( const TQDomDocument & ); /** * We have received the list of chatrooms for the categories */ - void gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & ); + void gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & ); /** * We have joined a chatroom */ - void chatRoomJoined( int, int, const QString &, const QString & ); + void chatRoomJoined( int, int, const TQString &, const TQString & ); /** * A buddy has joined a chatroom */ - void chatBuddyHasJoined( const QString &, const QString &, bool ); + void chatBuddyHasJoined( const TQString &, const TQString &, bool ); /** * A buddy has left a chatroom */ - void chatBuddyHasLeft( const QString &, const QString & ); + void chatBuddyHasLeft( const TQString &, const TQString & ); /** * We have received a message in a chatroom */ - void chatMessageReceived( const QString &, const QString &, const QString & ); + void chatMessageReceived( const TQString &, const TQString &, const TQString & ); protected slots: // INTERNAL, FOR USE BY TASKS' finished() SIGNALS // void lt_loginFinished(); @@ -687,7 +687,7 @@ Q_OBJECT /** * Used by tasks to identify a response to a login attempt */ - void slotLoginResponse( int, const QString& ); + void slotLoginResponse( int, const TQString& ); /** * Used by the client stream to notify errors to upper layers. @@ -726,7 +726,7 @@ Q_OBJECT ClientPrivate* d; KNetworkConnector *m_connector; - QTimer *m_pingTimer; + TQTimer *m_pingTimer; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp b/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp index 9ab0d4c1..59d3b3fa 100644 --- a/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp @@ -19,8 +19,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kdebug.h> ConferenceTask::ConferenceTask(Task* parent) : Task(parent) @@ -78,16 +78,16 @@ void ConferenceTask::parseInvitation( YMSGTransfer *t ) kdDebug(YAHOO_RAW_DEBUG) ; int i = 0; - QString who = t->firstParam( 50 ); - QString room = t->firstParam( 57 ); - bool utf = QString( t->firstParam( 97 ) ).toInt() == 1; - QString msg; + TQString who = t->firstParam( 50 ); + TQString room = t->firstParam( 57 ); + bool utf = TQString( t->firstParam( 97 ) ).toInt() == 1; + TQString msg; if( utf ) - msg = QString::fromUtf8( t->firstParam( 58 ) ); + msg = TQString::fromUtf8( t->firstParam( 58 ) ); else msg = t->firstParam( 58 ); - QStringList members; + TQStringList members; for( i = 0; i < t->paramCount( 52 ); ++i ) members.append( t->nthParam( 52, i ) ); for( i = 0; i < t->paramCount( 53 ); ++i ) @@ -103,12 +103,12 @@ void ConferenceTask::parseMessage( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString from = t->firstParam( 3 ); - bool utf = QString( t->firstParam( 97 ) ).toInt() == 1; - QString msg; + TQString room = t->firstParam( 57 ); + TQString from = t->firstParam( 3 ); + bool utf = TQString( t->firstParam( 97 ) ).toInt() == 1; + TQString msg; if( utf ) - msg = QString::fromUtf8( t->firstParam( 14 ) ); + msg = TQString::fromUtf8( t->firstParam( 14 ) ); else msg = t->firstParam( 14 ); @@ -120,8 +120,8 @@ void ConferenceTask::parseUserJoined( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString who = t->firstParam( 53 ); + TQString room = t->firstParam( 57 ); + TQString who = t->firstParam( 53 ); if( !who.isEmpty() && !room.isEmpty() ) emit userJoined( who, room ); @@ -131,8 +131,8 @@ void ConferenceTask::parseUserLeft( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString who = t->firstParam( 56 ); + TQString room = t->firstParam( 57 ); + TQString who = t->firstParam( 56 ); if( !who.isEmpty() && !room.isEmpty() ) emit userLeft( who, room ); @@ -142,15 +142,15 @@ void ConferenceTask::parseUserDeclined( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString who = t->firstParam( 54 ); - QString msg = t->firstParam( 14 ); + TQString room = t->firstParam( 57 ); + TQString who = t->firstParam( 54 ); + TQString msg = t->firstParam( 14 ); if( !who.isEmpty() && !room.isEmpty() ) emit userDeclined( who, room, msg ); } -void ConferenceTask::inviteConference( const QString &room, const QStringList &members, const QString &msg ) +void ConferenceTask::inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; @@ -161,14 +161,14 @@ void ConferenceTask::inviteConference( const QString &room, const QStringList &m t->setParam( 57, room.local8Bit() ); t->setParam( 58, msg.local8Bit() ); t->setParam( 97, 1 ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 52, (*it).local8Bit() ); t->setParam( 13, "0" ); send( t ); } -void ConferenceTask::addInvite( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ) +void ConferenceTask::addInvite( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; @@ -176,15 +176,15 @@ void ConferenceTask::addInvite( const QString &room, const QStringList &who, con t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - QString whoList = who.first(); + TQString whoList = who.first(); for( int i = 1; i < who.size(); i++ ) - whoList += QString(",%1").arg( who[i] ); + whoList += TQString(",%1").arg( who[i] ); t->setParam( 51, whoList.local8Bit() ); t->setParam( 57, room.local8Bit() ); t->setParam( 58, msg.local8Bit() ); t->setParam( 97, 1 ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) { t->setParam( 52, (*it).local8Bit() ); t->setParam( 53, (*it).local8Bit() ); // Note: this field should only be set if the buddy has already joined the conference, but no harm is done this way @@ -194,28 +194,28 @@ void ConferenceTask::addInvite( const QString &room, const QStringList &who, con send( t ); } -void ConferenceTask::joinConference( const QString &room, const QStringList &members ) +void ConferenceTask::joinConference( const TQString &room, const TQStringList &members ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfLogon); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 3, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); send( t ); } -void ConferenceTask::declineConference( const QString &room, const QStringList &members, const QString &msg ) +void ConferenceTask::declineConference( const TQString &room, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfDecline); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 3, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); t->setParam( 14, msg.utf8() ); @@ -223,28 +223,28 @@ void ConferenceTask::declineConference( const QString &room, const QStringList & send( t ); } -void ConferenceTask::leaveConference( const QString &room, const QStringList &members ) +void ConferenceTask::leaveConference( const TQString &room, const TQStringList &members ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfLogoff); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 3, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); send( t ); } -void ConferenceTask::sendMessage( const QString &room, const QStringList &members, const QString &msg ) +void ConferenceTask::sendMessage( const TQString &room, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfMsg); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 53, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); t->setParam( 14, msg.utf8() ); diff --git a/kopete/protocols/yahoo/libkyahoo/conferencetask.h b/kopete/protocols/yahoo/libkyahoo/conferencetask.h index f8a101c5..5f027c0f 100644 --- a/kopete/protocols/yahoo/libkyahoo/conferencetask.h +++ b/kopete/protocols/yahoo/libkyahoo/conferencetask.h @@ -34,18 +34,18 @@ public: bool take(Transfer *transfer); bool forMe( const Transfer* transfer ) const; - void joinConference( const QString &room, const QStringList &members ); - void declineConference( const QString &room, const QStringList &members, const QString &msg ); - void leaveConference( const QString &room, const QStringList &members ); - void sendMessage( const QString &room, const QStringList &members, const QString &msg ); - void inviteConference( const QString &room, const QStringList &members, const QString &msg ); - void addInvite( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); + void joinConference( const TQString &room, const TQStringList &members ); + void declineConference( const TQString &room, const TQStringList &members, const TQString &msg ); + void leaveConference( const TQString &room, const TQStringList &members ); + void sendMessage( const TQString &room, const TQStringList &members, const TQString &msg ); + void inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ); + void addInvite( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); signals: - void gotInvite( const QString &who, const QString &room, const QString &msg, const QStringList &members); - void gotMessage( const QString &who, const QString &room, const QString &msg ); - void userJoined( const QString &who, const QString &room ); - void userLeft( const QString &who, const QString &room ); - void userDeclined( const QString &who, const QString &room, const QString &msg ); + void gotInvite( const TQString &who, const TQString &room, const TQString &msg, const TQStringList &members); + void gotMessage( const TQString &who, const TQString &room, const TQString &msg ); + void userJoined( const TQString &who, const TQString &room ); + void userLeft( const TQString &who, const TQString &room ); + void userDeclined( const TQString &who, const TQString &room, const TQString &msg ); private: void parseInvitation( YMSGTransfer *transfer ); void parseMessage( YMSGTransfer *transfer ); diff --git a/kopete/protocols/yahoo/libkyahoo/connector.cpp b/kopete/protocols/yahoo/libkyahoo/connector.cpp index 773f8757..cc7dcfa3 100644 --- a/kopete/protocols/yahoo/libkyahoo/connector.cpp +++ b/kopete/protocols/yahoo/libkyahoo/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setPeerAddressNone(); } @@ -35,7 +35,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -48,11 +48,11 @@ Q_UINT16 Connector::peerPort() const void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/yahoo/libkyahoo/connector.h b/kopete/protocols/yahoo/libkyahoo/connector.h index dea818fb..02b47019 100644 --- a/kopete/protocols/yahoo/libkyahoo/connector.h +++ b/kopete/protocols/yahoo/libkyahoo/connector.h @@ -22,8 +22,8 @@ #define LIBKYAHOO_CONNECTOR_H -#include <qobject.h> -#include "qhostaddress.h" +#include <tqobject.h> +#include "tqhostaddress.h" class ByteStream; @@ -31,15 +31,15 @@ class Connector : public QObject { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -48,11 +48,11 @@ signals: protected: void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; diff --git a/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp b/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp index 2c73ef2b..573c5ccf 100644 --- a/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp +++ b/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp @@ -22,9 +22,9 @@ #include <string.h> #include <iostream> -#include <qdatastream.h> -#include <qdatetime.h> -#include <qtextstream.h> +#include <tqdatastream.h> +#include <tqdatetime.h> +#include <tqtextstream.h> #include <kdebug.h> #include <kurl.h> @@ -33,7 +33,7 @@ #include "ymsgprotocol.h" #include "ymsgtransfer.h" -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_YMSGProtocol = new YMSGProtocol( this, "ymsgprotocol" ); } @@ -47,7 +47,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { // store locally int oldsize = m_in.size(); @@ -75,7 +75,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) //m_in.remove( 0, parsedBytes ); // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -112,7 +112,7 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef YAHOO_COREPROTOCOL_DEBUG kdDebug(YAHOO_RAW_DEBUG) << " contains " << bytes.count() << " bytes" << endl; @@ -133,11 +133,11 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) { kdDebug(YAHOO_RAW_DEBUG) << " got YMSGTransfer" << endl; YMSGTransfer *yt = (YMSGTransfer *) outgoing; - QByteArray bytesOut = yt->serialize(); + TQByteArray bytesOut = yt->serialize(); - //QTextStream dout( bytesOut, QIODevice::WriteOnly ); - //dout.setEncoding( QTextStream::Latin1 ); - //dout.setByteOrder( QDataStream::LittleEndian ); + //TQTextStream dout( bytesOut, TQIODevice::WriteOnly ); + //dout.setEncoding( TQTextStream::Latin1 ); + //dout.setByteOrder( TQDataStream::LittleEndian ); //dout << bytesOut; //kdDebug(YAHOO_RAW_DEBUG) << " " << bytesOut; emit outgoingData( bytesOut ); @@ -149,7 +149,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; // processing incoming data and reassembling it into transfers @@ -163,8 +163,8 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) return bytesParsed; } - QByteArray tempWire = wire; - QDataStream din( tempWire, IO_ReadOnly ); + TQByteArray tempWire = wire; + TQDataStream din( tempWire, IO_ReadOnly ); // look at first four bytes and decide what to do with the chunk if ( okToProceed( din ) ) @@ -194,8 +194,8 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) else { kdDebug(YAHOO_RAW_DEBUG) << " - not a valid YMSG packet. Trying to recover." << endl; - QTextStream s( wire, IO_ReadOnly ); - QString remaining = s.read(); + TQTextStream s( wire, IO_ReadOnly ); + TQString remaining = s.read(); int pos = remaining.find( "YMSG", bytesParsed ); if( pos >= 0 ) { @@ -217,12 +217,12 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -void CoreProtocol::slotOutgoingData( const QByteArray &out ) +void CoreProtocol::slotOutgoingData( const TQByteArray &out ) { qDebug( "%s", out.data() ); } -bool CoreProtocol::okToProceed( QDataStream &din) +bool CoreProtocol::okToProceed( TQDataStream &din) { if ( din.atEnd() ) { diff --git a/kopete/protocols/yahoo/libkyahoo/coreprotocol.h b/kopete/protocols/yahoo/libkyahoo/coreprotocol.h index 6432093c..c1c05d89 100644 --- a/kopete/protocols/yahoo/libkyahoo/coreprotocol.h +++ b/kopete/protocols/yahoo/libkyahoo/coreprotocol.h @@ -22,7 +22,7 @@ #ifndef YAHOO_CORE_PROTOCOL_H #define YAHOO_CORE_PROTOCOL_H -#include <qobject.h> +#include <tqobject.h> class Transfer; class YMSGProtocol; @@ -47,7 +47,7 @@ public: * This requires parsing out each FLAP, etc. from the incoming data * @param incomingBytes Raw data in wire format. */ - void addIncomingData( const QByteArray& incomingBytes ); + void addIncomingData( const TQByteArray& incomingBytes ); /** * @return the incoming transfer or 0 if none is available. @@ -69,7 +69,7 @@ signals: /** * Emitted as the core protocol converts fields to wire ready data */ - void outgoingData( const QByteArray& ); + void outgoingData( const TQByteArray& ); /** * Emitted when there is incoming data, parsed into a Transfer @@ -79,21 +79,21 @@ protected slots: /** * Just a debug method to test emitting to the socket, atm - should go to the ClientStream */ - void slotOutgoingData( const QByteArray & ); + void slotOutgoingData( const TQByteArray & ); protected: /** * Check that there is data to read, and set the protocol's state if there isn't any. */ - bool okToProceed( QDataStream & ); + bool okToProceed( TQDataStream & ); /** * Convert incoming wire data into a Transfer object and queue it * @return number of bytes from the input that were parsed into a Transfer */ - int wireToTransfer( const QByteArray& wire ); + int wireToTransfer( const TQByteArray& wire ); private: - QByteArray m_in; // buffer containing unprocessed bytes we received + TQByteArray m_in; // buffer containing unprocessed bytes we received int m_error; Transfer* m_inTransfer; // the transfer that is being received int m_state; // represents the protocol's overall state diff --git a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp index e011dfeb..fd9657f7 100644 --- a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp @@ -20,8 +20,8 @@ #include "yahootypes.h" #include "client.h" -#include <qstring.h> -#include <qpixmap.h> +#include <tqstring.h> +#include <tqpixmap.h> #include <kdebug.h> //#include <kcodecs.h> @@ -76,12 +76,12 @@ void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from; /* key = 4 */ - QString to; /* key = 5 */ - QString url; /* key = 20 */ + TQString from; /* key = 4 */ + TQString to; /* key = 5 */ + TQString url; /* key = 20 */ long expires; /* key = 38 */ - QString msg; /* key = 14 */ - QString filename; /* key = 27 */ + TQString msg; /* key = 14 */ + TQString filename; /* key = 27 */ unsigned long size; /* key = 28 */ from = t->firstParam( 4 ); @@ -108,22 +108,22 @@ void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t ) unsigned int right = url.findRev( '?' ); filename = url.mid( left, right - left ); - emit incomingFileTransfer( from, url, expires, msg, filename, size, QPixmap() ); + emit incomingFileTransfer( from, url, expires, msg, filename, size, TQPixmap() ); } void FileTransferNotifierTask::parseFileTransfer7( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from; /* key = 4 */ - QString to; /* key = 5 */ - QString url; /* key = 20 */ + TQString from; /* key = 4 */ + TQString to; /* key = 5 */ + TQString url; /* key = 20 */ long expires; /* key = 38 */ - QString msg; /* key = 14 */ - QString filename; /* key = 27 */ + TQString msg; /* key = 14 */ + TQString filename; /* key = 27 */ unsigned long size; /* key = 28 */ - QByteArray preview; /* key = 267 */ - QPixmap previewPixmap; + TQByteArray preview; /* key = 267 */ + TQPixmap previewPixmap; if( t->firstParam( 222 ).toInt() == 2 ) return; // user cancelled the file transfer @@ -137,7 +137,7 @@ void FileTransferNotifierTask::parseFileTransfer7( YMSGTransfer *t ) size = t->firstParam( 28 ).toULong(); // FIXME (same) - //preview = QByteArray::fromBase64( t->firstParam( 267 ) ); + //preview = TQByteArray::fromBase64( t->firstParam( 267 ) ); if( preview.size() > 0 ) { diff --git a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h index 24b684f4..d5f6c7f2 100644 --- a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h @@ -39,8 +39,8 @@ public: protected: virtual bool forMe( const Transfer *transfer ) const; signals: - void incomingFileTransfer( const QString &who, const QString &url, long expires, const QString &msg , - const QString &fname, unsigned long size, const QPixmap &preview ); + void incomingFileTransfer( const TQString &who, const TQString &url, long expires, const TQString &msg , + const TQString &fname, unsigned long size, const TQPixmap &preview ); private: void parseFileTransfer( YMSGTransfer *transfer ); void parseFileTransfer7( YMSGTransfer *transfer ); diff --git a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp index eca3318a..15c3b078 100644 --- a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp +++ b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp @@ -19,8 +19,8 @@ #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(QObject *parent, const char *name) - : QObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) + : TQObject(parent, name) { } @@ -34,13 +34,13 @@ uint InputProtocolBase::state() const return m_state; } -bool InputProtocolBase::readString( QString &message ) +bool InputProtocolBase::readString( TQString &message ) { uint len; - QCString rawData; + TQCString rawData; if ( !safeReadBytes( rawData, len ) ) return false; - message = QString::fromUtf8( rawData.data(), len - 1 ); + message = TQString::fromUtf8( rawData.data(), len - 1 ); return true; } @@ -61,7 +61,7 @@ bool InputProtocolBase::okToProceed() } // FIXME: need to be checked -bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) +bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes Q_UINT32 val; @@ -72,7 +72,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) if ( val > 1024 ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); - QCString temp( val ); + TQCString temp( val ); if ( val != 0 ) { if ( !okToProceed() ) diff --git a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h index 18a3dab3..e236bc68 100644 --- a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h +++ b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h @@ -19,7 +19,7 @@ #ifndef INPUTPROTOCOLBASE_H #define INPUTPROTOCOLBASE_H -#include <qobject.h> +#include <tqobject.h> class Transfer; /** @@ -32,7 +32,7 @@ class InputProtocolBase : public QObject Q_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(QObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *parent = 0, const char *name = 0); ~InputProtocolBase(); /** * Returns a value describing the state of the object. @@ -45,13 +45,13 @@ public: * @param bytes this will be set to the number of bytes that were successfully parsed. It is no indication of the success of the whole procedure * @return On success, a Transfer object that the caller is responsible for deleting. It will be either an EventTransfer or a Response, delete as appropriate. On failure, returns 0. */ - virtual Transfer * parse( const QByteArray &, uint & bytes ) = 0 ; + virtual Transfer * parse( const TQByteArray &, uint & bytes ) = 0 ; protected: /** * Reads an arbitrary string * updates the bytes parsed counter */ - bool readString( QString &message ); + bool readString( TQString &message ); /** * Check that there is data to read, and set the protocol's state if there isn't any. */ @@ -61,12 +61,12 @@ protected: * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ - bool safeReadBytes( QCString & data, uint & len ); + bool safeReadBytes( TQCString & data, uint & len ); protected: uint m_state; uint m_bytes; - QDataStream *m_din; + TQDataStream *m_din; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/listtask.cpp b/kopete/protocols/yahoo/libkyahoo/listtask.cpp index b1e35940..d299f963 100644 --- a/kopete/protocols/yahoo/libkyahoo/listtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/listtask.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include "listtask.h" #include "transfer.h" @@ -64,8 +64,8 @@ void ListTask::parseBuddyList( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString group; - QString buddy; + TQString group; + TQString buddy; // We need some low-level parsing here // FIXME same: need to check @@ -90,7 +90,7 @@ void ListTask::parseBuddyList( YMSGTransfer *t ) case 301: if( p.second == "319"){ kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Parsed buddy: " << buddy << " in group " << group << endl; - emit gotBuddy( buddy, QString(), group ); + emit gotBuddy( buddy, TQString(), group ); } } } @@ -100,11 +100,11 @@ void ListTask::parseStealthList( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString raw; + TQString raw; raw = t->firstParam( 185 ); - const QStringList buddies = QStringList::split( ',', raw ); - for ( QStringList::ConstIterator it = buddies.begin(); it != buddies.end(); ++it ) + const TQStringList buddies = TQStringList::split( ',', raw ); + for ( TQStringList::ConstIterator it = buddies.begin(); it != buddies.end(); ++it ) { emit stealthStatusChanged( *it, Yahoo::StealthActive ); } diff --git a/kopete/protocols/yahoo/libkyahoo/listtask.h b/kopete/protocols/yahoo/libkyahoo/listtask.h index cc058004..514df17e 100644 --- a/kopete/protocols/yahoo/libkyahoo/listtask.h +++ b/kopete/protocols/yahoo/libkyahoo/listtask.h @@ -39,8 +39,8 @@ protected: void parseBuddyList( YMSGTransfer *transfer ); void parseStealthList( YMSGTransfer *transfer ); signals: - void gotBuddy(const QString&, const QString&, const QString&); - void stealthStatusChanged( const QString&, Yahoo::StealthStatus ); + void gotBuddy(const TQString&, const TQString&, const TQString&); + void stealthStatusChanged( const TQString&, Yahoo::StealthStatus ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/logintask.cpp b/kopete/protocols/yahoo/libkyahoo/logintask.cpp index d3b5be7b..3c3127b2 100644 --- a/kopete/protocols/yahoo/libkyahoo/logintask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/logintask.cpp @@ -25,7 +25,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include <stdlib.h> @@ -179,10 +179,10 @@ void LoginTask::sendAuthResp(YMSGTransfer* t) { kdDebug(YAHOO_RAW_DEBUG) ; - QString sn = t->firstParam( 1 ); - QString seed = t->firstParam( 94 ); + TQString sn = t->firstParam( 1 ); + TQString seed = t->firstParam( 94 ); m_challengeString = seed; - QString version_s = t->firstParam( 13 ); + TQString version_s = t->firstParam( 13 ); m_sessionID = t->id(); int version = version_s.toInt(); @@ -205,23 +205,23 @@ void LoginTask::sendAuthResp(YMSGTransfer* t) emit haveSessionID( m_sessionID ); } -void LoginTask::sendAuthSixteenStage1(const QString& sn, const QString& seed) +void LoginTask::sendAuthSixteenStage1(const TQString& sn, const TQString& seed) { - const QString YahooTokenUrl = "https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=%1&passwd=%2&chal=%3"; + const TQString YahooTokenUrl = "https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=%1&passwd=%2&chal=%3"; kdDebug(YAHOO_RAW_DEBUG) << "seed:" << seed << endl; - m_stage1Data= QString::null; + m_stage1Data= TQString::null; /* construct a URL from the seed and request tokens */ - QByteArray encodedUrl; - QString fullUrl = YahooTokenUrl.arg(sn, client()->password(), seed); + TQByteArray encodedUrl; + TQString fullUrl = YahooTokenUrl.arg(sn, client()->password(), seed); KURL tokenUrl(fullUrl); KIO::Job* job = KIO::get(tokenUrl, true, false); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(handleAuthSixteenStage1Data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job*)), - this, SLOT(handleAuthSixteenStage1Result(KIO::Job*))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(handleAuthSixteenStage1Data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(handleAuthSixteenStage1Result(KIO::Job*))); } -void LoginTask::handleAuthSixteenStage1Data(KIO::Job* job, const QByteArray& data) +void LoginTask::handleAuthSixteenStage1Data(KIO::Job* job, const TQByteArray& data) { kdDebug(YAHOO_RAW_DEBUG) << "data:" << data << endl; m_stage1Data.append(data); @@ -230,12 +230,12 @@ void LoginTask::handleAuthSixteenStage1Data(KIO::Job* job, const QByteArray& dat void LoginTask::handleAuthSixteenStage1Result(KIO::Job* job) { int responseNumber = -1; - QString token; + TQString token; int error = job->error(); kdDebug(YAHOO_RAW_DEBUG) << "error:" << error << endl; if (error == 0) { - QStringList responses = QStringList::split("\r\n", m_stage1Data); + TQStringList responses = TQStringList::split("\r\n", m_stage1Data); responseNumber = responses[0].toInt(); if (responses.count() >= 3) { @@ -250,26 +250,26 @@ void LoginTask::handleAuthSixteenStage1Result(KIO::Job* job) { case -1: /* error in the received stream */ - emit loginResponse(Yahoo::LoginSock, QString()); + emit loginResponse(Yahoo::LoginSock, TQString()); kdDebug(YAHOO_RAW_DEBUG) << "unknown error logging in" << endl; break; case 1212: /* password incorrect */ - emit loginResponse(Yahoo::LoginPasswd, QString()); + emit loginResponse(Yahoo::LoginPasswd, TQString()); kdDebug(YAHOO_RAW_DEBUG) << "password incorrect" << endl; break; case 1213: /* security lock */ - emit loginResponse(Yahoo::LoginLock, QString()); + emit loginResponse(Yahoo::LoginLock, TQString()); break; case 1235: /* username does not exist */ - emit loginResponse(Yahoo::LoginUname, QString()); + emit loginResponse(Yahoo::LoginUname, TQString()); kdDebug(YAHOO_RAW_DEBUG) << "user does not exist" << endl; break; case 1214: case 1236: - emit loginResponse(Yahoo::LoginVerify, QString()); + emit loginResponse(Yahoo::LoginVerify, TQString()); break; case 100: /* username or password missing */ /*FIXME handle this */ @@ -287,21 +287,21 @@ void LoginTask::handleAuthSixteenStage1Result(KIO::Job* job) } } -void LoginTask::sendAuthSixteenStage2(const QString& token) +void LoginTask::sendAuthSixteenStage2(const TQString& token) { - const QString YahooLoginUrl = "https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=%1"; + const TQString YahooLoginUrl = "https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=%1"; kdDebug(YAHOO_RAW_DEBUG) << "token:" << token << endl; - m_stage2Data = QString::null; - QString fullUrl = YahooLoginUrl.arg(token); + m_stage2Data = TQString::null; + TQString fullUrl = YahooLoginUrl.arg(token); KURL loginUrl(fullUrl); KIO::Job* job = KIO::get(loginUrl, true, false); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(handleAuthSixteenStage2Data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job*)), - this, SLOT(handleAuthSixteenStage2Result(KIO::Job*))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(handleAuthSixteenStage2Data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(handleAuthSixteenStage2Result(KIO::Job*))); } -void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data) +void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const TQByteArray& data) { kdDebug(YAHOO_RAW_DEBUG) << "data:" << data << endl; m_stage2Data.append(data); @@ -309,13 +309,13 @@ void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data) void LoginTask::handleAuthSixteenStage2Result(KIO::Job* job) { - QString crumb; + TQString crumb; int responseNumber = -1; int error = job->error(); kdDebug(YAHOO_RAW_DEBUG) << "error:" << error << endl; if (error == 0) { - QStringList responses = QStringList::split("\r\n", m_stage2Data); + TQStringList responses = TQStringList::split("\r\n", m_stage2Data); kdDebug(YAHOO_RAW_DEBUG) << responses << endl; responseNumber = responses[0].toInt(); if (responseNumber == 0) @@ -331,10 +331,10 @@ void LoginTask::handleAuthSixteenStage2Result(KIO::Job* job) switch(responseNumber) { case -1: - emit loginResponse(Yahoo::LoginSock, QString()); + emit loginResponse(Yahoo::LoginSock, TQString()); break; case 100: - emit loginResponse(Yahoo::LoginSock, QString()); + emit loginResponse(Yahoo::LoginSock, TQString()); break; default: /* try to login anyways */ break; @@ -342,22 +342,22 @@ void LoginTask::handleAuthSixteenStage2Result(KIO::Job* job) } else { - QString cryptString = crumb; + TQString cryptString = crumb; cryptString.append(m_challengeString); sendAuthSixteenStage3(cryptString); } } } -void LoginTask::sendAuthSixteenStage3(const QString& cryptString) +void LoginTask::sendAuthSixteenStage3(const TQString& cryptString) { kdDebug(YAHOO_RAW_DEBUG) << " with crypt string" << cryptString << endl; - //QByteArray cryptStringHash = QCryptographicHash::hash( cryptString.toAscii(), + //TQByteArray cryptStringHash = QCryptographicHash::hash( cryptString.toAscii(), // QCryptographicHash::Md5 ); //cryptStringHash = cryptStringHash.toBase64(); - QString cryptStringHash = KMD5( cryptString.ascii() ).base64Digest(); + TQString cryptStringHash = KMD5( cryptString.ascii() ).base64Digest(); cryptStringHash = cryptStringHash.replace('+', '.'); cryptStringHash = cryptStringHash.replace('/', '_'); @@ -379,7 +379,7 @@ void LoginTask::sendAuthSixteenStage3(const QString& cryptString) } -void LoginTask::sendAuthResp_pre_0x0b(const QString &/*sn*/, const QString &/*seed*/) +void LoginTask::sendAuthResp_pre_0x0b(const TQString &/*sn*/, const TQString &/*seed*/) { kdDebug(YAHOO_RAW_DEBUG) ; } @@ -392,7 +392,7 @@ void LoginTask::handleAuthResp(YMSGTransfer *t) { case( Yahoo::ServiceList ): kdDebug(YAHOO_RAW_DEBUG) << "Emitting Signal" << endl; - emit loginResponse( Yahoo::LoginOk, QString() ); + emit loginResponse( Yahoo::LoginOk, TQString() ); break; case( Yahoo::ServiceAuthResp ): kdDebug(YAHOO_RAW_DEBUG) << "Emitting Signal" << endl; @@ -415,7 +415,7 @@ void LoginTask::parseCookies( YMSGTransfer *t ) for( int i = 0; i < t->paramCount( 59 ); ++i) { - QString cookie; + TQString cookie; cookie = t->nthParam( 59, i ); if( cookie.startsWith( "Y" ) ) { @@ -435,27 +435,27 @@ void LoginTask::parseCookies( YMSGTransfer *t ) emit haveCookies(); } -void LoginTask::setVerificationWord( const QString &word ) +void LoginTask::setVerificationWord( const TQString &word ) { m_verificationWord = word; } -const QString& LoginTask::yCookie() +const TQString& LoginTask::yCookie() { return m_yCookie; } -const QString& LoginTask::tCookie() +const TQString& LoginTask::tCookie() { return m_tCookie; } -const QString& LoginTask::cCookie() +const TQString& LoginTask::cCookie() { return m_cCookie; } -const QString& LoginTask::loginCookie() +const TQString& LoginTask::loginCookie() { return m_loginCookie; } diff --git a/kopete/protocols/yahoo/libkyahoo/logintask.h b/kopete/protocols/yahoo/libkyahoo/logintask.h index a3701692..563cd3a4 100644 --- a/kopete/protocols/yahoo/libkyahoo/logintask.h +++ b/kopete/protocols/yahoo/libkyahoo/logintask.h @@ -47,47 +47,47 @@ public: void reset(); void setStateOnConnect( Yahoo::Status status ); - void setVerificationWord( const QString &word ); + void setVerificationWord( const TQString &word ); - const QString &yCookie(); - const QString &cCookie(); - const QString &tCookie(); - const QString &loginCookie(); + const TQString &yCookie(); + const TQString &cCookie(); + const TQString &tCookie(); + const TQString &loginCookie(); protected: virtual bool forMe( const Transfer* transfer ) const; enum State { InitialState, SentVerify, GotVerifyACK, SentAuth, GotAuthACK, SentAuthResp }; void sendVerify(); void sendAuth(YMSGTransfer* transfer); void sendAuthResp(YMSGTransfer* transfer); - void sendAuthResp_0x0b(const QString &sn, const QString &seed, uint sessionID); - void sendAuthResp_pre_0x0b(const QString &sn, const QString &seed); + void sendAuthResp_0x0b(const TQString &sn, const TQString &seed, uint sessionID); + void sendAuthResp_pre_0x0b(const TQString &sn, const TQString &seed); void handleAuthResp(YMSGTransfer *transfer); void parseCookies( YMSGTransfer *transfer ); - void sendAuthSixteenStage1(const QString& sn, const QString& seed); - void sendAuthSixteenStage2(const QString& token); - void sendAuthSixteenStage3(const QString& cryptString); + void sendAuthSixteenStage1(const TQString& sn, const TQString& seed); + void sendAuthSixteenStage2(const TQString& token); + void sendAuthSixteenStage3(const TQString& cryptString); protected slots: - void handleAuthSixteenStage1Data(KIO::Job*, const QByteArray& data); + void handleAuthSixteenStage1Data(KIO::Job*, const TQByteArray& data); void handleAuthSixteenStage1Result(KIO::Job*); - void handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data); + void handleAuthSixteenStage2Data(KIO::Job*, const TQByteArray& data); void handleAuthSixteenStage2Result(KIO::Job*); signals: void haveSessionID( uint ); void haveCookies(); - void loginResponse( int, const QString& ); + void loginResponse( int, const TQString& ); void buddyListReady(); private: State mState; Yahoo::Status m_stateOnConnect; - QString m_yCookie; - QString m_tCookie; - QString m_cCookie; - QString m_loginCookie; - QString m_verificationWord; - QString m_stage1Data; - QString m_stage2Data; - QString m_challengeString; + TQString m_yCookie; + TQString m_tCookie; + TQString m_cCookie; + TQString m_loginCookie; + TQString m_verificationWord; + TQString m_stage1Data; + TQString m_stage2Data; + TQString m_challengeString; uint m_sessionID; }; diff --git a/kopete/protocols/yahoo/libkyahoo/logofftask.cpp b/kopete/protocols/yahoo/libkyahoo/logofftask.cpp index 0531283b..4816ba44 100644 --- a/kopete/protocols/yahoo/libkyahoo/logofftask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/logofftask.cpp @@ -19,7 +19,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> LogoffTask::LogoffTask(Task* parent) : Task(parent) diff --git a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp index 1d637877..de6a1080 100644 --- a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include <qstring.h> +#include <tqstring.h> #include "mailnotifiertask.h" #include "transfer.h" @@ -62,15 +62,15 @@ void MailNotifierTask::parseMail( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString count = t->firstParam( 9 ); - QString mail = t->firstParam( 42 ); - QString from = t->firstParam( 43 ); - QString subject = t->firstParam( 18 ); + TQString count = t->firstParam( 9 ); + TQString mail = t->firstParam( 42 ); + TQString from = t->firstParam( 43 ); + TQString subject = t->firstParam( 18 ); if( !mail.isEmpty() && !from.isEmpty() && !subject.isEmpty() ) - emit mailNotify( QString::fromLatin1( "%1 <%2>").arg( from, mail ), subject, count.toInt() ); + emit mailNotify( TQString::fromLatin1( "%1 <%2>").arg( from, mail ), subject, count.toInt() ); else - emit mailNotify( QString(), QString(), count.toInt()); + emit mailNotify( TQString(), TQString(), count.toInt()); } #include "mailnotifiertask.moc" diff --git a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h index 1564eb16..d2c03bdd 100644 --- a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h @@ -38,7 +38,7 @@ protected: virtual bool forMe( const Transfer *transfer ) const; void parseMail( YMSGTransfer *transfer ); signals: - void mailNotify(const QString&, const QString&, int); + void mailNotify(const TQString&, const TQString&, int); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp index 698552a3..769b4abe 100644 --- a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include <qstring.h> +#include <tqstring.h> #include "messagereceivertask.h" #include "transfer.h" @@ -73,12 +73,12 @@ void MessageReceiverTask::parseMessage( YMSGTransfer *t ) int cnt = t->paramCount( 5 ); for( int i = 0; i < cnt; ++i ) { - QString to = t->nthParam( 5, i ); - QString timestamp = t->nthParamSeparated( 15, i, 4 ); - QString utf8 = t->nthParamSeparated( 97, i, 4 ); - QString from = t->nthParamSeparated( 1, i, 4 ).isEmpty() ? t->nthParam( 4, i ) : t->nthParamSeparated( 1, i, 4 ); - QString msg = t->nthParamSeparated( 14, i, 4 ); - QString sysmsg = t->nthParamSeparated( 16, i, 4 ); + TQString to = t->nthParam( 5, i ); + TQString timestamp = t->nthParamSeparated( 15, i, 4 ); + TQString utf8 = t->nthParamSeparated( 97, i, 4 ); + TQString from = t->nthParamSeparated( 1, i, 4 ).isEmpty() ? t->nthParam( 4, i ) : t->nthParamSeparated( 1, i, 4 ); + TQString msg = t->nthParamSeparated( 14, i, 4 ); + TQString sysmsg = t->nthParamSeparated( 16, i, 4 ); // The arrangement of the key->value pairs is different when there is only one message in the packet. // Separating by key "5" (sender) doesn't work in that case, because the "1" and "4" keys are sent before the "5" key @@ -98,7 +98,7 @@ void MessageReceiverTask::parseMessage( YMSGTransfer *t ) } if( utf8.startsWith( "1" ) ) - msg = QString::fromUtf8( msg.latin1() ); + msg = TQString::fromUtf8( msg.latin1() ); if( t->service() == Yahoo::ServiceSysMessage ) emit systemMessage( sysmsg ); @@ -116,11 +116,11 @@ void MessageReceiverTask::parseNotify( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from = t->firstParam( 4 ); - //QString to = t->firstParam( 5 ); - QString type = t->firstParam( 49 ); - QString stat = t->firstParam( 13 ); - QString ind = t->firstParam( 14 ); + TQString from = t->firstParam( 4 ); + //TQString to = t->firstParam( 5 ); + TQString type = t->firstParam( 49 ); + TQString stat = t->firstParam( 13 ); + TQString ind = t->firstParam( 14 ); if( type.startsWith( "TYPING" ) ) emit gotTypingNotify( from, stat.toInt() ); diff --git a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h index 6ff26bca..89536443 100644 --- a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h +++ b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h @@ -39,11 +39,11 @@ protected: void parseMessage( YMSGTransfer *transfer ); void parseNotify( YMSGTransfer *transfer ); signals: - void gotIm(const QString&, const QString&, long, int); - void gotBuzz( const QString &who, long tm ); - void systemMessage(const QString&); - void gotTypingNotify(const QString &, int); - void gotWebcamInvite(const QString &); + void gotIm(const TQString&, const TQString&, long, int); + void gotBuzz( const TQString &who, long tm ); + void systemMessage(const TQString&); + void gotTypingNotify(const TQString &, int); + void gotWebcamInvite(const TQString &); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp index 018d0e84..e83b1e4b 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp @@ -139,22 +139,22 @@ void ModifyBuddyTask::moveBuddy() send( mov ); } -void ModifyBuddyTask::setTarget( const QString &target ) +void ModifyBuddyTask::setTarget( const TQString &target ) { m_target = target; } -void ModifyBuddyTask::setMessage( const QString &text ) +void ModifyBuddyTask::setMessage( const TQString &text ) { m_message = text; } -void ModifyBuddyTask::setGroup( const QString &group ) +void ModifyBuddyTask::setGroup( const TQString &group ) { m_group = group; } -void ModifyBuddyTask::setOldGroup( const QString &old ) +void ModifyBuddyTask::setOldGroup( const TQString &old ) { m_oldGroup = old; } diff --git a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h index 4b135f93..f3ceb73c 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h +++ b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h @@ -37,15 +37,15 @@ public: bool take(Transfer *transfer); void setType( Type type ); - void setMessage( const QString &text ); - void setTarget( const QString &target ); - void setGroup( const QString &group ); - void setOldGroup( const QString &group ); + void setMessage( const TQString &text ); + void setTarget( const TQString &target ); + void setGroup( const TQString &group ); + void setOldGroup( const TQString &group ); signals: - void buddyAddResult( const QString &, const QString &, bool ); - void buddyRemoveResult( const QString &, const QString &, bool ); - void buddyChangeGroupResult( const QString &, const QString &, bool ); + void buddyAddResult( const TQString &, const TQString &, bool ); + void buddyRemoveResult( const TQString &, const TQString &, bool ); + void buddyChangeGroupResult( const TQString &, const TQString &, bool ); protected: virtual bool forMe( const Transfer *transfer ) const; @@ -55,10 +55,10 @@ private: void removeBuddy(); void moveBuddy(); - QString m_message; - QString m_target; - QString m_group; - QString m_oldGroup; + TQString m_message; + TQString m_target; + TQString m_group; + TQString m_oldGroup; Type m_type; }; diff --git a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp index 825f958d..1264272a 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp @@ -21,9 +21,9 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> -#include <qdatastream.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqdatastream.h> +#include <tqdom.h> #include <klocale.h> #include <kio/global.h> #include <kio/job.h> @@ -45,9 +45,9 @@ ModifyYABTask::~ModifyYABTask() void ModifyYABTask::onGo() { kdDebug(YAHOO_RAW_DEBUG) ; - m_socket = new KBufferedSocket( "address.yahoo.com", QString::number(80) ); - connect( m_socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( connectSucceeded() ) ); - connect( m_socket, SIGNAL( gotError(int) ), this, SLOT( connectFailed(int) ) ); + m_socket = new KBufferedSocket( "address.yahoo.com", TQString::number(80) ); + connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( connectSucceeded() ) ); + connect( m_socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( connectFailed(int) ) ); m_socket->connect(); } @@ -59,15 +59,15 @@ void ModifyYABTask::setAction( Action action ) void ModifyYABTask::setEntry( const YABEntry &entry ) { - QDomDocument doc(""); - QDomElement root = doc.createElement( "ab" ); - QDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\" "); + TQDomDocument doc(""); + TQDomElement root = doc.createElement( "ab" ); + TQDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\" "); doc.appendChild(instr); root.setAttribute( "k", client()->userId() ); root.setAttribute( "cc", "1" ); doc.appendChild( root ); - QDomElement contact = doc.createElement( "ct" ); + TQDomElement contact = doc.createElement( "ct" ); entry.fillQDomElement( contact ); switch( m_action ) { @@ -91,7 +91,7 @@ void ModifyYABTask::connectFailed( int i) { m_socket->close(); client()->notifyError( i18n( "An error occurred while saving the address book entry." ), - QString( "%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error ); + TQString( "%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error ); } void ModifyYABTask::connectSucceeded() @@ -99,7 +99,7 @@ void ModifyYABTask::connectSucceeded() kdDebug(YAHOO_RAW_DEBUG) ; KBufferedSocket* socket = const_cast<KBufferedSocket*>( static_cast<const KBufferedSocket*>( sender() ) ); - QString header = QString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n" + TQString header = TQString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n" "Cookie: Y=%1; T=%2; C=%3 ;B=fckeert1kk1nl&b=2\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" "Host: address.yahoo.com\r\n" @@ -108,9 +108,9 @@ void ModifyYABTask::connectSucceeded() .arg(client()->yCookie()).arg(client()->tCookie()) .arg(client()->cCookie()).arg(m_postData.utf8().size()); - QByteArray buffer; - QByteArray paket; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQByteArray paket; + TQDataStream stream( buffer, IO_WriteOnly ); stream.writeRawBytes( header.local8Bit(), header.length() ); stream.writeRawBytes( m_postData.utf8(), m_postData.utf8().size() ); @@ -123,24 +123,24 @@ void ModifyYABTask::connectSucceeded() return; } - connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); } void ModifyYABTask::slotRead() { KBufferedSocket* socket = const_cast<KBufferedSocket*>( static_cast<const KBufferedSocket*>( sender() ) ); - QByteArray ar( socket->bytesAvailable() ); + TQByteArray ar( socket->bytesAvailable() ); socket->readBlock( ar.data (), ar.size () ); - QString data( ar ); + TQString data( ar ); data = data.right( data.length() - data.find("<?xml") ); if( m_data.find("</ab>") < 0 ) return; // Need more data m_socket->close(); - QDomDocument doc; - QDomNodeList list; - QDomElement e; + TQDomDocument doc; + TQDomNodeList list; + TQDomElement e; int it = 0; doc.setContent( m_data ); diff --git a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h index cb9acde8..543b582c 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h +++ b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h @@ -46,7 +46,7 @@ public: signals: void gotEntry( YABEntry * ); void gotRevision( long rev, bool merged ); - void error( YABEntry *, const QString &); + void error( YABEntry *, const TQString &); private slots: void connectSucceeded(); void connectFailed( int ); @@ -54,8 +54,8 @@ private slots: private: KIO::TransferJob *m_transferJob; KNetwork::KBufferedSocket *m_socket; - QString m_postData; - QString m_data; + TQString m_postData; + TQString m_data; Action m_action; }; diff --git a/kopete/protocols/yahoo/libkyahoo/oscartypes.h b/kopete/protocols/yahoo/libkyahoo/oscartypes.h index 74ee818e..70d19c9a 100644 --- a/kopete/protocols/yahoo/libkyahoo/oscartypes.h +++ b/kopete/protocols/yahoo/libkyahoo/oscartypes.h @@ -19,7 +19,7 @@ #ifndef OSCARTYPES_H #define OSCARTYPES_H -#include <qglobal.h> +#include <tqglobal.h> namespace Yahoo { diff --git a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp index b88b99c6..d924b3a6 100644 --- a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp @@ -20,7 +20,7 @@ #include "yahootypes.h" #include "client.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdebug.h> #include <klocale.h> @@ -119,7 +119,7 @@ void PictureNotifierTask::parsePicture( YMSGTransfer *t ) QString nick; /* key = 4 */ int type; /* key = 13: 1 = request, 2 = notification, 0 = Just changed */ - QString url; /* key = 20 */ + TQString url; /* key = 20 */ int checksum; /* key = 192 */ nick = t->firstParam( 4 ); @@ -139,8 +139,8 @@ void PictureNotifierTask::parsePictureUploadResponse( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString url; - QString error; + TQString url; + TQString error; int expires; url = t->firstParam( 20 ); diff --git a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h index 1a6536af..851c8b9c 100644 --- a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h @@ -42,11 +42,11 @@ protected: void parsePicture( YMSGTransfer *transfer ); void parsePictureUploadResponse( YMSGTransfer *transfer ); signals: - void pictureStatusNotify( const QString &, int ); - void pictureChecksumNotify( const QString &, int ); - void pictureInfoNotify( const QString &, KURL, int ); - void pictureRequest( const QString & ); - void pictureUploaded( const QString &, int ); + void pictureStatusNotify( const TQString &, int ); + void pictureChecksumNotify( const TQString &, int ); + void pictureInfoNotify( const TQString &, KURL, int ); + void pictureRequest( const TQString & ); + void pictureUploaded( const TQString &, int ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/pingtask.cpp b/kopete/protocols/yahoo/libkyahoo/pingtask.cpp index c8a97cd7..c453ff9d 100644 --- a/kopete/protocols/yahoo/libkyahoo/pingtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/pingtask.cpp @@ -21,7 +21,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> PingTask::PingTask(Task* parent) : Task(parent) diff --git a/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp b/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp index 3bca2217..ec2e9f5f 100644 --- a/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp @@ -20,8 +20,8 @@ #include "yahootypes.h" #include "client.h" -#include <qtimer.h> -#include <qfile.h> +#include <tqtimer.h> +#include <tqfile.h> #include <kdebug.h> #include <klocale.h> #include <kio/global.h> @@ -49,7 +49,7 @@ void ReceiveFileTask::onGo() switch( m_type ) { case FileTransferAccept: - m_file = new QFile( m_localUrl.path() ); + m_file = new TQFile( m_localUrl.path() ); if( !m_file->open( IO_WriteOnly ) ) { emit error( m_transferId, KIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Could not open file for writing.") ); @@ -58,8 +58,8 @@ void ReceiveFileTask::onGo() return; } m_transferJob = KIO::get( m_remoteUrl, false, false ); - QObject::connect( m_transferJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - QObject::connect( m_transferJob, SIGNAL( data( KIO::Job*, const QByteArray & ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray & ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); delete t; break; case FileTransfer7Accept: @@ -120,7 +120,7 @@ bool ReceiveFileTask::forMe( const Transfer *transfer ) const return false; } -void ReceiveFileTask::slotData( KIO::Job *job, const QByteArray& data ) +void ReceiveFileTask::slotData( KIO::Job *job, const TQByteArray& data ) { Q_UNUSED( job ); kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -168,7 +168,7 @@ void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer ) } else if( transfer->firstParam( 249 ).toInt() == 3 ) { - m_file = new QFile( m_localUrl.path() ); + m_file = new TQFile( m_localUrl.path() ); if( !m_file->open( IO_WriteOnly ) ) { emit error( m_transferId, KIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Could not open file for writing.") ); @@ -187,19 +187,19 @@ void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer ) send( t ); // The server expects a HTTP HEAD command prior to the GET - m_mimetypeJob = KIO::mimetype(QString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") - .arg( QString(transfer->firstParam( 250 )) ).arg( QString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false); + m_mimetypeJob = KIO::mimetype(TQString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") + .arg( TQString(transfer->firstParam( 250 )) ).arg( TQString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false); m_mimetypeJob->addMetaData("cookies", "manual"); - m_mimetypeJob->addMetaData("setcookies", QString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; C=%3;") + m_mimetypeJob->addMetaData("setcookies", TQString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; C=%3;") .arg(client()->tCookie()).arg(client()->yCookie()).arg(client()->cCookie()) ); - m_transferJob = KIO::get( QString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") - .arg( QString(transfer->firstParam( 250 )) ).arg( QString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false, false ); - QObject::connect( m_transferJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - QObject::connect( m_transferJob, SIGNAL( data( KIO::Job*, const QByteArray & ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); + m_transferJob = KIO::get( TQString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") + .arg( TQString(transfer->firstParam( 250 )) ).arg( TQString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false, false ); + TQObject::connect( m_transferJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray & ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); m_transferJob->addMetaData("cookies", "manual"); - m_transferJob->addMetaData("setcookies", QString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; path=/; domain=.yahoo.com;") + m_transferJob->addMetaData("setcookies", TQString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; path=/; domain=.yahoo.com;") .arg(client()->tCookie()).arg(client()->yCookie()) ); } } @@ -224,7 +224,7 @@ void ReceiveFileTask::setType( Type type ) m_type = type; } -void ReceiveFileTask::setUserId( const QString &userId ) +void ReceiveFileTask::setUserId( const TQString &userId ) { m_userId = userId; } diff --git a/kopete/protocols/yahoo/libkyahoo/receivefiletask.h b/kopete/protocols/yahoo/libkyahoo/receivefiletask.h index 01644178..103f3230 100644 --- a/kopete/protocols/yahoo/libkyahoo/receivefiletask.h +++ b/kopete/protocols/yahoo/libkyahoo/receivefiletask.h @@ -45,10 +45,10 @@ public: void setRemoteUrl( KURL url ); void setLocalUrl( KURL url ); - void setFileName( const QString &filename ); + void setFileName( const TQString &filename ); void setTransferId( unsigned int transferId ); void setType( Type type ); - void setUserId( const QString & userId ); + void setUserId( const TQString & userId ); bool take(Transfer *transfer); @@ -58,10 +58,10 @@ protected: signals: void bytesProcessed( unsigned int, unsigned int ); void complete( unsigned int ); - void error( unsigned int, int, const QString & ); + void error( unsigned int, int, const TQString & ); private slots: - void slotData( KIO::Job *job, const QByteArray &data ); + void slotData( KIO::Job *job, const TQByteArray &data ); void slotComplete( KIO::Job *job ); void canceled( unsigned int ); @@ -70,9 +70,9 @@ private: KURL m_remoteUrl; KURL m_localUrl; - QString m_fileName; - QString m_userId; - QFile *m_file; + TQString m_fileName; + TQString m_userId; + TQFile *m_file; KIO::TransferJob *m_transferJob; KIO::MimetypeJob *m_mimetypeJob; unsigned int m_transferId; diff --git a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp index 27a35430..55fb046e 100644 --- a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp @@ -43,7 +43,7 @@ void RequestPictureTask::onGo() setSuccess(); } -void RequestPictureTask::setTarget( const QString &target ) +void RequestPictureTask::setTarget( const TQString &target ) { m_target = target; } diff --git a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h index 8a96f6e7..05c192cd 100644 --- a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h +++ b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h @@ -33,9 +33,9 @@ public: virtual void onGo(); - void setTarget( const QString &target ); + void setTarget( const TQString &target ); private: - QString m_target; + TQString m_target; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/safedelete.cpp b/kopete/protocols/yahoo/libkyahoo/safedelete.cpp index 2b6b09cf..0b12c370 100644 --- a/kopete/protocols/yahoo/libkyahoo/safedelete.cpp +++ b/kopete/protocols/yahoo/libkyahoo/safedelete.cpp @@ -19,7 +19,7 @@ #include "safedelete.h" -#include <qtimer.h> +#include <tqtimer.h> //---------------------------------------------------------------------------- // SafeDelete @@ -35,7 +35,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -54,17 +54,17 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -117,7 +117,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -126,7 +126,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/yahoo/libkyahoo/safedelete.h b/kopete/protocols/yahoo/libkyahoo/safedelete.h index fd2ef937..ded0cb31 100644 --- a/kopete/protocols/yahoo/libkyahoo/safedelete.h +++ b/kopete/protocols/yahoo/libkyahoo/safedelete.h @@ -20,8 +20,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include<qobject.h> -#include<qobjectlist.h> +#include<tqobject.h> +#include<tqobjectlist.h> class SafeDelete; class SafeDeleteLock @@ -43,13 +43,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -62,7 +62,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -71,7 +71,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp index 28dfc664..34e94c69 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp @@ -20,7 +20,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> SendAuthRespTask::SendAuthRespTask(Task* parent) : Task(parent) @@ -59,12 +59,12 @@ void SendAuthRespTask::setGranted( bool granted ) m_granted = granted; } -void SendAuthRespTask::setTarget( const QString &to ) +void SendAuthRespTask::setTarget( const TQString &to ) { m_target = to; } -void SendAuthRespTask::setMessage( const QString &msg ) +void SendAuthRespTask::setMessage( const TQString &msg ) { m_msg = msg; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h index fed15168..953dabc3 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h @@ -35,12 +35,12 @@ public: virtual void onGo(); void setGranted( bool ); - void setTarget( const QString &to ); - void setMessage( const QString &msg ); + void setTarget( const TQString &to ); + void setMessage( const TQString &msg ); private: - QString m_target; + TQString m_target; bool m_granted; - QString m_msg; + TQString m_msg; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp b/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp index 5cdcf5c3..48af8684 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp @@ -19,8 +19,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> -#include <qtimer.h> +#include <tqstring.h> +#include <tqtimer.h> #include <kapplication.h> // for random() #include <kdebug.h> #include <klocale.h> @@ -35,7 +35,7 @@ SendFileTask::SendFileTask(Task* parent) : Task(parent) m_transmitted = 0; m_socket = 0; - QTime epoch(0, 0, 0); + TQTime epoch(0, 0, 0); } SendFileTask::~SendFileTask() @@ -132,7 +132,7 @@ void SendFileTask::sendFileTransferInfo() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - KResolverResults results = KResolver::resolve("filetransfer.msg.yahoo.com", QString::number(80)); + KResolverResults results = KResolver::resolve("filetransfer.msg.yahoo.com", TQString::number(80)); if(results.count() > 0) { m_relayHost = results.first().address().toString(); @@ -175,10 +175,10 @@ void SendFileTask::parseTransferAccept(const Transfer *transfer) m_token = KURL::encode_string(t->firstParam(251)); kdDebug(YAHOO_RAW_DEBUG) << "Token: " << m_token << endl; - m_socket = new KStreamSocket( m_relayHost, QString::number(80) ); + m_socket = new KStreamSocket( m_relayHost, TQString::number(80) ); m_socket->setBlocking( true ); - connect( m_socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( connectSucceeded() ) ); - connect( m_socket, SIGNAL( gotError(int) ), this, SLOT( connectFailed(int) ) ); + connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( connectSucceeded() ) ); + connect( m_socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( connectFailed(int) ) ); m_socket->connect(); @@ -186,7 +186,7 @@ void SendFileTask::parseTransferAccept(const Transfer *transfer) void SendFileTask::connectFailed( int i ) { - QString err = KSocketBase::errorString(m_socket->error()); + TQString err = KSocketBase::errorString(m_socket->error()); kdDebug(YAHOO_RAW_DEBUG) << i << ": " << err << endl; emit error( m_transferId, i, err ); setError(); @@ -196,8 +196,8 @@ void SendFileTask::connectSucceeded() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); if ( m_file.open(IO_ReadOnly ) ) { @@ -212,7 +212,7 @@ void SendFileTask::connectSucceeded() } kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Sizes: File (" << m_url << "): " << m_file.size() << endl; - QString header = + TQString header = "POST /relay?token=" + m_token + "&sender=" + client()->userId() + "&recver=" + m_target + " HTTP/1.1\r\n" @@ -220,7 +220,7 @@ void SendFileTask::connectSucceeded() "Cache-Control: no-cache\r\n" "Cookie: T=" + client()->tCookie() + "; Y=" + client()->yCookie() + "\r\n" "Host: " + m_relayHost + "\r\n" - "Content-Length: " + QString::number(m_file.size()) + "\r\n" + "Content-Length: " + TQString::number(m_file.size()) + "\r\n" "Connection: Close\r\n\r\n"; kdDebug() << header << endl; stream.writeRawBytes( header.local8Bit(), header.length() ); @@ -232,7 +232,7 @@ void SendFileTask::connectSucceeded() } else { - connect( m_socket, SIGNAL(readyWrite()), this, SLOT(transmitData()) ); + connect( m_socket, TQT_SIGNAL(readyWrite()), this, TQT_SLOT(transmitData()) ); m_socket->enableWrite( true ); } } @@ -271,12 +271,12 @@ void SendFileTask::transmitData() m_socket->enableWrite( true ); } } -void SendFileTask::setTarget( const QString &to ) +void SendFileTask::setTarget( const TQString &to ) { m_target = to; } -void SendFileTask::setMessage( const QString &msg ) +void SendFileTask::setMessage( const TQString &msg ) { m_msg = msg; } @@ -303,11 +303,11 @@ void SendFileTask::canceled( unsigned int id ) setError(); } -QString SendFileTask::newYahooTransferId() +TQString SendFileTask::newYahooTransferId() { // Adapted from libpurple/protocols/yahoo/yahoo_filexfer.c yahoo_xfer_new_xfer_id() - QString newId; + TQString newId; for(int i = 0; i < 22; i++) { diff --git a/kopete/protocols/yahoo/libkyahoo/sendfiletask.h b/kopete/protocols/yahoo/libkyahoo/sendfiletask.h index 83a205e2..1da3a7ae 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendfiletask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendfiletask.h @@ -19,7 +19,7 @@ #include "task.h" #include <kurl.h> -#include <qfile.h> +#include <tqfile.h> class QString; namespace KNetwork{ @@ -40,15 +40,15 @@ public: bool take(Transfer *transfer); - void setTarget( const QString &to ); - void setMessage( const QString &msg ); + void setTarget( const TQString &to ); + void setMessage( const TQString &msg ); void setFileUrl( KURL url ); void setTransferId( unsigned int transferId ); signals: void bytesProcessed( unsigned int, unsigned int ); void complete( unsigned int ); - void error( unsigned int, int, const QString & ); + void error( unsigned int, int, const TQString & ); void declined(); @@ -58,7 +58,7 @@ protected: void parseFileTransfer( const Transfer *transfer ); void parseTransferAccept(const Transfer *transfer); - QString newYahooTransferId(); + TQString newYahooTransferId(); private slots: void connectSucceeded(); @@ -67,17 +67,17 @@ private slots: void canceled( unsigned int ); private: - QString m_msg; - QString m_target; + TQString m_msg; + TQString m_target; KURL m_url; - QFile m_file; + TQFile m_file; unsigned int m_transferId; unsigned int m_transmitted; KNetwork::KStreamSocket *m_socket; - QString m_relayHost; - QString m_token; - QString m_yahooTransferId; + TQString m_relayHost; + TQString m_token; + TQString m_yahooTransferId; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp index bb6e4802..828c6832 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp @@ -19,7 +19,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include <klocale.h> @@ -64,12 +64,12 @@ void SendMessageTask::onGo() setSuccess(); } -void SendMessageTask::setTarget( const QString &to ) +void SendMessageTask::setTarget( const TQString &to ) { m_target = to; } -void SendMessageTask::setText( const QString &text ) +void SendMessageTask::setText( const TQString &text ) { m_text = text; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h index b4c31efe..eef62c13 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h @@ -32,12 +32,12 @@ public: virtual void onGo(); - void setText( const QString &text ); - void setTarget( const QString &to ); + void setText( const TQString &text ); + void setTarget( const TQString &to ); void setPicureFlag( int flag ); private: - QString m_text; - QString m_target; + TQString m_text; + TQString m_target; int m_pictureFlag; }; diff --git a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp index ed424bd3..638a1811 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp @@ -72,7 +72,7 @@ void SendNotifyTask::setType( Type type ) m_type = type; } -void SendNotifyTask::setTarget( const QString &to ) +void SendNotifyTask::setTarget( const TQString &to ) { m_target = to; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h index 67c0547a..2fee8fc6 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h @@ -37,10 +37,10 @@ public: virtual void onGo(); void setType( Type type ); - void setTarget( const QString &to ); + void setTarget( const TQString &to ); void setState( State ); private: - QString m_target; + TQString m_target; Type m_type; State m_state; }; diff --git a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp index 84edecaa..ab10873a 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp @@ -19,9 +19,9 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> -#include <qfile.h> -#include <qdatastream.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqdatastream.h> #include <kio/global.h> #include <kio/job.h> #include <kio/jobclasses.h> @@ -64,10 +64,10 @@ void SendPictureTask::onGo() void SendPictureTask::initiateUpload() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - m_socket = new KBufferedSocket( "filetransfer.msg.yahoo.com", QString::number(80) ); - connect( m_socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( connectSucceeded() ) ); - connect( m_socket, SIGNAL( gotError(int) ), this, SLOT( connectFailed(int) ) ); - connect( m_socket, SIGNAL( readyRead() ), this, SLOT( readResult() ) ); + m_socket = new KBufferedSocket( "filetransfer.msg.yahoo.com", TQString::number(80) ); + connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( connectSucceeded() ) ); + connect( m_socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( connectFailed(int) ) ); + connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( readResult() ) ); m_socket->connect(); } @@ -76,7 +76,7 @@ void SendPictureTask::connectFailed( int i) { kdDebug(YAHOO_RAW_DEBUG) << i << ": " << static_cast<const KBufferedSocket*>( sender() )->errorString() << endl; - client()->notifyError(i18n("The picture was not successfully uploaded"), QString("%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error ); + client()->notifyError(i18n("The picture was not successfully uploaded"), TQString("%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error ); setError(); } @@ -85,7 +85,7 @@ void SendPictureTask::connectSucceeded() kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; YMSGTransfer t(Yahoo::ServicePictureUpload); - QFile file( m_path ); + TQFile file( m_path ); t.setId( client()->sessionID() ); t.setParam( 1, client()->userId().local8Bit()); @@ -94,9 +94,9 @@ void SendPictureTask::connectSucceeded() t.setParam( 28, file.size() ); t.setParam( 27, m_fileName.local8Bit() ); t.setParam( 14, "" ); - QByteArray buffer; - QByteArray paket; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQByteArray paket; + TQDataStream stream( buffer, IO_WriteOnly ); if ( file.open( IO_ReadOnly ) ) { @@ -111,7 +111,7 @@ void SendPictureTask::connectSucceeded() paket = t.serialize(); kdDebug(YAHOO_RAW_DEBUG) << "Sizes: File (" << m_path << "): " << file.size() << " - paket: " << paket.size() << endl; - QString header = QString::fromLatin1("POST /notifyft HTTP/1.1\r\n" + TQString header = TQString::fromLatin1("POST /notifyft HTTP/1.1\r\n" "Cookie: Y=%1; T=%2; C=%3 ;\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" "Host: filetransfer.msg.yahoo.com\r\n" @@ -142,7 +142,7 @@ void SendPictureTask::readResult() // FIXME: to check // m_socket->enableRead( false ); -// QByteArray buf; +// TQByteArray buf; // buf.resize( m_socket->bytesAvailable() ); // m_socket->read( buf.data(), m_socket->bytesAvailable() ); // @@ -158,9 +158,9 @@ void SendPictureTask::readResult() // } // from original file - QByteArray ar( m_socket->bytesAvailable() ); + TQByteArray ar( m_socket->bytesAvailable() ); m_socket->readBlock ( ar.data (), ar.size () ); - QString buf( ar ); + TQString buf( ar ); m_socket->close(); if( buf.find( "error", 0, false ) >= 0 ) @@ -227,12 +227,12 @@ void SendPictureTask::setType( Type type ) m_type = type; } -void SendPictureTask::setTarget( const QString &to ) +void SendPictureTask::setTarget( const TQString &to ) { m_target = to; } -void SendPictureTask::setFilename( const QString &filename ) +void SendPictureTask::setFilename( const TQString &filename ) { m_fileName = filename; } @@ -242,7 +242,7 @@ void SendPictureTask::setFilesize( int filesize ) m_fileSize = filesize; } -void SendPictureTask::setPath( const QString &path ) +void SendPictureTask::setPath( const TQString &path ) { m_path = path; } @@ -257,7 +257,7 @@ void SendPictureTask::setStatus( int status ) m_status = status; } -void SendPictureTask::setUrl( const QString &url ) +void SendPictureTask::setUrl( const TQString &url ) { m_url = url; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h index b4d0d27e..3a3e1437 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h @@ -44,13 +44,13 @@ public: virtual void onGo(); void setType( Type type ); - void setTarget( const QString &to ); - void setFilename( const QString & ); + void setTarget( const TQString &to ); + void setFilename( const TQString & ); void setFilesize( int ); - void setPath( const QString & ); + void setPath( const TQString & ); void setChecksum( int ); void setStatus( int ); - void setUrl( const QString & ); + void setUrl( const TQString & ); private: void initiateUpload(); void sendChecksum(); @@ -62,15 +62,15 @@ private slots: void readResult(); private: Type m_type; - QString m_target; - QString m_fileName; + TQString m_target; + TQString m_fileName; int m_fileSize; - QString m_path; + TQString m_path; int m_checksum; int m_status; - QString m_url; + TQString m_url; int m_transmitted; - QFile *m_file; + TQFile *m_file; KNetwork::KBufferedSocket *m_socket; }; diff --git a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp index c7fcaeac..35796666 100644 --- a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp @@ -19,8 +19,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kdebug.h> #include <klocale.h> @@ -84,14 +84,14 @@ void StatusNotifierTask::parseStatus( YMSGTransfer* t ) if( t->status() == Yahoo::StatusDisconnected && t->service() == Yahoo::ServiceLogoff ) { - emit loginResponse( Yahoo::LoginDupl, QString() ); + emit loginResponse( Yahoo::LoginDupl, TQString() ); } QString myNick; /* key = 1 */ - QString customError; /* key = 16 */ - QString nick; /* key = 7 */ + TQString customError; /* key = 16 */ + TQString nick; /* key = 7 */ int state; /* key = 10 */ - QString message; /* key = 19 */ + TQString message; /* key = 19 */ int flags; /* key = 13 */ int away; /* key = 47 */ int idle; /* key = 137 */ @@ -114,12 +114,12 @@ void StatusNotifierTask::parseStatus( YMSGTransfer* t ) utf = t->nthParamSeparated( 97, i, 7 ).toInt() == 1; pictureChecksum = t->nthParamSeparated( 192, i, 7 ).toInt(); if( utf ) - message = QString::fromUtf8( t->nthParamSeparated( 19, i, 7 ) ); + message = TQString::fromUtf8( t->nthParamSeparated( 19, i, 7 ) ); else message = t->nthParamSeparated( 19, i, 7 ); if( t->service() == Yahoo::ServiceLogoff || ( state != 0 && flags == 0 ) ) - emit statusChanged( nick, Yahoo::StatusOffline, QString(), 0, 0, 0 ); + emit statusChanged( nick, Yahoo::StatusOffline, TQString(), 0, 0, 0 ); else emit statusChanged( nick, state, message, away, idle, pictureChecksum ); } @@ -129,15 +129,15 @@ void StatusNotifierTask::parseAuthorization( YMSGTransfer* t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString nick; /* key = 4 */ - QString msg; /* key = 14 */ + TQString nick; /* key = 4 */ + TQString msg; /* key = 14 */ int state; /* key = 13 */ bool utf; /* key = 97 */ utf = t->firstParam( 97 ).toInt() == 1; nick = t->firstParam( 4 ); if( utf ) - msg = QString::fromUtf8( t->firstParam( 14 ) ); + msg = TQString::fromUtf8( t->firstParam( 14 ) ); else msg = t->firstParam( 14 ); state = t->firstParam( 13 ).toInt(); @@ -152,11 +152,11 @@ void StatusNotifierTask::parseAuthorization( YMSGTransfer* t ) } else // This is a request { - QString fname = t->firstParam( 216 ); - QString lname = t->firstParam( 254 ); - QString name; + TQString fname = t->firstParam( 216 ); + TQString lname = t->firstParam( 254 ); + TQString name; if( !fname.isEmpty() || !lname.isEmpty() ) - name = QString("%1 %2").arg(fname).arg(lname); + name = TQString("%1 %2").arg(fname).arg(lname); kdDebug(YAHOO_RAW_DEBUG) << "Emitting gotAuthorizationRequest( " << nick<< ", " << msg << ", " << name << " )" << endl; emit gotAuthorizationRequest( nick, msg, name ); @@ -167,7 +167,7 @@ void StatusNotifierTask::parseStealthStatus( YMSGTransfer* t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString nick; /* key = 7 */ + TQString nick; /* key = 7 */ int state; /* key = 31 */ nick = t->firstParam( 7 ); diff --git a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h index 5cc63d8a..2400363b 100644 --- a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h @@ -41,12 +41,12 @@ protected: void parseStealthStatus( YMSGTransfer *transfer ); void parseAuthorization( YMSGTransfer *transfer ); signals: - void statusChanged( const QString &nick, int state, const QString &message, int away, int idle, int pictureChecksum ); - void stealthStatusChanged( const QString&, Yahoo::StealthStatus ); - void loginResponse( int, const QString& ); - void authorizationAccepted( const QString & ); - void authorizationRejected( const QString &, const QString & ); - void gotAuthorizationRequest( const QString &, const QString &, const QString & ); + void statusChanged( const TQString &nick, int state, const TQString &message, int away, int idle, int pictureChecksum ); + void stealthStatusChanged( const TQString&, Yahoo::StealthStatus ); + void loginResponse( int, const TQString& ); + void authorizationAccepted( const TQString & ); + void authorizationRejected( const TQString &, const TQString & ); + void gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp b/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp index 89474ab4..6eba854a 100644 --- a/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp @@ -19,7 +19,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> +#include <tqstring.h> StealthTask::StealthTask(Task* parent) : Task(parent) { @@ -65,7 +65,7 @@ void StealthTask::onGo() setSuccess(); } -void StealthTask::setTarget( const QString &to ) +void StealthTask::setTarget( const TQString &to ) { m_target = to; } diff --git a/kopete/protocols/yahoo/libkyahoo/stealthtask.h b/kopete/protocols/yahoo/libkyahoo/stealthtask.h index 6c33da1e..5659e110 100644 --- a/kopete/protocols/yahoo/libkyahoo/stealthtask.h +++ b/kopete/protocols/yahoo/libkyahoo/stealthtask.h @@ -34,11 +34,11 @@ public: virtual void onGo(); - void setTarget( const QString &to ); + void setTarget( const TQString &to ); void setState( Yahoo::StealthStatus state ); void setMode( Yahoo::StealthMode mode ); private: - QString m_target; + TQString m_target; Yahoo::StealthMode m_mode; Yahoo::StealthStatus m_state; }; diff --git a/kopete/protocols/yahoo/libkyahoo/stream.cpp b/kopete/protocols/yahoo/libkyahoo/stream.cpp index 8173281c..82d6fe52 100644 --- a/kopete/protocols/yahoo/libkyahoo/stream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/yahoo/libkyahoo/stream.h b/kopete/protocols/yahoo/libkyahoo/stream.h index 71bcae5c..c7f9eeae 100644 --- a/kopete/protocols/yahoo/libkyahoo/stream.h +++ b/kopete/protocols/yahoo/libkyahoo/stream.h @@ -18,7 +18,7 @@ ************************************************************************* */ -#include <qobject.h> +#include <tqobject.h> #ifndef YAHOO_STREAM_H #define YAHOO_STREAM_H @@ -43,12 +43,12 @@ public: SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); virtual void close()=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; + virtual TQString errorText() const=0; /** * Are there any messages waiting to be read diff --git a/kopete/protocols/yahoo/libkyahoo/task.cpp b/kopete/protocols/yahoo/libkyahoo/task.cpp index f3d1a98c..b604219b 100644 --- a/kopete/protocols/yahoo/libkyahoo/task.cpp +++ b/kopete/protocols/yahoo/libkyahoo/task.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qtimer.h> +#include <tqtimer.h> #include "client.h" #include "transfer.h" @@ -30,10 +30,10 @@ class Task::TaskPrivate public: TaskPrivate() {} - QString id; + TQString id; bool success; int statusCode; - QString statusString; + TQString statusString; Client *client; bool insignificant, deleteme, autoDelete; bool done; @@ -41,22 +41,22 @@ public: }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->transfer = 0; d->client = parent->client(); //d->id = client()->genUniqueId(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Client *parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -77,7 +77,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Client *Task::client() const @@ -95,7 +95,7 @@ void Task::setTransfer( Transfer * transfer ) d->transfer = transfer; } -QString Task::id() const +TQString Task::id() const { return d->id; } @@ -110,7 +110,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -124,16 +124,16 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the transfer to our children - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("Task")) continue; @@ -172,7 +172,7 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } @@ -181,7 +181,7 @@ void Task::send( Transfer * request ) client()->send( request ); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -191,7 +191,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -228,7 +228,7 @@ void Task::clientDisconnected() // void Task::debug(const char *fmt, ...) // { // char *buf; -// QString str; +// TQString str; // int size = 1024; // int r; // @@ -240,7 +240,7 @@ void Task::clientDisconnected() // va_end(ap); // // if(r != -1) -// str = QString(buf); +// str = TQString(buf); // // delete [] buf; // @@ -250,9 +250,9 @@ void Task::clientDisconnected() // debug(str); // } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { - client()->debug(QString("%1: ").arg(className()) + str); + client()->debug(TQString("%1: ").arg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const diff --git a/kopete/protocols/yahoo/libkyahoo/task.h b/kopete/protocols/yahoo/libkyahoo/task.h index a1a64e45..00cdb18f 100644 --- a/kopete/protocols/yahoo/libkyahoo/task.h +++ b/kopete/protocols/yahoo/libkyahoo/task.h @@ -20,7 +20,7 @@ #ifndef YAHOO_TASK_H #define YAHOO_TASK_H -#include <qobject.h> +#include <tqobject.h> class QString; @@ -40,11 +40,11 @@ public: Client *client() const; Transfer *transfer() const; - QString id() const; + TQString id() const; bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go( bool autoDelete=false ); /** @@ -61,10 +61,10 @@ protected: virtual void onGo(); virtual void onDisconnect(); void send( Transfer * request ); - void setSuccess( int code=0, const QString &str="" ); - void setError( int code=0, const QString &str="" ); + void setSuccess( int code=0, const TQString &str="" ); + void setError( int code=0, const TQString &str="" ); // void debug( const char *, ... ); - void debug( const QString & ); + void debug( const TQString & ); /** * Used in take() to check if the offered transfer is for this Task * @return true if this Task should take the Transfer. Default impl always returns false. @@ -73,7 +73,7 @@ protected: /** * Creates a transfer with the given command and field list */ - //void createTransfer( const QString & command, const Field::FieldList fields ); + //void createTransfer( const TQString & command, const Field::FieldList fields ); /** * Direct setter for Tasks which don't have any fields */ diff --git a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp index a52b1f56..efcd63cf 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp +++ b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp @@ -5,7 +5,7 @@ #include "../ymsgtransfer.h" #include "../yahootypes.h" -ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, argv ) +ClientStreamTest::ClientStreamTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -13,12 +13,12 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, myConnector->setOptHostPort( "scs.msg.yahoo.com", 5050 ); myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); // notify and start sending - //connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) ); + //connect( myTestObject, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotWarning(int) ) ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -30,7 +30,7 @@ ClientStreamTest::~ClientStreamTest() void ClientStreamTest::slotDoTest() { - QString server = QString::fromLatin1("scs.msg.yahoo.com"); + TQString server = TQString::fromLatin1("scs.msg.yahoo.com"); // connect to server kdDebug(14180) << k_funcinfo << " connecting to server" << endl; myTestObject->connectToServer( server, true ); // fine up to here... diff --git a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h index ef367cec..8842fcc2 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h +++ b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h @@ -10,9 +10,9 @@ #ifndef clientstream_test_h #define clientstream_test_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "yahooclientstream.h" #include "yahooconnector.h" diff --git a/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp b/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp index 8778d9da..5e9b04a5 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp +++ b/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp @@ -23,7 +23,7 @@ #include "../ymsgtransfer.h" #include "../yahootypes.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -33,7 +33,7 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) // notify when the transport layer is connected myClient = new Client(); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -46,11 +46,11 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("scs.msg.yahoo.com"); + TQString server = TQString::fromLatin1("scs.msg.yahoo.com"); // connect to server kdDebug(14180) << k_funcinfo << " connecting to server" << endl; - connect( myClient, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myClient, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient->start( server, 5050, "duncanmacvicar", "**********" ); myClient->connectToServer( myClientStream, server, true ); } diff --git a/kopete/protocols/yahoo/libkyahoo/tests/logintest.h b/kopete/protocols/yahoo/libkyahoo/tests/logintest.h index 12274843..68a40b24 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/logintest.h +++ b/kopete/protocols/yahoo/libkyahoo/tests/logintest.h @@ -21,9 +21,9 @@ #ifndef logintest_h #define logintest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "client.h" #include "coreprotocol.h" diff --git a/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp b/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp index fe3c6d7c..2ad978f2 100644 --- a/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp @@ -21,10 +21,10 @@ #include "yahootypes.h" #include "client.h" -#include <qbuffer.h> -#include <qfile.h> -#include <qtimer.h> -#include <qpixmap.h> +#include <tqbuffer.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqpixmap.h> #include <ktempfile.h> #include <kprocess.h> #include <kstreamsocket.h> @@ -73,7 +73,7 @@ bool WebcamTask::forMe( const Transfer* transfer ) const return false; } -void WebcamTask::requestWebcam( const QString &who ) +void WebcamTask::requestWebcam( const TQString &who ) { kdDebug(YAHOO_RAW_DEBUG) ; @@ -108,12 +108,12 @@ void WebcamTask::parseWebcamInformation( YMSGTransfer *t ) kdDebug(YAHOO_RAW_DEBUG) << "Got WebcamInformation: Sender: " << info.sender << " Server: " << info.server << " Key: " << info.key << endl; - KStreamSocket *socket = new KStreamSocket( info.server, QString::number(5100) ); + KStreamSocket *socket = new KStreamSocket( info.server, TQString::number(5100) ); socketMap[socket] = info; socket->enableRead( true ); - connect( socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage1Established() ) ); - connect( socket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); - connect( socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + connect( socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage1Established() ) ); + connect( socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); + connect( socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); socket->connect(); } @@ -124,23 +124,23 @@ void WebcamTask::slotConnectionStage1Established() if( !socket ) return; kdDebug(YAHOO_RAW_DEBUG) << "Webcam connection Stage1 to the user " << socketMap[socket].sender << " established." << endl; - disconnect( socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage1Established() ) ); - disconnect( socket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); + disconnect( socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage1Established() ) ); + disconnect( socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); socketMap[socket].status = ConnectedStage1; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); - QString s; + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); + TQString s; if( socketMap[socket].direction == Incoming ) { - socket->writeBlock( QCString("<RVWCFG>").data(), 8 ); - s = QString("g=%1\r\n").arg(socketMap[socket].sender); + socket->writeBlock( TQCString("<RVWCFG>").data(), 8 ); + s = TQString("g=%1\r\n").arg(socketMap[socket].sender); } else { - socket->writeBlock( QCString("<RUPCFG>").data(), 8 ); - s = QString("f=1\r\n"); + socket->writeBlock( TQCString("<RUPCFG>").data(), 8 ); + s = TQString("f=1\r\n"); } // Header: 08 00 01 00 00 00 00 @@ -157,21 +157,21 @@ void WebcamTask::slotConnectionStage2Established() return; kdDebug(YAHOO_RAW_DEBUG) << "Webcam connection Stage2 to the user " << socketMap[socket].sender << " established." << endl; - disconnect( socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage2Established() ) ); - disconnect( socket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); + disconnect( socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage2Established() ) ); + disconnect( socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); socketMap[socket].status = ConnectedStage2; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); - QString s; + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); + TQString s; if( socketMap[socket].direction == Incoming ) { // Send <REQIMG>-Packet - socket->writeBlock( QCString("<REQIMG>").data(), 8 ); + socket->writeBlock( TQCString("<REQIMG>").data(), 8 ); // Send request information - s = QString("a=2\r\nc=us\r\ne=21\r\nu=%1\r\nt=%2\r\ni=\r\ng=%3\r\no=w-2-5-1\r\np=1") + s = TQString("a=2\r\nc=us\r\ne=21\r\nu=%1\r\nt=%2\r\ni=\r\ng=%3\r\no=w-2-5-1\r\np=1") .arg(client()->userId()).arg(socketMap[socket].key).arg(socketMap[socket].sender); // Header: 08 00 01 00 00 00 00 stream << (Q_INT8)0x08 << (Q_INT8)0x00 << (Q_INT8)0x01 << (Q_INT8)0x00 << (Q_INT32)s.length(); @@ -179,9 +179,9 @@ void WebcamTask::slotConnectionStage2Established() else { // Send <REQIMG>-Packet - socket->writeBlock( QCString("<SNDIMG>").data(), 8 ); + socket->writeBlock( TQCString("<SNDIMG>").data(), 8 ); // Send request information - s = QString("a=2\r\nc=us\r\nu=%1\r\nt=%2\r\ni=%3\r\no=w-2-5-1\r\np=2\r\nb=KopeteWebcam\r\nd=\r\n") + s = TQString("a=2\r\nc=us\r\nu=%1\r\nt=%2\r\ni=%3\r\no=w-2-5-1\r\np=2\r\nb=KopeteWebcam\r\nd=\r\n") .arg(client()->userId()).arg(socketMap[socket].key).arg(socket->localAddress().nodeName()); // Header: 08 00 05 00 00 00 00 01 00 00 00 01 stream << (Q_INT8)0x0d << (Q_INT8)0x00 << (Q_INT8)0x05 << (Q_INT8)0x00 << (Q_INT32)s.length() @@ -197,7 +197,7 @@ void WebcamTask::slotConnectionFailed( int error ) KStreamSocket* socket = const_cast<KStreamSocket*>( dynamic_cast<const KStreamSocket*>( sender() ) ); kdDebug(YAHOO_RAW_DEBUG) << "Webcam connection to the user " << socketMap[socket].sender << " failed. Error " << error << " - " << socket->errorString() << endl; client()->notifyError( i18n("Webcam connection to the user %1 could not be established.\n\nPlease relogin and try again.") - .arg(socketMap[socket].sender), QString("%1 - %2").arg(error).arg( socket->errorString()), Client::Error ); + .arg(socketMap[socket].sender), TQString("%1 - %2").arg(error).arg( socket->errorString()), Client::Error ); socketMap.remove( socket ); socket->deleteLater(); } @@ -211,7 +211,7 @@ void WebcamTask::slotRead() switch( socketMap[socket].status ) { case ConnectedStage1: - disconnect( socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + disconnect( socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); connectStage2( socket ); break; case ConnectedStage2: @@ -226,13 +226,13 @@ void WebcamTask::slotRead() void WebcamTask::connectStage2( KStreamSocket *socket ) { kdDebug(YAHOO_RAW_DEBUG) ; - QByteArray data( socket->bytesAvailable() ); + TQByteArray data( socket->bytesAvailable() ); socket->readBlock ( data.data (), data.size () ); kdDebug(YAHOO_RAW_DEBUG) << "Magic Byte:" << data[2] << endl; socketMap[socket].status = ConnectedStage2; - QString server; + TQString server; int i = 4; KStreamSocket *newSocket; switch( (const char)data[2] ) @@ -252,16 +252,16 @@ void WebcamTask::connectStage2( KStreamSocket *socket ) } kdDebug(YAHOO_RAW_DEBUG) << "Connecting to " << server << endl; - newSocket = new KStreamSocket( server, QString::number(5100) ); + newSocket = new KStreamSocket( server, TQString::number(5100) ); socketMap[newSocket] = socketMap[socket]; newSocket->enableRead( true ); - connect( newSocket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage2Established() ) ); - connect( newSocket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); - connect( newSocket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + connect( newSocket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage2Established() ) ); + connect( newSocket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); + connect( newSocket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); if( socketMap[newSocket].direction == Outgoing ) { newSocket->enableWrite( true ); - connect( newSocket, SIGNAL( readyWrite() ), this, SLOT( transmitWebcamImage() ) ); + connect( newSocket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( transmitWebcamImage() ) ); } newSocket->connect(); @@ -275,7 +275,7 @@ void WebcamTask::connectStage2( KStreamSocket *socket ) void WebcamTask::processData( KStreamSocket *socket ) { - QByteArray data( socket->bytesAvailable() ); + TQByteArray data( socket->bytesAvailable() ); socket->readBlock ( data.data (), data.size () ); @@ -288,7 +288,7 @@ void WebcamTask::processData( KStreamSocket *socket ) parseData( data, socket ); } -void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) +void WebcamTask::parseData( TQByteArray &data, KStreamSocket *socket ) { int headerLength = 0; int read = 0; @@ -310,7 +310,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) kdDebug() << data[8] << data[9] << data[10] << data[11] << data[12] << endl; info->timestamp = yahoo_get32(data.data() + 9); kdDebug(YAHOO_RAW_DEBUG) << "PacketType: " << data[8] << " reason: " << info->reason << " timestamp: " << info->timestamp << endl; - QStringList::iterator it; + TQStringList::iterator it; switch( data[8] ) { case 0x00: @@ -384,8 +384,8 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) { // More headers to read kdDebug(YAHOO_RAW_DEBUG) << "More data to read..." << endl; - QByteArray newData( data.size() - headerLength ); - QDataStream stream( newData, IO_WriteOnly ); + TQByteArray newData( data.size() - headerLength ); + TQDataStream stream( newData, IO_WriteOnly ); stream.writeRawBytes( data.data() + headerLength, data.size() - headerLength ); parseData( newData, socket ); return; @@ -408,7 +408,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) if( !info->buffer ) { kdDebug(YAHOO_RAW_DEBUG) << "Buffer created" << endl; - info->buffer = new QBuffer(); + info->buffer = new TQBuffer(); info->buffer->open( IO_WriteOnly ); } @@ -419,7 +419,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) if( info->buffer->size() >= static_cast<uint>(info->dataLength) ) { info->buffer->close(); - QString who; + TQString who; switch( info->type ) { case UserRequest: @@ -450,7 +450,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) break; case Image: { - QPixmap webcamImage; + TQPixmap webcamImage; //webcamImage.loadFromData( info->buffer->buffer() ); // FIXME (same) @@ -466,7 +466,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) KTempFile jpcTmpImageFile; KTempFile bmpTmpImageFile; - QFile *file = jpcTmpImageFile.file(); + TQFile *file = jpcTmpImageFile.file(); file->writeBlock((info->buffer->buffer()).data(), info->buffer->size()); file->close(); @@ -485,8 +485,8 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) /******* UPTO THIS POINT ******/ emit webcamImageReceived( info->sender, webcamImage ); } - QFile::remove(jpcTmpImageFile.name()); - QFile::remove(bmpTmpImageFile.name()); + TQFile::remove(jpcTmpImageFile.name()); + TQFile::remove(bmpTmpImageFile.name()); kdDebug(YAHOO_RAW_DEBUG) << "Image Received. Size: " << webcamImage.size() << endl; } @@ -503,8 +503,8 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) { // More headers to read kdDebug(YAHOO_RAW_DEBUG) << "More data to read..." << data.size() - read << endl; - QByteArray newData( data.size() - read ); - QDataStream stream( newData, IO_WriteOnly ); + TQByteArray newData( data.size() - read ); + TQDataStream stream( newData, IO_WriteOnly ); stream.writeRawBytes( data.data() + read, data.size() - read ); parseData( newData, socket ); } @@ -520,7 +520,7 @@ void WebcamTask::cleanUpConnection( KStreamSocket *socket ) delete socket; } -void WebcamTask::closeWebcam( const QString & who ) +void WebcamTask::closeWebcam( const TQString & who ) { kdDebug(YAHOO_RAW_DEBUG) ; SocketInfoMap::Iterator it; @@ -552,14 +552,14 @@ void WebcamTask::registerWebcam() send( t ); } -void WebcamTask::addPendingInvitation( const QString &userId ) +void WebcamTask::addPendingInvitation( const TQString &userId ) { kdDebug(YAHOO_RAW_DEBUG) << "Inviting " << userId << " to watch the webcam." << endl; pendingInvitations.append( userId ); accessGranted.append( userId ); } -void WebcamTask::grantAccess( const QString &userId ) +void WebcamTask::grantAccess( const TQString &userId ) { kdDebug(YAHOO_RAW_DEBUG) ; KStreamSocket *socket = 0L; @@ -577,9 +577,9 @@ void WebcamTask::grantAccess( const QString &userId ) kdDebug(YAHOO_RAW_DEBUG) << "Error. No outgoing socket found." << endl; return; } - QByteArray ar; - QDataStream stream( ar, IO_WriteOnly ); - QString user = QString("u=%1").arg(userId); + TQByteArray ar; + TQDataStream stream( ar, IO_WriteOnly ); + TQString user = TQString("u=%1").arg(userId); stream << (Q_INT8)0x0d << (Q_INT8)0x00 << (Q_INT8)0x05 << (Q_INT8)0x00 << (Q_INT32)user.length() << (Q_INT8)0x00 << (Q_INT8)0x00 << (Q_INT8)0x00 << (Q_INT8)0x00 << (Q_INT8)0x01; @@ -635,11 +635,11 @@ void WebcamTask::sendEmptyWebcamImage() pictureBuffer.resize( 0 ); transmissionPending = true; - QTimer::singleShot( 1000, this, SLOT(sendEmptyWebcamImage()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(sendEmptyWebcamImage()) ); } -void WebcamTask::sendWebcamImage( const QByteArray &image ) +void WebcamTask::sendWebcamImage( const TQByteArray &image ) { kdDebug(YAHOO_RAW_DEBUG) ; pictureBuffer = image; @@ -687,8 +687,8 @@ void WebcamTask::transmitWebcamImage() } socket->enableWrite( false ); - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); stream << (Q_INT8)0x0d << (Q_INT8)0x00 << (Q_INT8)0x05 << (Q_INT8)0x00 << (Q_INT32)pictureBuffer.size() << (Q_INT8)0x02 << (Q_INT32)timestamp++; socket->writeBlock( buffer.data(), buffer.size() ); diff --git a/kopete/protocols/yahoo/libkyahoo/webcamtask.h b/kopete/protocols/yahoo/libkyahoo/webcamtask.h index 23639b8d..d84b6374 100644 --- a/kopete/protocols/yahoo/libkyahoo/webcamtask.h +++ b/kopete/protocols/yahoo/libkyahoo/webcamtask.h @@ -18,9 +18,9 @@ #define WEBCAMTASK_H #include "task.h" -#include <qmap.h> -#include <qpixmap.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqpixmap.h> +#include <tqstringlist.h> class QString; class YMSGTransfer; @@ -46,10 +46,10 @@ struct YahooWebcamInformation Q_INT32 dataLength; Q_INT32 timestamp; bool headerRead; - QBuffer *buffer; + TQBuffer *buffer; }; -typedef QMap< KStreamSocket *, YahooWebcamInformation > SocketInfoMap; +typedef TQMap< KStreamSocket *, YahooWebcamInformation > SocketInfoMap; /** @author André Duffeck @@ -65,24 +65,24 @@ public: bool transmitting() { return transmittingData; } - void requestWebcam( const QString &who ); - void closeWebcam( const QString &who ); + void requestWebcam( const TQString &who ); + void closeWebcam( const TQString &who ); void registerWebcam(); - void sendWebcamImage( const QByteArray &image ); - void addPendingInvitation( const QString &userId ); - void grantAccess( const QString &userId ); + void sendWebcamImage( const TQByteArray &image ); + void addPendingInvitation( const TQString &userId ); + void grantAccess( const TQString &userId ); void closeOutgoingWebcam(); signals: - void webcamNotAvailable( const QString & ); - void webcamClosed( const QString &, int ); - void webcamPaused( const QString& ); - void webcamImageReceived( const QString &, const QPixmap &); + void webcamNotAvailable( const TQString & ); + void webcamClosed( const TQString &, int ); + void webcamPaused( const TQString& ); + void webcamImageReceived( const TQString &, const TQPixmap &); void readyForTransmission(); void stopTransmission(); - void viewerJoined( const QString & ); - void viewerLeft( const QString & ); - void viewerRequest( const QString & ); + void viewerJoined( const TQString & ); + void viewerLeft( const TQString & ); + void viewerRequest( const TQString & ); private slots: void slotConnectionStage1Established(); void slotConnectionStage2Established(); @@ -94,19 +94,19 @@ protected: virtual bool forMe( const Transfer* transfer ) const; private: void parseWebcamInformation( YMSGTransfer *transfer ); - void parseData( QByteArray &data, KStreamSocket *socket ); + void parseData( TQByteArray &data, KStreamSocket *socket ); void connectStage2( KStreamSocket *socket ); void processData( KStreamSocket *socket ); void cleanUpConnection( KStreamSocket *socket ); - QString keyPending; // the buddy we have requested the webcam from + TQString keyPending; // the buddy we have requested the webcam from SocketInfoMap socketMap; bool transmittingData; - QStringList pendingInvitations; - QStringList accessGranted; + TQStringList pendingInvitations; + TQStringList accessGranted; int timestamp; - QByteArray pictureBuffer; + TQByteArray pictureBuffer; bool transmissionPending; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yabentry.cpp b/kopete/protocols/yahoo/libkyahoo/yabentry.cpp index d726d6d6..b9a4d72b 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabentry.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yabentry.cpp @@ -16,7 +16,7 @@ #include "yabentry.h" -void YABEntry::fromQDomElement( const QDomElement &e ) +void YABEntry::fromQDomElement( const TQDomElement &e ) { yahooId = e.attribute("yi"); YABId = e.attribute("id", "-1").toInt(); @@ -47,10 +47,10 @@ void YABEntry::fromQDomElement( const QDomElement &e ) privateState = e.attribute("hs"); privateZIP = e.attribute("hz"); privateCountry = e.attribute("hn"); - QString birtday = e.attribute("bi"); - birthday = QDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); - QString an = e.attribute("an"); - anniversary = QDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); + TQString birtday = e.attribute("bi"); + birthday = TQDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); + TQString an = e.attribute("an"); + anniversary = TQDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); additional1 = e.attribute("c1"); additional2 = e.attribute("c2"); additional3 = e.attribute("c3"); @@ -65,7 +65,7 @@ void YABEntry::fromQDomElement( const QDomElement &e ) imSkype = e.attribute("imk"); } -void YABEntry::fromQDomDocument( const QDomDocument &d ) +void YABEntry::fromQDomDocument( const TQDomDocument &d ) { kdDebug() << d.toString() << d.elementsByTagName("yi").item(0).toElement().text() << endl; @@ -97,10 +97,10 @@ void YABEntry::fromQDomDocument( const QDomDocument &d ) privateState = d.elementsByTagName("hs").item(0).toElement().text(); privateZIP = d.elementsByTagName("hz").item(0).toElement().text(); privateCountry = d.elementsByTagName("hn").item(0).toElement().text(); - QString birtday = d.elementsByTagName("bi").item(0).toElement().text(); - birthday = QDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); - QString an = d.elementsByTagName("an").item(0).toElement().text(); - anniversary = QDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); + TQString birtday = d.elementsByTagName("bi").item(0).toElement().text(); + birthday = TQDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); + TQString an = d.elementsByTagName("an").item(0).toElement().text(); + anniversary = TQDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); additional1 = d.elementsByTagName("c1").item(0).toElement().text(); additional2 = d.elementsByTagName("c2").item(0).toElement().text(); additional3 = d.elementsByTagName("c3").item(0).toElement().text(); @@ -115,7 +115,7 @@ void YABEntry::fromQDomDocument( const QDomDocument &d ) imSkype = d.elementsByTagName("imk").item(0).toElement().text(); } -void YABEntry::fillQDomElement( QDomElement &e ) const +void YABEntry::fillQDomElement( TQDomElement &e ) const { e.setAttribute( "yi", yahooId ); e.setAttribute( "id", YABId ); @@ -135,24 +135,24 @@ void YABEntry::fillQDomElement( QDomElement &e ) const e.setAttribute( "pu", privateURL ); e.setAttribute( "ti", title ); e.setAttribute( "co", corporation ); - e.setAttribute( "wa", QString( workAdress ).replace( '\n', "
" ) ); + e.setAttribute( "wa", TQString( workAdress ).replace( '\n', "
" ) ); e.setAttribute( "wc", workCity ); e.setAttribute( "ws", workState ); e.setAttribute( "wz", workZIP ); e.setAttribute( "wn", workCountry ); e.setAttribute( "wu", workURL ); - e.setAttribute( "ha", QString( privateAdress ).replace( '\n', "
" ) ); + e.setAttribute( "ha", TQString( privateAdress ).replace( '\n', "
" ) ); e.setAttribute( "hc", privateCity ); e.setAttribute( "hs", privateState ); e.setAttribute( "hz", privateZIP ); e.setAttribute( "hn", privateCountry ); - e.setAttribute( "bi", QString("%1/%2/%3").arg( birthday.day() ).arg( birthday.month() ).arg( birthday.year() ) ); - e.setAttribute( "an", QString("%1/%2/%3").arg( anniversary.day() ).arg( anniversary.month() ).arg( anniversary.year() ) ); + e.setAttribute( "bi", TQString("%1/%2/%3").arg( birthday.day() ).arg( birthday.month() ).arg( birthday.year() ) ); + e.setAttribute( "an", TQString("%1/%2/%3").arg( anniversary.day() ).arg( anniversary.month() ).arg( anniversary.year() ) ); e.setAttribute( "c1", additional1 ); e.setAttribute( "c2", additional2 ); e.setAttribute( "c3", additional3 ); e.setAttribute( "c4", additional4 ); - e.setAttribute( "cm", QString( notes ).replace( '\n', "
" ) ); + e.setAttribute( "cm", TQString( notes ).replace( '\n', "
" ) ); e.setAttribute( "ima", imAIM ); e.setAttribute( "img", imGoogleTalk ); e.setAttribute( "imq", imICQ ); diff --git a/kopete/protocols/yahoo/libkyahoo/yabentry.h b/kopete/protocols/yahoo/libkyahoo/yabentry.h index da042032..35620911 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabentry.h +++ b/kopete/protocols/yahoo/libkyahoo/yabentry.h @@ -17,8 +17,8 @@ #define YABEntry_H #include <kdebug.h> -#include <qdatetime.h> -#include <qdom.h> +#include <tqdatetime.h> +#include <tqdom.h> struct YABEntry { @@ -81,9 +81,9 @@ struct YABEntry QString additional4; - void fromQDomElement( const QDomElement &e ); - void fromQDomDocument( const QDomDocument &e ); - void fillQDomElement( QDomElement &e ) const; + void fromQDomElement( const TQDomElement &e ); + void fromQDomDocument( const TQDomDocument &e ); + void fillQDomElement( TQDomElement &e ) const; void dump() const; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yabtask.cpp b/kopete/protocols/yahoo/libkyahoo/yabtask.cpp index 3cc66dba..1066640e 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yabtask.cpp @@ -20,8 +20,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include <qstring.h> -#include <qdatastream.h> +#include <tqstring.h> +#include <tqdatastream.h> #include <kio/global.h> #include <kio/job.h> #include <kio/jobclasses.h> @@ -66,7 +66,7 @@ void YABTask::parseContactDetails( YMSGTransfer* t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from; /* key = 7 */ + TQString from; /* key = 7 */ int count; from = t->firstParam( 4 ); @@ -74,12 +74,12 @@ void YABTask::parseContactDetails( YMSGTransfer* t ) for( int i = 0; i < count; i++ ) { - QString who = t->nthParam( 5, i ); - QString s = t->nthParamSeparated( 280, i, 5 ); + TQString who = t->nthParam( 5, i ); + TQString s = t->nthParamSeparated( 280, i, 5 ); if( s.isEmpty() ) continue; - QDomDocument doc; + TQDomDocument doc; doc.setContent( s ); YABEntry *entry = new YABEntry; entry->fromQDomDocument( doc ); @@ -93,19 +93,19 @@ void YABTask::parseContactDetails( YMSGTransfer* t ) void YABTask::getAllEntries( long lastMerge, long lastRemoteRevision ) { kdDebug(YAHOO_RAW_DEBUG) << "LastMerge: " << lastMerge << " LastRemoteRevision: " << lastRemoteRevision << endl; - m_data = QString::null; - QString url = QString::fromLatin1("http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&diffs=1&t=%1&tags=short&rt=%2&prog-ver=%3") + m_data = TQString::null; + TQString url = TQString::fromLatin1("http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&diffs=1&t=%1&tags=short&rt=%2&prog-ver=%3") .arg( lastMerge ).arg( lastRemoteRevision ).arg( YMSG_PROGRAM_VERSION_STRING ); m_transferJob = KIO::get( url , false, false ); m_transferJob->addMetaData("cookies", "manual"); - m_transferJob->addMetaData("setcookies", QString::fromLatin1("Cookie: Y=%1; T=%2; C=%3;") + m_transferJob->addMetaData("setcookies", TQString::fromLatin1("Cookie: Y=%1; T=%2; C=%3;") .arg(client()->yCookie()).arg(client()->tCookie()).arg(client()->cCookie()) ); - connect( m_transferJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); - connect( m_transferJob, SIGNAL( result( KIO::Job *) ), this, SLOT( slotResult( KIO::Job* ) ) ); + connect( m_transferJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); + connect( m_transferJob, TQT_SIGNAL( result( KIO::Job *) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) ); } -void YABTask::slotData( KIO::Job* /*job*/, const QByteArray &info ) +void YABTask::slotData( KIO::Job* /*job*/, const TQByteArray &info ) { kdDebug(YAHOO_RAW_DEBUG) ; m_data += info; @@ -121,9 +121,9 @@ void YABTask::slotResult( KIO::Job* job ) else { kdDebug(YAHOO_RAW_DEBUG) << "Server side addressbook retrieved." << endl; - QDomDocument doc; - QDomNodeList list; - QDomElement e; + TQDomDocument doc; + TQDomNodeList list; + TQDomElement e; int it = 0; kdDebug(YAHOO_RAW_DEBUG) << m_data << endl; diff --git a/kopete/protocols/yahoo/libkyahoo/yabtask.h b/kopete/protocols/yahoo/libkyahoo/yabtask.h index fe9cae3c..3086a01a 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabtask.h +++ b/kopete/protocols/yahoo/libkyahoo/yabtask.h @@ -49,11 +49,11 @@ protected: virtual bool forMe( const Transfer* transfer ) const; void parseContactDetails( YMSGTransfer* t ); private slots: - void slotData( KIO::Job*, const QByteArray & ); + void slotData( KIO::Job*, const TQByteArray & ); void slotResult( KIO::Job* ); private: KIO::TransferJob *m_transferJob; - QString m_data; + TQString m_data; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp index 5e704efa..025386f0 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp @@ -16,7 +16,7 @@ #include "yahoobuddyiconloader.h" // QT Includes -#include <qfile.h> +#include <tqfile.h> // KDE Includes #include <kdebug.h> @@ -40,17 +40,17 @@ YahooBuddyIconLoader::~YahooBuddyIconLoader() { } -void YahooBuddyIconLoader::fetchBuddyIcon( const QString &who, KURL url, int checksum ) +void YahooBuddyIconLoader::fetchBuddyIcon( const TQString &who, KURL url, int checksum ) { kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << url << endl; KIO::TransferJob *transfer; - QString Url = url.url(); - QString ext = Url.left( Url.findRev( "?" ) ); + TQString Url = url.url(); + TQString ext = Url.left( Url.findRev( "?" ) ); ext = ext.right( ext.length() - ext.findRev( "." ) ); transfer = KIO::get( url, false, false ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); m_jobs[transfer].url = url; m_jobs[transfer].who = who; @@ -58,7 +58,7 @@ void YahooBuddyIconLoader::fetchBuddyIcon( const QString &who, KURL url, int che } -void YahooBuddyIconLoader::slotData( KIO::Job *job, const QByteArray& data ) +void YahooBuddyIconLoader::slotData( KIO::Job *job, const TQByteArray& data ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h index 76f70cdc..f200725d 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h +++ b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h @@ -17,9 +17,9 @@ #define YAHOOBUDDYICONLOADER_ // QT Includes -#include <qobject.h> -#include <qstring.h> -#include <qmap.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqmap.h> // KDE Includes #include <kurl.h> @@ -33,9 +33,9 @@ namespace KIO { struct IconLoadJob { KURL url; - QString who; + TQString who; int checksum; - QByteArray icon; + TQByteArray icon; }; /** @@ -55,21 +55,21 @@ public: /** * Add a BuddyIcon for download. */ - void fetchBuddyIcon( const QString &who, KURL url, int checksum ); + void fetchBuddyIcon( const TQString &who, KURL url, int checksum ); signals: /** * The account can connect to this signal and append the icon * stored in 'file' to the appropriate contact */ - void fetchedBuddyIcon( const QString &who, const QByteArray &icon, int checksum ); + void fetchedBuddyIcon( const TQString &who, const TQByteArray &icon, int checksum ); private slots: - void slotData( KIO::Job *job, const QByteArray &data ); + void slotData( KIO::Job *job, const TQByteArray &data ); void slotComplete( KIO::Job *job ); private: - typedef QMap< KIO::TransferJob *, IconLoadJob > TransferJobMap; + typedef TQMap< KIO::TransferJob *, IconLoadJob > TransferJobMap; TransferJobMap m_jobs; Client *m_client; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp index b0d1cbb9..028396c2 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp @@ -15,14 +15,14 @@ ************************************************************************* */ -#include <qobject.h> +#include <tqobject.h> #include <kbufferedsocket.h> #include <kdebug.h> #include <kresolver.h> #include "yahoobytestream.h" -KNetworkByteStream::KNetworkByteStream( QObject *parent ) +KNetworkByteStream::KNetworkByteStream( TQObject *parent ) : ByteStream ( parent ) { kdDebug( 14181 ) << "Instantiating new KNetwork byte stream." << endl; @@ -36,14 +36,14 @@ KNetworkByteStream::KNetworkByteStream( QObject *parent ) mSocket->enableRead( true ); // connect signals and slots - QObject::connect( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) ); - QObject::connect( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) ); - QObject::connect( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) ); - QObject::connect( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) ); - QObject::connect( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) ); } -bool KNetworkByteStream::connect( QString host, QString service ) +bool KNetworkByteStream::connect( TQString host, TQString service ) { kdDebug( 14181 ) << "Connecting to " << host << ", service " << service << endl; @@ -68,7 +68,7 @@ void KNetworkByteStream::close () int KNetworkByteStream::tryWrite () { // send all data from the buffers to the socket - QByteArray writeData = takeWrite(); + TQByteArray writeData = takeWrite(); kdDebug( 14181 ) << "[writeData.size() = " << writeData.size() << "]" << endl; socket()->writeBlock( writeData.data(), writeData.size () ); @@ -113,7 +113,7 @@ void KNetworkByteStream::slotReadyRead() { kdDebug( 14181 ); // stuff all available data into our buffers - QByteArray readBuffer; + TQByteArray readBuffer; readBuffer.resize( socket()->bytesAvailable () ); socket()->readBlock( readBuffer.data (), readBuffer.size () ); diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h index d48bcf36..5f7f0206 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h +++ b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h @@ -34,11 +34,11 @@ class KNetworkByteStream : public ByteStream Q_OBJECT public: - KNetworkByteStream ( QObject *parent = 0 ); + KNetworkByteStream ( TQObject *parent = 0 ); ~KNetworkByteStream (); - bool connect ( QString host, QString service ); + bool connect ( TQString host, TQString service ); virtual bool isOpen () const; virtual void close (); diff --git a/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp b/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp index 56834a83..1c9528ff 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp @@ -25,7 +25,7 @@ #include <kio/global.h> #include <kio/job.h> #include <kio/jobclasses.h> -#include <qdom.h> +#include <tqdom.h> YahooChatTask::YahooChatTask(Task* parent) : Task(parent) { @@ -95,11 +95,11 @@ void YahooChatTask::getYahooChatCategories() transfer->addMetaData( "UserAgent", "Mozilla/4.0 (compatible; MSIE 5.5)"); transfer->addMetaData( "no-cache", "true" ); transfer->addMetaData( "cookies", "manual" ); - transfer->addMetaData("setcookies", QString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); + transfer->addMetaData("setcookies", TQString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotCategoriesComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotCategoriesComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); } void YahooChatTask::getYahooChatRooms( const Yahoo::ChatCategory &category ) @@ -107,20 +107,20 @@ void YahooChatTask::getYahooChatRooms( const Yahoo::ChatCategory &category ) kdDebug(YAHOO_RAW_DEBUG) << "Category Id: " << category.id << endl; KIO::TransferJob *transfer; - transfer = KIO::get( KURL(QString("http://insider.msg.yahoo.com/ycontent/?chatroom_%1=0").arg( category.id )), false, false ); + transfer = KIO::get( KURL(TQString("http://insider.msg.yahoo.com/ycontent/?chatroom_%1=0").arg( category.id )), false, false ); transfer->addMetaData( "UserAgent", "Mozilla/4.0 (compatible; MSIE 5.5)"); transfer->addMetaData( "no-cache", "true" ); transfer->addMetaData( "cookies", "manual" ); - transfer->addMetaData("setcookies", QString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); + transfer->addMetaData("setcookies", TQString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotChatRoomsComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotChatRoomsComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); m_jobs[ transfer ].category = category; } -void YahooChatTask::slotData( KIO::Job *job, const QByteArray& data) +void YahooChatTask::slotData( KIO::Job *job, const TQByteArray& data) { kdDebug(YAHOO_RAW_DEBUG) ; // FIXME (same) @@ -139,7 +139,7 @@ void YahooChatTask::slotCategoriesComplete( KIO::Job *job ) } else { - QDomDocument doc; + TQDomDocument doc; doc.setContent( m_jobs[ transfer ].data ); emit gotYahooChatCategories( doc ); } @@ -159,7 +159,7 @@ void YahooChatTask::slotChatRoomsComplete( KIO::Job *job ) } else { - QDomDocument doc; + TQDomDocument doc; doc.setContent( m_jobs[ transfer ].data ); // kdDebug(YAHOO_RAW_DEBUG) << doc.toString(); emit gotYahooChatRooms( m_jobs[ transfer ].category, doc ); @@ -188,7 +188,7 @@ void YahooChatTask::joinRoom( const Yahoo::ChatRoom &room ) send( t ); } -void YahooChatTask::sendYahooChatMessage( const QString &msg, const QString &handle ) +void YahooChatTask::sendYahooChatMessage( const TQString &msg, const TQString &handle ) { kdDebug(YAHOO_RAW_DEBUG) ; if( !m_loggedIn ) @@ -214,7 +214,7 @@ void YahooChatTask::login() YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceChatOnline); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - t->setParam( 135, QString("ym%1").arg(YMSG_PROGRAM_VERSION_STRING).local8Bit() ); + t->setParam( 135, TQString("ym%1").arg(YMSG_PROGRAM_VERSION_STRING).local8Bit() ); send( t ); } @@ -232,11 +232,11 @@ void YahooChatTask::logout() void YahooChatTask::parseLoginResponse( YMSGTransfer *t ) { - if( !QString(t->firstParam( 1 )).startsWith( client()->userId().local8Bit() ) ) + if( !TQString(t->firstParam( 1 )).startsWith( client()->userId().local8Bit() ) ) return; m_loggedIn = true; - QValueList< Yahoo::ChatRoom >::iterator it; + TQValueList< Yahoo::ChatRoom >::iterator it; for ( it = m_pendingJoins.begin(); it != m_pendingJoins.end(); ++it ) //for( int i = 0; i < m_pendingJoins.size(); ++i ) { @@ -255,10 +255,10 @@ void YahooChatTask::parseJoin( YMSGTransfer *t ) { int room; int category; - QString handle; - QString comment; + TQString handle; + TQString comment; bool suppressJoinNotification = false; - QString error; + TQString error; room = t->firstParam( 129 ).toInt(); category = t->firstParam( 128 ).toInt(); @@ -296,7 +296,7 @@ void YahooChatTask::parseJoin( YMSGTransfer *t ) emit chatRoomJoined( room, category, comment, handle ); } - QString nick; + TQString nick; for( int i = 0; i < t->paramCount( 109 ); ++i ) { nick = t->nthParam( 109 , i ); @@ -308,9 +308,9 @@ void YahooChatTask::parseChatMessage( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString handle; - QString msg; - QString nick; + TQString handle; + TQString msg; + TQString nick; handle = t->firstParam( 104 ); for( int i = 0; i < t->paramCount( 109 ); ++i ) @@ -325,8 +325,8 @@ void YahooChatTask::parseChatExit( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString handle; - QString nick; + TQString handle; + TQString nick; handle = t->firstParam( 104 ); for( int i = 0; i < t->paramCount( 109 ); ++i ) @@ -340,7 +340,7 @@ void YahooChatTask::parseLogout( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString nick = t->firstParam( 1 ); + TQString nick = t->firstParam( 1 ); if( nick == client()->userId() ) m_loggedIn = false; } diff --git a/kopete/protocols/yahoo/libkyahoo/yahoochattask.h b/kopete/protocols/yahoo/libkyahoo/yahoochattask.h index 310b174d..3de4cbd4 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoochattask.h +++ b/kopete/protocols/yahoo/libkyahoo/yahoochattask.h @@ -20,9 +20,9 @@ #include "task.h" #include "yahootypes.h" -#include <qmap.h> -#include <qvaluelist.h> -#include <qpair.h> +#include <tqmap.h> +#include <tqvaluelist.h> +#include <tqpair.h> class QDomDocument; class YMSGTransfer; @@ -31,7 +31,7 @@ namespace KIO { } struct YahooChatJob { - QByteArray data; + TQByteArray data; Yahoo::ChatCategory category; }; @@ -54,18 +54,18 @@ public: void joinRoom( const Yahoo::ChatRoom &room ); - void sendYahooChatMessage( const QString &msg, const QString &handle ); + void sendYahooChatMessage( const TQString &msg, const TQString &handle ); void logout(); signals: - void gotYahooChatCategories( const QDomDocument & ); - void gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & ); + void gotYahooChatCategories( const TQDomDocument & ); + void gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & ); - void chatRoomJoined( int roomId, int categoryId, const QString &comment, const QString &handle ); - void chatBuddyHasJoined( const QString &nick, const QString &handle, bool suppressNotification ); - void chatBuddyHasLeft( const QString &nick, const QString &handle ); - void chatMessageReceived( const QString &nick, const QString &message, const QString &handle ); + void chatRoomJoined( int roomId, int categoryId, const TQString &comment, const TQString &handle ); + void chatBuddyHasJoined( const TQString &nick, const TQString &handle, bool suppressNotification ); + void chatBuddyHasLeft( const TQString &nick, const TQString &handle ); + void chatMessageReceived( const TQString &nick, const TQString &message, const TQString &handle ); private: void login(); void parseLoginResponse( YMSGTransfer *t ); @@ -75,12 +75,12 @@ private: void parseLogout( YMSGTransfer * ); private slots: - void slotData( KIO::Job *, const QByteArray & ); + void slotData( KIO::Job *, const TQByteArray & ); void slotCategoriesComplete( KIO::Job * ); void slotChatRoomsComplete( KIO::Job * ); private: - QMap< KIO::Job *, YahooChatJob > m_jobs; - QValueList< Yahoo::ChatRoom > m_pendingJoins; + TQMap< KIO::Job *, YahooChatJob > m_jobs; + TQValueList< Yahoo::ChatRoom > m_pendingJoins; bool m_loggedIn; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp index 3279bbd0..34eb649e 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp @@ -20,11 +20,11 @@ -#include <qapplication.h> // for qdebug -#include <qguardedptr.h> -#include <qobject.h> -#include <qptrqueue.h> -#include <qtimer.h> +#include <tqapplication.h> // for qdebug +#include <tqguardedptr.h> +#include <tqobject.h> +#include <tqptrqueue.h> +#include <tqtimer.h> #include <kdebug.h> @@ -36,7 +36,7 @@ #include "yahooclientstream.h" #include "yahootypes.h" -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -58,9 +58,9 @@ public: conn = 0; bs = 0; - username = QString::null; - password = QString::null; - server = QString::null; + username = TQString::null; + password = TQString::null; + server = TQString::null; haveLocalAddr = false; doBinding = true; @@ -73,12 +73,12 @@ public: newTransfers = false; } - QString username; - QString password; - QString server; + TQString username; + TQString password; + TQString server; bool doAuth; //send the initial login sequences to get the cookie bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; bool doBinding; @@ -86,7 +86,7 @@ public: ByteStream *bs; CoreProtocol client; - QString defRealm; + TQString defRealm; int mode; int state; @@ -94,28 +94,28 @@ public: bool newTransfers; int errCond; - QString errText; + TQString errText; - QPtrQueue<Transfer> in; + TQPtrQueue<Transfer> in; - QTimer noopTimer; // used to send icq keepalive + TQTimer noopTimer; // used to send icq keepalive int noop_time; }; -ClientStream::ClientStream(Connector *conn, QObject *parent) +ClientStream::ClientStream(Connector *conn, TQObject *parent) :Stream(parent), d(new Private()) { kdDebug(YAHOO_RAW_DEBUG) ; d->mode = Client; d->conn = conn; - connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) ); - connect( d->conn, SIGNAL(error()), SLOT(cr_error()) ); - connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) ); - connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) ); + connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) ); + connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) ); + connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) ); + connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) ); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); } ClientStream::~ClientStream() @@ -148,7 +148,7 @@ void ClientStream::reset(bool all) d->in.clear(); } -void ClientStream::connectToServer(const QString& server, bool auth) +void ClientStream::connectToServer(const TQString& server, bool auth) { kdDebug(YAHOO_RAW_DEBUG) ; reset(true); @@ -203,7 +203,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start(d->noop_time); } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -215,7 +215,7 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } @@ -253,7 +253,7 @@ void ClientStream::write( Transfer *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { #if 0 qDebug( "contains: %i bytes ", bytes.count() ); @@ -295,7 +295,7 @@ void cs_dump( const QByteArray &bytes ) Q_UNUSED( bytes ); } -void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes ) +void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes ) { if ( !d->bs ) return; @@ -327,15 +327,15 @@ void ClientStream::cr_connected() kdDebug(YAHOO_RAW_DEBUG) ; d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); - connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; emit connected(); if(!self) return; @@ -368,11 +368,11 @@ void ClientStream::bs_error(int) void ClientStream::bs_readyRead() { // kdDebug(YAHOO_RAW_DEBUG) ; - QByteArray a; + TQByteArray a; //qDebug( "size of storage for incoming data is %i bytes.", a.size() ); a = d->bs->read(); - //QCString cs(a.data(), a.size()+1); + //TQCString cs(a.data(), a.size()+1); //qDebug("ClientStream: recv: %d [%s]\n", a.size(), cs.data()); //kdDebug(YAHOO_RAW_DEBUG) << " recv: " << a.size() <<" bytes"; //cs_dump( a ); @@ -399,7 +399,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } diff --git a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h index 01ca6a2a..6efc307f 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h +++ b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h @@ -71,19 +71,19 @@ public: BindConflict // resource in-use }; - explicit ClientStream(Connector *conn, QObject *parent=0); + explicit ClientStream(Connector *conn, TQObject *parent=0); ~ClientStream(); - void connectToServer(const QString& server, bool auth=true); + void connectToServer(const TQString& server, bool auth=true); void accept(); // server bool isActive() const; bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); void close(); @@ -103,10 +103,10 @@ public: void write( Transfer* request ); int errorCondition() const; - QString errorText() const; + TQString errorText() const; // extrahttp://bugs.kde.org/show_bug.cgi?id=85158 -/*# void writeDirect(const QString &s); // must be for debug testing*/ +/*# void writeDirect(const TQString &s); // must be for debug testing*/ void setNoopTime(int mills); signals: @@ -124,7 +124,7 @@ private slots: /** * collects wire ready outgoing data from the core protocol and sends */ - void cp_outgoingData( const QByteArray& ); + void cp_outgoingData( const TQByteArray& ); /** * collects parsed incoming data as a transfer from the core protocol and queues */ diff --git a/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp b/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp index fce630db..9b7c8d8a 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp @@ -25,7 +25,7 @@ #include "yahoobytestream.h" #include "yahootypes.h" -KNetworkConnector::KNetworkConnector( QObject *parent ) +KNetworkConnector::KNetworkConnector( TQObject *parent ) : Connector( parent ) { kdDebug( YAHOO_RAW_DEBUG ) << "New KNetwork connector." << endl; @@ -34,8 +34,8 @@ KNetworkConnector::KNetworkConnector( QObject *parent ) mByteStream = new KNetworkByteStream( this ); - connect( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - connect( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) ); + connect( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + connect( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); mPort = 5510; } @@ -44,7 +44,7 @@ KNetworkConnector::~KNetworkConnector() delete mByteStream; } -void KNetworkConnector::connectToServer( const QString &server ) +void KNetworkConnector::connectToServer( const TQString &server ) { Q_UNUSED( server ); kdDebug( YAHOO_RAW_DEBUG ) << "Initiating connection to " << mHost << endl; @@ -53,7 +53,7 @@ void KNetworkConnector::connectToServer( const QString &server ) mErrorCode = KNetwork::KSocketBase::NoError; - if ( !mByteStream->connect( mHost, QString::number (mPort) ) ) + if ( !mByteStream->connect( mHost, TQString::number (mPort) ) ) { // Houston, we have a problem mErrorCode = mByteStream->socket()->error(); @@ -67,7 +67,7 @@ void KNetworkConnector::slotConnected() // FIXME: setPeerAddress() is something different, find out correct usage later //KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 (); - //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); + //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); emit connected (); } @@ -97,7 +97,7 @@ void KNetworkConnector::done() mByteStream->close (); } -void KNetworkConnector::setOptHostPort( const QString &host, Q_UINT16 port ) +void KNetworkConnector::setOptHostPort( const TQString &host, Q_UINT16 port ) { kdDebug ( YAHOO_RAW_DEBUG ) << "Manually specifying host " << host << " and port " << port << endl; diff --git a/kopete/protocols/yahoo/libkyahoo/yahooconnector.h b/kopete/protocols/yahoo/libkyahoo/yahooconnector.h index 10c86ce0..b4758e72 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooconnector.h +++ b/kopete/protocols/yahoo/libkyahoo/yahooconnector.h @@ -36,15 +36,15 @@ class KNetworkConnector : public Connector Q_OBJECT public: - KNetworkConnector( QObject *parent = 0 ); + KNetworkConnector( TQObject *parent = 0 ); virtual ~KNetworkConnector(); - virtual void connectToServer( const QString &server ); + virtual void connectToServer( const TQString &server ); virtual ByteStream *stream() const; virtual void done(); - void setOptHostPort( const QString &host, Q_UINT16 port ); + void setOptHostPort( const TQString &host, Q_UINT16 port ); int errorCode(); @@ -53,7 +53,7 @@ private slots: void slotError( int ); private: - QString mHost; + TQString mHost; Q_UINT16 mPort; int mErrorCode; diff --git a/kopete/protocols/yahoo/libkyahoo/yahootypes.h b/kopete/protocols/yahoo/libkyahoo/yahootypes.h index 244d4022..0e8858c5 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahootypes.h +++ b/kopete/protocols/yahoo/libkyahoo/yahootypes.h @@ -18,8 +18,8 @@ #ifndef YAHOOTYPESH #define YAHOOTYPESH -#include <qglobal.h> -#include <qstring.h> +#include <tqglobal.h> +#include <tqstring.h> const int YAHOO_RAW_DEBUG = 14181; const int YAHOO_GEN_DEBUG = 14180; @@ -172,13 +172,13 @@ namespace Yahoo typedef Q_UINT32 DWORD; struct ChatRoom { - QString name; - QString topic; + TQString name; + TQString topic; int id; }; struct ChatCategory { - QString name; + TQString name; int id; }; } diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp index ce2c65eb..b1e6e4e3 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp +++ b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp @@ -16,16 +16,16 @@ ************************************************************************* */ -//#include <QDataStream> -//#include <QMap> -//#include <QObject> -//#include <QStringList> +//#include <TQDataStream> +//#include <TQMap> +//#include <TQObject> +//#include <TQStringList> -//#include <qcstring.h> -#include <qdatastream.h> -#include <qmap.h> -#include <qobject.h> -#include <qstringlist.h> +//#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqstringlist.h> #include <kdebug.h> @@ -36,7 +36,7 @@ using namespace Yahoo; -YMSGProtocol::YMSGProtocol(QObject *parent, const char *name) +YMSGProtocol::YMSGProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -45,7 +45,7 @@ YMSGProtocol::~YMSGProtocol() { } -Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* YMSGProtocol::parse( const TQByteArray & packet, uint& bytes ) { /* <------- 4B -------><------- 4B -------><---2B---> @@ -71,7 +71,7 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes ) int servicenum; int version1, version2; - QMap<QString, QString> params; + TQMap<TQString, TQString> params; // Skip the YMSG header pos += 4; @@ -381,13 +381,13 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes ) t->setStatus(status); t->setPacketLength(len); - QString d = QString::fromAscii( packet.data() + pos, packet.size() - pos ); - QStringList list = QStringList::split( "\xc0\x80", d ); + TQString d = TQString::fromAscii( packet.data() + pos, packet.size() - pos ); + TQStringList list = TQStringList::split( "\xc0\x80", d ); for( int i = 0; i+1 < list.size() && pos+1 < len+20; i += 2 ) { - QString key = list[i]; - QString value = QString::fromUtf8( list[i+1].ascii() ); + TQString key = list[i]; + TQString value = TQString::fromUtf8( list[i+1].ascii() ); pos += key.utf8().length() + value.utf8().length() + 4; - t->setParam( QString(key).toInt(), value.utf8() ); + t->setParam( TQString(key).toInt(), value.utf8() ); kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Key: " << key << " Value: " << value << endl; } diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h index 230745ef..a3ac04a6 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h +++ b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h @@ -28,7 +28,7 @@ Q_OBJECT public: - YMSGProtocol( QObject *parent = 0, const char *name = 0 ); + YMSGProtocol( TQObject *parent = 0, const char *name = 0 ); ~YMSGProtocol(); /** @@ -38,7 +38,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an EventTransfer object if successful, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp index 233b0c85..dcee98d9 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp +++ b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp @@ -24,10 +24,10 @@ #include "yahootypes.h" #include "kdebug.h" -#include <qdatastream.h> -#include <qmap.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdatastream.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqstringlist.h> using namespace Yahoo; @@ -143,7 +143,7 @@ int YMSGTransfer::paramCount( int index ) const } -QCString YMSGTransfer::nthParam( int index, int occurrence ) const +TQCString YMSGTransfer::nthParam( int index, int occurrence ) const { int cnt = 0; for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) @@ -151,10 +151,10 @@ QCString YMSGTransfer::nthParam( int index, int occurrence ) const if( (*it).first == index && cnt++ == occurrence) return (*it).second; } - return QCString(); + return TQCString(); } -QCString YMSGTransfer::nthParamSeparated( int index, int occurrence, int separator ) const +TQCString YMSGTransfer::nthParamSeparated( int index, int occurrence, int separator ) const { int cnt = -1; @@ -165,27 +165,27 @@ QCString YMSGTransfer::nthParamSeparated( int index, int occurrence, int separat if( (*it).first == index && cnt == occurrence) return (*it).second; } - return QCString(); + return TQCString(); } -QCString YMSGTransfer::firstParam( int index ) const +TQCString YMSGTransfer::firstParam( int index ) const { for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) { if( (*it).first == index ) return (*it).second; } - return QCString(); + return TQCString(); } -void YMSGTransfer::setParam(int index, const QCString &data) +void YMSGTransfer::setParam(int index, const TQCString &data) { d->data.append( Param( index, data ) ); } void YMSGTransfer::setParam( int index, int data ) { - d->data.append( Param( index, QString::number( data ).local8Bit() ) ); + d->data.append( Param( index, TQString::number( data ).local8Bit() ) ); } int YMSGTransfer::length() const @@ -193,7 +193,7 @@ int YMSGTransfer::length() const int len = 0; for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) { - len += QString::number( (*it).first ).length(); + len += TQString::number( (*it).first ).length(); len += 2; len += (*it).second.length(); len += 2; @@ -202,7 +202,7 @@ int YMSGTransfer::length() const } -QByteArray YMSGTransfer::serialize() const +TQByteArray YMSGTransfer::serialize() const { /* <------- 4B -------><------- 4B -------><---2B---> @@ -218,9 +218,9 @@ QByteArray YMSGTransfer::serialize() const */ int pos = 0; - QStringList::ConstIterator listIt = 0; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); + TQStringList::ConstIterator listIt = 0; + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); stream << (Q_INT8)'Y' << (Q_INT8)'M' << (Q_INT8)'S' << (Q_INT8)'G'; if( d->service == Yahoo::ServicePictureUpload ) @@ -239,7 +239,7 @@ QByteArray YMSGTransfer::serialize() const for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) { kdDebug(YAHOO_RAW_DEBUG) << " Serializing key " << (*it).first << " value " << (*it).second << endl; - stream.writeRawBytes ( QString::number( (*it).first ).local8Bit(), QString::number( (*it).first ).length() ); + stream.writeRawBytes ( TQString::number( (*it).first ).local8Bit(), TQString::number( (*it).first ).length() ); stream << (Q_INT8)0xc0 << (Q_INT8)0x80; stream.writeRawBytes( (*it).second, (*it).second.length() ); stream << (Q_INT8)0xc0 << (Q_INT8)0x80; diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h index 662ca4d2..0b157792 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h +++ b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h @@ -25,13 +25,13 @@ #include "yahootypes.h" -#include <qpair.h> -#include <qvaluelist.h> +#include <tqpair.h> +#include <tqvaluelist.h> class YMSGTransferPrivate; -typedef QPair< int, QCString > Param; -typedef QValueList< Param > ParamList; +typedef QPair< int, TQCString > Param; +typedef TQValueList< Param > ParamList; /** @author Duncan Mac-Vicar Prett @@ -60,15 +60,15 @@ public: ParamList paramList() const; - QCString firstParam( int index ) const; - QCString nthParam( int index, int occurrence ) const; - QCString nthParamSeparated( int index, int occurrence, int separator ) const; + TQCString firstParam( int index ) const; + TQCString nthParam( int index, int occurrence ) const; + TQCString nthParamSeparated( int index, int occurrence, int separator ) const; int paramCount( int index ) const; - void setParam(int index, const QCString &data); + void setParam(int index, const TQCString &data); void setParam(int index, int data); - QByteArray serialize() const; + TQByteArray serialize() const; int length() const; private: diff --git a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp index dcd6e184..594e7a01 100644 --- a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp +++ b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp @@ -19,27 +19,27 @@ #include <kdebug.h> -#include <qlistbox.h> -#include <qlineedit.h> +#include <tqlistbox.h> +#include <tqlineedit.h> -YahooInviteListImpl::YahooInviteListImpl(QWidget *parent, const char *name) : YahooInviteListBase(parent,name) +YahooInviteListImpl::YahooInviteListImpl(TQWidget *parent, const char *name) : YahooInviteListBase(parent,name) { - listFriends->setSelectionMode( QListBox::Extended ); - listInvited->setSelectionMode( QListBox::Extended ); + listFriends->setSelectionMode( TQListBox::Extended ); + listInvited->setSelectionMode( TQListBox::Extended ); } YahooInviteListImpl::~YahooInviteListImpl() { } -void YahooInviteListImpl::setRoom( const QString &room ) +void YahooInviteListImpl::setRoom( const TQString &room ) { kdDebug(14180) << k_funcinfo << "Setting roomname to: " << room << endl; m_room = room; } -void YahooInviteListImpl::fillFriendList( const QStringList &buddies ) +void YahooInviteListImpl::fillFriendList( const TQStringList &buddies ) { kdDebug(14180) << k_funcinfo << "Adding friends: " << buddies << endl; @@ -59,11 +59,11 @@ void YahooInviteListImpl::updateListBoxes() listInvited->sort(); } -void YahooInviteListImpl::addInvitees( const QStringList &invitees ) +void YahooInviteListImpl::addInvitees( const TQStringList &invitees ) { kdDebug(14180) << k_funcinfo << "Adding invitees: " << invitees << endl; - for( QStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) + for( TQStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) { if( m_inviteeList.find( *it ) == m_inviteeList.end() ) m_inviteeList.push_back( *it ); @@ -74,11 +74,11 @@ void YahooInviteListImpl::addInvitees( const QStringList &invitees ) updateListBoxes(); } -void YahooInviteListImpl::removeInvitees( const QStringList &invitees ) +void YahooInviteListImpl::removeInvitees( const TQStringList &invitees ) { kdDebug(14180) << k_funcinfo << "Removing invitees: " << invitees << endl; - for( QStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) + for( TQStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) { if( m_buddyList.find( *it ) == m_buddyList.end() ) m_buddyList.push_back( *it ); @@ -89,7 +89,7 @@ void YahooInviteListImpl::removeInvitees( const QStringList &invitees ) updateListBoxes(); } -void YahooInviteListImpl::addParticipant( const QString &p ) +void YahooInviteListImpl::addParticipant( const TQString &p ) { m_participants.push_back( p ); } @@ -100,7 +100,7 @@ void YahooInviteListImpl::btnInvite_clicked() if( m_inviteeList.count() ) emit readyToInvite( m_room, m_inviteeList,m_participants, editMessage->text() ); - QDialog::accept(); + TQDialog::accept(); } @@ -108,7 +108,7 @@ void YahooInviteListImpl::btnCancel_clicked() { kdDebug(14180) << k_funcinfo << endl; - QDialog::reject(); + TQDialog::reject(); } @@ -116,12 +116,12 @@ void YahooInviteListImpl::btnAddCustom_clicked() { kdDebug(14180) << k_funcinfo << endl; - QString userId; + TQString userId; userId = editBuddyAdd->text(); if( userId.isEmpty() ) return; - addInvitees( QStringList(userId) ); + addInvitees( TQStringList(userId) ); editBuddyAdd->clear(); } @@ -130,7 +130,7 @@ void YahooInviteListImpl::btnRemove_clicked() { kdDebug(14180) << k_funcinfo << endl; - QStringList buddies; + TQStringList buddies; for( uint i=0; i<listInvited->count(); i++ ) { if (listInvited->isSelected(i)) @@ -146,7 +146,7 @@ void YahooInviteListImpl::btnAdd_clicked() { kdDebug(14180) << k_funcinfo << endl; - QStringList buddies; + TQStringList buddies; for( uint i=0; i<listFriends->count(); i++ ) { if (listFriends->isSelected(i)) diff --git a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h index 76577f36..94fa6402 100644 --- a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h +++ b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h @@ -18,7 +18,7 @@ #ifndef YAHOO_INVITE_LIST_IMPL #define YAHOO_INVITE_LIST_IMPL -#include <qwidget.h> +#include <tqwidget.h> #include "yahooinvitelistbase.h" @@ -26,18 +26,18 @@ class YahooInviteListImpl : public YahooInviteListBase { Q_OBJECT public: - YahooInviteListImpl(QWidget *parent=0, const char *name=0); + YahooInviteListImpl(TQWidget *parent=0, const char *name=0); ~YahooInviteListImpl(); - void fillFriendList( const QStringList &buddies ); - void addInvitees( const QStringList &buddies ); - void removeInvitees( const QStringList &buddies ); - void setRoom( const QString &room ); - void addParticipant( const QString &participant ); + void fillFriendList( const TQStringList &buddies ); + void addInvitees( const TQStringList &buddies ); + void removeInvitees( const TQStringList &buddies ); + void setRoom( const TQString &room ); + void addParticipant( const TQString &participant ); private: signals: - void readyToInvite( const QString &room, const QStringList &buddies, const QStringList &participants, const QString &msg ); + void readyToInvite( const TQString &room, const TQStringList &buddies, const TQStringList &participants, const TQString &msg ); protected slots: public slots: @@ -49,10 +49,10 @@ public slots: private: void updateListBoxes(); - QStringList m_buddyList; - QStringList m_inviteeList; - QStringList m_participants; - QString m_room; + TQStringList m_buddyList; + TQStringList m_inviteeList; + TQStringList m_participants; + TQString m_room; }; #endif diff --git a/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp b/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp index 28a8532d..700c91e5 100644 --- a/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp +++ b/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp @@ -19,13 +19,13 @@ #include "yahoouserinfodialog.h" -#include <qlayout.h> -#include <qlineedit.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qtextedit.h> -#include <qobject.h> -#include <qtextcodec.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqspinbox.h> +#include <tqcombobox.h> +#include <tqtextedit.h> +#include <tqobject.h> +#include <tqtextcodec.h> #include <kdatewidget.h> #include <kdebug.h> @@ -39,34 +39,34 @@ #include "yahoootherinfowidget.h" #include "yahoocontact.h" -YahooUserInfoDialog::YahooUserInfoDialog( YahooContact *c, QWidget * parent, const char * name ) +YahooUserInfoDialog::YahooUserInfoDialog( YahooContact *c, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::IconList, 0, parent, name, false, i18n( "Yahoo User Information" ), User2|User1|Cancel, Cancel, false, i18n("Save and Close"), i18n("Merge with existing entry") ) { kdDebug(14180) << k_funcinfo << "Creating new yahoo user info widget" << endl; m_contact = c; showButton( User2, false ); - QFrame* genInfo = addPage( i18n( "General Info" ), + TQFrame* genInfo = addPage( i18n( "General Info" ), i18n( "General Yahoo Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "identity" ), KIcon::Desktop ) ); - QVBoxLayout* genLayout = new QVBoxLayout( genInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "identity" ), KIcon::Desktop ) ); + TQVBoxLayout* genLayout = new TQVBoxLayout( genInfo ); m_genInfoWidget = new YahooGeneralInfoWidget( genInfo, "Basic Information" ); genLayout->addWidget( m_genInfoWidget ); - QFrame* workInfo = addPage( i18n( "Work Info" ), + TQFrame* workInfo = addPage( i18n( "Work Info" ), i18n( "Work Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "attach" ), KIcon::Desktop ) ); - QVBoxLayout* workLayout = new QVBoxLayout( workInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "attach" ), KIcon::Desktop ) ); + TQVBoxLayout* workLayout = new TQVBoxLayout( workInfo ); m_workInfoWidget = new YahooWorkInfoWidget( workInfo, "Work Information" ); workLayout->addWidget( m_workInfoWidget ); - QFrame* otherInfo = addPage( i18n( "Other Info" ), + TQFrame* otherInfo = addPage( i18n( "Other Info" ), i18n( "Other Yahoo Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* otherLayout = new QVBoxLayout( otherInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* otherLayout = new TQVBoxLayout( otherInfo ); m_otherInfoWidget = new YahooOtherInfoWidget( otherInfo, "Other Information" ); otherLayout->addWidget( m_otherInfoWidget ); - QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotSaveAndCloseClicked())); + TQObject::connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotSaveAndCloseClicked())); } void YahooUserInfoDialog::setAccountConnected( bool isOnline ) @@ -107,10 +107,10 @@ void YahooUserInfoDialog::slotSaveAndCloseClicked() entry.privateState = m_genInfoWidget->stateEdit->text(); entry.privateZIP = m_genInfoWidget->zipEdit->text(); entry.privateCountry = m_genInfoWidget->countryEdit->text(); - QString bi = m_genInfoWidget->birthdayEdit->text(); - entry.birthday = QDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); - QString an = m_genInfoWidget->anniversaryEdit->text(); - entry.anniversary = QDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); + TQString bi = m_genInfoWidget->birthdayEdit->text(); + entry.birthday = TQDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); + TQString an = m_genInfoWidget->anniversaryEdit->text(); + entry.anniversary = TQDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); entry.additional1 = m_otherInfoWidget->note1Edit->text(); entry.additional2 = m_otherInfoWidget->note2Edit->text(); entry.additional3 = m_otherInfoWidget->note3Edit->text(); @@ -126,7 +126,7 @@ void YahooUserInfoDialog::slotSaveAndCloseClicked() emit saveYABEntry( entry ); - QDialog::accept(); + TQDialog::accept(); } void YahooUserInfoDialog::slotUser2() @@ -170,16 +170,16 @@ void YahooUserInfoDialog::slotUser2() entry.birthday = oldEntry->birthday; else { - QString bi = m_genInfoWidget->birthdayEdit->text(); - entry.birthday = QDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); + TQString bi = m_genInfoWidget->birthdayEdit->text(); + entry.birthday = TQDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); } if( m_genInfoWidget->anniversaryEdit->text().isEmpty() ) entry.anniversary = oldEntry->anniversary; else { - QString an = m_genInfoWidget->anniversaryEdit->text(); - entry.anniversary = QDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); + TQString an = m_genInfoWidget->anniversaryEdit->text(); + entry.anniversary = TQDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); } entry.additional1 = m_otherInfoWidget->note1Edit->text().isEmpty() ? oldEntry->additional1 : m_otherInfoWidget->note1Edit->text(); @@ -198,7 +198,7 @@ void YahooUserInfoDialog::slotUser2() emit saveYABEntry( entry ); } - QDialog::accept(); + TQDialog::accept(); } void YahooUserInfoDialog::setData( const YABEntry &yab ) @@ -219,9 +219,9 @@ void YahooUserInfoDialog::setData( const YABEntry &yab ) m_genInfoWidget->titleEdit->setText( yab.title ); if( yab.birthday.isValid() ) - m_genInfoWidget->birthdayEdit->setText( QString("%1/%2/%3").arg( yab.birthday.day() ).arg( yab.birthday.month() ).arg( yab.birthday.year() )); + m_genInfoWidget->birthdayEdit->setText( TQString("%1/%2/%3").arg( yab.birthday.day() ).arg( yab.birthday.month() ).arg( yab.birthday.year() )); if( yab.anniversary.isValid() ) - m_genInfoWidget->anniversaryEdit->setText( QString("%1/%2/%3").arg( yab.anniversary.day() ).arg( yab.anniversary.month() ).arg( yab.anniversary.year() )); + m_genInfoWidget->anniversaryEdit->setText( TQString("%1/%2/%3").arg( yab.anniversary.day() ).arg( yab.anniversary.month() ).arg( yab.anniversary.year() )); m_genInfoWidget->addressEdit->setText( yab.privateAdress ); m_genInfoWidget->cityEdit->setText( yab.privateCity ); diff --git a/kopete/protocols/yahoo/ui/yahoouserinfodialog.h b/kopete/protocols/yahoo/ui/yahoouserinfodialog.h index 6500d412..e8529033 100644 --- a/kopete/protocols/yahoo/ui/yahoouserinfodialog.h +++ b/kopete/protocols/yahoo/ui/yahoouserinfodialog.h @@ -33,7 +33,7 @@ class YahooUserInfoDialog : public KDialogBase { Q_OBJECT public: - YahooUserInfoDialog( YahooContact *c, QWidget* parent = 0, const char* name = 0 ); + YahooUserInfoDialog( YahooContact *c, TQWidget* parent = 0, const char* name = 0 ); void setAccountConnected( bool isOnline ); signals: void saveYABEntry( YABEntry & ); diff --git a/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp b/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp index 1c7d4ef7..caa3c75a 100644 --- a/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp +++ b/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp @@ -16,39 +16,39 @@ #include "yahoowebcamdialog.h" -#include <qframe.h> -#include <qobject.h> -#include <qwidget.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> +#include <tqframe.h> +#include <tqobject.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> #include <kdebug.h> #include <klocale.h> #include <webcamwidget.h> -YahooWebcamDialog::YahooWebcamDialog( const QString &contactId, QWidget * parent, const char * name ) +YahooWebcamDialog::YahooWebcamDialog( const TQString &contactId, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::Plain, i18n( "Webcam for %1" ).arg( contactId ), KDialogBase::Close, KDialogBase::Close, parent, name, false, true /*seperator*/ ) { - setInitialSize( QSize(320,290), false ); + setInitialSize( TQSize(320,290), false ); setEscapeButton( KDialogBase::Close ); - QObject::connect( this, SIGNAL( closeClicked() ), this, SIGNAL( closingWebcamDialog() ) ); + TQObject::connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SIGNAL( closingWebcamDialog() ) ); contactName = contactId; - QWidget *page = plainPage(); + TQWidget *page = plainPage(); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); m_imageContainer = new Kopete::WebcamWidget( page ); m_imageContainer->setText( i18n( "No webcam image received" ) ); m_imageContainer->setMinimumSize(320,240); - m_imageContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_imageContainer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); topLayout->add( m_imageContainer ); - m_Viewer = new QLabel( page ); - m_Viewer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_Viewer = new TQLabel( page ); + m_Viewer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_Viewer->hide(); topLayout->add( m_Viewer ); @@ -60,20 +60,20 @@ YahooWebcamDialog::~ YahooWebcamDialog( ) } -void YahooWebcamDialog::newImage( const QPixmap &image ) +void YahooWebcamDialog::newImage( const TQPixmap &image ) { m_imageContainer->updatePixmap( image ); } void YahooWebcamDialog::webcamPaused() { - m_imageContainer->setText( QString::fromLatin1("*** Webcam paused ***") ); + m_imageContainer->setText( TQString::fromLatin1("*** Webcam paused ***") ); } void YahooWebcamDialog::webcamClosed( int reason ) { kdDebug(14180) << k_funcinfo << "webcam closed with reason?? " << reason <<endl; - QString closeReason; + TQString closeReason; switch ( reason ) { case 1: @@ -92,13 +92,13 @@ void YahooWebcamDialog::webcamClosed( int reason ) m_imageContainer->setText( closeReason ); } -void YahooWebcamDialog::setViewer( const QStringList &viewer ) +void YahooWebcamDialog::setViewer( const TQStringList &viewer ) { - QString s = i18n( "%1 viewer(s)" ).arg( viewer.size() ); + TQString s = i18n( "%1 viewer(s)" ).arg( viewer.size() ); if( viewer.size() ) { s += ": "; - for ( QStringList::ConstIterator it = viewer.begin(); it != viewer.end(); ++it ) { + for ( TQStringList::ConstIterator it = viewer.begin(); it != viewer.end(); ++it ) { if( it != viewer.begin() ) s += ", "; s += *it; diff --git a/kopete/protocols/yahoo/ui/yahoowebcamdialog.h b/kopete/protocols/yahoo/ui/yahoowebcamdialog.h index 8400e53d..8f130e03 100644 --- a/kopete/protocols/yahoo/ui/yahoowebcamdialog.h +++ b/kopete/protocols/yahoo/ui/yahoowebcamdialog.h @@ -17,7 +17,7 @@ #ifndef YAHOOWEBCAMDIALOG_H_ #define YAHOOWEBCAMDIALOG_H_ -#include <qstring.h> +#include <tqstring.h> #include <kdialogbase.h> @@ -34,12 +34,12 @@ class YahooWebcamDialog : public KDialogBase { Q_OBJECT public: - YahooWebcamDialog( const QString &, QWidget* parent = 0, const char* name = 0 ); + YahooWebcamDialog( const TQString &, TQWidget* parent = 0, const char* name = 0 ); ~YahooWebcamDialog(); - void setViewer( const QStringList & ); + void setViewer( const TQStringList & ); public slots: - void newImage( const QPixmap &image ); + void newImage( const TQPixmap &image ); void webcamClosed( int ); void webcamPaused(); signals: @@ -47,8 +47,8 @@ signals: private: Kopete::WebcamWidget *m_imageContainer; - QLabel *m_Viewer; - QString contactName; + TQLabel *m_Viewer; + TQString contactName; }; diff --git a/kopete/protocols/yahoo/yahooaccount.cpp b/kopete/protocols/yahoo/yahooaccount.cpp index 3a64d215..ae33f264 100644 --- a/kopete/protocols/yahoo/yahooaccount.cpp +++ b/kopete/protocols/yahoo/yahooaccount.cpp @@ -21,15 +21,15 @@ #include <stdlib.h> //QT -#include <qfont.h> -#include <qdatetime.h> -#include <qcolor.h> -#include <qregexp.h> -#include <qimage.h> -#include <qfile.h> -#include <qpixmap.h> -#include <qdir.h> -#include <qfileinfo.h> +#include <tqfont.h> +#include <tqdatetime.h> +#include <tqcolor.h> +#include <tqregexp.h> +#include <tqimage.h> +#include <tqfile.h> +#include <tqpixmap.h> +#include <tqdir.h> +#include <tqfileinfo.h> // KDE #include <klocale.h> @@ -66,7 +66,7 @@ #include "yabentry.h" #include "yahoouserinfodialog.h" -YahooAccount::YahooAccount(YahooProtocol *parent, const QString& accountId, const char *name) +YahooAccount::YahooAccount(YahooProtocol *parent, const TQString& accountId, const char *name) : Kopete::PasswordedAccount(parent, accountId, 0, name) { @@ -83,21 +83,21 @@ YahooAccount::YahooAccount(YahooProtocol *parent, const QString& accountId, cons // FIXME //m_openInboxAction = new KAction( KIcon("mail-folder-inbox"), i18n( "Open Inbo&x..." ), this ); //, "m_openInboxAction" ); - //QObject::connect(m_openInboxAction, SIGNAL( triggered(bool) ), this, SLOT( slotOpenInbox() ) ); + //TQObject::connect(m_openInboxAction, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotOpenInbox() ) ); //m_openYABAction = new KAction( KIcon("x-office-address-book"), i18n( "Open &Address book..." ), this ); //, "m_openYABAction" ); - //QObject::connect(m_openYABAction, SIGNAL( triggered(bool) ), this, SLOT( slotOpenYAB() ) ); + //TQObject::connect(m_openYABAction, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotOpenYAB() ) ); //m_editOwnYABEntry = new KAction( KIcon("document-properties"), i18n( "&Edit my contact details..."), this ); //, "m_editOwnYABEntry" ); - //QObject::connect(m_editOwnYABEntry, SIGNAL( triggered(bool) ), this, SLOT( slotEditOwnYABEntry() ) ); + //TQObject::connect(m_editOwnYABEntry, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotEditOwnYABEntry() ) ); //m_joinChatAction = new KAction( KIcon("im-chat-room-join"), i18n( "&Join chat room..."), this ); //, "m_joinChatAction" ); - //QObject::connect(m_joinChatAction, SIGNAL( triggered(bool) ), this, SLOT( slotJoinChatRoom() ) ); + //TQObject::connect(m_joinChatAction, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotJoinChatRoom() ) ); - m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, SLOT( slotOpenInbox() ), this, "m_openInboxAction" ); - m_openYABAction = new KAction( i18n( "Open &Addressbook..." ), "contents", 0, this, SLOT( slotOpenYAB() ), this, "m_openYABAction" ); - m_editOwnYABEntry = new KAction( i18n( "&Edit my contact details..."), "contents", 0, this, SLOT( slotEditOwnYABEntry() ), this, "m_editOwnYABEntry" ); - m_joinChatAction = new KAction( i18n( "&Join chat room..."), "contents", 0, this, SLOT( slotJoinChatRoom() ), this, "m_joinChatAction"); + m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, TQT_SLOT( slotOpenInbox() ), this, "m_openInboxAction" ); + m_openYABAction = new KAction( i18n( "Open &Addressbook..." ), "contents", 0, this, TQT_SLOT( slotOpenYAB() ), this, "m_openYABAction" ); + m_editOwnYABEntry = new KAction( i18n( "&Edit my contact details..."), "contents", 0, this, TQT_SLOT( slotEditOwnYABEntry() ), this, "m_editOwnYABEntry" ); + m_joinChatAction = new KAction( i18n( "&Join chat room..."), "contents", 0, this, TQT_SLOT( slotJoinChatRoom() ), this, "m_joinChatAction"); YahooContact* _myself=new YahooContact( this, accountId.lower(), accountId, Kopete::ContactList::self()->myself() ); setMyself( _myself ); @@ -109,7 +109,7 @@ YahooAccount::YahooAccount(YahooProtocol *parent, const QString& accountId, cons // initConnectionSignals( MakeConnections ); - QString displayName = configGroup()->readEntry(QString::fromLatin1("displayName"), QString()); + TQString displayName = configGroup()->readEntry(TQString::fromLatin1("displayName"), TQString()); if(!displayName.isEmpty()) _myself->setNickName(displayName); @@ -128,17 +128,17 @@ YahooAccount::~YahooAccount() m_webcam->stopTransmission(); } -void YahooAccount::setServer( const QString &server ) +void YahooAccount::setServer( const TQString &server ) { - configGroup()->writeEntry( QString::fromLatin1( "Server" ), server ); + configGroup()->writeEntry( TQString::fromLatin1( "Server" ), server ); } void YahooAccount::setPort( int port ) { - configGroup()->writeEntry( QString::fromLatin1( "Port" ), port ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), port ); } -void YahooAccount::slotGoStatus( int status, const QString &awayMessage) +void YahooAccount::slotGoStatus( int status, const TQString &awayMessage) { kdDebug(YAHOO_GEN_DEBUG) << "GoStatus: " << status << " msg: " << awayMessage << endl; if( !isConnected() ) @@ -162,9 +162,9 @@ Client *YahooAccount::yahooSession() return m_session ? m_session : 0L; } -QString YahooAccount::stripMsgColorCodes(const QString& msg) +TQString YahooAccount::stripMsgColorCodes(const TQString& msg) { - QString filteredMsg = msg; + TQString filteredMsg = msg; //Handle bold, underline and italic messages filteredMsg.replace( "\033[1m", "<b>" ); @@ -183,12 +183,12 @@ QString YahooAccount::stripMsgColorCodes(const QString& msg) filteredMsg.remove( "\033[xlm" ); //Remove color codes and other residual formatting - filteredMsg.remove( QRegExp("\033\\[[^m]*m") ); + filteredMsg.remove( TQRegExp("\033\\[[^m]*m") ); return filteredMsg; } -QColor YahooAccount::getMsgColor(const QString& msg) +TQColor YahooAccount::getMsgColor(const TQString& msg) { /* Yahoo sends a message either with color or without color * so we have to use this really hacky method to get colors @@ -209,13 +209,13 @@ QColor YahooAccount::getMsgColor(const QString& msg) if ( msg.find("\033[32m") != -1 ) return Qt::cyan; if ( msg.find("\033[37m") != -1 ) - return QColor("#FFAA39"); + return TQColor("#FFAA39"); if ( msg.find("\033[35m") != -1 ) - return QColor("#FFD8D8"); + return TQColor("#FFD8D8"); if ( msg.find("\033[#") != -1 ) { kdDebug(YAHOO_GEN_DEBUG) << "Custom color is " << msg.mid(msg.find("\033[#")+2,7) << endl; - return QColor(msg.mid(msg.find("\033[#")+2,7)); + return TQColor(msg.mid(msg.find("\033[#")+2,7)); } //return a default value just in case @@ -229,294 +229,294 @@ void YahooAccount::initConnectionSignals( enum SignalConnectionType sct ) if ( sct == MakeConnections ) { - QObject::connect(m_session, SIGNAL(loggedIn( int, const QString &)), - this, SLOT(slotLoginResponse(int, const QString &)) ); + TQObject::connect(m_session, TQT_SIGNAL(loggedIn( int, const TQString &)), + this, TQT_SLOT(slotLoginResponse(int, const TQString &)) ); - QObject::connect(m_session, SIGNAL(disconnected()), - this, SLOT(slotDisconnected()) ); + TQObject::connect(m_session, TQT_SIGNAL(disconnected()), + this, TQT_SLOT(slotDisconnected()) ); - QObject::connect(m_session, SIGNAL(loginFailed()), - this, SLOT(slotLoginFailed()) ); + TQObject::connect(m_session, TQT_SIGNAL(loginFailed()), + this, TQT_SLOT(slotLoginFailed()) ); - QObject::connect(m_session, SIGNAL(error(int)), - this, SLOT(slotError(int))); + TQObject::connect(m_session, TQT_SIGNAL(error(int)), + this, TQT_SLOT(slotError(int))); - QObject::connect(m_session, SIGNAL(gotBuddy(const QString &, const QString &, const QString &)), - this, SLOT(slotGotBuddy(const QString &, const QString &, const QString &))); + TQObject::connect(m_session, TQT_SIGNAL(gotBuddy(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotGotBuddy(const TQString &, const TQString &, const TQString &))); - QObject::connect(m_session, SIGNAL(buddyAddResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyAddResult(const QString &, const QString &, bool))); + TQObject::connect(m_session, TQT_SIGNAL(buddyAddResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyAddResult(const TQString &, const TQString &, bool))); - QObject::connect(m_session, SIGNAL(buddyRemoveResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyRemoveResult(const QString &, const QString &, bool))); + TQObject::connect(m_session, TQT_SIGNAL(buddyRemoveResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyRemoveResult(const TQString &, const TQString &, bool))); - QObject::connect(m_session, SIGNAL(buddyChangeGroupResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyChangeGroupResult(const QString &, const QString &, bool))); + TQObject::connect(m_session, TQT_SIGNAL(buddyChangeGroupResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyChangeGroupResult(const TQString &, const TQString &, bool))); - QObject::connect(m_session, SIGNAL(authorizationAccepted( const QString & )), - this, SLOT(slotAuthorizationAccepted( const QString & )) ); + TQObject::connect(m_session, TQT_SIGNAL(authorizationAccepted( const TQString & )), + this, TQT_SLOT(slotAuthorizationAccepted( const TQString & )) ); - QObject::connect(m_session, SIGNAL(authorizationRejected( const QString &, const QString & )), - this, SLOT(slotAuthorizationRejected( const QString &, const QString & )) ); + TQObject::connect(m_session, TQT_SIGNAL(authorizationRejected( const TQString &, const TQString & )), + this, TQT_SLOT(slotAuthorizationRejected( const TQString &, const TQString & )) ); - QObject::connect(m_session, SIGNAL(gotAuthorizationRequest( const QString &, const QString &, const QString & )), - this, SLOT(slotgotAuthorizationRequest( const QString &, const QString &, const QString & )) ); + TQObject::connect(m_session, TQT_SIGNAL(gotAuthorizationRequest( const TQString &, const TQString &, const TQString & )), + this, TQT_SLOT(slotgotAuthorizationRequest( const TQString &, const TQString &, const TQString & )) ); - QObject::connect(m_session, SIGNAL(statusChanged(const QString&,int,const QString&,int,int,int)), - this, SLOT(slotStatusChanged(const QString&,int,const QString&,int,int,int))); + TQObject::connect(m_session, TQT_SIGNAL(statusChanged(const TQString&,int,const TQString&,int,int,int)), + this, TQT_SLOT(slotStatusChanged(const TQString&,int,const TQString&,int,int,int))); - QObject::connect(m_session, SIGNAL(stealthStatusChanged(const QString &, Yahoo::StealthStatus)), - this, SLOT(slotStealthStatusChanged( const QString &, Yahoo::StealthStatus)) ); + TQObject::connect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthStatus)), + this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthStatus)) ); - QObject::connect(m_session, SIGNAL(gotIm(const QString&, const QString&, long, int)), - this, SLOT(slotGotIm(const QString &, const QString&, long, int))); + TQObject::connect(m_session, TQT_SIGNAL(gotIm(const TQString&, const TQString&, long, int)), + this, TQT_SLOT(slotGotIm(const TQString &, const TQString&, long, int))); - QObject::connect(m_session, SIGNAL(gotBuzz(const QString&, long)), - this, SLOT(slotGotBuzz(const QString &, long))); + TQObject::connect(m_session, TQT_SIGNAL(gotBuzz(const TQString&, long)), + this, TQT_SLOT(slotGotBuzz(const TQString &, long))); - QObject::connect(m_session, SIGNAL( gotConferenceInvite( const QString&, const QString&, - const QString&, const QStringList&) ), + TQObject::connect(m_session, TQT_SIGNAL( gotConferenceInvite( const TQString&, const TQString&, + const TQString&, const TQStringList&) ), this, - SLOT( slotGotConfInvite( const QString&, const QString&, - const QString&, const QStringList& ) ) ); + TQT_SLOT( slotGotConfInvite( const TQString&, const TQString&, + const TQString&, const TQStringList& ) ) ); - QObject::connect(m_session, SIGNAL(confUserDeclined(const QString&, const QString &, const QString &)), + TQObject::connect(m_session, TQT_SIGNAL(confUserDeclined(const TQString&, const TQString &, const TQString &)), this, - SLOT(slotConfUserDecline( const QString &, const QString &, const QString &)) ); + TQT_SLOT(slotConfUserDecline( const TQString &, const TQString &, const TQString &)) ); - QObject::connect(m_session , SIGNAL(confUserJoined( const QString &, const QString &)), this, - SLOT(slotConfUserJoin( const QString &, const QString &)) ); + TQObject::connect(m_session , TQT_SIGNAL(confUserJoined( const TQString &, const TQString &)), this, + TQT_SLOT(slotConfUserJoin( const TQString &, const TQString &)) ); - QObject::connect(m_session , SIGNAL(confUserLeft( const QString &, const QString &)), this, - SLOT(slotConfUserLeave( const QString &, const QString &)) ); + TQObject::connect(m_session , TQT_SIGNAL(confUserLeft( const TQString &, const TQString &)), this, + TQT_SLOT(slotConfUserLeave( const TQString &, const TQString &)) ); - QObject::connect(m_session , SIGNAL(gotConferenceMessage( const QString &, const QString &, const QString &)), this, - SLOT(slotConfMessage( const QString &, const QString &, const QString &)) ); + TQObject::connect(m_session , TQT_SIGNAL(gotConferenceMessage( const TQString &, const TQString &, const TQString &)), this, + TQT_SLOT(slotConfMessage( const TQString &, const TQString &, const TQString &)) ); - QObject::connect(m_session, - SIGNAL(incomingFileTransfer(const QString &, const QString &, long, const QString &, const QString &, unsigned long, const QPixmap &)), + TQObject::connect(m_session, + TQT_SIGNAL(incomingFileTransfer(const TQString &, const TQString &, long, const TQString &, const TQString &, unsigned long, const TQPixmap &)), this, - SLOT(slotGotFile(const QString&, const QString&, long, const QString&, const QString&, unsigned long, const QPixmap &))); + TQT_SLOT(slotGotFile(const TQString&, const TQString&, long, const TQString&, const TQString&, unsigned long, const TQPixmap &))); - QObject::connect(m_session, SIGNAL(fileTransferComplete(unsigned int)), this, - SLOT(slotFileTransferComplete(unsigned int)) ); + TQObject::connect(m_session, TQT_SIGNAL(fileTransferComplete(unsigned int)), this, + TQT_SLOT(slotFileTransferComplete(unsigned int)) ); - QObject::connect(m_session, SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, - SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); + TQObject::connect(m_session, TQT_SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, + TQT_SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); - QObject::connect(m_session, SIGNAL(fileTransferError(unsigned int,int,const QString &)), this, - SLOT(slotFileTransferError(unsigned int,int,const QString &)) ); + TQObject::connect(m_session, TQT_SIGNAL(fileTransferError(unsigned int,int,const TQString &)), this, + TQT_SLOT(slotFileTransferError(unsigned int,int,const TQString &)) ); - QObject::connect(m_session, SIGNAL(typingNotify(const QString &, int)), this , - SLOT(slotTypingNotify(const QString &, int))); + TQObject::connect(m_session, TQT_SIGNAL(typingNotify(const TQString &, int)), this , + TQT_SLOT(slotTypingNotify(const TQString &, int))); -// QObject::connect(m_session, SIGNAL(gameNotify(const QString &, int)), this, -// SLOT(slotGameNotify( const QString &, int))); +// TQObject::connect(m_session, TQT_SIGNAL(gameNotify(const TQString &, int)), this, +// TQT_SLOT(slotGameNotify( const TQString &, int))); - QObject::connect(m_session, SIGNAL(mailNotify(const QString&, const QString&, int)), this, - SLOT(slotMailNotify(const QString &, const QString&, int))); + TQObject::connect(m_session, TQT_SIGNAL(mailNotify(const TQString&, const TQString&, int)), this, + TQT_SLOT(slotMailNotify(const TQString &, const TQString&, int))); - QObject::connect(m_session, SIGNAL(systemMessage(const QString&)), this, - SLOT(slotSystemMessage(const QString &))); + TQObject::connect(m_session, TQT_SIGNAL(systemMessage(const TQString&)), this, + TQT_SLOT(slotSystemMessage(const TQString &))); -// QObject::connect(m_session, SIGNAL(gotIdentities(const QStringList &)), this, -// SLOT(slotGotIdentities( const QStringList&))); +// TQObject::connect(m_session, TQT_SIGNAL(gotIdentities(const TQStringList &)), this, +// TQT_SLOT(slotGotIdentities( const TQStringList&))); - QObject::connect(m_session, SIGNAL(gotWebcamInvite(const QString&)), this, SLOT(slotGotWebcamInvite(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(gotWebcamInvite(const TQString&)), this, TQT_SLOT(slotGotWebcamInvite(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamNotAvailable(const QString&)), this, SLOT(slotWebcamNotAvailable(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamNotAvailable(const TQString&)), this, TQT_SLOT(slotWebcamNotAvailable(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamImageReceived(const QString&, const QPixmap& )), this, SLOT(slotGotWebcamImage(const QString&, const QPixmap& ))); + TQObject::connect(m_session, TQT_SIGNAL(webcamImageReceived(const TQString&, const TQPixmap& )), this, TQT_SLOT(slotGotWebcamImage(const TQString&, const TQPixmap& ))); - QObject::connect(m_session, SIGNAL(webcamClosed(const QString&, int )), this, SLOT(slotWebcamClosed(const QString&, int ))); + TQObject::connect(m_session, TQT_SIGNAL(webcamClosed(const TQString&, int )), this, TQT_SLOT(slotWebcamClosed(const TQString&, int ))); - QObject::connect(m_session, SIGNAL(webcamPaused(const QString&)), this, SLOT(slotWebcamPaused(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamPaused(const TQString&)), this, TQT_SLOT(slotWebcamPaused(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamReadyForTransmission()), this, SLOT(slotWebcamReadyForTransmission())); + TQObject::connect(m_session, TQT_SIGNAL(webcamReadyForTransmission()), this, TQT_SLOT(slotWebcamReadyForTransmission())); - QObject::connect(m_session, SIGNAL(webcamStopTransmission()), this, SLOT(slotWebcamStopTransmission())); + TQObject::connect(m_session, TQT_SIGNAL(webcamStopTransmission()), this, TQT_SLOT(slotWebcamStopTransmission())); - QObject::connect(m_session, SIGNAL(webcamViewerJoined(const QString&)), this, SLOT(slotWebcamViewerJoined(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamViewerJoined(const TQString&)), this, TQT_SLOT(slotWebcamViewerJoined(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamViewerLeft(const QString&)), this, SLOT(slotWebcamViewerLeft(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamViewerLeft(const TQString&)), this, TQT_SLOT(slotWebcamViewerLeft(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamViewerRequest(const QString&)), this, SLOT(slotWebcamViewerRequest( const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamViewerRequest(const TQString&)), this, TQT_SLOT(slotWebcamViewerRequest( const TQString&))); - QObject::connect(m_session, SIGNAL(pictureStatusNotify( const QString&, int )), SLOT(slotPictureStatusNotify( const QString&, int))); + TQObject::connect(m_session, TQT_SIGNAL(pictureStatusNotify( const TQString&, int )), TQT_SLOT(slotPictureStatusNotify( const TQString&, int))); - QObject::connect(m_session, SIGNAL(pictureDownloaded(const QString&, const QByteArray &, int)), this, SLOT(slotGotBuddyIcon(const QString&, const QByteArray &, int)) ); + TQObject::connect(m_session, TQT_SIGNAL(pictureDownloaded(const TQString&, const TQByteArray &, int)), this, TQT_SLOT(slotGotBuddyIcon(const TQString&, const TQByteArray &, int)) ); - QObject::connect(m_session, SIGNAL(pictureInfoNotify(const QString&, KURL, int)), this, SLOT(slotGotBuddyIconInfo(const QString&, KURL, int ))); + TQObject::connect(m_session, TQT_SIGNAL(pictureInfoNotify(const TQString&, KURL, int)), this, TQT_SLOT(slotGotBuddyIconInfo(const TQString&, KURL, int ))); - QObject::connect(m_session, SIGNAL(pictureChecksumNotify(const QString&, int)), this, SLOT(slotGotBuddyIconChecksum(const QString&, int ))); + TQObject::connect(m_session, TQT_SIGNAL(pictureChecksumNotify(const TQString&, int)), this, TQT_SLOT(slotGotBuddyIconChecksum(const TQString&, int ))); - QObject::connect(m_session, SIGNAL(pictureRequest(const QString&)), this, SLOT(slotGotBuddyIconRequest(const QString&)) ); + TQObject::connect(m_session, TQT_SIGNAL(pictureRequest(const TQString&)), this, TQT_SLOT(slotGotBuddyIconRequest(const TQString&)) ); - QObject::connect(m_session, SIGNAL(pictureUploaded( const QString &, int)), this, SLOT(slotBuddyIconChanged(const QString&, int))); + TQObject::connect(m_session, TQT_SIGNAL(pictureUploaded( const TQString &, int)), this, TQT_SLOT(slotBuddyIconChanged(const TQString&, int))); - QObject::connect(m_session, SIGNAL(gotYABEntry( YABEntry * )), this, SLOT(slotGotYABEntry( YABEntry * ))); + TQObject::connect(m_session, TQT_SIGNAL(gotYABEntry( YABEntry * )), this, TQT_SLOT(slotGotYABEntry( YABEntry * ))); - QObject::connect(m_session, SIGNAL(modifyYABEntryError( YABEntry *, const QString & )), this, SLOT(slotModifyYABEntryError( YABEntry *, const QString & ))); + TQObject::connect(m_session, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & )), this, TQT_SLOT(slotModifyYABEntryError( YABEntry *, const TQString & ))); - QObject::connect(m_session, SIGNAL(gotYABRevision( long, bool )), this, SLOT(slotGotYABRevision( long , bool )) ); + TQObject::connect(m_session, TQT_SIGNAL(gotYABRevision( long, bool )), this, TQT_SLOT(slotGotYABRevision( long , bool )) ); - QObject::connect(m_session, SIGNAL(chatRoomJoined(int,int,QString,QString)), this, SLOT(slotChatJoined(int,int,QString,QString))); + TQObject::connect(m_session, TQT_SIGNAL(chatRoomJoined(int,int,TQString,TQString)), this, TQT_SLOT(slotChatJoined(int,int,TQString,TQString))); - QObject::connect(m_session, SIGNAL(chatBuddyHasJoined(QString,QString,bool)), this, SLOT(slotChatBuddyHasJoined(QString,QString,bool))); + TQObject::connect(m_session, TQT_SIGNAL(chatBuddyHasJoined(TQString,TQString,bool)), this, TQT_SLOT(slotChatBuddyHasJoined(TQString,TQString,bool))); - QObject::connect(m_session, SIGNAL(chatBuddyHasLeft(QString,QString)), this, SLOT(slotChatBuddyHasLeft(QString,QString))); + TQObject::connect(m_session, TQT_SIGNAL(chatBuddyHasLeft(TQString,TQString)), this, TQT_SLOT(slotChatBuddyHasLeft(TQString,TQString))); - QObject::connect(m_session, SIGNAL(chatMessageReceived(QString,QString,QString)), this, SLOT(slotChatMessageReceived(QString,QString,QString))); + TQObject::connect(m_session, TQT_SIGNAL(chatMessageReceived(TQString,TQString,TQString)), this, TQT_SLOT(slotChatMessageReceived(TQString,TQString,TQString))); } if ( sct == DeleteConnections ) { - QObject::disconnect(m_session, SIGNAL(loggedIn(int, const QString &)), - this, SLOT(slotLoginResponse(int, const QString &)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(loggedIn(int, const TQString &)), + this, TQT_SLOT(slotLoginResponse(int, const TQString &)) ); - QObject::disconnect(m_session, SIGNAL(disconnected()), - this, SLOT(slotDisconnected()) ); + TQObject::disconnect(m_session, TQT_SIGNAL(disconnected()), + this, TQT_SLOT(slotDisconnected()) ); - QObject::disconnect(m_session, SIGNAL(loginFailed()), - this, SLOT(slotLoginFailed()) ); + TQObject::disconnect(m_session, TQT_SIGNAL(loginFailed()), + this, TQT_SLOT(slotLoginFailed()) ); - QObject::disconnect(m_session, SIGNAL(error(int)), - this, SLOT(slotError(int))); + TQObject::disconnect(m_session, TQT_SIGNAL(error(int)), + this, TQT_SLOT(slotError(int))); - QObject::disconnect(m_session, SIGNAL(gotBuddy(const QString &, const QString &, const QString &)), - this, SLOT(slotGotBuddy(const QString &, const QString &, const QString &))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotBuddy(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotGotBuddy(const TQString &, const TQString &, const TQString &))); - QObject::disconnect(m_session, SIGNAL(buddyAddResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyAddResult(const QString &, const QString &, bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(buddyAddResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyAddResult(const TQString &, const TQString &, bool))); - QObject::disconnect(m_session, SIGNAL(buddyRemoveResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyRemoveResult(const QString &, const QString &, bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(buddyRemoveResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyRemoveResult(const TQString &, const TQString &, bool))); - QObject::disconnect(m_session, SIGNAL(buddyChangeGroupResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyChangeGroupResult(const QString &, const QString &, bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(buddyChangeGroupResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyChangeGroupResult(const TQString &, const TQString &, bool))); - QObject::disconnect(m_session, SIGNAL(authorizationAccepted( const QString &)), - this, SLOT(slotAuthorizationAccepted( const QString &)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(authorizationAccepted( const TQString &)), + this, TQT_SLOT(slotAuthorizationAccepted( const TQString &)) ); - QObject::disconnect(m_session, SIGNAL(authorizationRejected( const QString &, const QString &)), - this, SLOT(slotAuthorizationRejected( const QString &, const QString & )) ); + TQObject::disconnect(m_session, TQT_SIGNAL(authorizationRejected( const TQString &, const TQString &)), + this, TQT_SLOT(slotAuthorizationRejected( const TQString &, const TQString & )) ); - QObject::disconnect(m_session, SIGNAL(gotAuthorizationRequest( const QString &, const QString &, const QString & )), - this, SLOT(slotgotAuthorizationRequest( const QString &, const QString &, const QString & )) ); + TQObject::disconnect(m_session, TQT_SIGNAL(gotAuthorizationRequest( const TQString &, const TQString &, const TQString & )), + this, TQT_SLOT(slotgotAuthorizationRequest( const TQString &, const TQString &, const TQString & )) ); - QObject::disconnect(m_session, SIGNAL(statusChanged(const QString&,int,const QString&,int,int,int)), - this, SLOT(slotStatusChanged(const QString&,int,const QString&,int,int,int))); + TQObject::disconnect(m_session, TQT_SIGNAL(statusChanged(const TQString&,int,const TQString&,int,int,int)), + this, TQT_SLOT(slotStatusChanged(const TQString&,int,const TQString&,int,int,int))); - QObject::disconnect(m_session, SIGNAL(stealthStatusChanged(const QString &, Yahoo::StealthStatus)), - this, SLOT(slotStealthStatusChanged( const QString &, Yahoo::StealthStatus)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthStatus)), + this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthStatus)) ); - QObject::disconnect(m_session, SIGNAL(gotIm(const QString&, const QString&, long, int)), - this, SLOT(slotGotIm(const QString &, const QString&, long, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotIm(const TQString&, const TQString&, long, int)), + this, TQT_SLOT(slotGotIm(const TQString &, const TQString&, long, int))); - QObject::disconnect(m_session, SIGNAL(gotBuzz(const QString&, long)), - this, SLOT(slotGotBuzz(const QString &, long))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotBuzz(const TQString&, long)), + this, TQT_SLOT(slotGotBuzz(const TQString &, long))); - QObject::disconnect(m_session, - SIGNAL( gotConferenceInvite( const QString&, const QString&, - const QString&, const QStringList&) ), + TQObject::disconnect(m_session, + TQT_SIGNAL( gotConferenceInvite( const TQString&, const TQString&, + const TQString&, const TQStringList&) ), this, - SLOT( slotGotConfInvite( const QString&, const QString&, - const QString&, const QStringList&) ) ); + TQT_SLOT( slotGotConfInvite( const TQString&, const TQString&, + const TQString&, const TQStringList&) ) ); - QObject::disconnect(m_session, - SIGNAL(confUserDeclined(const QString&, const QString &, const QString &)), + TQObject::disconnect(m_session, + TQT_SIGNAL(confUserDeclined(const TQString&, const TQString &, const TQString &)), this, - SLOT(slotConfUserDecline( const QString &, const QString &, const QString& ) ) ); + TQT_SLOT(slotConfUserDecline( const TQString &, const TQString &, const TQString& ) ) ); - QObject::disconnect(m_session , SIGNAL(confUserJoined( const QString &, const QString &)), - this, SLOT(slotConfUserJoin( const QString &, const QString &)) ); + TQObject::disconnect(m_session , TQT_SIGNAL(confUserJoined( const TQString &, const TQString &)), + this, TQT_SLOT(slotConfUserJoin( const TQString &, const TQString &)) ); - QObject::disconnect(m_session , SIGNAL(confUserLeft( const QString &, const QString &)), - this, SLOT(slotConfUserLeave( const QString &, const QString &)) ); + TQObject::disconnect(m_session , TQT_SIGNAL(confUserLeft( const TQString &, const TQString &)), + this, TQT_SLOT(slotConfUserLeave( const TQString &, const TQString &)) ); - QObject::disconnect(m_session , SIGNAL(gotConferenceMessage( const QString &, const QString &, const QString &)), this, - SLOT(slotConfMessage( const QString &, const QString &, const QString &)) ); + TQObject::disconnect(m_session , TQT_SIGNAL(gotConferenceMessage( const TQString &, const TQString &, const TQString &)), this, + TQT_SLOT(slotConfMessage( const TQString &, const TQString &, const TQString &)) ); - QObject::disconnect(m_session, - SIGNAL(incomingFileTransfer(const QString &, const QString &, - long, const QString &, const QString &, unsigned long, const QPixmap &)), + TQObject::disconnect(m_session, + TQT_SIGNAL(incomingFileTransfer(const TQString &, const TQString &, + long, const TQString &, const TQString &, unsigned long, const TQPixmap &)), this, - SLOT(slotGotFile(const QString&, const QString&, - long, const QString&, const QString&, unsigned long, const QPixmap &))); + TQT_SLOT(slotGotFile(const TQString&, const TQString&, + long, const TQString&, const TQString&, unsigned long, const TQPixmap &))); - QObject::disconnect(m_session, SIGNAL(fileTransferComplete(unsigned int)), this, - SLOT(slotFileTransferComplete(unsigned int)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(fileTransferComplete(unsigned int)), this, + TQT_SLOT(slotFileTransferComplete(unsigned int)) ); - QObject::disconnect(m_session, SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, - SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, + TQT_SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); - QObject::disconnect(m_session, SIGNAL(fileTransferError(unsigned int,int,const QString &)), this, - SLOT(slotFileTransferError(unsigned int,int,const QString &)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(fileTransferError(unsigned int,int,const TQString &)), this, + TQT_SLOT(slotFileTransferError(unsigned int,int,const TQString &)) ); - QObject::disconnect(m_session, SIGNAL(typingNotify(const QString &, int)), this , - SLOT(slotTypingNotify(const QString &, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(typingNotify(const TQString &, int)), this , + TQT_SLOT(slotTypingNotify(const TQString &, int))); -// QObject::disconnect(m_session, SIGNAL(gameNotify(const QString &, int)), this, -// SLOT(slotGameNotify( const QString &, int))); +// TQObject::disconnect(m_session, TQT_SIGNAL(gameNotify(const TQString &, int)), this, +// TQT_SLOT(slotGameNotify( const TQString &, int))); - QObject::disconnect(m_session, SIGNAL(mailNotify(const QString&, const QString&, int)), this, - SLOT(slotMailNotify(const QString &, const QString&, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(mailNotify(const TQString&, const TQString&, int)), this, + TQT_SLOT(slotMailNotify(const TQString &, const TQString&, int))); - QObject::disconnect(m_session, SIGNAL(systemMessage(const QString&)), this, - SLOT(slotSystemMessage(const QString &))); + TQObject::disconnect(m_session, TQT_SIGNAL(systemMessage(const TQString&)), this, + TQT_SLOT(slotSystemMessage(const TQString &))); -// QObject::disconnect(m_session, SIGNAL(gotIdentities(const QStringList &)), this, -// SLOT(slotGotIdentities( const QStringList&))); +// TQObject::disconnect(m_session, TQT_SIGNAL(gotIdentities(const TQStringList &)), this, +// TQT_SLOT(slotGotIdentities( const TQStringList&))); - QObject::disconnect(m_session, SIGNAL(gotWebcamInvite(const QString&)), this, SLOT(slotGotWebcamInvite(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotWebcamInvite(const TQString&)), this, TQT_SLOT(slotGotWebcamInvite(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamNotAvailable(const QString&)), this, SLOT(slotWebcamNotAvailable(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamNotAvailable(const TQString&)), this, TQT_SLOT(slotWebcamNotAvailable(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamImageReceived(const QString&, const QPixmap& )), this, SLOT(slotGotWebcamImage(const QString&, const QPixmap& ))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamImageReceived(const TQString&, const TQPixmap& )), this, TQT_SLOT(slotGotWebcamImage(const TQString&, const TQPixmap& ))); - QObject::disconnect(m_session, SIGNAL(webcamClosed(const QString&, int )), this, SLOT(slotWebcamClosed(const QString&, int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamClosed(const TQString&, int )), this, TQT_SLOT(slotWebcamClosed(const TQString&, int ))); - QObject::disconnect(m_session, SIGNAL(webcamPaused(const QString&)), this, SLOT(slotWebcamPaused(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamPaused(const TQString&)), this, TQT_SLOT(slotWebcamPaused(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamReadyForTransmission()), this, SLOT(slotWebcamReadyForTransmission())); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamReadyForTransmission()), this, TQT_SLOT(slotWebcamReadyForTransmission())); - QObject::disconnect(m_session, SIGNAL(webcamStopTransmission()), this, SLOT(slotWebcamStopTransmission())); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamStopTransmission()), this, TQT_SLOT(slotWebcamStopTransmission())); - QObject::disconnect(m_session, SIGNAL(webcamViewerJoined(const QString&)), this, SLOT(slotWebcamViewerJoined(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamViewerJoined(const TQString&)), this, TQT_SLOT(slotWebcamViewerJoined(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamViewerLeft(const QString&)), this, SLOT(slotWebcamViewerLeft(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamViewerLeft(const TQString&)), this, TQT_SLOT(slotWebcamViewerLeft(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamViewerRequest(const QString&)), this, SLOT(slotWebcamViewerRequest( const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamViewerRequest(const TQString&)), this, TQT_SLOT(slotWebcamViewerRequest( const TQString&))); - QObject::disconnect(m_session, SIGNAL(pictureDownloaded(const QString&, const QByteArray &, int )), this, SLOT(slotGotBuddyIcon(const QString&, const QByteArray &,int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureDownloaded(const TQString&, const TQByteArray &, int )), this, TQT_SLOT(slotGotBuddyIcon(const TQString&, const TQByteArray &,int ))); - QObject::disconnect(m_session, SIGNAL(pictureInfoNotify(const QString&, KURL, int)), this, SLOT(slotGotBuddyIconInfo(const QString&, KURL, int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureInfoNotify(const TQString&, KURL, int)), this, TQT_SLOT(slotGotBuddyIconInfo(const TQString&, KURL, int ))); - QObject::disconnect(m_session, SIGNAL(pictureRequest(const QString&)), this, SLOT(slotGotBuddyIconRequest(const QString&)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureRequest(const TQString&)), this, TQT_SLOT(slotGotBuddyIconRequest(const TQString&)) ); - QObject::disconnect(m_session, SIGNAL(pictureUploaded( const QString &, int )), this, SLOT(slotBuddyIconChanged(const QString&, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureUploaded( const TQString &, int )), this, TQT_SLOT(slotBuddyIconChanged(const TQString&, int))); - QObject::disconnect(m_session, SIGNAL(pictureStatusNotify( const QString&, int )), this, SLOT(slotPictureStatusNotify( const QString&, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureStatusNotify( const TQString&, int )), this, TQT_SLOT(slotPictureStatusNotify( const TQString&, int))); - QObject::disconnect(m_session, SIGNAL(pictureChecksumNotify(const QString&, int)), this, SLOT(slotGotBuddyIconChecksum(const QString&, int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureChecksumNotify(const TQString&, int)), this, TQT_SLOT(slotGotBuddyIconChecksum(const TQString&, int ))); - QObject::disconnect(m_session, SIGNAL(gotYABEntry( YABEntry * )), this, SLOT(slotGotYABEntry( YABEntry * ))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotYABEntry( YABEntry * )), this, TQT_SLOT(slotGotYABEntry( YABEntry * ))); - QObject::disconnect(m_session, SIGNAL(modifyYABEntryError( YABEntry *, const QString & )), this, SLOT(slotModifyYABEntryError( YABEntry *, const QString & ))); + TQObject::disconnect(m_session, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & )), this, TQT_SLOT(slotModifyYABEntryError( YABEntry *, const TQString & ))); - QObject::disconnect(m_session, SIGNAL(gotYABRevision( long, bool )), this, SLOT(slotGotYABRevision( long , bool )) ); + TQObject::disconnect(m_session, TQT_SIGNAL(gotYABRevision( long, bool )), this, TQT_SLOT(slotGotYABRevision( long , bool )) ); - QObject::disconnect(m_session, SIGNAL(chatRoomJoined(int,int,const QString&,const QString&)), this, SLOT(slotChatJoined(int,int,const QString&,const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatRoomJoined(int,int,const TQString&,const TQString&)), this, TQT_SLOT(slotChatJoined(int,int,const TQString&,const TQString&))); - QObject::disconnect(m_session, SIGNAL(chatBuddyHasJoined(const QString&,const QString&,bool)), this, SLOT(slotChatBuddyHasJoined(const QString&,const QString&,bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatBuddyHasJoined(const TQString&,const TQString&,bool)), this, TQT_SLOT(slotChatBuddyHasJoined(const TQString&,const TQString&,bool))); - QObject::disconnect(m_session, SIGNAL(chatBuddyHasLeft(const QString&,const QString&)), this, SLOT(slotChatBuddyHasLeft(const QString&,const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatBuddyHasLeft(const TQString&,const TQString&)), this, TQT_SLOT(slotChatBuddyHasLeft(const TQString&,const TQString&))); - QObject::disconnect(m_session, SIGNAL(chatMessageReceived(const QString&,const QString&,const QString&)), this, SLOT(slotChatMessageReceived(const QString&,const QString&,const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatMessageReceived(const TQString&,const TQString&,const TQString&)), this, TQT_SLOT(slotChatMessageReceived(const TQString&,const TQString&,const TQString&))); } } -void YahooAccount::connectWithPassword( const QString &passwd ) +void YahooAccount::connectWithPassword( const TQString &passwd ) { kdDebug(YAHOO_GEN_DEBUG) ; if ( isAway() ) @@ -539,7 +539,7 @@ void YahooAccount::connectWithPassword( const QString &passwd ) return; } - QString server = configGroup()->readEntry( "Server", "scsa.msg.yahoo.com" ); + TQString server = configGroup()->readEntry( "Server", "scsa.msg.yahoo.com" ); int port = configGroup()->readNumEntry( "Port", 5050 ); initConnectionSignals( MakeConnections ); @@ -567,10 +567,10 @@ void YahooAccount::disconnect() static_cast<YahooContact *>( myself() )->setOnlineStatus( m_protocol->Offline ); // FIXME: to check - //QHash<QString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd(); + //QHash<TQString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd(); //for ( it = contacts().constBegin(); it != itEnd; ++it ) // static_cast<YahooContact *>( it.value() )->setOnlineStatus( m_protocol->Offline ); - for ( QDictIterator<Kopete::Contact> i( contacts() ); i.current(); ++i ) + for ( TQDictIterator<Kopete::Contact> i( contacts() ); i.current(); ++i ) static_cast<YahooContact *>( i.current() )->setOnlineStatus( m_protocol->Offline ); static_cast<YahooContact*>( myself() )->setOnlineStatus( m_protocol->Offline ); @@ -581,10 +581,10 @@ void YahooAccount::disconnect() m_session->cancelConnect(); // FIXME: to check - //QHash<QString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd(); + //QHash<TQString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd(); //for ( it = contacts().constBegin(); it != itEnd; ++it ) // static_cast<YahooContact*>( it.value() )->setOnlineStatus( m_protocol->Offline ); - for ( QDictIterator<Kopete::Contact> i(contacts()); i.current(); ++i ) + for ( TQDictIterator<Kopete::Contact> i(contacts()); i.current(); ++i ) static_cast<YahooContact*>( i.current() )->setOnlineStatus( m_protocol->Offline ); static_cast<YahooContact*>( myself() )->setOnlineStatus( m_protocol->Offline ); @@ -595,14 +595,14 @@ void YahooAccount::disconnect() theHaveContactList = false; } -void YahooAccount::verifyAccount( const QString &word ) +void YahooAccount::verifyAccount( const TQString &word ) { kdDebug(YAHOO_GEN_DEBUG) << "Word: s" << word << endl; m_session->setVerificationWord( word ); disconnected( BadPassword ); } -void YahooAccount::setAway(bool status, const QString &awayMessage) +void YahooAccount::setAway(bool status, const TQString &awayMessage) { kdDebug(YAHOO_GEN_DEBUG) ; @@ -658,12 +658,12 @@ KActionMenu* YahooAccount::actionMenu() return theActionMenu; } -YahooContact *YahooAccount::contact( const QString &id ) +YahooContact *YahooAccount::contact( const TQString &id ) { return static_cast<YahooContact *>(contacts()[id]); } -bool YahooAccount::createContact(const QString &contactId, Kopete::MetaContact *parentContact ) +bool YahooAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact ) { // kdDebug(YAHOO_GEN_DEBUG) << " contactId: " << contactId; @@ -683,7 +683,7 @@ bool YahooAccount::createContact(const QString &contactId, Kopete::MetaContact * return false; } -bool YahooAccount::createChatContact(const QString &nick) +bool YahooAccount::createChatContact(const TQString &nick) { Kopete::MetaContact *m = new Kopete::MetaContact; m->setTemporary( true ); @@ -692,13 +692,13 @@ bool YahooAccount::createChatContact(const QString &nick) void YahooAccount::sendFile( YahooContact *to, const KURL &url ) { - QFile file( url.path() ); + TQFile file( url.path() ); Kopete::Transfer *transfer = Kopete::TransferManager::transferManager()->addTransfer ( to, url.fileName(), file.size(), to->userId(), Kopete::FileTransferInfo::Outgoing ); - m_session->sendFile( transfer->info().transferId(), to->userId(), QString(), url ); + m_session->sendFile( transfer->info().transferId(), to->userId(), TQString(), url ); - QObject::connect( transfer, SIGNAL(result( KIO::Job * )), this, SLOT(slotFileTransferResult( KIO::Job * )) ); + TQObject::connect( transfer, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotFileTransferResult( KIO::Job * )) ); m_fileTransfers.insert( transfer->info().transferId(), transfer ); } @@ -715,10 +715,10 @@ void YahooAccount::setupActions( bool connected ) * * ***************************************************************************/ -void YahooAccount::slotLoginResponse( int succ , const QString &url ) +void YahooAccount::slotLoginResponse( int succ , const TQString &url ) { kdDebug(YAHOO_GEN_DEBUG) << succ << ", " << url << ")]" << endl; - QString errorMsg; + TQString errorMsg; setupActions( succ == Yahoo::LoginOk ); if ( succ == Yahoo::LoginOk || (succ == Yahoo::LoginDupl && m_lastDisconnectCode == 2) ) { @@ -799,7 +799,7 @@ void YahooAccount::slotDisconnected() static_cast<YahooContact *>( myself() )->setOnlineStatus( m_protocol->Offline ); disconnected( ConnectionReset ); // may reconnect - QString message; + TQString message; message = i18n( "%1 has been disconnected.\nError message:\n%2 - %3" ) .arg( accountId() ).arg( m_session->error() ).arg( m_session->errorString() ); KNotification::event( "connection_lost", message, myself()->onlineStatus().protocolIcon() ); @@ -812,7 +812,7 @@ void YahooAccount::slotLoginFailed() static_cast<YahooContact *>( myself() )->setOnlineStatus( m_protocol->Offline ); disconnected( Manual ); // don't reconnect - QString message; + TQString message; message = i18n( "There was an error while connecting %1 to the Yahoo server.\nError message:\n%2 - %3" ) .arg( accountId()).arg( m_session->error() ).arg( m_session->errorString() ); KNotification::event( "cannot_connect", message, myself()->onlineStatus().protocolIcon() ); @@ -832,10 +832,10 @@ void YahooAccount::slotError( int level ) .arg( m_session->errorInformation() ).arg( m_session->errorString() ), i18n( "Yahoo Plugin" ) ); } -void YahooAccount::slotGotBuddy( const QString &userid, const QString &alias, const QString &group ) +void YahooAccount::slotGotBuddy( const TQString &userid, const TQString &alias, const TQString &group ) { kdDebug(YAHOO_GEN_DEBUG) ; - IDs[userid] = QPair<QString, QString>(group, alias); + IDs[userid] = QPair<TQString, TQString>(group, alias); // Serverside -> local if ( !contact( userid ) ) @@ -849,18 +849,18 @@ void YahooAccount::slotGotBuddy( const QString &userid, const QString &alias, co //kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotBuddyAddResult( const QString &userid, const QString &group, bool success ) +void YahooAccount::slotBuddyAddResult( const TQString &userid, const TQString &group, bool success ) { kdDebug(YAHOO_GEN_DEBUG) << success << endl; if(success) - IDs[userid] = QPair<QString, QString>(group, QString()); + IDs[userid] = QPair<TQString, TQString>(group, TQString()); // FIXME (same) //kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotBuddyRemoveResult( const QString &userid, const QString &group, bool success ) +void YahooAccount::slotBuddyRemoveResult( const TQString &userid, const TQString &group, bool success ) { kdDebug(YAHOO_GEN_DEBUG); @@ -873,38 +873,38 @@ void YahooAccount::slotBuddyRemoveResult( const QString &userid, const QString & // kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotBuddyChangeGroupResult(const QString &userid, const QString &group, bool success) +void YahooAccount::slotBuddyChangeGroupResult(const TQString &userid, const TQString &group, bool success) { kdDebug(YAHOO_GEN_DEBUG); if(success) - IDs[userid] = QPair<QString, QString>(group, QString()); + IDs[userid] = QPair<TQString, TQString>(group, TQString()); // FIXME //kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotAuthorizationAccepted( const QString &who ) +void YahooAccount::slotAuthorizationAccepted( const TQString &who ) { kdDebug(YAHOO_GEN_DEBUG) ; - QString message; + TQString message; message = i18n( "User %1 has granted your authorization request." ).arg( who ); - KNotification::event( QString::fromLatin1("kopete_authorization"), message ); + KNotification::event( TQString::fromLatin1("kopete_authorization"), message ); if( contact( who ) ) contact( who )->setOnlineStatus( m_protocol->Online ); } -void YahooAccount::slotAuthorizationRejected( const QString &who, const QString &msg ) +void YahooAccount::slotAuthorizationRejected( const TQString &who, const TQString &msg ) { kdDebug(YAHOO_GEN_DEBUG) ; - QString message; + TQString message; message = i18n( "User %1 has rejected your authorization request.\n%2" ) .arg( who ).arg( msg ); - KNotification::event( QString::fromLatin1("kopete_authorization"), message ); + KNotification::event( TQString::fromLatin1("kopete_authorization"), message ); } -void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QString &msg, const QString &name ) +void YahooAccount::slotgotAuthorizationRequest( const TQString &user, const TQString &msg, const TQString &name ) { kdDebug(YAHOO_GEN_DEBUG) ; Q_UNUSED( msg ); @@ -921,8 +921,8 @@ void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QStri // actions |= Kopete::AddedInfoEvent::AddAction; //Kopete::AddedInfoEvent* event = new Kopete::AddedInfoEvent( user, this ); - //QObject::connect( event, SIGNAL(actionActivated(uint)), - // this, SLOT(slotAddedInfoEventActionActivated(uint)) ); + //TQObject::connect( event, TQT_SIGNAL(actionActivated(uint)), + // this, TQT_SLOT(slotAddedInfoEventActionActivated(uint)) ); //event->showActions( actions ); //event->sendEvent(); @@ -932,21 +932,21 @@ void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QStri hideFlags |= Kopete::UI::ContactAddedNotifyDialog::AddCheckBox | Kopete::UI::ContactAddedNotifyDialog::AddGroupBox ; Kopete::UI::ContactAddedNotifyDialog *dialog= - new Kopete::UI::ContactAddedNotifyDialog( user,QString::null,this, hideFlags ); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)), - this,SLOT(slotContactAddedNotifyDialogClosed(const QString& ))); + new Kopete::UI::ContactAddedNotifyDialog( user,TQString::null,this, hideFlags ); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)), + this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& ))); dialog->show(); } -void YahooAccount::slotContactAddedNotifyDialogClosed( const QString &user ) +void YahooAccount::slotContactAddedNotifyDialogClosed( const TQString &user ) { const Kopete::UI::ContactAddedNotifyDialog *dialog = dynamic_cast<const Kopete::UI::ContactAddedNotifyDialog *>(sender()); if(!dialog || !isConnected()) return; - m_session->sendAuthReply( user, dialog->authorized(), QString::null ); + m_session->sendAuthReply( user, dialog->authorized(), TQString::null ); if(dialog->added()) { @@ -964,10 +964,10 @@ void YahooAccount::slotContactAddedNotifyDialogClosed( const QString &user ) switch ( actionId ) { case Kopete::AddedInfoEvent::AuthorizeAction: - m_session->sendAuthReply( event->contactId(), true, QString() ); + m_session->sendAuthReply( event->contactId(), true, TQString() ); break; case Kopete::AddedInfoEvent::BlockAction: - m_session->sendAuthReply( event->contactId(), false, QString() ); + m_session->sendAuthReply( event->contactId(), false, TQString() ); break; case Kopete::AddedInfoEvent::AddContactAction: event->addContact(); @@ -975,17 +975,17 @@ void YahooAccount::slotContactAddedNotifyDialogClosed( const QString &user ) } }*/ -void YahooAccount::slotGotIgnore( const QStringList & /* igns */ ) +void YahooAccount::slotGotIgnore( const TQStringList & /* igns */ ) { //kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotGotIdentities( const QStringList & /* ids */ ) +void YahooAccount::slotGotIdentities( const TQStringList & /* ids */ ) { //kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotStatusChanged( const QString &who, int stat, const QString &msg, int away, int idle, int pictureChecksum ) +void YahooAccount::slotStatusChanged( const TQString &who, int stat, const TQString &msg, int away, int idle, int pictureChecksum ) { kdDebug(YAHOO_GEN_DEBUG) << who << " status: " << stat << " msg: " << msg << " away: " << away << " idle: " << idle << endl; YahooContact *kc = contact( who ); @@ -1032,7 +1032,7 @@ void YahooAccount::slotStatusChanged( const QString &who, int stat, const QStrin } } -void YahooAccount::slotStealthStatusChanged( const QString &who, Yahoo::StealthStatus state ) +void YahooAccount::slotStealthStatusChanged( const TQString &who, Yahoo::StealthStatus state ) { //kdDebug(YAHOO_GEN_DEBUG) << "Stealth Status of " << who << "changed to " << state; @@ -1044,16 +1044,16 @@ void YahooAccount::slotStealthStatusChanged( const QString &who, Yahoo::StealthS kc->setStealthed( state == Yahoo::StealthActive ); } -QString YahooAccount::prepareIncomingMessage( const QString &messageText ) +TQString YahooAccount::prepareIncomingMessage( const TQString &messageText ) { - QString newMsgText( messageText ); - QRegExp regExp; + TQString newMsgText( messageText ); + TQRegExp regExp; int pos = 0; newMsgText = stripMsgColorCodes( newMsgText ); kdDebug(YAHOO_GEN_DEBUG) << "Message after stripping color codes '" << newMsgText << "'" << endl; - newMsgText.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&" ) ); + newMsgText.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); // Replace Font tags regExp.setMinimal( true ); @@ -1063,7 +1063,7 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText ) pos = regExp.search( newMsgText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsgText.replace( regExp, QString::fromLatin1("<font\\1style=\"font-size:\\2pt\">" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("<font\\1style=\"font-size:\\2pt\">" ) ); } } @@ -1095,7 +1095,7 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText ) pos = regExp.search( newMsgText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsgText.replace( regExp, QString::fromLatin1("<" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("<" ) ); } } regExp.setPattern( "([^\"bui])>" ); @@ -1104,30 +1104,30 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText ) pos = regExp.search( newMsgText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsgText.replace( regExp, QString::fromLatin1("\\1>" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1>" ) ); } } // add closing tags when needed regExp.setMinimal( false ); regExp.setPattern( "(<b>.*)(?!</b>)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1</b>" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1</b>" ) ); regExp.setPattern( "(<i>.*)(?!</i>)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1</i>" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1</i>" ) ); regExp.setPattern( "(<u>.*)(?!</u>)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1</u>" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1</u>" ) ); regExp.setPattern( "(<font.*)(?!</font>)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1</font>" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1</font>" ) ); - newMsgText.replace( QString::fromLatin1( "\r" ), QString::fromLatin1( "<br/>" ) ); + newMsgText.replace( TQString::fromLatin1( "\r" ), TQString::fromLatin1( "<br/>" ) ); return newMsgText; } -void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, int /*stat*/) +void YahooAccount::slotGotIm( const TQString &who, const TQString &msg, long tm, int /*stat*/) { - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( who ) ) @@ -1139,17 +1139,17 @@ void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, i //Parse the message for it's properties kdDebug(YAHOO_GEN_DEBUG) << "Original message is '" << msg << "'" << endl; //kdDebug(YAHOO_GEN_DEBUG) << "Message color is " << getMsgColor(msg); - QColor fgColor = getMsgColor( msg ); + TQColor fgColor = getMsgColor( msg ); // FIXME to check if (tm == 0) - //msgDT = QDateTime( QDate::currentDate(), QTime::currentTime(), Qt::LocalTime ); + //msgDT = TQDateTime( TQDate::currentDate(), TQTime::currentTime(), Qt::LocalTime ); msgDT.setTime_t(time(0L)); else - //msgDT = QDateTime::fromTime_t(tm); + //msgDT = TQDateTime::fromTime_t(tm); msgDT.setTime_t(tm, Qt::LocalTime); - QString newMsgText = prepareIncomingMessage( msg ); + TQString newMsgText = prepareIncomingMessage( msg ); kdDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'" << endl; @@ -1167,10 +1167,10 @@ void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, i mm->appendMessage(kmsg); } -void YahooAccount::slotGotBuzz( const QString &who, long tm ) +void YahooAccount::slotGotBuzz( const TQString &who, long tm ) { - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( who ) ) @@ -1181,20 +1181,20 @@ void YahooAccount::slotGotBuzz( const QString &who, long tm ) // FIXME: to check if (tm == 0) - //msgDT = QDateTime( QDate::currentDate(), QTime::currentTime(), Qt::LocalTime ); + //msgDT = TQDateTime( TQDate::currentDate(), TQTime::currentTime(), Qt::LocalTime ); msgDT.setTime_t(time(0L)); else - //msgDT = QDateTime::fromTime_t(tm); + //msgDT = TQDateTime::fromTime_t(tm); msgDT.setTime_t(tm, Qt::LocalTime); justMe.append(myself()); - QString buzzMsgText = i18n("This string is shown when the user is buzzed by a contact", "Buzz"); + TQString buzzMsgText = i18n("This string is shown when the user is buzzed by a contact", "Buzz"); Kopete::Message kmsg(msgDT, contact(who), justMe, buzzMsgText, Kopete::Message::Inbound, - Kopete::Message::PlainText, QString::null, Kopete::Message::TypeAction); + Kopete::Message::PlainText, TQString::null, Kopete::Message::TypeAction); - QColor fgColor( "gold" ); + TQColor fgColor( "gold" ); kmsg.setFg( fgColor ); Kopete::ChatSession *mm = contact(who)->manager(Kopete::Contact::CanCreate); @@ -1203,7 +1203,7 @@ void YahooAccount::slotGotBuzz( const QString &who, long tm ) mm->emitNudgeNotification(); } -void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, const QString &msg, const QStringList &members ) +void YahooAccount::slotGotConfInvite( const TQString & who, const TQString & room, const TQString &msg, const TQStringList &members ) { kdDebug(YAHOO_GEN_DEBUG) << who << " has invited you to join the conference \"" << room << "\" : " << msg << endl; kdDebug(YAHOO_GEN_DEBUG) << "Members: " << members << endl; @@ -1215,20 +1215,20 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, return; } - QString m = who; - QStringList myMembers; + TQString m = who; + TQStringList myMembers; myMembers.push_back( who ); - for( QStringList::const_iterator it = ++members.constBegin(); it != members.constEnd(); ++it ) + for( TQStringList::const_iterator it = ++members.constBegin(); it != members.constEnd(); ++it ) { if( *it != m_session->userId() ) { - m.append( QString(", %1").arg( *it ) ); + m.append( TQString(", %1").arg( *it ) ); myMembers.push_back( *it ); } } if( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n("%1 has invited you to join a conference with %2.\n\nHis/her message: %3\n\nAccept?") - .arg(who).arg(m).arg(msg), QString(), i18n("Accept"), i18n("Ignore") ) ) + .arg(who).arg(m).arg(msg), TQString(), i18n("Accept"), i18n("Ignore") ) ) { m_session->joinConference( room, myMembers ); if( !m_conferences[room] ) @@ -1237,9 +1237,9 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, YahooConferenceChatSession *session = new YahooConferenceChatSession( room, protocol(), myself(), others ); m_conferences[room] = session; - QObject::connect( session, SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); + TQObject::connect( session, TQT_SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, TQT_SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); - for ( QStringList::ConstIterator it = myMembers.constBegin(); it != myMembers.constEnd(); ++it ) + for ( TQStringList::ConstIterator it = myMembers.constBegin(); it != myMembers.constEnd(); ++it ) { YahooContact * c = contact( *it ); if ( !c ) @@ -1254,32 +1254,32 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, } } else - m_session->declineConference( room, myMembers, QString() ); + m_session->declineConference( room, myMembers, TQString() ); m_pendingConfInvites.remove( room ); } -void YahooAccount::prepareConference( const QString &who ) +void YahooAccount::prepareConference( const TQString &who ) { - QString room; + TQString room; for( int i = 0; i < 22; i++ ) { char c = rand()%52; room += (c > 25) ? c + 71 : c + 65; } - room = QString("%1-%2--").arg(accountId()).arg(room); + room = TQString("%1-%2--").arg(accountId()).arg(room); kdDebug(YAHOO_GEN_DEBUG) << "The generated roomname is: " << room << endl; - QStringList buddies; + TQStringList buddies; // FIXME: to check - //QHash<QString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd(); + //QHash<TQString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd(); //for( it = contacts().constBegin(); it != itEnd; ++it ) //{ // buddies.push_back( it.value()->contactId() ); //} - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for( ; it.current(); ++it ) { if( (*it) != myself() ) @@ -1287,15 +1287,15 @@ void YahooAccount::prepareConference( const QString &who ) } YahooInviteListImpl *dlg = new YahooInviteListImpl( Kopete::UI::Global::mainWidget() ); - QObject::connect( dlg, SIGNAL( readyToInvite( const QString &, const QStringList &, const QStringList &, const QString & ) ), - this, SLOT( slotInviteConference( const QString &, const QStringList &, const QStringList &, const QString & ) ) ); + TQObject::connect( dlg, TQT_SIGNAL( readyToInvite( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ), + this, TQT_SLOT( slotInviteConference( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ) ); dlg->setRoom( room ); dlg->fillFriendList( buddies ); - dlg->addInvitees( QStringList( who ) ); + dlg->addInvitees( TQStringList( who ) ); dlg->show(); } -void YahooAccount::slotInviteConference( const QString &room, const QStringList &members, const QStringList &participants, const QString &msg ) +void YahooAccount::slotInviteConference( const TQString &room, const TQStringList &members, const TQStringList &participants, const TQString &msg ) { Q_UNUSED( participants ); kdDebug(YAHOO_GEN_DEBUG) << "Inviting " << members << " to the conference " << room << ". Message: " << msg << endl; @@ -1305,19 +1305,19 @@ kdDebug(YAHOO_GEN_DEBUG) << "Inviting " << members << " to the conference " << r YahooConferenceChatSession *session = new YahooConferenceChatSession( room, protocol(), myself(), others ); m_conferences[room] = session; - QObject::connect( session, SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); + TQObject::connect( session, TQT_SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, TQT_SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); session->joined( static_cast< YahooContact *>(myself()) ); session->view( true )->raise( false ); } -void YahooAccount::slotAddInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ) +void YahooAccount::slotAddInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_GEN_DEBUG) << "Inviting " << who << " to the conference " << room << ". Message: " << msg << endl; m_session->addInviteConference( room, who, members, msg ); } -void YahooAccount::slotConfUserDecline( const QString &who, const QString &room, const QString &msg) +void YahooAccount::slotConfUserDecline( const TQString &who, const TQString &room, const TQString &msg) { kdDebug(YAHOO_GEN_DEBUG) ; @@ -1329,13 +1329,13 @@ void YahooAccount::slotConfUserDecline( const QString &who, const QString &room, YahooConferenceChatSession *session = m_conferences[room]; - QString body = i18n( "%1 has declined to join the conference: \"%2\"").arg( who ).arg( msg ); + TQString body = i18n( "%1 has declined to join the conference: \"%2\"").arg( who ).arg( msg ); Kopete::Message message = Kopete::Message( contact( who ), myself(), body, Kopete::Message::Internal, Kopete::Message::PlainText ); session->appendMessage( message ); } -void YahooAccount::slotConfUserJoin( const QString &who, const QString &room ) +void YahooAccount::slotConfUserJoin( const TQString &who, const TQString &room ) { kdDebug(YAHOO_GEN_DEBUG) ; if( !m_conferences.contains( room ) ) @@ -1352,7 +1352,7 @@ void YahooAccount::slotConfUserJoin( const QString &who, const QString &room ) session->joined( contact( who ) ); } -void YahooAccount::slotConfUserLeave( const QString & who, const QString &room ) +void YahooAccount::slotConfUserLeave( const TQString & who, const TQString &room ) { kdDebug(YAHOO_GEN_DEBUG) ; if( !m_conferences.contains( room ) ) @@ -1374,7 +1374,7 @@ void YahooAccount::slotConfLeave( YahooConferenceChatSession *s ) kdDebug(YAHOO_GEN_DEBUG) ; if( !s ) return; - QStringList members; + TQStringList members; for( Kopete::ContactPtrList::ConstIterator it = s->members().constBegin(); it != s->members().constEnd(); ++it ) { if( (*it) == myself() ) @@ -1386,7 +1386,7 @@ void YahooAccount::slotConfLeave( YahooConferenceChatSession *s ) m_conferences.remove( s->room() ); } -void YahooAccount::slotConfMessage( const QString &who, const QString &room, const QString &msg ) +void YahooAccount::slotConfMessage( const TQString &who, const TQString &room, const TQString &msg ) { kdDebug(YAHOO_GEN_DEBUG) ; @@ -1398,8 +1398,8 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con YahooConferenceChatSession *session = m_conferences[room]; - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( who ) ) @@ -1409,10 +1409,10 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con } kdDebug(YAHOO_GEN_DEBUG) << "Original message is '" << msg << "'" << endl; - QColor fgColor = getMsgColor( msg ); + TQColor fgColor = getMsgColor( msg ); msgDT.setTime_t(time(0L)); - QString newMsgText = prepareIncomingMessage( msg ); + TQString newMsgText = prepareIncomingMessage( msg ); kdDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'" << endl; session->receivedTypingMsg(contact(who), false); @@ -1429,7 +1429,7 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con void YahooAccount::sendConfMessage( YahooConferenceChatSession *s, const Kopete::Message &message ) { kdDebug(YAHOO_GEN_DEBUG) ; - QStringList members; + TQStringList members; for( Kopete::ContactPtrList::ConstIterator it = s->members().constBegin(); it != s->members().constEnd(); ++it ) { if( (*it) == myself() ) @@ -1478,7 +1478,7 @@ void YahooAccount::slotGotYABEntry( YABEntry *entry ) dlg->setData( *entry ); dlg->setAccountConnected( isConnected() ); dlg->show(); - QObject::connect( dlg, SIGNAL(saveYABEntry( YABEntry & )), this, SLOT(slotSaveYABEntry( YABEntry & ))); + TQObject::connect( dlg, TQT_SIGNAL(saveYABEntry( YABEntry & )), this, TQT_SLOT(slotSaveYABEntry( YABEntry & ))); delete entry; } } @@ -1493,7 +1493,7 @@ void YahooAccount::slotSaveYABEntry( YABEntry &entry ) m_session->addYABEntry( entry ); } -void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const QString &msg ) +void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const TQString &msg ) { YahooContact* kc = contact( entry->yahooId ); if( kc ) @@ -1501,7 +1501,7 @@ void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const QString &msg KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, msg, i18n( "Yahoo Plugin" ) ); } -void YahooAccount::slotGotFile( const QString & who, const QString & url , long /* expires */, const QString & msg , const QString & fname, unsigned long fesize, const QPixmap &preview ) +void YahooAccount::slotGotFile( const TQString & who, const TQString & url , long /* expires */, const TQString & msg , const TQString & fname, unsigned long fesize, const TQPixmap &preview ) { kdDebug(YAHOO_GEN_DEBUG) << "Received File from " << who << ": " << msg << endl; kdDebug(YAHOO_GEN_DEBUG) << "Filename :" << fname << " size:" << fesize << endl; @@ -1511,15 +1511,15 @@ void YahooAccount::slotGotFile( const QString & who, const QString & url , lon if( m_pendingFileTransfers.empty() ) { - QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ), - this, SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( refused(const Kopete::FileTransferInfo& ) ), - this, SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); + TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ), + this, TQT_SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused(const Kopete::FileTransferInfo& ) ), + this, TQT_SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); } m_pendingFileTransfers.append( url ); } -void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QString& fileName) +void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const TQString& fileName) { kdDebug(YAHOO_GEN_DEBUG) ; if( !m_pendingFileTransfers.contains( transfer->info().internalId() ) ) @@ -1529,8 +1529,8 @@ void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QSt // FIXME to check //Create directory if it doesn't already exist - QDir dir; - QString path = QFileInfo( fileName ).dirPath(); + TQDir dir; + TQString path = TQFileInfo( fileName ).dirPath(); for( int i = 1; i <= path.contains('/'); ++i ) { if( !dir.exists( path.section( '/', 0, i ) ) ) @@ -1541,14 +1541,14 @@ void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QSt m_session->receiveFile( transfer->info().transferId(), transfer->info().contact()->contactId(), transfer->info().internalId(), fileName ); m_fileTransfers.insert( transfer->info().transferId(), transfer ); - QObject::connect( transfer, SIGNAL(result( KIO::Job * )), this, SLOT(slotFileTransferResult( KIO::Job * )) ); + TQObject::connect( transfer, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotFileTransferResult( KIO::Job * )) ); if( m_pendingFileTransfers.empty() ) { - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ), - this, SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( refused(const Kopete::FileTransferInfo& ) ), - this, SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ), + this, TQT_SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused(const Kopete::FileTransferInfo& ) ), + this, TQT_SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); } } @@ -1562,10 +1562,10 @@ void YahooAccount::slotReceiveFileRefused( const Kopete::FileTransferInfo& info if( m_pendingFileTransfers.empty() ) { - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ), - this, SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( refused(const Kopete::FileTransferInfo& ) ), - this, SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ), + this, TQT_SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused(const Kopete::FileTransferInfo& ) ), + this, TQT_SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); } } @@ -1590,7 +1590,7 @@ void YahooAccount::slotFileTransferComplete( unsigned int transferId ) m_fileTransfers.remove( transferId ); } -void YahooAccount::slotFileTransferError( unsigned int transferId, int error, const QString &desc ) +void YahooAccount::slotFileTransferError( unsigned int transferId, int error, const TQString &desc ) { kdDebug(YAHOO_GEN_DEBUG) ; Kopete::Transfer *t = m_fileTransfers[transferId]; @@ -1616,49 +1616,49 @@ void YahooAccount::slotFileTransferResult( KIO::Job *job ) } } -void YahooAccount::slotContactAdded( const QString & /* myid */, const QString & /* who */, const QString & /* msg */ ) +void YahooAccount::slotContactAdded( const TQString & /* myid */, const TQString & /* who */, const TQString & /* msg */ ) { // kdDebug(YAHOO_GEN_DEBUG) << myid << " " << who << " " << msg; } -void YahooAccount::slotRejected( const QString & /* who */, const QString & /* msg */ ) +void YahooAccount::slotRejected( const TQString & /* who */, const TQString & /* msg */ ) { // kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotTypingNotify( const QString &who, int what ) +void YahooAccount::slotTypingNotify( const TQString &who, int what ) { emit receivedTypingMsg(who, what); } -void YahooAccount::slotGameNotify( const QString & /* who */, int /* stat */ ) +void YahooAccount::slotGameNotify( const TQString & /* who */, int /* stat */ ) { // kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotMailNotify( const QString& from, const QString& subject , int cnt ) +void YahooAccount::slotMailNotify( const TQString& from, const TQString& subject , int cnt ) { kdDebug(YAHOO_GEN_DEBUG) << "Mail count: " << cnt << endl; if ( cnt > 0 && from.isEmpty() ) { - QObject::connect(KNotification::event( QString::fromLatin1("yahoo_mail"), i18n( "You have one unread message in your Yahoo inbox.", - "You have %n unread messages in your Yahoo inbox.", cnt ), QPixmap() , 0 ), - SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) ); + TQObject::connect(KNotification::event( TQString::fromLatin1("yahoo_mail"), i18n( "You have one unread message in your Yahoo inbox.", + "You have %n unread messages in your Yahoo inbox.", cnt ), TQPixmap() , 0 ), + TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) ); m_currentMailCount = cnt; } else if ( cnt > 0 ) { kdDebug(YAHOO_GEN_DEBUG) << "attempting to trigger event" << endl; - QObject::connect(KNotification::event( QString::fromLatin1("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox. <br><br>Subject: %2").arg( from ).arg( subject ), - QPixmap() , 0 ), SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) ); + TQObject::connect(KNotification::event( TQString::fromLatin1("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox. <br><br>Subject: %2").arg( from ).arg( subject ), + TQPixmap() , 0 ), TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) ); m_currentMailCount = cnt; } } -void YahooAccount::slotSystemMessage( const QString & /* msg */ ) +void YahooAccount::slotSystemMessage( const TQString & /* msg */ ) { // kdDebug(YAHOO_GEN_DEBUG) << msg; } @@ -1668,7 +1668,7 @@ void YahooAccount::slotRemoveHandler( int /* fd */ ) // kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotGotWebcamInvite( const QString& who ) +void YahooAccount::slotGotWebcamInvite( const TQString& who ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1682,18 +1682,18 @@ void YahooAccount::slotGotWebcamInvite( const QString& who ) m_pendingWebcamInvites.append( who ); if( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n("%1 has invited you to view his/her webcam. Accept?").arg( who ), - QString(), i18n("Accept"), i18n("Ignore") ) ) + TQString(), i18n("Accept"), i18n("Ignore") ) ) { m_pendingWebcamInvites.remove( who ); m_session->requestWebcam( who ); } } -void YahooAccount::slotWebcamNotAvailable( const QString &who ) +void YahooAccount::slotWebcamNotAvailable( const TQString &who ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, i18n("Webcam for %1 is not available.").arg(who), i18n( "Yahoo Plugin" ) ); } -void YahooAccount::slotGotWebcamImage( const QString& who, const QPixmap& image ) +void YahooAccount::slotGotWebcamImage( const TQString& who, const TQPixmap& image ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1703,7 +1703,7 @@ void YahooAccount::slotGotWebcamImage( const QString& who, const QPixmap& image kc->receivedWebcamImage( image ); } -void YahooAccount::slotPictureStatusNotify( const QString &who, int status) +void YahooAccount::slotPictureStatusNotify( const TQString &who, int status) { YahooContact *kc = contact( who ); if ( kc == NULL ) { @@ -1714,7 +1714,7 @@ void YahooAccount::slotPictureStatusNotify( const QString &who, int status) kdDebug(YAHOO_GEN_DEBUG) << "contact " << who << " changed picture status to" << status << endl; } -void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum) +void YahooAccount::slotGotBuddyIconChecksum(const TQString &who, int checksum) { YahooContact *kc = contact( who ); if ( kc == NULL ) { @@ -1723,7 +1723,7 @@ void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum) } if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() && - QFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(QRegExp("[./~]"),"-") +".png" ) ) ) + TQFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(TQRegExp("[./~]"),"-") +".png" ) ) ) { kdDebug(YAHOO_GEN_DEBUG) << "Icon already exists. I will not request it again." << endl; return; @@ -1731,7 +1731,7 @@ void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum) m_session->requestPicture( who ); } -void YahooAccount::slotGotBuddyIconInfo(const QString &who, KURL url, int checksum) +void YahooAccount::slotGotBuddyIconInfo(const TQString &who, KURL url, int checksum) { kdDebug(YAHOO_GEN_DEBUG) ; YahooContact *kc = contact( who ); @@ -1741,7 +1741,7 @@ void YahooAccount::slotGotBuddyIconInfo(const QString &who, KURL url, int checks } if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() && - QFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(QRegExp("[./~]"),"-") +".png" ) )) + TQFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(TQRegExp("[./~]"),"-") +".png" ) )) { kdDebug(YAHOO_GEN_DEBUG) << "Icon already exists. I will not download it again." << endl; return; @@ -1749,7 +1749,7 @@ void YahooAccount::slotGotBuddyIconInfo(const QString &who, KURL url, int checks m_session->downloadPicture( who, url, checksum ); } -void YahooAccount::slotGotBuddyIcon( const QString &who, const QByteArray &data, int checksum ) +void YahooAccount::slotGotBuddyIcon( const TQString &who, const TQByteArray &data, int checksum ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; YahooContact *kc = contact( who ); @@ -1759,7 +1759,7 @@ void YahooAccount::slotGotBuddyIcon( const QString &who, const QByteArray &data, } kc->setDisplayPicture( data, checksum ); } -void YahooAccount::slotGotBuddyIconRequest( const QString & who ) +void YahooAccount::slotGotBuddyIconRequest( const TQString & who ) { kdDebug(YAHOO_GEN_DEBUG) ; m_session->sendPictureInformation( who, myself()->property( YahooProtocol::protocol()->iconRemoteUrl ).value().toString(), @@ -1769,7 +1769,7 @@ void YahooAccount::slotGotBuddyIconRequest( const QString & who ) void YahooAccount::setBuddyIcon( const KURL &url ) { kdDebug(YAHOO_GEN_DEBUG) << "Url: " << url.path() << endl; - QString s = url.path(); + TQString s = url.path(); if ( url.path().isEmpty() ) { myself()->removeProperty( Kopete::Global::Properties::self()->photo() ); @@ -1781,17 +1781,17 @@ void YahooAccount::setBuddyIcon( const KURL &url ) } else { - QImage image( url.path() ); - QString newlocation( locateLocal( "appdata", "yahoopictures/"+ url.fileName().lower() ) ) ; - QFile iconFile( newlocation ); - QByteArray data; + TQImage image( url.path() ); + TQString newlocation( locateLocal( "appdata", "yahoopictures/"+ url.fileName().lower() ) ) ; + TQFile iconFile( newlocation ); + TQByteArray data; uint expire = myself()->property( YahooProtocol::protocol()->iconExpire ).value().toInt(); if ( image.isNull() ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, i18n( "<qt>The selected buddy icon could not be opened. <br />Please set a new buddy icon.</qt>" ), i18n( "Yahoo Plugin" ) ); return; } - image = image.smoothScale( 96, 96, QImage::ScaleMin ); + image = image.smoothScale( 96, 96, TQImage::ScaleMin ); if(image.width() < image.height()) { image = image.copy((image.width()-image.height())/2, 0, 96, 96); @@ -1827,7 +1827,7 @@ void YahooAccount::setBuddyIcon( const KURL &url ) configGroup()->writeEntry( "iconLocalUrl", newlocation ); if ( checksum != static_cast<uint>(myself()->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt()) || - QDateTime::currentDateTime().toTime_t() > expire ) + TQDateTime::currentDateTime().toTime_t() > expire ) { myself()->setProperty( YahooProtocol::protocol()->iconCheckSum, checksum ); configGroup()->writeEntry( "iconCheckSum", checksum ); @@ -1837,7 +1837,7 @@ void YahooAccount::setBuddyIcon( const KURL &url ) } } -void YahooAccount::slotBuddyIconChanged( const QString &url, int expires ) +void YahooAccount::slotBuddyIconChanged( const TQString &url, int expires ) { kdDebug(YAHOO_GEN_DEBUG) ; int checksum = myself()->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt(); @@ -1849,7 +1849,7 @@ void YahooAccount::slotBuddyIconChanged( const QString &url, int expires ) configGroup()->writeEntry( "iconRemoteUrl", url ); configGroup()->writeEntry( "iconExpire", expires ); m_session->setPictureStatus( Yahoo::Picture ); - m_session->sendPictureChecksum( QString(), checksum ); + m_session->sendPictureChecksum( TQString(), checksum ); } } @@ -1859,7 +1859,7 @@ void YahooAccount::slotWebcamReadyForTransmission() if( !m_webcam ) { m_webcam = new YahooWebcam( this ); - QObject::connect( m_webcam, SIGNAL(webcamClosing()), this, SLOT(slotOutgoingWebcamClosing()) ); + TQObject::connect( m_webcam, TQT_SIGNAL(webcamClosing()), this, TQT_SLOT(slotOutgoingWebcamClosing()) ); } m_webcam->startTransmission(); @@ -1882,7 +1882,7 @@ void YahooAccount::slotOutgoingWebcamClosing() m_webcam = 0L; } -void YahooAccount::slotWebcamViewerJoined( const QString &viewer ) +void YahooAccount::slotWebcamViewerJoined( const TQString &viewer ) { if( m_webcam ) { @@ -1890,14 +1890,14 @@ void YahooAccount::slotWebcamViewerJoined( const QString &viewer ) } } -void YahooAccount::slotWebcamViewerRequest( const QString &viewer ) +void YahooAccount::slotWebcamViewerRequest( const TQString &viewer ) { if( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n("%1 wants to view your webcam. Grant access?") - .arg(viewer), QString::null, i18n("Accept"), i18n("Ignore") ) ) + .arg(viewer), TQString::null, i18n("Accept"), i18n("Ignore") ) ) m_session->grantWebcamAccess( viewer ); } -void YahooAccount::slotWebcamViewerLeft( const QString &viewer ) +void YahooAccount::slotWebcamViewerLeft( const TQString &viewer ) { if( m_webcam ) { @@ -1905,7 +1905,7 @@ void YahooAccount::slotWebcamViewerLeft( const QString &viewer ) } } -void YahooAccount::slotWebcamClosed( const QString& who, int reason ) +void YahooAccount::slotWebcamClosed( const TQString& who, int reason ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1915,7 +1915,7 @@ void YahooAccount::slotWebcamClosed( const QString& who, int reason ) kc->webcamClosed( reason ); } -void YahooAccount::slotWebcamPaused( const QString &who ) +void YahooAccount::slotWebcamPaused( const TQString &who ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1925,7 +1925,7 @@ void YahooAccount::slotWebcamPaused( const QString &who ) kc->webcamPaused(); } -void YahooAccount::setOnlineStatus( const Kopete::OnlineStatus &status, const QString &reason) +void YahooAccount::setOnlineStatus( const Kopete::OnlineStatus &status, const TQString &reason) { kdDebug(YAHOO_GEN_DEBUG) ; if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && @@ -1968,12 +1968,12 @@ void YahooAccount::setStatusMessage(const Kopete::StatusMessage &statusMessage) void YahooAccount::slotOpenInbox() { - KRun::runURL( KURL( QString::fromLatin1("http://mail.yahoo.com/") ) , "text/html" ); + KRun::runURL( KURL( TQString::fromLatin1("http://mail.yahoo.com/") ) , "text/html" ); } void YahooAccount::slotOpenYAB() { - KRun::runURL( KURL( QString::fromLatin1("http://address.yahoo.com/") ) , "text/html" ); + KRun::runURL( KURL( TQString::fromLatin1("http://address.yahoo.com/") ) , "text/html" ); } void YahooAccount::slotEditOwnYABEntry() @@ -1988,15 +1988,15 @@ void YahooAccount::slotJoinChatRoom() /* YahooChatSelectorDialog *chatDialog = new YahooChatSelectorDialog( Kopete::UI::Global::mainWidget() ); - QObject::connect( m_session, SIGNAL(gotYahooChatCategories( const QDomDocument & )), chatDialog, - SLOT(slotSetChatCategories( const QDomDocument & )) ); - QObject::connect( m_session, SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )), - chatDialog, SLOT(slotSetChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )) ); - QObject::connect( chatDialog, SIGNAL(chatCategorySelected( const Yahoo::ChatCategory & )), - this, SLOT(slotChatCategorySelected( const Yahoo::ChatCategory & ) ) ); + TQObject::connect( m_session, TQT_SIGNAL(gotYahooChatCategories( const TQDomDocument & )), chatDialog, + TQT_SLOT(slotSetChatCategories( const TQDomDocument & )) ); + TQObject::connect( m_session, TQT_SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )), + chatDialog, TQT_SLOT(slotSetChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )) ); + TQObject::connect( chatDialog, TQT_SIGNAL(chatCategorySelected( const Yahoo::ChatCategory & )), + this, TQT_SLOT(slotChatCategorySelected( const Yahoo::ChatCategory & ) ) ); m_session->getYahooChatCategories(); - if( chatDialog->exec() == QDialog::Accepted ) + if( chatDialog->exec() == TQDialog::Accepted ) { kdDebug() << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().id << endl; m_session->joinYahooChatRoom( chatDialog->selectedRoom() ); @@ -2018,7 +2018,7 @@ void YahooAccount::slotChatCategorySelected( const Yahoo::ChatCategory &category } // FIXME: not ported yet -void YahooAccount::slotChatJoined( int roomId, int categoryId, const QString &comment, const QString &handle ) +void YahooAccount::slotChatJoined( int roomId, int categoryId, const TQString &comment, const TQString &handle ) { } /* @@ -2028,8 +2028,8 @@ void YahooAccount::slotChatJoined( int roomId, int categoryId, const QString &co if( !m_chatChatSession ) { m_chatChatSession = new YahooChatChatSession( protocol(), myself(), others ); - QObject::connect( m_chatChatSession, SIGNAL(closing(Kopete::ChatSession *)), this, - SLOT(slotLeavChat()) ); + TQObject::connect( m_chatChatSession, TQT_SIGNAL(closing(Kopete::ChatSession *)), this, + TQT_SLOT(slotLeavChat()) ); } m_chatChatSession->removeAllContacts(); m_chatChatSession->setHandle( handle ); @@ -2046,7 +2046,7 @@ void YahooAccount::slotChatJoined( int roomId, int categoryId, const QString &co */ // FIXME: not ported yet -void YahooAccount::slotChatBuddyHasJoined( const QString &nick, const QString &handle, bool suppressNotification ) +void YahooAccount::slotChatBuddyHasJoined( const TQString &nick, const TQString &handle, bool suppressNotification ) { } /* @@ -2071,7 +2071,7 @@ void YahooAccount::slotChatBuddyHasJoined( const QString &nick, const QString &h */ // FIXME: not ported yet -void YahooAccount::slotChatBuddyHasLeft( const QString &nick, const QString &handle ) +void YahooAccount::slotChatBuddyHasLeft( const TQString &nick, const TQString &handle ) { } /* @@ -2091,7 +2091,7 @@ void YahooAccount::slotChatBuddyHasLeft( const QString &nick, const QString &han */ // FIXME: not ported yet -void YahooAccount::slotChatMessageReceived( const QString &nick, const QString &message, const QString &handle ) +void YahooAccount::slotChatMessageReceived( const TQString &nick, const TQString &message, const TQString &handle ) { } /* @@ -2101,8 +2101,8 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString & if( !m_chatChatSession->handle().startsWith( handle ) ) return; - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( nick ) ) @@ -2114,10 +2114,10 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString & } kdDebug(YAHOO_GEN_DEBUG) << "Original message is '" << message << "'" << endl; - QColor fgColor = getMsgColor( message ); + TQColor fgColor = getMsgColor( message ); msgDT.setTime_t(time(0L)); - QString newMsgText = prepareIncomingMessage( message ); + TQString newMsgText = prepareIncomingMessage( message ); kdDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'" << endl; @@ -2133,7 +2133,7 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString & } */ -void YahooAccount::sendChatMessage( const Kopete::Message &msg, const QString &handle ) +void YahooAccount::sendChatMessage( const Kopete::Message &msg, const TQString &handle ) { m_session->sendYahooChatMessage( YahooContact::prepareMessage( msg.escapedBody() ), handle ); } diff --git a/kopete/protocols/yahoo/yahooaccount.h b/kopete/protocols/yahoo/yahooaccount.h index 0c636731..e2660edc 100644 --- a/kopete/protocols/yahoo/yahooaccount.h +++ b/kopete/protocols/yahoo/yahooaccount.h @@ -22,10 +22,10 @@ #define YAHOOACCOUNT_H // Qt -#include <qobject.h> -#include <qmap.h> -#include <qpixmap.h> -#include <qpair.h> +#include <tqobject.h> +#include <tqmap.h> +#include <tqpixmap.h> +#include <tqpair.h> // KDE #include <kurl.h> @@ -69,20 +69,20 @@ public: enum SignalConnectionType { MakeConnections, DeleteConnections }; - YahooAccount(YahooProtocol *parent,const QString& accountID, const char *name = 0); + YahooAccount(YahooProtocol *parent,const TQString& accountID, const char *name = 0); ~YahooAccount(); /* * Returns a contact of name @p id */ - YahooContact *contact(const QString &id); + YahooContact *contact(const TQString &id); virtual KActionMenu* actionMenu(); /** * Sets the yahoo away status */ - virtual void setAway(bool, const QString &); + virtual void setAway(bool, const TQString &); /** * The session @@ -92,7 +92,7 @@ public: /** * Returns true if contact @p id is on the server-side contact list */ - bool isOnServer(const QString &id) { return IDs.contains(id); } + bool isOnServer(const TQString &id) { return IDs.contains(id); } /** * Returns true if we have the server-side contact list @@ -106,7 +106,7 @@ public: /** * Set the pager server */ - void setServer( const QString &server ); + void setServer( const TQString &server ); /** * Set the port of the pager server @@ -118,30 +118,30 @@ public: */ void setBuddyIcon( const KURL &url ); - void verifyAccount( const QString &word ); + void verifyAccount( const TQString &word ); void sendConfMessage( YahooConferenceChatSession *s, const Kopete::Message &message ); - void sendChatMessage( const Kopete::Message &msg, const QString &handle ); - void prepareConference( const QString &who ); + void sendChatMessage( const Kopete::Message &msg, const TQString &handle ); + void prepareConference( const TQString &who ); void sendFile( YahooContact *to, const KURL &url ); public slots: /** * Connect to the Yahoo service */ - virtual void connectWithPassword( const QString & ); + virtual void connectWithPassword( const TQString & ); /** * Disconnect from the Yahoo service */ virtual void disconnect(); /** Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus&, const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus&, const TQString &reason = TQString::null); signals: /** * Emitted when we receive notification that the person we're talking to is typing */ - void receivedTypingMsg(const QString &contactId, bool isTyping); + void receivedTypingMsg(const TQString &contactId, bool isTyping); /** * Emitted when our Buddy Icon has changed @@ -152,18 +152,18 @@ protected: /** * Adds our Yahoo contact to a metacontact */ - virtual bool createContact(const QString &contactId, Kopete::MetaContact *parentContact); + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); - virtual bool createChatContact( const QString &nick ); + virtual bool createChatContact( const TQString &nick ); /** * Gets the just-received message color */ - QColor getMsgColor(const QString& msg); + TQColor getMsgColor(const TQString& msg); /** * Remove color codes from a message */ - QString stripMsgColorCodes(const QString& msg); + TQString stripMsgColorCodes(const TQString& msg); protected slots: void slotConnected(); @@ -175,73 +175,73 @@ protected slots: void slotJoinChatRoom(); void slotChatCategorySelected( const Yahoo::ChatCategory &category ); - void slotGoStatus(int status, const QString &awayMessage = QString()); - void slotLoginResponse(int succ, const QString &url); + void slotGoStatus(int status, const TQString &awayMessage = TQString()); + void slotLoginResponse(int succ, const TQString &url); void slotDisconnected(); void slotLoginFailed(); - void slotGotBuddy(const QString &userid, const QString &alias, const QString &group); - void slotBuddyAddResult(const QString &userid, const QString &group, bool success); - void slotBuddyRemoveResult(const QString &userid, const QString &group, bool success); - void slotBuddyChangeGroupResult(const QString &userid, const QString &group, bool success); - void slotAuthorizationAccepted( const QString &who ); - void slotAuthorizationRejected( const QString &who, const QString &msg ); - void slotgotAuthorizationRequest( const QString &, const QString &, const QString & ); - void slotContactAddedNotifyDialogClosed( const QString &user ); + void slotGotBuddy(const TQString &userid, const TQString &alias, const TQString &group); + void slotBuddyAddResult(const TQString &userid, const TQString &group, bool success); + void slotBuddyRemoveResult(const TQString &userid, const TQString &group, bool success); + void slotBuddyChangeGroupResult(const TQString &userid, const TQString &group, bool success); + void slotAuthorizationAccepted( const TQString &who ); + void slotAuthorizationRejected( const TQString &who, const TQString &msg ); + void slotgotAuthorizationRequest( const TQString &, const TQString &, const TQString & ); + void slotContactAddedNotifyDialogClosed( const TQString &user ); //void slotAddedInfoEventActionActivated( uint actionId ); - void slotGotIgnore(const QStringList &); - void slotGotIdentities(const QStringList &); - void slotStatusChanged(const QString &who, int stat, const QString &msg, int away, int idle, int pictureChecksum); - void slotStealthStatusChanged(const QString &who, Yahoo::StealthStatus state); - void slotGotIm(const QString &who, const QString &msg, long tm, int stat); - void slotGotBuzz(const QString &who, long tm); - void slotGotConfInvite(const QString &who, const QString &room, const QString &msg, const QStringList &members); - void slotConfUserDecline(const QString &who, const QString &room, const QString &msg); - void slotConfUserJoin(const QString &who, const QString &room); - void slotConfUserLeave(const QString &who, const QString &room); - void slotConfMessage(const QString &who, const QString &room, const QString &msg); + void slotGotIgnore(const TQStringList &); + void slotGotIdentities(const TQStringList &); + void slotStatusChanged(const TQString &who, int stat, const TQString &msg, int away, int idle, int pictureChecksum); + void slotStealthStatusChanged(const TQString &who, Yahoo::StealthStatus state); + void slotGotIm(const TQString &who, const TQString &msg, long tm, int stat); + void slotGotBuzz(const TQString &who, long tm); + void slotGotConfInvite(const TQString &who, const TQString &room, const TQString &msg, const TQStringList &members); + void slotConfUserDecline(const TQString &who, const TQString &room, const TQString &msg); + void slotConfUserJoin(const TQString &who, const TQString &room); + void slotConfUserLeave(const TQString &who, const TQString &room); + void slotConfMessage(const TQString &who, const TQString &room, const TQString &msg); void slotConfLeave( YahooConferenceChatSession *s ); - void slotInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); - void slotAddInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); - void slotGotFile(const QString &who, const QString &url, long expires, const QString &msg, const QString &fname, unsigned long fesize, const QPixmap &); - void slotContactAdded(const QString &myid, const QString &who, const QString &msg); - void slotRejected(const QString &, const QString &); - void slotTypingNotify(const QString &, int ); - void slotGameNotify(const QString &, int); - void slotMailNotify(const QString &, const QString &, int); - void slotSystemMessage(const QString &); + void slotInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); + void slotAddInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); + void slotGotFile(const TQString &who, const TQString &url, long expires, const TQString &msg, const TQString &fname, unsigned long fesize, const TQPixmap &); + void slotContactAdded(const TQString &myid, const TQString &who, const TQString &msg); + void slotRejected(const TQString &, const TQString &); + void slotTypingNotify(const TQString &, int ); + void slotGameNotify(const TQString &, int); + void slotMailNotify(const TQString &, const TQString &, int); + void slotSystemMessage(const TQString &); void slotRemoveHandler(int fd); - //void slotHostConnect(const QString &host, int port); - void slotGotWebcamInvite(const QString &); - void slotWebcamNotAvailable( const QString &who ); - void slotGotWebcamImage(const QString&, const QPixmap&); + //void slotHostConnect(const TQString &host, int port); + void slotGotWebcamInvite(const TQString &); + void slotWebcamNotAvailable( const TQString &who ); + void slotGotWebcamImage(const TQString&, const TQPixmap&); void slotWebcamReadyForTransmission(); void slotWebcamStopTransmission(); void slotOutgoingWebcamClosing(); - void slotWebcamClosed(const QString&, int); - void slotWebcamPaused(const QString&); - void slotWebcamViewerJoined( const QString & ); - void slotWebcamViewerLeft( const QString & ); - void slotWebcamViewerRequest( const QString & ); - void slotPictureStatusNotify( const QString&, int); - void slotGotBuddyIcon(const QString&, const QByteArray&, int); - void slotGotBuddyIconInfo(const QString&, KURL, int); - void slotGotBuddyIconChecksum(const QString&, int); - void slotGotBuddyIconRequest(const QString &); - void slotBuddyIconChanged(const QString&, int); + void slotWebcamClosed(const TQString&, int); + void slotWebcamPaused(const TQString&); + void slotWebcamViewerJoined( const TQString & ); + void slotWebcamViewerLeft( const TQString & ); + void slotWebcamViewerRequest( const TQString & ); + void slotPictureStatusNotify( const TQString&, int); + void slotGotBuddyIcon(const TQString&, const TQByteArray&, int); + void slotGotBuddyIconInfo(const TQString&, KURL, int); + void slotGotBuddyIconChecksum(const TQString&, int); + void slotGotBuddyIconRequest(const TQString &); + void slotBuddyIconChanged(const TQString&, int); void slotGotYABEntry( YABEntry *entry ); void slotGotYABRevision( long revision, bool merged ); void slotSaveYABEntry( YABEntry &entry ); - void slotModifyYABEntryError( YABEntry *entry, const QString & ); - void slotChatJoined( int roomId, int categoryId, const QString &comment, const QString &handle ); - void slotChatBuddyHasJoined( const QString &nick, const QString &handle, bool suppressNotification ); - void slotChatBuddyHasLeft( const QString &nick, const QString &handle ); - void slotChatMessageReceived( const QString &nick, const QString &message, const QString &handle ); + void slotModifyYABEntryError( YABEntry *entry, const TQString & ); + void slotChatJoined( int roomId, int categoryId, const TQString &comment, const TQString &handle ); + void slotChatBuddyHasJoined( const TQString &nick, const TQString &handle, bool suppressNotification ); + void slotChatBuddyHasLeft( const TQString &nick, const TQString &handle ); + void slotChatMessageReceived( const TQString &nick, const TQString &message, const TQString &handle ); void slotLeavChat(); - void slotReceiveFileAccepted( Kopete::Transfer *trans, const QString& fileName ); + void slotReceiveFileAccepted( Kopete::Transfer *trans, const TQString& fileName ); void slotReceiveFileRefused( const Kopete::FileTransferInfo& info ); void slotFileTransferComplete( unsigned int id ); - void slotFileTransferError( unsigned int id, int error, const QString &desc ); + void slotFileTransferError( unsigned int id, int error, const TQString &desc ); void slotFileTransferBytesProcessed( unsigned int id, unsigned int bytes ); void slotFileTransferResult( KIO::Job * ); void slotError( int level ); @@ -255,24 +255,24 @@ private: void setupActions( bool connected ); - QString prepareIncomingMessage( const QString &msg ); + TQString prepareIncomingMessage( const TQString &msg ); /** * internal (to the plugin) controls/flags * This should be kept in sync with server - if a buddy is removed, this should be changed accordingly. */ - QMap<QString, QPair<QString, QString> > IDs; + TQMap<TQString, QPair<TQString, TQString> > IDs; /** * Conferences list, maped by room name (id) */ - QMap<QString, YahooConferenceChatSession *> m_conferences; + TQMap<TQString, YahooConferenceChatSession *> m_conferences; YahooChatChatSession * m_chatChatSession; - QStringList m_pendingConfInvites; - QStringList m_pendingWebcamInvites; - QStringList m_pendingFileTransfers; + TQStringList m_pendingConfInvites; + TQStringList m_pendingWebcamInvites; + TQStringList m_pendingFileTransfers; - QMap<unsigned int, Kopete::Transfer *> m_fileTransfers; + TQMap<unsigned int, Kopete::Transfer *> m_fileTransfers; bool theHaveContactList; // Do we have the full server-side contact list yet? int stateOnConnection; // The state to change to on connection diff --git a/kopete/protocols/yahoo/yahooaddcontact.cpp b/kopete/protocols/yahoo/yahooaddcontact.cpp index 909c4379..af3e1bc5 100644 --- a/kopete/protocols/yahoo/yahooaddcontact.cpp +++ b/kopete/protocols/yahoo/yahooaddcontact.cpp @@ -17,7 +17,7 @@ */ // QT Includes -#include <qlayout.h> +#include <tqlayout.h> // KDE Includes #include <kdebug.h> @@ -33,11 +33,11 @@ #include "yahooaccount.h" // Yahoo Add Contact page -YahooAddContact::YahooAddContact(YahooProtocol *owner, QWidget *parent, const char *name): AddContactPage(parent, name) +YahooAddContact::YahooAddContact(YahooProtocol *owner, TQWidget *parent, const char *name): AddContactPage(parent, name) { kdDebug(YAHOO_GEN_DEBUG) << "YahooAddContact::YahooAddContact(<owner>, <parent>, " << name << ")" << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); theDialog = new YahooAddContactBase(this); theDialog->show(); theProtocol = owner; @@ -60,7 +60,7 @@ bool YahooAddContact::apply(Kopete::Account *theAccount, Kopete::MetaContact *th { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString displayName = theDialog->contactID->text(); + TQString displayName = theDialog->contactID->text(); YahooAccount* myAccount = static_cast<YahooAccount*>(theAccount); myAccount->addContact(theDialog->contactID->text().lower(), theMetaContact, Kopete::Account::ChangeKABC ); return true; diff --git a/kopete/protocols/yahoo/yahooaddcontact.h b/kopete/protocols/yahoo/yahooaddcontact.h index 947a7dcd..796c82ce 100644 --- a/kopete/protocols/yahoo/yahooaddcontact.h +++ b/kopete/protocols/yahoo/yahooaddcontact.h @@ -40,7 +40,7 @@ private: YahooAddContactBase *theDialog; public: - YahooAddContact(YahooProtocol *owner, QWidget *parent = 0, const char *name = 0); + YahooAddContact(YahooProtocol *owner, TQWidget *parent = 0, const char *name = 0); ~YahooAddContact(); virtual bool validateData(); diff --git a/kopete/protocols/yahoo/yahoochatsession.cpp b/kopete/protocols/yahoo/yahoochatsession.cpp index 0402c400..5402919c 100644 --- a/kopete/protocols/yahoo/yahoochatsession.cpp +++ b/kopete/protocols/yahoo/yahoochatsession.cpp @@ -15,11 +15,11 @@ #include "yahoochatsession.h" -#include <qlabel.h> -#include <qimage.h> -#include <qtooltip.h> -#include <qfile.h> -#include <qiconset.h> +#include <tqlabel.h> +#include <tqimage.h> +#include <tqtooltip.h> +#include <tqfile.h> +#include <tqiconset.h> #include <kconfig.h> #include <kdebug.h> @@ -53,19 +53,19 @@ YahooChatSession::YahooChatSession( Kopete::Protocol *protocol, const Kopete::Co setInstance(protocol->instance()); // Add Actions - new KAction( i18n( "Buzz Contact" ), QIconSet(BarIcon("bell")), "Ctrl+G", this, SLOT( slotBuzzContact() ), actionCollection(), "yahooBuzz" ) ; - new KAction( i18n( "Show User Info" ), QIconSet(BarIcon("idea")), 0, this, SLOT( slotUserInfo() ), actionCollection(), "yahooShowInfo" ) ; - new KAction( i18n( "Request Webcam" ), QIconSet(BarIcon("webcamreceive")), 0, this, SLOT( slotRequestWebcam() ), actionCollection(), "yahooRequestWebcam" ) ; - new KAction( i18n( "Invite to view your Webcam" ), QIconSet(BarIcon("webcamsend")), 0, this, SLOT( slotInviteWebcam() ), actionCollection(), "yahooSendWebcam" ) ; - new KAction( i18n( "Send File" ), QIconSet(BarIcon("attach")), 0, this, SLOT( slotSendFile() ), actionCollection(), "yahooSendFile" ); + new KAction( i18n( "Buzz Contact" ), TQIconSet(BarIcon("bell")), "Ctrl+G", this, TQT_SLOT( slotBuzzContact() ), actionCollection(), "yahooBuzz" ) ; + new KAction( i18n( "Show User Info" ), TQIconSet(BarIcon("idea")), 0, this, TQT_SLOT( slotUserInfo() ), actionCollection(), "yahooShowInfo" ) ; + new KAction( i18n( "Request Webcam" ), TQIconSet(BarIcon("webcamreceive")), 0, this, TQT_SLOT( slotRequestWebcam() ), actionCollection(), "yahooRequestWebcam" ) ; + new KAction( i18n( "Invite to view your Webcam" ), TQIconSet(BarIcon("webcamsend")), 0, this, TQT_SLOT( slotInviteWebcam() ), actionCollection(), "yahooSendWebcam" ) ; + new KAction( i18n( "Send File" ), TQIconSet(BarIcon("attach")), 0, this, TQT_SLOT( slotSendFile() ), actionCollection(), "yahooSendFile" ); YahooContact *c = static_cast<YahooContact*>( others.first() ); - connect( c, SIGNAL( displayPictureChanged() ), this, SLOT( slotDisplayPictureChanged() ) ); - m_image = new QLabel( 0L, "kde toolbar widget" ); - new KWidgetAction( m_image, i18n( "Yahoo Display Picture" ), 0, this, SLOT( slotDisplayPictureChanged() ), actionCollection(), "yahooDisplayPicture" ); + connect( c, TQT_SIGNAL( displayPictureChanged() ), this, TQT_SLOT( slotDisplayPictureChanged() ) ); + m_image = new TQLabel( 0L, "kde toolbar widget" ); + new KWidgetAction( m_image, i18n( "Yahoo Display Picture" ), 0, this, TQT_SLOT( slotDisplayPictureChanged() ), actionCollection(), "yahooDisplayPicture" ); if(c->hasProperty(Kopete::Global::Properties::self()->photo().key()) ) { - connect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) ); } else { @@ -83,42 +83,42 @@ YahooChatSession::~YahooChatSession() void YahooChatSession::slotBuzzContact() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrList<Kopete::Contact>contacts = members(); + TQPtrList<Kopete::Contact>contacts = members(); static_cast<YahooContact *>(contacts.first())->buzzContact(); } void YahooChatSession::slotUserInfo() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrList<Kopete::Contact>contacts = members(); + TQPtrList<Kopete::Contact>contacts = members(); static_cast<YahooContact *>(contacts.first())->slotUserInfo(); } void YahooChatSession::slotRequestWebcam() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrList<Kopete::Contact>contacts = members(); + TQPtrList<Kopete::Contact>contacts = members(); static_cast<YahooContact *>(contacts.first())->requestWebcam(); } void YahooChatSession::slotInviteWebcam() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrList<Kopete::Contact>contacts = members(); + TQPtrList<Kopete::Contact>contacts = members(); static_cast<YahooContact *>(contacts.first())->inviteWebcam(); } void YahooChatSession::slotSendFile() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrList<Kopete::Contact>contacts = members(); + TQPtrList<Kopete::Contact>contacts = members(); static_cast<YahooContact *>(contacts.first())->sendFile(); } void YahooChatSession::slotDisplayPictureChanged() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrList<Kopete::Contact> mb=members(); + TQPtrList<Kopete::Contact> mb=members(); YahooContact *c = static_cast<YahooContact *>( mb.first() ); if ( c && m_image ) { @@ -131,9 +131,9 @@ void YahooChatSession::slotDisplayPictureChanged() if(w) { //We connected that in the constructor. we don't need to keep this slot active. - disconnect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) ); + disconnect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) ); - QPtrListIterator<KToolBar> it=w->toolBarIterator() ; + TQPtrListIterator<KToolBar> it=w->toolBarIterator() ; KAction *imgAction=actionCollection()->action("yahooDisplayPicture"); if(imgAction) while(it) { @@ -142,15 +142,15 @@ void YahooChatSession::slotDisplayPictureChanged() { sz=tb->iconSize(); //ipdate if the size of the toolbar change. - disconnect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged())); - connect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged())); + disconnect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged())); + connect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged())); break; } ++it; } } - QString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString(); - QImage scaledImg = QPixmap( imgURL ).convertToImage().smoothScale( sz, sz ); + TQString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString(); + TQImage scaledImg = TQPixmap( imgURL ).convertToImage().smoothScale( sz, sz ); if(!scaledImg.isNull()) m_image->setPixmap( scaledImg ); else @@ -158,7 +158,7 @@ void YahooChatSession::slotDisplayPictureChanged() c->removeProperty(Kopete::Global::Properties::self()->photo()); //slotDisplayPictureChanged(); //don't do that or we might end in a infinite loop } - QToolTip::add( m_image, "<qt><img src=\"" + imgURL + "\"></qt>" ); + TQToolTip::add( m_image, "<qt><img src=\"" + imgURL + "\"></qt>" ); } } } diff --git a/kopete/protocols/yahoo/yahoochatsession.h b/kopete/protocols/yahoo/yahoochatsession.h index 1e440e95..57fc970f 100644 --- a/kopete/protocols/yahoo/yahoochatsession.h +++ b/kopete/protocols/yahoo/yahoochatsession.h @@ -45,7 +45,7 @@ private slots: void slotSendFile(); private: - QLabel *m_image; + TQLabel *m_image; }; #endif diff --git a/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp b/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp index cc173d96..8d34689b 100644 --- a/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp +++ b/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp @@ -34,7 +34,7 @@ #include "yahooaccount.h" #include "yahooinvitelistimpl.h" -YahooConferenceChatSession::YahooConferenceChatSession( const QString & yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, +YahooConferenceChatSession::YahooConferenceChatSession( const TQString & yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name ) : Kopete::ChatSession( user, others, protocol, name ) { @@ -42,12 +42,12 @@ YahooConferenceChatSession::YahooConferenceChatSession( const QString & yahooRoo Kopete::ChatSessionManager::self()->registerChatSession( this ); setInstance(protocol->instance()); - connect ( this, SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), - SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); + connect ( this, TQT_SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); m_yahooRoom = yahooRoom; - m_actionInvite = new KAction( i18n( "&Invite others" ), "kontact_contacts", this, SLOT( slotInviteOthers() ), actionCollection(), "yahooInvite"); + m_actionInvite = new KAction( i18n( "&Invite others" ), "kontact_contacts", this, TQT_SLOT( slotInviteOthers() ), actionCollection(), "yahooInvite"); setXMLFile("yahooconferenceui.rc"); } @@ -62,7 +62,7 @@ YahooAccount *YahooConferenceChatSession::account() return static_cast< YahooAccount *>( Kopete::ChatSession::account() ); } -const QString &YahooConferenceChatSession::room() +const TQString &YahooConferenceChatSession::room() { return m_yahooRoom; } @@ -90,8 +90,8 @@ void YahooConferenceChatSession::slotMessageSent( Kopete::Message & message, Kop void YahooConferenceChatSession::slotInviteOthers() { - QStringList buddies; - QDictIterator<Kopete::Contact> it( account()->contacts() ); + TQStringList buddies; + TQDictIterator<Kopete::Contact> it( account()->contacts() ); Kopete::Contact *myself = account()->myself(); for( ; it.current(); ++it ) { @@ -100,11 +100,11 @@ void YahooConferenceChatSession::slotInviteOthers() } YahooInviteListImpl *dlg = new YahooInviteListImpl( Kopete::UI::Global::mainWidget() ); - QObject::connect( dlg, SIGNAL( readyToInvite( const QString &, const QStringList &, const QStringList &, const QString & ) ), - account(), SLOT( slotAddInviteConference( const QString &, const QStringList &, const QStringList &, const QString & ) ) ); + TQObject::connect( dlg, TQT_SIGNAL( readyToInvite( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ), + account(), TQT_SLOT( slotAddInviteConference( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ) ); dlg->setRoom( m_yahooRoom ); dlg->fillFriendList( buddies ); - for( QPtrList<Kopete::Contact>::ConstIterator it = members().begin(); it != members().end(); it++ ) + for( TQPtrList<Kopete::Contact>::ConstIterator it = members().begin(); it != members().end(); it++ ) dlg->addParticipant( (*it)->contactId() ); dlg->show(); } diff --git a/kopete/protocols/yahoo/yahooconferencemessagemanager.h b/kopete/protocols/yahoo/yahooconferencemessagemanager.h index 60771fab..086d229a 100644 --- a/kopete/protocols/yahoo/yahooconferencemessagemanager.h +++ b/kopete/protocols/yahoo/yahooconferencemessagemanager.h @@ -34,12 +34,12 @@ class YahooConferenceChatSession : public Kopete::ChatSession Q_OBJECT public: - YahooConferenceChatSession( const QString &m_yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name = 0 ); + YahooConferenceChatSession( const TQString &m_yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name = 0 ); ~YahooConferenceChatSession(); void joined( YahooContact *c ); void left( YahooContact *c ); - const QString &room(); + const TQString &room(); YahooAccount *account(); signals: void leavingConference( YahooConferenceChatSession *s ); @@ -47,7 +47,7 @@ protected slots: void slotMessageSent( Kopete::Message &message, Kopete::ChatSession * ); void slotInviteOthers(); private: - QString m_yahooRoom; + TQString m_yahooRoom; KAction *m_actionInvite; }; diff --git a/kopete/protocols/yahoo/yahoocontact.cpp b/kopete/protocols/yahoo/yahoocontact.cpp index d5f79250..d26eb739 100644 --- a/kopete/protocols/yahoo/yahoocontact.cpp +++ b/kopete/protocols/yahoo/yahoocontact.cpp @@ -39,9 +39,9 @@ #include "sendfiletask.h" // QT Includes -#include <qregexp.h> -#include <qfile.h> -#include <qradiobutton.h> +#include <tqregexp.h> +#include <tqfile.h> +#include <tqradiobutton.h> // KDE Includes #include <kdebug.h> @@ -60,7 +60,7 @@ #include <kstandarddirs.h> #include <kfiledialog.h> -YahooContact::YahooContact( YahooAccount *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact ) +YahooContact::YahooContact( YahooAccount *account, const TQString &userId, const TQString &fullName, Kopete::MetaContact *metaContact ) : Kopete::Contact( account, userId, metaContact ) { //kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -99,7 +99,7 @@ YahooContact::~YahooContact() m_YABEntry = 0L; } -QString YahooContact::userId() const +TQString YahooContact::userId() const { return m_userId; } @@ -113,7 +113,7 @@ void YahooContact::setOnlineStatus(const Kopete::OnlineStatus &status) (status.weight()==0) ? 0 : (status.weight() -1) , protocol() , status.internalStatus()+1000 , - status.overlayIcons() + QStringList("yahoo_stealthed") , + status.overlayIcons() + TQStringList("yahoo_stealthed") , i18n("%1|Stealthed").arg( status.description() ) ) ); } else if( !m_stealthed && status.internalStatus() > 999 )// Stealthed -> Not Stealthed @@ -136,7 +136,7 @@ bool YahooContact::stealthed() return m_stealthed; } -void YahooContact::serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData) +void YahooContact::serialize(TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData) { //kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -173,7 +173,7 @@ void YahooContact::sync(unsigned int flags) } else { - QString newGroup = metaContact()->groups().first()->displayName(); + TQString newGroup = metaContact()->groups().first()->displayName(); if ( flags & Kopete::Contact::MovedBetweenGroup ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << "contact changed groups. moving on server" << endl; @@ -206,22 +206,22 @@ Kopete::ChatSession *YahooContact::manager( Kopete::Contact::CanCreateFlags canC Kopete::ContactPtrList m_them; m_them.append( this ); m_manager = new YahooChatSession( protocol(), account()->myself(), m_them ); - connect( m_manager, SIGNAL( destroyed() ), this, SLOT( slotChatSessionDestroyed() ) ); - connect( m_manager, SIGNAL( messageSent ( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( slotSendMessage( Kopete::Message& ) ) ); - connect( m_manager, SIGNAL( myselfTyping( bool) ), this, SLOT( slotTyping( bool ) ) ); - connect( m_account, SIGNAL( receivedTypingMsg( const QString &, bool ) ), m_manager, SLOT( receivedTypingMsg( const QString&, bool ) ) ); - connect( this, SIGNAL(displayPictureChanged()), m_manager, SLOT(slotDisplayPictureChanged())); + connect( m_manager, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotChatSessionDestroyed() ) ); + connect( m_manager, TQT_SIGNAL( messageSent ( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( slotSendMessage( Kopete::Message& ) ) ); + connect( m_manager, TQT_SIGNAL( myselfTyping( bool) ), this, TQT_SLOT( slotTyping( bool ) ) ); + connect( m_account, TQT_SIGNAL( receivedTypingMsg( const TQString &, bool ) ), m_manager, TQT_SLOT( receivedTypingMsg( const TQString&, bool ) ) ); + connect( this, TQT_SIGNAL(displayPictureChanged()), m_manager, TQT_SLOT(slotDisplayPictureChanged())); } return m_manager; } -QString YahooContact::prepareMessage( const QString &messageText ) +TQString YahooContact::prepareMessage( const TQString &messageText ) { // Yahoo does not understand XML/HTML message data, so send plain text // instead. (Yahoo has its own format for "rich text".) - QString newMsg( messageText ); - QRegExp regExp; + TQString newMsg( messageText ); + TQRegExp regExp; int pos = 0; regExp.setMinimal( true ); @@ -232,7 +232,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("<span\\1font-weight:600\\2>\033[1m\\3\033[x1m</span>" ) ); + newMsg.replace( regExp, TQString::fromLatin1("<span\\1font-weight:600\\2>\033[1m\\3\033[x1m</span>" ) ); } } @@ -243,7 +243,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("<span\\1text-decoration:underline\\2>\033[4m\\3\033[x4m</span>" ) ); + newMsg.replace( regExp, TQString::fromLatin1("<span\\1text-decoration:underline\\2>\033[4m\\3\033[x4m</span>" ) ); } } @@ -254,7 +254,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("<span\\1font-style:italic\\2>\033[2m\\3\033[x2m</span>" ) ); + newMsg.replace( regExp, TQString::fromLatin1("<span\\1font-style:italic\\2>\033[2m\\3\033[x2m</span>" ) ); } } @@ -265,7 +265,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("<span\\1\\3>\033[#\\2m\\4\033[#000000m</span>" ) ); + newMsg.replace( regExp, TQString::fromLatin1("<span\\1\\3>\033[#\\2m\\4\033[#000000m</span>" ) ); } } @@ -276,7 +276,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("<span\\1\\3><font face=\"\\2\">\\4</span>" ) ); + newMsg.replace( regExp, TQString::fromLatin1("<span\\1\\3><font face=\"\\2\">\\4</span>" ) ); } } @@ -287,7 +287,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("<span\\1\\3><font size=\"\\2\">\\4</span>" ) ); + newMsg.replace( regExp, TQString::fromLatin1("<span\\1\\3><font size=\"\\2\">\\4</span>" ) ); } } @@ -298,18 +298,18 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\\2") ); + newMsg.replace( regExp, TQString::fromLatin1("\\2") ); } } // convert escaped chars - newMsg.replace( QString::fromLatin1( ">" ), QString::fromLatin1( ">" ) ); - newMsg.replace( QString::fromLatin1( "<" ), QString::fromLatin1( "<" ) ); - newMsg.replace( QString::fromLatin1( """ ), QString::fromLatin1( "\"" ) ); - newMsg.replace( QString::fromLatin1( " " ), QString::fromLatin1( " " ) ); - newMsg.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&" ) ); - newMsg.replace( QString::fromLatin1( "<br />" ), QString::fromLatin1( "\r" ) ); - newMsg.replace( QString::fromLatin1( "<br/>" ), QString::fromLatin1( "\r" ) ); + newMsg.replace( TQString::fromLatin1( ">" ), TQString::fromLatin1( ">" ) ); + newMsg.replace( TQString::fromLatin1( "<" ), TQString::fromLatin1( "<" ) ); + newMsg.replace( TQString::fromLatin1( """ ), TQString::fromLatin1( "\"" ) ); + newMsg.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); + newMsg.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); + newMsg.replace( TQString::fromLatin1( "<br />" ), TQString::fromLatin1( "\r" ) ); + newMsg.replace( TQString::fromLatin1( "<br/>" ), TQString::fromLatin1( "\r" ) ); return newMsg; } @@ -318,7 +318,7 @@ void YahooContact::slotSendMessage( Kopete::Message &message ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString messageText = message.escapedBody(); + TQString messageText = message.escapedBody(); kdDebug(YAHOO_GEN_DEBUG) << "Original message: " << messageText << endl; messageText = prepareMessage( messageText ); kdDebug(YAHOO_GEN_DEBUG) << "Converted message: " << messageText << endl; @@ -339,10 +339,10 @@ void YahooContact::slotSendMessage( Kopete::Message &message ) manager(Kopete::Contact::CanCreate)->messageSucceeded(); } -void YahooContact::sendFile( const KURL &sourceURL, const QString &fileName, uint fileSize ) +void YahooContact::sendFile( const KURL &sourceURL, const TQString &fileName, uint fileSize ) { Kopete::TransferManager::transferManager()->sendFile( sourceURL, fileName, fileSize, - false, this, SLOT(slotSendFile( const KURL & )) ); + false, this, TQT_SLOT(slotSendFile( const KURL & )) ); } void YahooContact::slotTyping(bool isTyping_ ) @@ -361,13 +361,13 @@ void YahooContact::slotChatSessionDestroyed() m_sessionActive = false; } -QPtrList<KAction> *YahooContact::customContextMenuActions() +TQPtrList<KAction> *YahooContact::customContextMenuActions() { - QPtrList<KAction> *actionCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>(); if ( !m_webcamAction ) { m_webcamAction = new KAction( i18n( "View &Webcam" ), "webcamreceive", KShortcut(), - this, SLOT( requestWebcam() ), this, "view_webcam" ); + this, TQT_SLOT( requestWebcam() ), this, "view_webcam" ); } if ( isReachable() ) m_webcamAction->setEnabled( true ); @@ -378,7 +378,7 @@ QPtrList<KAction> *YahooContact::customContextMenuActions() if( !m_inviteWebcamAction ) { m_inviteWebcamAction = new KAction( i18n( "Invite to view your Webcam" ), "webcamsend", KShortcut(), - this, SLOT( inviteWebcam() ), this, "invite_webcam" ); + this, TQT_SLOT( inviteWebcam() ), this, "invite_webcam" ); } if ( isReachable() ) m_inviteWebcamAction->setEnabled( true ); @@ -388,7 +388,7 @@ QPtrList<KAction> *YahooContact::customContextMenuActions() if ( !m_buzzAction ) { - m_buzzAction = new KAction( i18n( "&Buzz Contact" ), "bell", KShortcut(), this, SLOT( buzzContact() ), this, "buzz_contact"); + m_buzzAction = new KAction( i18n( "&Buzz Contact" ), "bell", KShortcut(), this, TQT_SLOT( buzzContact() ), this, "buzz_contact"); } if ( isReachable() ) m_buzzAction->setEnabled( true ); @@ -398,7 +398,7 @@ QPtrList<KAction> *YahooContact::customContextMenuActions() if ( !m_stealthAction ) { - m_stealthAction = new KAction( i18n( "&Stealth Setting" ), "yahoo_stealthed", KShortcut(), this, SLOT( stealthContact() ), this, "stealth_contact"); + m_stealthAction = new KAction( i18n( "&Stealth Setting" ), "yahoo_stealthed", KShortcut(), this, TQT_SLOT( stealthContact() ), this, "stealth_contact"); } if ( isReachable() ) m_stealthAction->setEnabled( true ); @@ -408,7 +408,7 @@ QPtrList<KAction> *YahooContact::customContextMenuActions() if ( !m_inviteConferenceAction ) { - m_inviteConferenceAction = new KAction( i18n( "&Invite to Conference" ), "kontact_contacts", KShortcut(), this, SLOT( inviteConference() ), this, "invite_conference"); + m_inviteConferenceAction = new KAction( i18n( "&Invite to Conference" ), "kontact_contacts", KShortcut(), this, TQT_SLOT( inviteConference() ), this, "invite_conference"); } if ( isReachable() ) m_inviteConferenceAction->setEnabled( true ); @@ -418,7 +418,7 @@ QPtrList<KAction> *YahooContact::customContextMenuActions() if ( !m_profileAction ) { - m_profileAction = new KAction( i18n( "&View Yahoo Profile" ), "kontact_notes", KShortcut(), this, SLOT( slotUserProfile() ), this, "profile_contact"); + m_profileAction = new KAction( i18n( "&View Yahoo Profile" ), "kontact_notes", KShortcut(), this, TQT_SLOT( slotUserProfile() ), this, "profile_contact"); } m_profileAction->setEnabled( true ); actionCollection->append( m_profileAction ); @@ -440,14 +440,14 @@ void YahooContact::slotUserInfo() dlg->setData( *m_YABEntry ); dlg->setAccountConnected( m_account->isConnected() ); dlg->show(); - QObject::connect( dlg, SIGNAL(saveYABEntry( YABEntry & )), m_account, SLOT(slotSaveYABEntry( YABEntry & ))); + TQObject::connect( dlg, TQT_SIGNAL(saveYABEntry( YABEntry & )), m_account, TQT_SLOT(slotSaveYABEntry( YABEntry & ))); } void YahooContact::slotUserProfile() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString profileSiteString = QString::fromLatin1("http://profiles.yahoo.com/") + userId(); + TQString profileSiteString = TQString::fromLatin1("http://profiles.yahoo.com/") + userId(); KRun::runURL( KURL( profileSiteString ) , "text/html" ); } @@ -477,7 +477,7 @@ void YahooContact::stealthContact() // Show dialog - if ( stealthSettingDialog->exec() == QDialog::Rejected ) + if ( stealthSettingDialog->exec() == TQDialog::Rejected ) { stealthSettingDialog->delayedDestruct(); return; @@ -518,7 +518,7 @@ void YahooContact::buzzContact() Kopete::Message msg = Kopete::Message( manager(Kopete::Contact::CannotCreate)->myself() , manager(Kopete::Contact::CannotCreate)->members(), i18n("Buzzz!!!"), Kopete::Message::Outbound, Kopete::Message::PlainText, - QString::null , Kopete::Message::TypeAction); + TQString::null , Kopete::Message::TypeAction); view->appendMessage( msg ); } } @@ -530,7 +530,7 @@ void YahooContact::sendBuddyIconChecksum( int checksum ) } -void YahooContact::sendBuddyIconInfo( const QString &url, int checksum ) +void YahooContact::sendBuddyIconInfo( const TQString &url, int checksum ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; m_account->yahooSession()->sendPictureInformation( m_userId, url, checksum ); @@ -545,14 +545,14 @@ void YahooContact::sendBuddyIconUpdate( int type ) } // new version -void YahooContact::setDisplayPicture(const QByteArray &data, int checksum) +void YahooContact::setDisplayPicture(const TQByteArray &data, int checksum) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << data.size() << endl; - QString newlocation = locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ; + TQString newlocation = locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; setProperty( YahooProtocol::protocol()->iconCheckSum, checksum ); - QFile f( newlocation ); + TQFile f( newlocation ); if (!f.open( IO_WriteOnly )) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << "Saving of " << newlocation << " failed!" << endl; @@ -561,7 +561,7 @@ void YahooContact::setDisplayPicture(const QByteArray &data, int checksum) f.writeBlock(data.data(), data.size()); f.close(); - setProperty( Kopete::Global::Properties::self()->photo(), QString() ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString() ); setProperty( Kopete::Global::Properties::self()->photo() , newlocation ); emit displayPictureChanged(); @@ -590,8 +590,8 @@ const YABEntry *YahooContact::yabEntry() void YahooContact::slotEmitDisplayPictureChanged() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString newlocation=locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ; - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + TQString newlocation=locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo() , newlocation ); emit displayPictureChanged(); } @@ -613,7 +613,7 @@ void YahooContact::inviteWebcam() m_account->yahooSession()->sendWebcamInvite( m_userId ); } -void YahooContact::receivedWebcamImage( const QPixmap& image ) +void YahooContact::receivedWebcamImage( const TQPixmap& image ) { if( !m_webcamDialog ) initWebcamViewer(); @@ -639,19 +639,19 @@ void YahooContact::initWebcamViewer() if ( !m_webcamDialog ) { m_webcamDialog = new YahooWebcamDialog( userId(), Kopete::UI::Global::mainWidget() ); -// QObject::connect( m_webcamDialog, SIGNAL( closeClicked() ), this, SLOT( closeWebcamDialog() ) ); +// TQObject::connect( m_webcamDialog, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( closeWebcamDialog() ) ); - QObject::connect( this, SIGNAL( signalWebcamClosed( int ) ), - m_webcamDialog, SLOT( webcamClosed( int ) ) ); + TQObject::connect( this, TQT_SIGNAL( signalWebcamClosed( int ) ), + m_webcamDialog, TQT_SLOT( webcamClosed( int ) ) ); - QObject::connect( this, SIGNAL( signalWebcamPaused() ), - m_webcamDialog, SLOT( webcamPaused() ) ); + TQObject::connect( this, TQT_SIGNAL( signalWebcamPaused() ), + m_webcamDialog, TQT_SLOT( webcamPaused() ) ); - QObject::connect( this, SIGNAL ( signalReceivedWebcamImage( const QPixmap& ) ), - m_webcamDialog, SLOT( newImage( const QPixmap& ) ) ); + TQObject::connect( this, TQT_SIGNAL ( signalReceivedWebcamImage( const TQPixmap& ) ), + m_webcamDialog, TQT_SLOT( newImage( const TQPixmap& ) ) ); - QObject::connect( m_webcamDialog, SIGNAL ( closingWebcamDialog ( ) ), - this, SLOT ( closeWebcamDialog ( ) ) ); + TQObject::connect( m_webcamDialog, TQT_SIGNAL ( closingWebcamDialog ( ) ), + this, TQT_SLOT ( closeWebcamDialog ( ) ) ); } m_webcamDialog->show(); } @@ -673,17 +673,17 @@ void YahooContact::requestWebcam() void YahooContact::closeWebcamDialog() { - QObject::disconnect( this, SIGNAL( signalWebcamClosed( int ) ), - m_webcamDialog, SLOT( webcamClosed( int ) ) ); + TQObject::disconnect( this, TQT_SIGNAL( signalWebcamClosed( int ) ), + m_webcamDialog, TQT_SLOT( webcamClosed( int ) ) ); - QObject::disconnect( this, SIGNAL( signalWebcamPaused() ), - m_webcamDialog, SLOT( webcamPaused( ) ) ); + TQObject::disconnect( this, TQT_SIGNAL( signalWebcamPaused() ), + m_webcamDialog, TQT_SLOT( webcamPaused( ) ) ); - QObject::disconnect( this, SIGNAL ( signalReceivedWebcamImage( const QPixmap& ) ), - m_webcamDialog, SLOT( newImage( const QPixmap& ) ) ); + TQObject::disconnect( this, TQT_SIGNAL ( signalReceivedWebcamImage( const TQPixmap& ) ), + m_webcamDialog, TQT_SLOT( newImage( const TQPixmap& ) ) ); - QObject::disconnect( m_webcamDialog, SIGNAL ( closingWebcamDialog ( ) ), - this, SLOT ( closeWebcamDialog ( ) ) ); + TQObject::disconnect( m_webcamDialog, TQT_SIGNAL ( closingWebcamDialog ( ) ), + this, TQT_SLOT ( closeWebcamDialog ( ) ) ); if( m_receivingWebcam ) m_account->yahooSession()->closeWebcam( contactId() ); m_webcamDialog->delayedDestruct(); @@ -826,8 +826,8 @@ void YahooContact::readYABEntry() m_YABEntry->workURL = property( YahooProtocol::protocol()->propWorkURL ).value().toString(); // Miscellanous - m_YABEntry->birthday = QDate::fromString( property( YahooProtocol::protocol()->propBirthday ).value().toString(), Qt::ISODate ); - m_YABEntry->anniversary = QDate::fromString( property( YahooProtocol::protocol()->propAnniversary ).value().toString(), Qt::ISODate ); + m_YABEntry->birthday = TQDate::fromString( property( YahooProtocol::protocol()->propBirthday ).value().toString(), Qt::ISODate ); + m_YABEntry->anniversary = TQDate::fromString( property( YahooProtocol::protocol()->propAnniversary ).value().toString(), Qt::ISODate ); m_YABEntry->notes = property( YahooProtocol::protocol()->propNotes ).value().toString(); m_YABEntry->additional1 = property( YahooProtocol::protocol()->propAdditional1 ).value().toString(); m_YABEntry->additional2 = property( YahooProtocol::protocol()->propAdditional2 ).value().toString(); diff --git a/kopete/protocols/yahoo/yahoocontact.h b/kopete/protocols/yahoo/yahoocontact.h index 53759252..092a2c93 100644 --- a/kopete/protocols/yahoo/yahoocontact.h +++ b/kopete/protocols/yahoo/yahoocontact.h @@ -42,15 +42,15 @@ class YahooContact : public Kopete::Contact { Q_OBJECT public: - YahooContact( YahooAccount *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact ); + YahooContact( YahooAccount *account, const TQString &userId, const TQString &fullName, Kopete::MetaContact *metaContact ); ~YahooContact(); /** Base Class Reimplementations **/ virtual bool isOnline() const; virtual bool isReachable(); - virtual QPtrList<KAction> *customContextMenuActions(); + virtual TQPtrList<KAction> *customContextMenuActions(); virtual Kopete::ChatSession *manager( Kopete::Contact::CanCreateFlags canCreate= Kopete::Contact::CanCreate ); - virtual void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData ); + virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData ); void setOnlineStatus(const Kopete::OnlineStatus &status); void setYahooStatus( const Kopete::OnlineStatus& ); @@ -59,32 +59,32 @@ public: /** The group name getter and setter methods**/ - QString group() const; - void setGroup( const QString& ); + TQString group() const; + void setGroup( const TQString& ); /** The userId getter method**/ - QString userId() const; + TQString userId() const; - void receivedWebcamImage( const QPixmap& ); + void receivedWebcamImage( const TQPixmap& ); void webcamClosed( int ); void webcamPaused(); const YABEntry *yabEntry(); - static QString prepareMessage( const QString &messageText ); + static TQString prepareMessage( const TQString &messageText ); public slots: virtual void slotUserInfo(); virtual void slotSendFile( const KURL &file ); virtual void deleteContact(); - virtual void sendFile( const KURL &sourceURL = KURL(), const QString &fileName = QString::null, uint fileSize = 0L ); + virtual void sendFile( const KURL &sourceURL = KURL(), const TQString &fileName = TQString::null, uint fileSize = 0L ); void slotUserProfile(); void stealthContact(); void requestWebcam(); void inviteWebcam(); void buzzContact(); - void setDisplayPicture(const QByteArray &data, int checksum); - void sendBuddyIconInfo( const QString &url, int checksum ); + void setDisplayPicture(const TQByteArray &data, int checksum); + void sendBuddyIconInfo( const TQString &url, int checksum ); void sendBuddyIconUpdate( int type ); void sendBuddyIconChecksum( int checksum ); void setYABEntry( YABEntry *, bool show = false ); @@ -98,7 +98,7 @@ public slots: void sync(unsigned int flags); signals: - void signalReceivedWebcamImage( const QPixmap &pic ); + void signalReceivedWebcamImage( const TQPixmap &pic ); void signalWebcamClosed( int reason ); void signalWebcamPaused(); void displayPictureChanged(); @@ -117,8 +117,8 @@ private slots: void readYABEntry(); private: - QString m_userId; - QString m_groupName; + TQString m_userId; + TQString m_groupName; YABEntry *m_YABEntry; YahooChatSession *m_manager; YahooWebcamDialog* m_webcamDialog; diff --git a/kopete/protocols/yahoo/yahooeditaccount.cpp b/kopete/protocols/yahoo/yahooeditaccount.cpp index c83905ed..c2508a58 100644 --- a/kopete/protocols/yahoo/yahooeditaccount.cpp +++ b/kopete/protocols/yahoo/yahooeditaccount.cpp @@ -17,14 +17,14 @@ */ // QT Includes -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qspinbox.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> // KDE Includes #include <klocale.h> @@ -47,7 +47,7 @@ #include "yahooeditaccount.h" // Yahoo Add Contact page -YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, QWidget *parent, const char* /*name*/): YahooEditAccountBase(parent), KopeteEditAccountWidget(theAccount) +YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, TQWidget *parent, const char* /*name*/): YahooEditAccountBase(parent), KopeteEditAccountWidget(theAccount) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -63,7 +63,7 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the mAutoConnect->setChecked(acct->excludeConnect()); mPasswordWidget->load( &acct->password() ); - QString pagerServer = account()->configGroup()->readEntry("Server", "scs.msg.yahoo.com"); + TQString pagerServer = account()->configGroup()->readEntry("Server", "scs.msg.yahoo.com"); int pagerPort = account()->configGroup()->readNumEntry("Port", 5050); if( pagerServer != "scs.msg.yahoo.com" || pagerPort != 5050 ) optionOverrideServer->setChecked( true ); @@ -72,11 +72,11 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the editServerAddress->setText( pagerServer ); sbxServerPort->setValue( pagerPort ); - QString iconUrl = account()->configGroup()->readEntry("pictureUrl", ""); + TQString iconUrl = account()->configGroup()->readEntry("pictureUrl", ""); bool sendPicture = account()->configGroup()->readBoolEntry("sendPicture", false); optionSendBuddyIcon->setChecked( sendPicture ); buttonSelectPicture->setEnabled( sendPicture ); - connect( optionSendBuddyIcon, SIGNAL( toggled( bool ) ), buttonSelectPicture, SLOT( setEnabled( bool ) ) ); + connect( optionSendBuddyIcon, TQT_SIGNAL( toggled( bool ) ), buttonSelectPicture, TQT_SLOT( setEnabled( bool ) ) ); editPictureUrl->setText( iconUrl ); if( !iconUrl.isEmpty() ) m_Picture->setPixmap( KURL( iconUrl ).path() ); @@ -86,15 +86,15 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the mGlobalIdentity->setChecked( account()->configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ); } - QObject::connect(buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); - QObject::connect(buttonSelectPicture, SIGNAL(clicked()), this, SLOT(slotSelectPicture())); + TQObject::connect(buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister())); + TQObject::connect(buttonSelectPicture, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectPicture())); optionSendBuddyIcon->setEnabled( account() ); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mAutoConnect, mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mPasswordWidget->mRemembered, mPasswordWidget->mPassword ); - QWidget::setTabOrder( mPasswordWidget->mPassword, buttonRegister ); + TQWidget::setTabOrder( mAutoConnect, mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mPasswordWidget->mRemembered, mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mPasswordWidget->mPassword, buttonRegister ); show(); } @@ -148,7 +148,7 @@ Kopete::Account *YahooEditAccount::apply() } else { - yahooAccount->setBuddyIcon( KURL( QString::null ) ); + yahooAccount->setBuddyIcon( KURL( TQString::null ) ); } // Global Identity @@ -164,16 +164,16 @@ void YahooEditAccount::slotOpenRegister() void YahooEditAccount::slotSelectPicture() { - KURL file = KFileDialog::getImageOpenURL( QString::null, this, i18n( "Yahoo Buddy Icon" ) ); + KURL file = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "Yahoo Buddy Icon" ) ); if ( file.isEmpty() ) return; - QImage picture(file.path()); + TQImage picture(file.path()); if( !picture.isNull() ) { - picture = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(picture), 96, 96, this ); - QString newlocation( locateLocal( "appdata", "yahoopictures/"+ file.fileName().lower() ) ) ; + picture = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(picture), 96, 96, this ); + TQString newlocation( locateLocal( "appdata", "yahoopictures/"+ file.fileName().lower() ) ) ; file = KURL(newlocation); if( !picture.save( newlocation, "PNG" )) { diff --git a/kopete/protocols/yahoo/yahooeditaccount.h b/kopete/protocols/yahoo/yahooeditaccount.h index 17a93752..a64d88f7 100644 --- a/kopete/protocols/yahoo/yahooeditaccount.h +++ b/kopete/protocols/yahoo/yahooeditaccount.h @@ -41,7 +41,7 @@ private: Kopete::UI::PasswordWidget *mPasswordWidget; public: - YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, QWidget *parent = 0, const char *name = 0); + YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, TQWidget *parent = 0, const char *name = 0); virtual bool validateData(); diff --git a/kopete/protocols/yahoo/yahooprotocol.cpp b/kopete/protocols/yahoo/yahooprotocol.cpp index 32c3c55c..dc2e3cdc 100644 --- a/kopete/protocols/yahoo/yahooprotocol.cpp +++ b/kopete/protocols/yahoo/yahooprotocol.cpp @@ -37,10 +37,10 @@ typedef KGenericFactory<YahooProtocol> YahooProtocolFactory; K_EXPORT_COMPONENT_FACTORY( kopete_yahoo, YahooProtocolFactory( "kopete_yahoo" ) ) -YahooProtocol::YahooProtocol( QObject *parent, const char *name, const QStringList & ) +YahooProtocol::YahooProtocol( TQObject *parent, const char *name, const TQStringList & ) : Kopete::Protocol( YahooProtocolFactory::instance(), parent, name ), - Offline( Kopete::OnlineStatus::Offline, 0, this, 0x5a55aa56, QString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ), - Online( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ), + Offline( Kopete::OnlineStatus::Offline, 0, this, 0x5a55aa56, TQString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ), + Online( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ), BeRightBack( Kopete::OnlineStatus::Away, 22, this, 1, "contact_away_overlay", i18n( "Be right back" ), i18n( "Be right back" ) ), Busy( Kopete::OnlineStatus::Away, 20, this, 2, "contact_busy_overlay", i18n( "Busy" ), i18n( "Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ), NotAtHome( Kopete::OnlineStatus::Away, 17, this, 3, "contact_xa_overlay", i18n( "Not at home" ), i18n( "Not at home" ), Kopete::OnlineStatusManager::ExtendedAway ), @@ -55,51 +55,51 @@ YahooProtocol::YahooProtocol( QObject *parent, const char *name, const QStringLi Idle( Kopete::OnlineStatus::Away, 15, this, 999, "yahoo_idle", i18n( "Idle" ), i18n( "Idle" ), Kopete::OnlineStatusManager::Idle ), Connecting( Kopete::OnlineStatus::Connecting,2, this, 555, "yahoo_connecting", i18n( "Connecting" ) ), awayMessage(Kopete::Global::Properties::self()->awayMessage()), - iconCheckSum("iconCheckSum", i18n("Buddy Icon Checksum"), QString::null, true, false, true), - iconExpire("iconExpire", i18n("Buddy Icon Expire"), QString::null, true, false, true), - iconRemoteUrl("iconRemoteUrl", i18n("Buddy Icon Remote Url"), QString::null, true, false, true), + iconCheckSum("iconCheckSum", i18n("Buddy Icon Checksum"), TQString::null, true, false, true), + iconExpire("iconExpire", i18n("Buddy Icon Expire"), TQString::null, true, false, true), + iconRemoteUrl("iconRemoteUrl", i18n("Buddy Icon Remote Url"), TQString::null, true, false, true), propfirstName(Kopete::Global::Properties::self()->firstName()), propSecondName(), propLastName(Kopete::Global::Properties::self()->lastName()), propNickName(Kopete::Global::Properties::self()->nickName()), - propTitle("YABTitle", i18n("Title"), QString::null, true, false), + propTitle("YABTitle", i18n("Title"), TQString::null, true, false), propPhoneMobile(Kopete::Global::Properties::self()->privateMobilePhone()), propEmail(Kopete::Global::Properties::self()->emailAddress()), - propYABId("YABId", i18n("YAB Id"), QString::null, true, false, true), - propPager("YABPager", i18n("Pager number"), QString::null, true, false), - propFax("YABFax", i18n("Fax number"), QString::null, true, false), - propAdditionalNumber("YABAdditionalNumber", i18n("Additional number"), QString::null, true, false), - propAltEmail1("YABAlternativeEmail1", i18n("Alternative email 1"), QString::null, true, false), - propAltEmail2("YABAlternativeEmail2", i18n("Alternative email 1"), QString::null, true, false), - propImAIM("YABIMAIM", i18n("AIM"), QString::null, true, false), - propImICQ("YABIMICQ", i18n("ICQ"), QString::null, true, false), - propImMSN("YABIMMSN", i18n("MSN"), QString::null, true, false), - propImGoogleTalk("YABIMGoogleTalk", i18n("GoogleTalk"), QString::null, true, false), - propImSkype("YABIMSkype", i18n("Skype"), QString::null, true, false), - propImIRC("YABIMIRC", i18n("IRC"), QString::null, true, false), - propImQQ("YABIMQQ", i18n("QQ"), QString::null, true, false), - propPrivateAddress("YABPrivateAddress", i18n("Private Address"), QString::null, true, false), - propPrivateCity("YABPrivateCity", i18n("Private City"), QString::null, true, false), - propPrivateState("YABPrivateState", i18n("Private State"), QString::null, true, false), - propPrivateZIP("YABPrivateZIP", i18n("Private ZIP"), QString::null, true, false), - propPrivateCountry("YABPrivateCountry", i18n("Private Country"), QString::null, true, false), + propYABId("YABId", i18n("YAB Id"), TQString::null, true, false, true), + propPager("YABPager", i18n("Pager number"), TQString::null, true, false), + propFax("YABFax", i18n("Fax number"), TQString::null, true, false), + propAdditionalNumber("YABAdditionalNumber", i18n("Additional number"), TQString::null, true, false), + propAltEmail1("YABAlternativeEmail1", i18n("Alternative email 1"), TQString::null, true, false), + propAltEmail2("YABAlternativeEmail2", i18n("Alternative email 1"), TQString::null, true, false), + propImAIM("YABIMAIM", i18n("AIM"), TQString::null, true, false), + propImICQ("YABIMICQ", i18n("ICQ"), TQString::null, true, false), + propImMSN("YABIMMSN", i18n("MSN"), TQString::null, true, false), + propImGoogleTalk("YABIMGoogleTalk", i18n("GoogleTalk"), TQString::null, true, false), + propImSkype("YABIMSkype", i18n("Skype"), TQString::null, true, false), + propImIRC("YABIMIRC", i18n("IRC"), TQString::null, true, false), + propImQQ("YABIMQQ", i18n("QQ"), TQString::null, true, false), + propPrivateAddress("YABPrivateAddress", i18n("Private Address"), TQString::null, true, false), + propPrivateCity("YABPrivateCity", i18n("Private City"), TQString::null, true, false), + propPrivateState("YABPrivateState", i18n("Private State"), TQString::null, true, false), + propPrivateZIP("YABPrivateZIP", i18n("Private ZIP"), TQString::null, true, false), + propPrivateCountry("YABPrivateCountry", i18n("Private Country"), TQString::null, true, false), propPrivatePhone(Kopete::Global::Properties::self()->privatePhone()), - propPrivateURL("YABPrivateURL", i18n("Private URL"), QString::null, true, false), - propCorporation("YABCorporation", i18n("Corporation"), QString::null, true, false), - propWorkAddress("YABWorkAddress", i18n("Work Address"), QString::null, true, false), - propWorkCity("YABWorkCity", i18n("Work City"), QString::null, true, false), - propWorkState("YABWorkState", i18n("Work State"), QString::null, true, false), - propWorkZIP("YABWorkZIP", i18n("Work ZIP"), QString::null, true, false), - propWorkCountry("YABWorkCountry", i18n("Work Country"), QString::null, true, false), + propPrivateURL("YABPrivateURL", i18n("Private URL"), TQString::null, true, false), + propCorporation("YABCorporation", i18n("Corporation"), TQString::null, true, false), + propWorkAddress("YABWorkAddress", i18n("Work Address"), TQString::null, true, false), + propWorkCity("YABWorkCity", i18n("Work City"), TQString::null, true, false), + propWorkState("YABWorkState", i18n("Work State"), TQString::null, true, false), + propWorkZIP("YABWorkZIP", i18n("Work ZIP"), TQString::null, true, false), + propWorkCountry("YABWorkCountry", i18n("Work Country"), TQString::null, true, false), propWorkPhone(Kopete::Global::Properties::self()->workPhone()), - propWorkURL("YABWorkURL", i18n("Work URL"), QString::null, true, false), - propBirthday("YABBirthday", i18n("Birthday"), QString::null, true, false), - propAnniversary("YABAnniversary", i18n("Anniversary"), QString::null, true, false), - propNotes("YABNotes", i18n("Notes"), QString::null, true, false), - propAdditional1("YABAdditional1", i18n("Additional 1"), QString::null, true, false), - propAdditional2("YABAdditional2", i18n("Additional 2"), QString::null, true, false), - propAdditional3("YABAdditional3", i18n("Additional 3"), QString::null, true, false), - propAdditional4("YABAdditional4", i18n("Additional 4"), QString::null, true, false) + propWorkURL("YABWorkURL", i18n("Work URL"), TQString::null, true, false), + propBirthday("YABBirthday", i18n("Birthday"), TQString::null, true, false), + propAnniversary("YABAnniversary", i18n("Anniversary"), TQString::null, true, false), + propNotes("YABNotes", i18n("Notes"), TQString::null, true, false), + propAdditional1("YABAdditional1", i18n("Additional 1"), TQString::null, true, false), + propAdditional2("YABAdditional2", i18n("Additional 2"), TQString::null, true, false), + propAdditional3("YABAdditional3", i18n("Additional 3"), TQString::null, true, false), + propAdditional4("YABAdditional4", i18n("Additional 4"), TQString::null, true, false) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -166,10 +166,10 @@ YahooProtocol *YahooProtocol::protocol() } Kopete::Contact *YahooProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, const QMap<QString, QString> & /* addressBookData */ ) + const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> & /* addressBookData */ ) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; YahooAccount *theAccount = static_cast<YahooAccount*>(Kopete::AccountManager::self()->findAccount(protocol()->pluginId(), accountId)); @@ -187,18 +187,18 @@ Kopete::Contact *YahooProtocol::deserializeContact( Kopete::MetaContact *metaCon return theAccount->contacts()[contactId]; } -AddContactPage *YahooProtocol::createAddContactWidget( QWidget * parent , Kopete::Account* ) +AddContactPage *YahooProtocol::createAddContactWidget( TQWidget * parent , Kopete::Account* ) { kdDebug(YAHOO_GEN_DEBUG) << "YahooProtocol::createAddContactWidget(<parent>)" << endl; return new YahooAddContact(this, parent); } -KopeteEditAccountWidget *YahooProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *YahooProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new YahooEditAccount(this, account, parent); } -Kopete::Account *YahooProtocol::createNewAccount(const QString &accountId) +Kopete::Account *YahooProtocol::createNewAccount(const TQString &accountId) { return new YahooAccount(this, accountId); } diff --git a/kopete/protocols/yahoo/yahooprotocol.h b/kopete/protocols/yahoo/yahooprotocol.h index 6f399ada..4b597243 100644 --- a/kopete/protocols/yahoo/yahooprotocol.h +++ b/kopete/protocols/yahoo/yahooprotocol.h @@ -23,8 +23,8 @@ #include "kopeteonlinestatus.h" // QT Includes -#include <qpixmap.h> -#include <qmap.h> +#include <tqpixmap.h> +#include <tqmap.h> // KDE Includes #include "kopeteprotocol.h" @@ -43,7 +43,7 @@ class YahooProtocol : public Kopete::Protocol { Q_OBJECT public: - YahooProtocol( QObject *parent, const char *name, const QStringList &args ); + YahooProtocol( TQObject *parent, const char *name, const TQStringList &args ); ~YahooProtocol(); //Online Statuses @@ -126,15 +126,15 @@ public: static YahooProtocol *protocol(); virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString,QString> &serializedData, - const QMap<QString, QString> &addressBookData ); + const TQMap<TQString,TQString> &serializedData, + const TQMap<TQString, TQString> &addressBookData ); Kopete::OnlineStatus statusFromYahoo( int status ); public slots: - virtual AddContactPage *createAddContactWidget(QWidget * parent, Kopete::Account* a); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget(TQWidget * parent, Kopete::Account* a); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); private: diff --git a/kopete/protocols/yahoo/yahooverifyaccount.cpp b/kopete/protocols/yahoo/yahooverifyaccount.cpp index cfb3ede6..7d50e900 100644 --- a/kopete/protocols/yahoo/yahooverifyaccount.cpp +++ b/kopete/protocols/yahoo/yahooverifyaccount.cpp @@ -14,9 +14,9 @@ */ // QT Includes -#include <qlayout.h> -#include <qfile.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqfile.h> +#include <tqlabel.h> // KDE Includes #include <kdebug.h> @@ -37,7 +37,7 @@ #include "yahooverifyaccount.h" #include "yahooaccount.h" -YahooVerifyAccount::YahooVerifyAccount(Kopete::Account *account, QWidget *parent, const char *name) +YahooVerifyAccount::YahooVerifyAccount(Kopete::Account *account, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Account Verification - Yahoo"), Cancel|Apply, Apply, true ) { @@ -59,11 +59,11 @@ void YahooVerifyAccount::setUrl( KURL url ) mFile = new KTempFile( locateLocal( "tmp", url.fileName() ) ); mFile->setAutoDelete( true ); KIO::TransferJob *transfer = KIO::get( url, false, false ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); } -void YahooVerifyAccount::slotData( KIO::Job */*job*/, const QByteArray& data ) +void YahooVerifyAccount::slotData( KIO::Job */*job*/, const TQByteArray& data ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -89,7 +89,7 @@ bool YahooVerifyAccount::validateData() void YahooVerifyAccount::slotClose() { - QDialog::done(0); + TQDialog::done(0); } void YahooVerifyAccount::slotApply() @@ -98,7 +98,7 @@ void YahooVerifyAccount::slotApply() YahooAccount* myAccount = static_cast<YahooAccount*>(mTheAccount); myAccount->verifyAccount( mTheDialog->mWord->text() ); - QDialog::done(0); + TQDialog::done(0); } #include "yahooverifyaccount.moc" diff --git a/kopete/protocols/yahoo/yahooverifyaccount.h b/kopete/protocols/yahoo/yahooverifyaccount.h index 237a45a4..c179a4c6 100644 --- a/kopete/protocols/yahoo/yahooverifyaccount.h +++ b/kopete/protocols/yahoo/yahooverifyaccount.h @@ -36,7 +36,7 @@ private: KTempFile *mFile; YahooVerifyAccountBase *mTheDialog; public: - YahooVerifyAccount(Kopete::Account *account, QWidget *parent = 0, const char *name = 0); + YahooVerifyAccount(Kopete::Account *account, TQWidget *parent = 0, const char *name = 0); ~YahooVerifyAccount(); virtual bool validateData(); @@ -47,7 +47,7 @@ protected slots: virtual void slotClose(); virtual void slotApply(); public slots: - void slotData( KIO::Job *job, const QByteArray& data ); + void slotData( KIO::Job *job, const TQByteArray& data ); void slotComplete( KIO::Job *job ); }; diff --git a/kopete/protocols/yahoo/yahoowebcam.cpp b/kopete/protocols/yahoo/yahoowebcam.cpp index 71ff921a..1e22b89c 100644 --- a/kopete/protocols/yahoo/yahoowebcam.cpp +++ b/kopete/protocols/yahoo/yahoowebcam.cpp @@ -16,7 +16,7 @@ #include <kdebug.h> #include <kprocess.h> #include <ktempfile.h> -#include <qtimer.h> +#include <tqtimer.h> #include "client.h" #include "yahoowebcam.h" @@ -25,23 +25,23 @@ #include "avdevice/videodevicepool.h" -YahooWebcam::YahooWebcam( YahooAccount *account ) : QObject( 0, "yahoo_webcam" ) +YahooWebcam::YahooWebcam( YahooAccount *account ) : TQObject( 0, "yahoo_webcam" ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; theAccount = account; theDialog = 0L; origImg = new KTempFile(); convertedImg = new KTempFile(); - m_img = new QImage(); + m_img = new TQImage(); - m_sendTimer = new QTimer( this ); - connect( m_sendTimer, SIGNAL(timeout()), this, SLOT(sendImage()) ); + m_sendTimer = new TQTimer( this ); + connect( m_sendTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(sendImage()) ); - m_updateTimer = new QTimer( this ); - connect( m_updateTimer, SIGNAL(timeout()), this, SLOT(updateImage()) ); + m_updateTimer = new TQTimer( this ); + connect( m_updateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateImage()) ); theDialog = new YahooWebcamDialog( "YahooWebcam" ); - connect( theDialog, SIGNAL(closingWebcamDialog()), this, SLOT(webcamDialogClosing()) ); + connect( theDialog, TQT_SIGNAL(closingWebcamDialog()), this, TQT_SLOT(webcamDialogClosing()) ); m_devicePool = Kopete::AV::VideoDevicePool::self(); m_devicePool->open(); @@ -52,8 +52,8 @@ YahooWebcam::YahooWebcam( YahooAccount *account ) : QObject( 0, "yahoo_webcam" ) YahooWebcam::~YahooWebcam() { - QFile::remove( origImg->name() ); - QFile::remove( convertedImg->name() ); + TQFile::remove( origImg->name() ); + TQFile::remove( convertedImg->name() ); delete origImg; delete convertedImg; delete m_img; @@ -109,10 +109,10 @@ void YahooWebcam::sendImage() } else { - QFile file( convertedImg->name() ); + TQFile file( convertedImg->name() ); if( file.open( IO_ReadOnly ) ) { - QByteArray ar = file.readAll(); + TQByteArray ar = file.readAll(); theAccount->yahooSession()->sendWebcamImage( ar ); } else @@ -120,14 +120,14 @@ void YahooWebcam::sendImage() } } -void YahooWebcam::addViewer( const QString &viewer ) +void YahooWebcam::addViewer( const TQString &viewer ) { m_viewer.push_back( viewer ); if( theDialog ) theDialog->setViewer( m_viewer ); } -void YahooWebcam::removeViewer( const QString &viewer ) +void YahooWebcam::removeViewer( const TQString &viewer ) { m_viewer.remove( viewer ); if( theDialog ) diff --git a/kopete/protocols/yahoo/yahoowebcam.h b/kopete/protocols/yahoo/yahoowebcam.h index 46032059..065ccb61 100644 --- a/kopete/protocols/yahoo/yahoowebcam.h +++ b/kopete/protocols/yahoo/yahoowebcam.h @@ -16,8 +16,8 @@ #ifndef YAHOOWEBCAM_H #define YAHOOWEBCAM_H -#include <qobject.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstringlist.h> class YahooAccount; class YahooWebcamDialog; @@ -43,17 +43,17 @@ public slots: void sendImage(); void updateImage(); void webcamDialogClosing(); - void addViewer( const QString & ); - void removeViewer( const QString & ); + void addViewer( const TQString & ); + void removeViewer( const TQString & ); signals: void webcamClosing(); private: YahooAccount *theAccount; YahooWebcamDialog *theDialog; - QTimer *m_sendTimer; - QTimer *m_updateTimer; - QStringList m_viewer; - QImage *m_img; + TQTimer *m_sendTimer; + TQTimer *m_updateTimer; + TQStringList m_viewer; + TQImage *m_img; KTempFile *origImg; KTempFile *convertedImg; Kopete::AV::VideoDevicePool *m_devicePool; |