From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/yahoo/libkyahoo/client.cpp | 360 ++++++++++++++-------------- 1 file changed, 180 insertions(+), 180 deletions(-) (limited to 'kopete/protocols/yahoo/libkyahoo/client.cpp') 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 -#include +#include +#include #include #include @@ -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( "" ) ); + smt->setText( TQString::fromLatin1( "" ) ); 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() -- cgit v1.2.1