diff options
Diffstat (limited to 'src/network/qsocket.cpp')
-rw-r--r-- | src/network/qsocket.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/network/qsocket.cpp b/src/network/qsocket.cpp index 8e69aa7cc..10cd2173e 100644 --- a/src/network/qsocket.cpp +++ b/src/network/qsocket.cpp @@ -321,7 +321,7 @@ TQSocket::TQSocket( TQObject *parent, const char *name ) TQSocket::~TQSocket() { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): Destroy", name() ); + tqDebug( "TQSocket (%s): Destroy", name() ); #endif if ( state() != Idle ) close(); @@ -411,7 +411,7 @@ TQSocket::State TQSocket::state() const void TQSocket::connectToHost( const TQString &host, Q_UINT16 port ) { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s)::connectToHost: host %s, port %d", + tqDebug( "TQSocket (%s)::connectToHost: host %s, port %d", name(), host.ascii(), port ); #endif setSocketIntern( -1 ); @@ -442,7 +442,7 @@ void TQSocket::connectToHost( const TQString &host, Q_UINT16 port ) void TQSocket::tryConnecting() { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s)::tryConnecting()", name() ); + tqDebug( "TQSocket (%s)::tryConnecting()", name() ); #endif // ### this ifdef isn't correct - addresses() also does /etc/hosts and // numeric-address-as-string handling. @@ -452,7 +452,7 @@ void TQSocket::tryConnecting() d->l4 = d->dns4->addresses(); if ( !d->l4.isEmpty() || !d->dns4->isWorking() ) { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s)::tryConnecting: host %s, port %d: " + tqDebug( "TQSocket (%s)::tryConnecting: host %s, port %d: " "%d IPv4 addresses", name(), d->host.ascii(), d->port, d->l4.count() ); #endif @@ -465,7 +465,7 @@ void TQSocket::tryConnecting() d->l6 = d->dns6->addresses(); if ( !d->l6.isEmpty() || !d->dns6->isWorking() ) { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s)::tryConnecting: host %s, port %d: " + tqDebug( "TQSocket (%s)::tryConnecting: host %s, port %d: " "%d IPv6 addresses", name(), d->host.ascii(), d->port, d->l6.count() ); #endif @@ -516,7 +516,7 @@ void TQSocket::tryConnecting() } #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s)::tryConnecting: " + tqDebug( "TQSocket (%s)::tryConnecting: " "Gave up on IP address %s", name(), d->socket->peerAddress().toString().ascii() ); #endif @@ -539,7 +539,7 @@ void TQSocket::tryConnecting() d->setSocketDevice( this, 0 ); stuck = TRUE; #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s)::tryConnecting: Trying IP address %s", + tqDebug( "TQSocket (%s)::tryConnecting: Trying IP address %s", name(), d->addr.toString().ascii() ); #endif } @@ -654,7 +654,7 @@ bool TQSocket::open( int m ) { if ( isOpen() ) { #if defined(QT_CHECK_STATE) - qWarning( "TQSocket::open: Already open" ); + tqWarning( "TQSocket::open: Already open" ); #endif return FALSE; } @@ -692,7 +692,7 @@ void TQSocket::close() if ( !d->rsn || !d->wsn ) return; #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): close socket", name() ); + tqDebug( "TQSocket (%s): close socket", name() ); #endif if ( d->socket && d->wsize ) { // there's data to be written d->state = Closing; @@ -721,7 +721,7 @@ bool TQSocket::consumeWriteBuf( Q_ULONG nbytes ) if ( nbytes <= 0 || nbytes > d->wsize ) return FALSE; #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): skipWriteBuf %d bytes", name(), (int)nbytes ); + tqDebug( "TQSocket (%s): skipWriteBuf %d bytes", name(), (int)nbytes ); #endif d->wsize -= nbytes; for ( ;; ) { @@ -754,7 +754,7 @@ void TQSocket::flush() int consumed = 0; while ( !osBufferFull && d->state >= Connecting && d->wsize > 0 ) { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): flush: Write data to the socket", name() ); + tqDebug( "TQSocket (%s): flush: Write data to the socket", name() ); #endif TQByteArray *a = d->wba.first(); int nwritten; @@ -798,14 +798,14 @@ void TQSocket::flush() } if ( consumed > 0 ) { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): flush: wrote %d bytes, %d left", + tqDebug( "TQSocket (%s): flush: wrote %d bytes, %d left", name(), consumed, (int)d->wsize ); #endif emit bytesWritten( consumed ); } if ( d->state == Closing && d->wsize == 0 ) { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): flush: Delayed close done. Terminating.", + tqDebug( "TQSocket (%s): flush: Delayed close done. Terminating.", name() ); #endif setFlags( IO_Sequential ); @@ -981,20 +981,20 @@ Q_LONG TQSocket::readBlock( char *data, Q_ULONG maxlen ) { if ( data == 0 && maxlen != 0 ) { #if defined(QT_CHECK_NULL) - qWarning( "TQSocket::readBlock: Null pointer error" ); + tqWarning( "TQSocket::readBlock: Null pointer error" ); #endif return -1; } if ( !isOpen() ) { #if defined(QT_CHECK_STATE) - qWarning( "TQSocket::readBlock: Socket is not open" ); + tqWarning( "TQSocket::readBlock: Socket is not open" ); #endif return -1; } if ( maxlen >= d->rba.size() ) maxlen = d->rba.size(); #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): readBlock %d bytes", name(), (int)maxlen ); + tqDebug( "TQSocket (%s): readBlock %d bytes", name(), (int)maxlen ); #endif d->rba.consumeBytes( maxlen, data ); // After we read data from our internal buffer, if we use the @@ -1019,18 +1019,18 @@ Q_LONG TQSocket::writeBlock( const char *data, Q_ULONG len ) { #if defined(QT_CHECK_NULL) if ( data == 0 && len != 0 ) { - qWarning( "TQSocket::writeBlock: Null pointer error" ); + tqWarning( "TQSocket::writeBlock: Null pointer error" ); } #endif #if defined(QT_CHECK_STATE) if ( !isOpen() ) { - qWarning( "TQSocket::writeBlock: Socket is not open" ); + tqWarning( "TQSocket::writeBlock: Socket is not open" ); return -1; } #endif #if defined(QT_CHECK_STATE) if ( d->state == Closing ) { - qWarning( "TQSocket::writeBlock: Cannot write, socket is closing" ); + tqWarning( "TQSocket::writeBlock: Cannot write, socket is closing" ); } #endif if ( len == 0 || d->state == Closing || d->state == Idle ) @@ -1061,7 +1061,7 @@ Q_LONG TQSocket::writeBlock( const char *data, Q_ULONG len ) else if ( d->wsn ) d->wsn->setEnabled( TRUE ); #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): writeBlock %d bytes", name(), (int)len ); + tqDebug( "TQSocket (%s): writeBlock %d bytes", name(), (int)len ); #endif return len; } @@ -1121,7 +1121,7 @@ int TQSocket::ungetch( int ch ) { #if defined(QT_CHECK_STATE) if ( !isOpen() ) { - qWarning( "TQSocket::ungetch: Socket not open" ); + tqWarning( "TQSocket::ungetch: Socket not open" ); return -1; } #endif @@ -1243,7 +1243,7 @@ void TQSocket::sn_read( bool force ) if ( nread == 0 ) { // really closed if ( !d->socket->isOpen() ) { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): sn_read: Connection closed", name() ); + tqDebug( "TQSocket (%s): sn_read: Connection closed", name() ); #endif d->connectionClosed(); emit connectionClosed(); @@ -1258,7 +1258,7 @@ void TQSocket::sn_read( bool force ) return; } #if defined(TQSOCKET_DEBUG) - qWarning( "TQSocket::sn_read (%s): Close error", name() ); + tqWarning( "TQSocket::sn_read (%s): Close error", name() ); #endif if ( d->rsn ) d->rsn->setEnabled( FALSE ); @@ -1272,7 +1272,7 @@ void TQSocket::sn_read( bool force ) } else { // data to be read #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): sn_read: %ld incoming bytes", name(), nbytes ); + tqDebug( "TQSocket (%s): sn_read: %ld incoming bytes", name(), nbytes ); #endif if ( nbytes > (int)sizeof(buf) ) { // big @@ -1289,7 +1289,7 @@ void TQSocket::sn_read( bool force ) } if ( nread == 0 ) { #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): sn_read: Connection closed", name() ); + tqDebug( "TQSocket (%s): sn_read: Connection closed", name() ); #endif // ### we should rather ask the socket device if it is closed d->connectionClosed(); @@ -1306,7 +1306,7 @@ void TQSocket::sn_read( bool force ) return; } #if defined(QT_CHECK_RANGE) - qWarning( "TQSocket::sn_read: Read error" ); + tqWarning( "TQSocket::sn_read: Read error" ); #endif if ( d->rsn ) d->rsn->setEnabled( FALSE ); @@ -1316,7 +1316,7 @@ void TQSocket::sn_read( bool force ) } if ( nread != (int)a->size() ) { // unexpected #if defined(CHECK_RANGE) && !defined(Q_OS_WIN32) - qWarning( "TQSocket::sn_read: Unexpected short read" ); + tqWarning( "TQSocket::sn_read: Unexpected short read" ); #endif a->resize( nread ); } @@ -1356,7 +1356,7 @@ void TQSocket::tryConnection() if ( d->socket->connect( d->addr, d->port ) ) { d->state = Connected; #if defined(TQSOCKET_DEBUG) - qDebug( "TQSocket (%s): sn_write: Got connection to %s", + tqDebug( "TQSocket (%s): sn_write: Got connection to %s", name(), peerName().ascii() ); #endif if ( d->rsn ) |