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 9414d0e..492bc72 100644 --- a/src/network/qsocket.cpp +++ b/src/network/qsocket.cpp @@ -321,7 +321,7 @@ QSocket::QSocket( QObject *parent, const char *name ) QSocket::~QSocket() { #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): Destroy", name() ); + qDebug( "QSocket (%s): Destroy", name() ); #endif if ( state() != Idle ) close(); @@ -411,7 +411,7 @@ QSocket::State QSocket::state() const void QSocket::connectToHost( const QString &host, Q_UINT16 port ) { #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s)::connectToHost: host %s, port %d", + qDebug( "QSocket (%s)::connectToHost: host %s, port %d", name(), host.ascii(), port ); #endif setSocketIntern( -1 ); @@ -442,7 +442,7 @@ void QSocket::connectToHost( const QString &host, Q_UINT16 port ) void QSocket::tryConnecting() { #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s)::tryConnecting()", name() ); + qDebug( "QSocket (%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 QSocket::tryConnecting() d->l4 = d->dns4->addresses(); if ( !d->l4.isEmpty() || !d->dns4->isWorking() ) { #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s)::tryConnecting: host %s, port %d: " + qDebug( "QSocket (%s)::tryConnecting: host %s, port %d: " "%d IPv4 addresses", name(), d->host.ascii(), d->port, d->l4.count() ); #endif @@ -465,7 +465,7 @@ void QSocket::tryConnecting() d->l6 = d->dns6->addresses(); if ( !d->l6.isEmpty() || !d->dns6->isWorking() ) { #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s)::tryConnecting: host %s, port %d: " + qDebug( "QSocket (%s)::tryConnecting: host %s, port %d: " "%d IPv6 addresses", name(), d->host.ascii(), d->port, d->l6.count() ); #endif @@ -516,7 +516,7 @@ void QSocket::tryConnecting() } #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s)::tryConnecting: " + qDebug( "QSocket (%s)::tryConnecting: " "Gave up on IP address %s", name(), d->socket->peerAddress().toString().ascii() ); #endif @@ -539,7 +539,7 @@ void QSocket::tryConnecting() d->setSocketDevice( this, 0 ); stuck = TRUE; #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s)::tryConnecting: Trying IP address %s", + qDebug( "QSocket (%s)::tryConnecting: Trying IP address %s", name(), d->addr.toString().ascii() ); #endif } @@ -654,7 +654,7 @@ bool QSocket::open( int m ) { if ( isOpen() ) { #if defined(QT_CHECK_STATE) - tqWarning( "QSocket::open: Already open" ); + qWarning( "QSocket::open: Already open" ); #endif return FALSE; } @@ -692,7 +692,7 @@ void QSocket::close() if ( !d->rsn || !d->wsn ) return; #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): close socket", name() ); + qDebug( "QSocket (%s): close socket", name() ); #endif if ( d->socket && d->wsize ) { // there's data to be written d->state = Closing; @@ -721,7 +721,7 @@ bool QSocket::consumeWriteBuf( Q_ULONG nbytes ) if ( nbytes <= 0 || nbytes > d->wsize ) return FALSE; #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): skipWriteBuf %d bytes", name(), (int)nbytes ); + qDebug( "QSocket (%s): skipWriteBuf %d bytes", name(), (int)nbytes ); #endif d->wsize -= nbytes; for ( ;; ) { @@ -754,7 +754,7 @@ void QSocket::flush() int consumed = 0; while ( !osBufferFull && d->state >= Connecting && d->wsize > 0 ) { #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): flush: Write data to the socket", name() ); + qDebug( "QSocket (%s): flush: Write data to the socket", name() ); #endif QByteArray *a = d->wba.first(); int nwritten; @@ -798,14 +798,14 @@ void QSocket::flush() } if ( consumed > 0 ) { #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): flush: wrote %d bytes, %d left", + qDebug( "QSocket (%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(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): flush: Delayed close done. Terminating.", + qDebug( "QSocket (%s): flush: Delayed close done. Terminating.", name() ); #endif setFlags( IO_Sequential ); @@ -981,20 +981,20 @@ Q_LONG QSocket::readBlock( char *data, Q_ULONG maxlen ) { if ( data == 0 && maxlen != 0 ) { #if defined(QT_CHECK_NULL) - tqWarning( "QSocket::readBlock: Null pointer error" ); + qWarning( "QSocket::readBlock: Null pointer error" ); #endif return -1; } if ( !isOpen() ) { #if defined(QT_CHECK_STATE) - tqWarning( "QSocket::readBlock: Socket is not open" ); + qWarning( "QSocket::readBlock: Socket is not open" ); #endif return -1; } if ( maxlen >= d->rba.size() ) maxlen = d->rba.size(); #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): readBlock %d bytes", name(), (int)maxlen ); + qDebug( "QSocket (%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 QSocket::writeBlock( const char *data, Q_ULONG len ) { #if defined(QT_CHECK_NULL) if ( data == 0 && len != 0 ) { - tqWarning( "QSocket::writeBlock: Null pointer error" ); + qWarning( "QSocket::writeBlock: Null pointer error" ); } #endif #if defined(QT_CHECK_STATE) if ( !isOpen() ) { - tqWarning( "QSocket::writeBlock: Socket is not open" ); + qWarning( "QSocket::writeBlock: Socket is not open" ); return -1; } #endif #if defined(QT_CHECK_STATE) if ( d->state == Closing ) { - tqWarning( "QSocket::writeBlock: Cannot write, socket is closing" ); + qWarning( "QSocket::writeBlock: Cannot write, socket is closing" ); } #endif if ( len == 0 || d->state == Closing || d->state == Idle ) @@ -1061,7 +1061,7 @@ Q_LONG QSocket::writeBlock( const char *data, Q_ULONG len ) else if ( d->wsn ) d->wsn->setEnabled( TRUE ); #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): writeBlock %d bytes", name(), (int)len ); + qDebug( "QSocket (%s): writeBlock %d bytes", name(), (int)len ); #endif return len; } @@ -1121,7 +1121,7 @@ int QSocket::ungetch( int ch ) { #if defined(QT_CHECK_STATE) if ( !isOpen() ) { - tqWarning( "QSocket::ungetch: Socket not open" ); + qWarning( "QSocket::ungetch: Socket not open" ); return -1; } #endif @@ -1243,7 +1243,7 @@ void QSocket::sn_read( bool force ) if ( nread == 0 ) { // really closed if ( !d->socket->isOpen() ) { #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): sn_read: Connection closed", name() ); + qDebug( "QSocket (%s): sn_read: Connection closed", name() ); #endif d->connectionClosed(); emit connectionClosed(); @@ -1258,7 +1258,7 @@ void QSocket::sn_read( bool force ) return; } #if defined(QSOCKET_DEBUG) - tqWarning( "QSocket::sn_read (%s): Close error", name() ); + qWarning( "QSocket::sn_read (%s): Close error", name() ); #endif if ( d->rsn ) d->rsn->setEnabled( FALSE ); @@ -1272,7 +1272,7 @@ void QSocket::sn_read( bool force ) } else { // data to be read #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): sn_read: %ld incoming bytes", name(), nbytes ); + qDebug( "QSocket (%s): sn_read: %ld incoming bytes", name(), nbytes ); #endif if ( nbytes > (int)sizeof(buf) ) { // big @@ -1289,7 +1289,7 @@ void QSocket::sn_read( bool force ) } if ( nread == 0 ) { #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): sn_read: Connection closed", name() ); + qDebug( "QSocket (%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 QSocket::sn_read( bool force ) return; } #if defined(QT_CHECK_RANGE) - tqWarning( "QSocket::sn_read: Read error" ); + qWarning( "QSocket::sn_read: Read error" ); #endif if ( d->rsn ) d->rsn->setEnabled( FALSE ); @@ -1316,7 +1316,7 @@ void QSocket::sn_read( bool force ) } if ( nread != (int)a->size() ) { // unexpected #if defined(CHECK_RANGE) && !defined(Q_OS_WIN32) - tqWarning( "QSocket::sn_read: Unexpected short read" ); + qWarning( "QSocket::sn_read: Unexpected short read" ); #endif a->resize( nread ); } @@ -1356,7 +1356,7 @@ void QSocket::tryConnection() if ( d->socket->connect( d->addr, d->port ) ) { d->state = Connected; #if defined(QSOCKET_DEBUG) - tqDebug( "QSocket (%s): sn_write: Got connection to %s", + qDebug( "QSocket (%s): sn_write: Got connection to %s", name(), peerName().ascii() ); #endif if ( d->rsn ) |