diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-28 22:31:39 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-28 22:31:39 -0600 |
commit | 41bb408dde90e755b07cd2ab8a9bdec7548c84b0 (patch) | |
tree | 6d4d5407c000add30aa78630e009c0e5d633e440 /src/network/qftp.cpp | |
parent | 1740cd279522c060e738bbbffacab83355d2b794 (diff) | |
download | tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.tar.gz tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.zip |
Automated conversion from qt3
Diffstat (limited to 'src/network/qftp.cpp')
-rw-r--r-- | src/network/qftp.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/network/qftp.cpp b/src/network/qftp.cpp index ec09fde4e..cb7af95a5 100644 --- a/src/network/qftp.cpp +++ b/src/network/qftp.cpp @@ -325,7 +325,7 @@ void TQFtpDTP::writeData() { if ( is_ba ) { #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP::writeData: write %d bytes", data.ba->size() ); + tqDebug( "TQFtpDTP::writeData: write %d bytes", data.ba->size() ); #endif if ( data.ba->size() == 0 ) emit dataTransferProgress( 0, bytesTotal ); @@ -340,7 +340,7 @@ void TQFtpDTP::writeData() while ( !data.dev->atEnd() && socket.bytesToWrite()==0 ) { Q_LONG read = data.dev->readBlock( buf, blockSize ); #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP::writeData: writeBlock() of size %d bytes", (int)read ); + tqDebug( "TQFtpDTP::writeData: writeBlock() of size %d bytes", (int)read ); #endif socket.writeBlock( buf, read ); if ( !data.dev ) @@ -375,7 +375,7 @@ inline void TQFtpDTP::clearError() void TQFtpDTP::abortConnection() { #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP::abortConnection" ); + tqDebug( "TQFtpDTP::abortConnection" ); #endif callWriteData = FALSE; clearData(); @@ -526,7 +526,7 @@ void TQFtpDTP::socketConnected() bytesDone = 0; #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP::connectState( CsConnected )" ); + tqDebug( "TQFtpDTP::connectState( CsConnected )" ); #endif emit connectState( TQFtpDTP::CsConnected ); } @@ -536,7 +536,7 @@ void TQFtpDTP::socketReadyRead() if ( pi->currentCommand().isEmpty() ) { socket.close(); #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP::connectState( CsClosed )" ); + tqDebug( "TQFtpDTP::connectState( CsClosed )" ); #endif emit connectState( TQFtpDTP::CsClosed ); return; @@ -547,7 +547,7 @@ void TQFtpDTP::socketReadyRead() TQUrlInfo i; TQString line = socket.readLine(); #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP read (list): '%s'", line.latin1() ); + tqDebug( "TQFtpDTP read (list): '%s'", line.latin1() ); #endif if ( parseDir( line, "", &i ) ) { emit listInfo( i ); @@ -570,14 +570,14 @@ void TQFtpDTP::socketReadyRead() ba.resize( bytesRead ); bytesDone += bytesRead; #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP read: %d bytes (total %d bytes)", (int)bytesRead, bytesDone ); + tqDebug( "TQFtpDTP read: %d bytes (total %d bytes)", (int)bytesRead, bytesDone ); #endif emit dataTransferProgress( bytesDone, bytesTotal ); if (data.dev) // make sure it wasn't deleted in the slot data.dev->writeBlock( ba ); } else { #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP readyRead: %d bytes available (total %d bytes read)", (int)bytesAvailable(), bytesDone ); + tqDebug( "TQFtpDTP readyRead: %d bytes available (total %d bytes read)", (int)bytesAvailable(), bytesDone ); #endif emit dataTransferProgress( bytesDone+socket.bytesAvailable(), bytesTotal ); emit readyRead(); @@ -589,12 +589,12 @@ void TQFtpDTP::socketError( int e ) { if ( e == TQSocket::ErrHostNotFound ) { #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP::connectState( CsHostNotFound )" ); + tqDebug( "TQFtpDTP::connectState( CsHostNotFound )" ); #endif emit connectState( TQFtpDTP::CsHostNotFound ); } else if ( e == TQSocket::ErrConnectionRefused ) { #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP::connectState( CsConnectionRefused )" ); + tqDebug( "TQFtpDTP::connectState( CsConnectionRefused )" ); #endif emit connectState( TQFtpDTP::CsConnectionRefused ); } @@ -606,7 +606,7 @@ void TQFtpDTP::socketConnectionClosed() clearData(); } #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP::connectState( CsClosed )" ); + tqDebug( "TQFtpDTP::connectState( CsClosed )" ); #endif emit connectState( TQFtpDTP::CsClosed ); } @@ -615,7 +615,7 @@ void TQFtpDTP::socketBytesWritten( int bytes ) { bytesDone += bytes; #if defined(TQFTPDTP_DEBUG) - qDebug( "TQFtpDTP::bytesWritten( %d )", bytesDone ); + tqDebug( "TQFtpDTP::bytesWritten( %d )", bytesDone ); #endif emit dataTransferProgress( bytesDone, bytesTotal ); if ( callWriteData ) @@ -701,7 +701,7 @@ void TQFtpPI::abort() abortState = AbortStarted; #if defined(TQFTPPI_DEBUG) - qDebug( "TQFtpPI send: ABOR" ); + tqDebug( "TQFtpPI send: ABOR" ); #endif commandSocket.writeBlock( "ABOR\r\n", 6 ); @@ -718,7 +718,7 @@ void TQFtpPI::connected() { state = Begin; #if defined(TQFTPPI_DEBUG) -// qDebug( "TQFtpPI state: %d [connected()]", state ); +// tqDebug( "TQFtpPI state: %d [connected()]", state ); #endif emit connectState( TQFtp::Connected ); } @@ -807,11 +807,11 @@ void TQFtpPI::readyRead() bool TQFtpPI::processReply() { #if defined(TQFTPPI_DEBUG) -// qDebug( "TQFtpPI state: %d [processReply() begin]", state ); +// tqDebug( "TQFtpPI state: %d [processReply() begin]", state ); if ( replyText.length() < 400 ) - qDebug( "TQFtpPI recv: %d %s", 100*replyCode[0]+10*replyCode[1]+replyCode[2], replyText.latin1() ); + tqDebug( "TQFtpPI recv: %d %s", 100*replyCode[0]+10*replyCode[1]+replyCode[2], replyText.latin1() ); else - qDebug( "TQFtpPI recv: %d (text skipped)", 100*replyCode[0]+10*replyCode[1]+replyCode[2] ); + tqDebug( "TQFtpPI recv: %d (text skipped)", 100*replyCode[0]+10*replyCode[1]+replyCode[2] ); #endif // process 226 replies ("Closing Data Connection") only when the data @@ -861,7 +861,7 @@ bool TQFtpPI::processReply() return TRUE; } #if defined(TQFTPPI_DEBUG) -// qDebug( "TQFtpPI state: %d [processReply() intermediate]", state ); +// tqDebug( "TQFtpPI state: %d [processReply() intermediate]", state ); #endif // special actions on certain replies @@ -878,7 +878,7 @@ bool TQFtpPI::processReply() TQRegExp addrPortPattern("(\\d+),(\\d+),(\\d+),(\\d+),(\\d+),(\\d+)"); if (addrPortPattern.search(replyText) == -1) { #if defined(TQFTPPI_DEBUG) - qDebug( "TQFtp: bad 227 response -- address and port information missing" ); + tqDebug( "TQFtp: bad 227 response -- address and port information missing" ); #endif // ### error handling } else { @@ -930,13 +930,13 @@ bool TQFtpPI::processReply() break; } #if defined(TQFTPPI_DEBUG) -// qDebug( "TQFtpPI state: %d [processReply() end]", state ); +// tqDebug( "TQFtpPI state: %d [processReply() end]", state ); #endif return TRUE; } #ifndef QT_NO_TEXTCODEC -TQM_EXPORT_FTP TQTextCodec *qt_ftp_filename_codec = 0; +TQM_EXPORT_FTP TQTextCodec *tqt_ftp_filename_codec = 0; #endif /* @@ -951,7 +951,7 @@ bool TQFtpPI::startNextCmd() #if defined(TQFTPPI_DEBUG) if ( state != Idle ) - qDebug( "TQFtpPI startNextCmd: Internal error! TQFtpPI called in non-Idle state %d", state ); + tqDebug( "TQFtpPI startNextCmd: Internal error! TQFtpPI called in non-Idle state %d", state ); #endif if ( pendingCommands.isEmpty() ) { currentCmd = TQString::null; @@ -961,13 +961,13 @@ bool TQFtpPI::startNextCmd() currentCmd = pendingCommands.first(); pendingCommands.pop_front(); #if defined(TQFTPPI_DEBUG) - qDebug( "TQFtpPI send: %s", currentCmd.left( currentCmd.length()-2 ).latin1() ); + tqDebug( "TQFtpPI send: %s", currentCmd.left( currentCmd.length()-2 ).latin1() ); #endif state = Waiting; #ifndef QT_NO_TEXTCODEC - if ( qt_ftp_filename_codec ) { + if ( tqt_ftp_filename_codec ) { int len = 0; - TQCString enc = qt_ftp_filename_codec->fromUnicode(currentCmd,len); + TQCString enc = tqt_ftp_filename_codec->fromUnicode(currentCmd,len); commandSocket.writeBlock( enc.data(), len ); } else #endif @@ -1042,7 +1042,7 @@ static TQFtpPrivate* d( const TQFtp* foo ) if ( !d_ptr ) { d_ptr = new TQPtrDict<TQFtpPrivate>; d_ptr->setAutoDelete( TRUE ); - qAddPostRoutine( cleanup_d_ptr ); + tqAddPostRoutine( cleanup_d_ptr ); } TQFtpPrivate* ret = d_ptr->find( (void*)foo ); if ( ! ret ) { @@ -1093,7 +1093,7 @@ static void delete_d( const TQFtp* foo ) \endcode This code will only work if the TQFtp class is registered; to - register the class, you must call qInitNetworkProtocols() before + register the class, you must call tqInitNetworkProtocols() before using a TQUrlOperator with TQFtp. The rest of this descrption describes the direct interface to FTP. |