summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp')
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp40
1 files changed, 20 insertions, 20 deletions
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;
}