summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp
diff options
context:
space:
mode:
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 );