diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-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/modifyyabtask.cpp')
-rw-r--r-- | kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp index 1264272a..b456746a 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp @@ -31,7 +31,7 @@ #include <kbufferedsocket.h> using namespace KNetwork; -ModifyYABTask::ModifyYABTask(Task* parent) : Task(parent) +ModifyYABTask::ModifyYABTask(Task* tqparent) : Task(tqparent) { kdDebug(YAHOO_RAW_DEBUG) ; m_socket = 0; @@ -68,7 +68,7 @@ void ModifyYABTask::setEntry( const YABEntry &entry ) doc.appendChild( root ); TQDomElement contact = doc.createElement( "ct" ); - entry.fillQDomElement( contact ); + entry.fillTQDomElement( contact ); switch( m_action ) { case EditEntry: @@ -91,7 +91,7 @@ void ModifyYABTask::connectFailed( int i) { m_socket->close(); client()->notifyError( i18n( "An error occurred while saving the address book entry." ), - TQString( "%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error ); + TQString( "%1 - %2").tqarg(i).tqarg(static_cast<const KBufferedSocket*>( sender() )->KSocketBase::errorString()), Client::Error ); } void ModifyYABTask::connectSucceeded() @@ -99,14 +99,14 @@ void ModifyYABTask::connectSucceeded() kdDebug(YAHOO_RAW_DEBUG) ; KBufferedSocket* socket = const_cast<KBufferedSocket*>( static_cast<const KBufferedSocket*>( sender() ) ); - TQString header = TQString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n" + TQString header = TQString::tqfromLatin1("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" "Content-length: %4\r\n" "Cache-Control: no-cache\r\n\r\n") - .arg(client()->yCookie()).arg(client()->tCookie()) - .arg(client()->cCookie()).arg(m_postData.utf8().size()); + .tqarg(client()->yCookie()).tqarg(client()->tCookie()) + .tqarg(client()->cCookie()).tqarg(m_postData.utf8().size()); TQByteArray buffer; TQByteArray paket; @@ -118,7 +118,7 @@ void ModifyYABTask::connectSucceeded() kdDebug(YAHOO_RAW_DEBUG) << "Upload Successful. Waiting for confirmation..." << endl; else { - client()->notifyError( i18n( "An error occurred while saving the address book entry." ), m_socket->errorString(), Client::Error ); + client()->notifyError( i18n( "An error occurred while saving the address book entry." ), m_socket->KSocketBase::errorString(), Client::Error ); setError(); return; } @@ -132,9 +132,9 @@ void ModifyYABTask::slotRead() TQByteArray ar( socket->bytesAvailable() ); socket->readBlock( ar.data (), ar.size () ); TQString data( ar ); - data = data.right( data.length() - data.find("<?xml") ); + data = data.right( data.length() - data.tqfind("<?xml") ); - if( m_data.find("</ab>") < 0 ) + if( m_data.tqfind("</ab>") < 0 ) return; // Need more data m_socket->close(); @@ -166,7 +166,7 @@ void ModifyYABTask::slotRead() e = list.item( it ).toElement(); YABEntry *entry = new YABEntry; - entry->fromQDomElement( e ); + entry->fromTQDomElement( e ); entry->source = YABEntry::SourceYAB; switch( m_action ) @@ -174,21 +174,21 @@ void ModifyYABTask::slotRead() case EditEntry: if( !e.attribute( "es" ).isEmpty() && e.attribute( "es" ) != "0" ) // Check for edit errors { - emit error( entry, i18n("The Yahoo Address Book entry could not be saved:\n%1 - %2").arg( e.attribute("es") ).arg( e.attribute("ee") ) ); + emit error( entry, i18n("The Yahoo Address Book entry could not be saved:\n%1 - %2").tqarg( e.attribute("es") ).tqarg( e.attribute("ee") ) ); continue; } break; case AddEntry: if( !e.attribute( "as" ).isEmpty() && e.attribute( "as" ) != "0" ) // Check for add errors { - emit error( entry, i18n("The Yahoo Address Book entry could not be created:\n%1 - %2").arg( e.attribute("as") ).arg( e.attribute("ae") ) ); + emit error( entry, i18n("The Yahoo Address Book entry could not be created:\n%1 - %2").tqarg( e.attribute("as") ).tqarg( e.attribute("ae") ) ); continue; } break; case DeleteEntry: if( !e.attribute( "ds" ).isEmpty() && e.attribute( "ds" ) != "0" ) // Check for delete errors { - emit error( entry, i18n("The Yahoo Address Book entry could not be deleted:\n%1 - %2").arg( e.attribute("ds") ).arg( e.attribute("de") ) ); + emit error( entry, i18n("The Yahoo Address Book entry could not be deleted:\n%1 - %2").tqarg( e.attribute("ds") ).tqarg( e.attribute("de") ) ); continue; } break; |