summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/modifyyabtask.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/modifyyabtask.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/modifyyabtask.cpp')
-rw-r--r--kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp
index 825f958d..1264272a 100644
--- a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp
+++ b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp
@@ -21,9 +21,9 @@
#include "ymsgtransfer.h"
#include "yahootypes.h"
#include "client.h"
-#include <qstring.h>
-#include <qdatastream.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdatastream.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kio/global.h>
#include <kio/job.h>
@@ -45,9 +45,9 @@ ModifyYABTask::~ModifyYABTask()
void ModifyYABTask::onGo()
{
kdDebug(YAHOO_RAW_DEBUG) ;
- m_socket = new KBufferedSocket( "address.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) ) );
+ m_socket = new KBufferedSocket( "address.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) ) );
m_socket->connect();
}
@@ -59,15 +59,15 @@ void ModifyYABTask::setAction( Action action )
void ModifyYABTask::setEntry( const YABEntry &entry )
{
- QDomDocument doc("");
- QDomElement root = doc.createElement( "ab" );
- QDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\" ");
+ TQDomDocument doc("");
+ TQDomElement root = doc.createElement( "ab" );
+ TQDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\" ");
doc.appendChild(instr);
root.setAttribute( "k", client()->userId() );
root.setAttribute( "cc", "1" );
doc.appendChild( root );
- QDomElement contact = doc.createElement( "ct" );
+ TQDomElement contact = doc.createElement( "ct" );
entry.fillQDomElement( contact );
switch( m_action )
{
@@ -91,7 +91,7 @@ void ModifyYABTask::connectFailed( int i)
{
m_socket->close();
client()->notifyError( i18n( "An error occurred while saving the address book entry." ),
- QString( "%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error );
+ TQString( "%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error );
}
void ModifyYABTask::connectSucceeded()
@@ -99,7 +99,7 @@ void ModifyYABTask::connectSucceeded()
kdDebug(YAHOO_RAW_DEBUG) ;
KBufferedSocket* socket = const_cast<KBufferedSocket*>( static_cast<const KBufferedSocket*>( sender() ) );
- QString header = QString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n"
+ TQString header = TQString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n"
"Cookie: Y=%1; T=%2; C=%3 ;B=fckeert1kk1nl&b=2\r\n"
"User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n"
"Host: address.yahoo.com\r\n"
@@ -108,9 +108,9 @@ void ModifyYABTask::connectSucceeded()
.arg(client()->yCookie()).arg(client()->tCookie())
.arg(client()->cCookie()).arg(m_postData.utf8().size());
- QByteArray buffer;
- QByteArray paket;
- QDataStream stream( buffer, IO_WriteOnly );
+ TQByteArray buffer;
+ TQByteArray paket;
+ TQDataStream stream( buffer, IO_WriteOnly );
stream.writeRawBytes( header.local8Bit(), header.length() );
stream.writeRawBytes( m_postData.utf8(), m_postData.utf8().size() );
@@ -123,24 +123,24 @@ void ModifyYABTask::connectSucceeded()
return;
}
- connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) );
+ connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) );
}
void ModifyYABTask::slotRead()
{
KBufferedSocket* socket = const_cast<KBufferedSocket*>( static_cast<const KBufferedSocket*>( sender() ) );
- QByteArray ar( socket->bytesAvailable() );
+ TQByteArray ar( socket->bytesAvailable() );
socket->readBlock( ar.data (), ar.size () );
- QString data( ar );
+ TQString data( ar );
data = data.right( data.length() - data.find("<?xml") );
if( m_data.find("</ab>") < 0 )
return; // Need more data
m_socket->close();
- QDomDocument doc;
- QDomNodeList list;
- QDomElement e;
+ TQDomDocument doc;
+ TQDomNodeList list;
+ TQDomElement e;
int it = 0;
doc.setContent( m_data );