summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp')
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp
index ab10873a..32500f1c 100644
--- a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp
+++ b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp
@@ -31,7 +31,7 @@
using namespace KNetwork;
-SendPictureTask::SendPictureTask(Task* parent) : Task(parent)
+SendPictureTask::SendPictureTask(Task* tqparent) : Task(tqparent)
{
kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
m_socket = 0;
@@ -55,8 +55,8 @@ void SendPictureTask::onGo()
case SendInformation:
sendInformation();
break;
- case SendStatus:
- sendStatus();
+ case SendtqStatus:
+ sendtqStatus();
break;
}
}
@@ -74,9 +74,9 @@ void SendPictureTask::initiateUpload()
void SendPictureTask::connectFailed( int i)
{
- kdDebug(YAHOO_RAW_DEBUG) << i << ": " << static_cast<const KBufferedSocket*>( sender() )->errorString() << endl;
+ kdDebug(YAHOO_RAW_DEBUG) << i << ": " << static_cast<const KBufferedSocket*>( sender() )->KSocketBase::errorString() << endl;
- client()->notifyError(i18n("The picture was not successfully uploaded"), TQString("%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").tqarg(i).tqarg(static_cast<const KBufferedSocket*>( sender() )->KSocketBase::errorString()), Client::Error );
setError();
}
@@ -104,22 +104,22 @@ void SendPictureTask::connectSucceeded()
}
else
{
- kdDebug(YAHOO_RAW_DEBUG) << "Error opening file: " << file.errorString() << endl;
- client()->notifyError(i18n("Error opening file: %1").arg(m_path), file.errorString(), Client::Error );
+ kdDebug(YAHOO_RAW_DEBUG) << "Error opening file: " << file.errorString().data() << endl;
+ client()->notifyError(i18n("Error opening file: %1").tqarg(m_path), file.errorString(), Client::Error );
return;
}
paket = t.serialize();
kdDebug(YAHOO_RAW_DEBUG) << "Sizes: File (" << m_path << "): " << file.size() << " - paket: " << paket.size() << endl;
- TQString header = TQString::fromLatin1("POST /notifyft HTTP/1.1\r\n"
+ TQString header = TQString::tqfromLatin1("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"
"Content-length: %4\r\n"
- "Cache-Control: no-cache\r\n\r\n").arg(client()->yCookie()).arg(client()->tCookie()).arg(client()->cCookie()).arg(file.size()+4+paket.size());
+ "Cache-Control: no-cache\r\n\r\n").tqarg(client()->yCookie()).tqarg(client()->tCookie()).tqarg(client()->cCookie()).tqarg(file.size()+4+paket.size());
stream.writeRawBytes( header.local8Bit(), header.length() );
stream.writeRawBytes( paket.data(), paket.size() );
- stream << (Q_INT8)0x32 << (Q_INT8)0x39 << (Q_INT8)0xc0 << (Q_INT8)0x80;
+ stream << (TQ_INT8)0x32 << (TQ_INT8)0x39 << (TQ_INT8)0xc0 << (TQ_INT8)0x80;
stream.writeRawBytes( file.readAll(), file.size() );
kdDebug(YAHOO_RAW_DEBUG) << "Buffersize: " << buffer.size() << endl;
@@ -163,7 +163,7 @@ void SendPictureTask::readResult()
TQString buf( ar );
m_socket->close();
- if( buf.find( "error", 0, false ) >= 0 )
+ if( buf.tqfind( "error", 0, false ) >= 0 )
{
kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Picture upload failed" << endl;
setSuccess( false );
@@ -208,11 +208,11 @@ void SendPictureTask::sendInformation()
setSuccess();
}
-void SendPictureTask::sendStatus()
+void SendPictureTask::sendtqStatus()
{
kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
- YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePictureStatus);
+ YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePicturetqStatus);
t->setId( client()->sessionID() );
t->setParam(3, client()->userId().local8Bit());
t->setParam(213, m_status );
@@ -252,7 +252,7 @@ void SendPictureTask::setChecksum( int checksum )
m_checksum = checksum;
}
-void SendPictureTask::setStatus( int status )
+void SendPictureTask::settqStatus( int status )
{
m_status = status;
}