author | dwmw2 <dwmw2> | 2002-05-09 17:30:42 (UTC) |
---|---|---|
committer | dwmw2 <dwmw2> | 2002-05-09 17:30:42 (UTC) |
commit | 37b512ee81aacdc53c4cf5de18a2eb7c0819086d (patch) (side-by-side diff) | |
tree | 4125c12092cf9036c07e1d06710ef08a7bafdc5d | |
parent | b9d7463dde0158b06ccbdc014ef20aa8569454a5 (diff) | |
download | opie-37b512ee81aacdc53c4cf5de18a2eb7c0819086d.zip opie-37b512ee81aacdc53c4cf5de18a2eb7c0819086d.tar.gz opie-37b512ee81aacdc53c4cf5de18a2eb7c0819086d.tar.bz2 |
don't use errno for variable names
-rw-r--r-- | noncore/comm/keypebble/krfbconnection.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/comm/keypebble/krfbconnection.cpp b/noncore/comm/keypebble/krfbconnection.cpp index c413186..c51f18a 100644 --- a/noncore/comm/keypebble/krfbconnection.cpp +++ b/noncore/comm/keypebble/krfbconnection.cpp @@ -75,112 +75,112 @@ void KRFBConnection::disconnectDone() delete sock; sock = 0; minData_ = 0; delete updater; delete decoder_; delete buffer_; emit disconnected(); } void KRFBConnection::gotSocketConnection() { currentState_ = LoggingIn; qWarning( "Connected, logging in..." ); static QString statusMsg = tr( "Connected" ); emit statusChanged( statusMsg ); // Do some login stuff login = new KRFBLogin( this ); } void KRFBConnection::gotRFBConnection() { qWarning( "Logged into server" ); currentState_ = Connected; emit connected(); // Create the decoder and start doing stuff decoder_ = new KRFBDecoder( this ); CHECK_PTR( decoder_ ); buffer_ = new KRFBBuffer( decoder_, this, "RFB Buffer" ); CHECK_PTR( buffer_ ); decoder_->setBuffer( buffer_ ); connect( decoder_, SIGNAL( status( const QString & ) ), this, SIGNAL( statusChanged( const QString & ) ) ); emit loggedIn(); decoder_->start(); updater = new QTimer; connect( updater, SIGNAL( timeout() ), SLOT( updateTimer() ) ); updater->start( options_->updateRate ); } -void KRFBConnection::gotSocketError( int errno ) +void KRFBConnection::gotSocketError( int err ) { currentState_ = Error; // Do some error handling stuff - qWarning( "KRFBConnection: Socket error %d", errno ); + qWarning( "KRFBConnection: Socket error %d", err ); static QString refused = tr( "Connection Refused" ); static QString host = tr( "Host not found" ); static QString read = tr( "Read Error: QSocket reported an error reading\n" "data, the remote host has probably dropped the\n" "connection." ); static QString confused = tr( "QSocket reported an invalid error code" ); QString msg; - switch ( errno ) { + switch ( err ) { case QSocket::ErrConnectionRefused: msg = refused; break; case QSocket::ErrHostNotFound: msg = host; break; case QSocket::ErrSocketRead: msg = read; break; default: msg = confused; }; QObject::disconnect( sock, SIGNAL( readyRead() ), this, SLOT( gotMoreData() ) ); delete sock; sock = 0; currentState_ = Disconnected; emit error( msg ); } void KRFBConnection::gotMoreData() { assert( minData_ > 0 ); if ( sock->size() >= minData_ ) { minData_ = 0; QObject::disconnect( sock, SIGNAL( readyRead() ), this, SLOT( gotMoreData() ) ); emit gotEnoughData(); } } void KRFBConnection::waitForData( unsigned int sz ) { assert( minData_ == 0 ); assert( sz > 0 ); assert( currentState_ != Error ); if ( sock->size() >= sz ) { // qWarning( "No need to wait for data" ); emit gotEnoughData(); } else { // qWarning( "Waiting for %u bytes", sz ); minData_ = sz; connect( sock, SIGNAL( readyRead() ), SLOT( gotMoreData() ) ); } |