-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 | |||
@@ -99,64 +99,64 @@ void KRFBConnection::gotRFBConnection() | |||
99 | qWarning( "Logged into server" ); | 99 | qWarning( "Logged into server" ); |
100 | 100 | ||
101 | currentState_ = Connected; | 101 | currentState_ = Connected; |
102 | emit connected(); | 102 | emit connected(); |
103 | 103 | ||
104 | // Create the decoder and start doing stuff | 104 | // Create the decoder and start doing stuff |
105 | decoder_ = new KRFBDecoder( this ); | 105 | decoder_ = new KRFBDecoder( this ); |
106 | CHECK_PTR( decoder_ ); | 106 | CHECK_PTR( decoder_ ); |
107 | 107 | ||
108 | buffer_ = new KRFBBuffer( decoder_, this, "RFB Buffer" ); | 108 | buffer_ = new KRFBBuffer( decoder_, this, "RFB Buffer" ); |
109 | CHECK_PTR( buffer_ ); | 109 | CHECK_PTR( buffer_ ); |
110 | decoder_->setBuffer( buffer_ ); | 110 | decoder_->setBuffer( buffer_ ); |
111 | 111 | ||
112 | connect( decoder_, SIGNAL( status( const QString & ) ), | 112 | connect( decoder_, SIGNAL( status( const QString & ) ), |
113 | this, SIGNAL( statusChanged( const QString & ) ) ); | 113 | this, SIGNAL( statusChanged( const QString & ) ) ); |
114 | emit loggedIn(); | 114 | emit loggedIn(); |
115 | 115 | ||
116 | decoder_->start(); | 116 | decoder_->start(); |
117 | 117 | ||
118 | updater = new QTimer; | 118 | updater = new QTimer; |
119 | connect( updater, SIGNAL( timeout() ), SLOT( updateTimer() ) ); | 119 | connect( updater, SIGNAL( timeout() ), SLOT( updateTimer() ) ); |
120 | updater->start( options_->updateRate ); | 120 | updater->start( options_->updateRate ); |
121 | } | 121 | } |
122 | 122 | ||
123 | void KRFBConnection::gotSocketError( int errno ) | 123 | void KRFBConnection::gotSocketError( int err ) |
124 | { | 124 | { |
125 | currentState_ = Error; | 125 | currentState_ = Error; |
126 | 126 | ||
127 | // Do some error handling stuff | 127 | // Do some error handling stuff |
128 | qWarning( "KRFBConnection: Socket error %d", errno ); | 128 | qWarning( "KRFBConnection: Socket error %d", err ); |
129 | 129 | ||
130 | static QString refused = tr( "Connection Refused" ); | 130 | static QString refused = tr( "Connection Refused" ); |
131 | static QString host = tr( "Host not found" ); | 131 | static QString host = tr( "Host not found" ); |
132 | static QString read = tr( "Read Error: QSocket reported an error reading\n" | 132 | static QString read = tr( "Read Error: QSocket reported an error reading\n" |
133 | "data, the remote host has probably dropped the\n" | 133 | "data, the remote host has probably dropped the\n" |
134 | "connection." ); | 134 | "connection." ); |
135 | static QString confused = tr( "QSocket reported an invalid error code" ); | 135 | static QString confused = tr( "QSocket reported an invalid error code" ); |
136 | 136 | ||
137 | QString msg; | 137 | QString msg; |
138 | switch ( errno ) { | 138 | switch ( err ) { |
139 | case QSocket::ErrConnectionRefused: | 139 | case QSocket::ErrConnectionRefused: |
140 | msg = refused; | 140 | msg = refused; |
141 | break; | 141 | break; |
142 | case QSocket::ErrHostNotFound: | 142 | case QSocket::ErrHostNotFound: |
143 | msg = host; | 143 | msg = host; |
144 | break; | 144 | break; |
145 | case QSocket::ErrSocketRead: | 145 | case QSocket::ErrSocketRead: |
146 | msg = read; | 146 | msg = read; |
147 | break; | 147 | break; |
148 | default: | 148 | default: |
149 | msg = confused; | 149 | msg = confused; |
150 | }; | 150 | }; |
151 | 151 | ||
152 | QObject::disconnect( sock, SIGNAL( readyRead() ), this, SLOT( gotMoreData() ) ); | 152 | QObject::disconnect( sock, SIGNAL( readyRead() ), this, SLOT( gotMoreData() ) ); |
153 | delete sock; | 153 | delete sock; |
154 | sock = 0; | 154 | sock = 0; |
155 | currentState_ = Disconnected; | 155 | currentState_ = Disconnected; |
156 | 156 | ||
157 | emit error( msg ); | 157 | emit error( msg ); |
158 | } | 158 | } |
159 | 159 | ||
160 | void KRFBConnection::gotMoreData() | 160 | void KRFBConnection::gotMoreData() |
161 | { | 161 | { |
162 | assert( minData_ > 0 ); | 162 | assert( minData_ > 0 ); |