diff options
Diffstat (limited to 'kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp')
-rw-r--r-- | kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp b/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp index ec2e9f5f..4528612b 100644 --- a/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp @@ -52,14 +52,14 @@ void ReceiveFileTask::onGo() 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.") ); + emit error( m_transferId, TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Could not open file for writing.") ); setError(); delete t; return; } - m_transferJob = KIO::get( m_remoteUrl, 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 = TDEIO::get( m_remoteUrl, false, false ); + TQObject::connect( m_transferJob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotComplete( TDEIO::Job* ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray & ) ), this, TQT_SLOT( slotData( TDEIO::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 TQByteArray& data ) +void ReceiveFileTask::slotData( TDEIO::Job *job, const TQByteArray& data ) { Q_UNUSED( job ); kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -130,17 +130,17 @@ void ReceiveFileTask::slotData( KIO::Job *job, const TQByteArray& data ) m_file->writeBlock( data.data() , data.size() ); } -void ReceiveFileTask::slotComplete( KIO::Job *job ) +void ReceiveFileTask::slotComplete( TDEIO::Job *job ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - KIO::TransferJob *transfer = static_cast< KIO::TransferJob * >(job); + TDEIO::TransferJob *transfer = static_cast< TDEIO::TransferJob * >(job); if( m_file ) m_file->close(); if ( job->error () || transfer->isErrorPage () ) { - emit error( m_transferId, KIO::ERR_ABORTED, i18n("An error occurred while downloading the file.") ); + emit error( m_transferId, TDEIO::ERR_ABORTED, i18n("An error occurred while downloading the file.") ); setError(); } else @@ -171,7 +171,7 @@ void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer ) 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.") ); + emit error( m_transferId, TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Could not open file for writing.") ); setError(); return; } @@ -187,17 +187,17 @@ void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer ) send( t ); // The server expects a HTTP HEAD command prior to the GET - m_mimetypeJob = KIO::mimetype(TQString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") + m_mimetypeJob = TDEIO::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", 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( TQString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") + m_transferJob = TDEIO::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 & ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotComplete( TDEIO::Job* ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray & ) ), this, TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray & ) ) ); m_transferJob->addMetaData("cookies", "manual"); 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()) ); |