-rw-r--r-- | noncore/comm/keypebble/krfbdecoder.cpp | 108 |
1 files changed, 52 insertions, 56 deletions
diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index d61433f..837fcc5 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp @@ -27,5 +27,5 @@ const int endianTest = 1; (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \ - (((l) & 0x00ff0000) >> 8) | \ - (((l) & 0x0000ff00) << 8) | \ - (((l) & 0x000000ff) << 24)) : (l)) + (((l) & 0x00ff0000) >> 8) | \ + (((l) & 0x0000ff00) << 8) | \ + (((l) & 0x000000ff) << 24)) : (l)) @@ -142,3 +142,3 @@ void KRFBDecoder::sendClientInit() // Wait for server init - owarn << "Waiting for server init" << oendl; + owarn << "Waiting for server init" << oendl; @@ -154,3 +154,3 @@ void KRFBDecoder::gotServerInit() { - owarn << "Got server init" << oendl; + owarn << "Got server init" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotServerInit() ) ); @@ -188,9 +188,8 @@ void KRFBDecoder::gotServerInit() - owarn << "Width = " << info->width << ", Height = " << info->height << "" << oendl; - qWarning( "Bpp = %d, Depth = %d, Big = %d, True = %d", - info->bpp, info->depth, info->bigEndian, info->trueColor ); - qWarning( "RedMax = %d, GreenMax = %d, BlueMax = %d", - info->redMax, info->greenMax, info->blueMax ); - qWarning( "RedShift = %d, GreenShift = %d, BlueShift = %d", - info->redShift, info->greenShift,info-> blueShift ); + owarn << "Width = " << info->width << ", Height = " << info->height << "" << oendl; + owarn << "Bpp = " << info->bpp << ", Depth = " << info->depth << ", Big = " << info->bigEndian + << ", True = " << info->trueColor << oendl; + owarn << "RedMax = " << info->redMax << ", GreenMax = " << info->greenMax << ", BlueMax = " << info->blueMax << oendl; + owarn << "RedShift = " << info->redShift << ", GreenShift = " << info->greenShift + << ", BlueShift = " << info-> blueShift << oendl; @@ -199,3 +198,3 @@ void KRFBDecoder::gotServerInit() // Wait for desktop name - owarn << "Waiting for desktop name" << oendl; + owarn << "Waiting for desktop name" << oendl; @@ -214,6 +213,6 @@ void KRFBDecoder::gotDesktopName() - owarn << "Got desktop name" << oendl; + owarn << "Got desktop name" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), - this, SLOT( gotDesktopName() ) ); + this, SLOT( gotDesktopName() ) ); @@ -226,3 +225,3 @@ void KRFBDecoder::gotDesktopName() - owarn << "Desktop: " << info->name.latin1() << "" << oendl; + owarn << "Desktop: " << info->name.latin1() << "" << oendl; @@ -266,8 +265,5 @@ void KRFBDecoder::decidePixelFormat() - qWarning( "Screen depth=%d, server depth=%d, best depth=%d, " \ - "eight bit %d, chosenDepth=%d", - screenDepth, - info->depth, - bestDepth, - con->options()->colors256, chosenDepth ); + owarn << "Screen depth=" << screenDepth << ", server depth=" << info->depth + << ", best depth=" << bestDepth << "eight bit " << con->options()->colors256 + << ", chosenDepth=" << chosenDepth << oendl; @@ -378,6 +374,6 @@ void KRFBDecoder::gotUpdateHeader() - // owarn << "Got update header" << oendl; + // owarn << "Got update header" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), - this, SLOT( gotUpdateHeader() ) ); + this, SLOT( gotUpdateHeader() ) ); @@ -413,3 +409,3 @@ void KRFBDecoder::gotUpdateHeader() - // owarn << "Expecting " << noRects << " rects" << oendl; + // owarn << "Expecting " << noRects << " rects" << oendl; @@ -425,6 +421,6 @@ void KRFBDecoder::gotRectHeader() - // owarn << "Got rect header" << oendl; + // owarn << "Got rect header" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), - this, SLOT( gotRectHeader() ) ); + this, SLOT( gotRectHeader() ) ); @@ -443,4 +439,4 @@ void KRFBDecoder::gotRectHeader() // CARD32 encodingLocal = Swap32IfLE( encoding ); - // qWarning( "Rect: x=%d, y= %d, w=%d, h=%d, encoding=%ld", - // x, y, w, h, encodingLocal ); + // owarn << "Rect: x=" << x << ", y= " << y << ", w=" << w << ", h=" << h + // << ", encoding= " << encodingLocal << oendl; @@ -453,3 +449,3 @@ void KRFBDecoder::gotRectHeader() if ( encoding == RawEncoding ) { - // owarn << "Raw encoding" << oendl; + // owarn << "Raw encoding" << oendl; handleRawRect(); @@ -457,3 +453,3 @@ void KRFBDecoder::gotRectHeader() else if ( encoding == CopyRectEncoding ) { -// owarn << "CopyRect encoding" << oendl; +// owarn << "CopyRect encoding" << oendl; handleCopyRect(); @@ -461,3 +457,3 @@ void KRFBDecoder::gotRectHeader() else if ( encoding == RreEncoding ) { - owarn << "RRE encoding" << oendl; + owarn << "RRE encoding" << oendl; handleRRERect(); @@ -465,3 +461,3 @@ void KRFBDecoder::gotRectHeader() else if ( encoding == CorreEncoding ) { - owarn << "CoRRE encoding" << oendl; + owarn << "CoRRE encoding" << oendl; handleCoRRERect(); @@ -469,3 +465,3 @@ void KRFBDecoder::gotRectHeader() else if ( encoding == HexTileEncoding ) { - owarn << "HexTile encoding" << oendl; + owarn << "HexTile encoding" << oendl; handleHexTileRect(); @@ -475,5 +471,5 @@ void KRFBDecoder::gotRectHeader() QString protocolError = tr( "Protocol Error: An unknown encoding was " - "used by the server %1" ).arg( msg ); + "used by the server %1" ).arg( msg ); currentState = Error; - owarn << "Unknown encoding, " << msg << "" << oendl; + owarn << "Unknown encoding, " << msg << "" << oendl; emit error( protocolError ); @@ -493,3 +489,3 @@ void KRFBDecoder::handleRawRect() - // owarn << "Handling a raw rect chunk" << oendl; + // owarn << "Handling a raw rect chunk" << oendl; @@ -516,3 +512,3 @@ void KRFBDecoder::getRawRectChunk( int lines ) // Wait for server init - // owarn << "Waiting for raw rect chunk, " << count << "" << oendl; + // owarn << "Waiting for raw rect chunk, " << count << "" << oendl; @@ -530,3 +526,3 @@ void KRFBDecoder::gotRawRectChunk() - // owarn << "Got raw rect chunk" << oendl; + // owarn << "Got raw rect chunk" << oendl; @@ -553,3 +549,3 @@ void KRFBDecoder::gotRawRectChunk() - // owarn << "There are " << noRects << " rects left" << oendl; + // owarn << "There are " << noRects << " rects left" << oendl; @@ -597,3 +593,3 @@ void KRFBDecoder::gotCopyRectPos() - // owarn << "There are " << noRects << " rects left" << oendl; + // owarn << "There are " << noRects << " rects left" << oendl; @@ -610,3 +606,3 @@ void KRFBDecoder::handleRRERect() { - owarn << "RRE not implemented" << oendl; + owarn << "RRE not implemented" << oendl; } @@ -615,3 +611,3 @@ void KRFBDecoder::handleCoRRERect() { - owarn << "CoRRE not implemented" << oendl; + owarn << "CoRRE not implemented" << oendl; } @@ -620,3 +616,3 @@ void KRFBDecoder::handleHexTileRect() { - owarn << "HexTile not implemented" << oendl; + owarn << "HexTile not implemented" << oendl; } @@ -646,5 +642,5 @@ void KRFBDecoder::sendMouseEvent( QMouseEvent *e ) - // HACK: Scaling + // HACK: Scaling CARD16 x = Swap16IfLE( e->x() * con->options()->scaleFactor ); - CARD16 y = Swap16IfLE( e->y() * con->options()->scaleFactor ); + CARD16 y = Swap16IfLE( e->y() * con->options()->scaleFactor ); @@ -680,3 +676,3 @@ void KRFBDecoder::gotServerCut() { - owarn << "Got server cut" << oendl; + owarn << "Got server cut" << oendl; @@ -728,3 +724,3 @@ void KRFBDecoder::gotServerCutText() * from within keypebble's mass of signals and slots - owarn << "Server cut: " << cutbuf << "" << oendl; + owarn << "Server cut: " << cutbuf << "" << oendl; @@ -745,3 +741,3 @@ void KRFBDecoder::gotServerCutText() else { - owarn << "Async handled in weird state" << oendl; + owarn << "Async handled in weird state" << oendl; currentState = oldState; @@ -752,3 +748,3 @@ void KRFBDecoder::gotBell() { - owarn << "Got server bell" << oendl; + owarn << "Got server bell" << oendl; buf->soundBell(); @@ -765,3 +761,3 @@ void KRFBDecoder::gotBell() else { - owarn << "Async handled in weird state" << oendl; + owarn << "Async handled in weird state" << oendl; currentState = oldState; @@ -821,7 +817,7 @@ int KRFBDecoder::toKeySym( QKeyEvent *k ) if ((k->key() >= Qt::Key_Escape) && (k->key() <= Qt::Key_F12)) { - for(int i = 0; keyMap[i].keycode != 0; i++) { - if (k->key() == keyMap[i].keycode) { - return keyMap[i].keysym; - } - } + for(int i = 0; keyMap[i].keycode != 0; i++) { + if (k->key() == keyMap[i].keycode) { + return keyMap[i].keysym; + } + } } |