summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/sendfiletask.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/sendfiletask.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/sendfiletask.cpp')
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp34
1 files changed, 17 insertions, 17 deletions
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++)
{