Diffstat (limited to 'noncore/comm/keypebble/krfbdecoder.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfbdecoder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index 837fcc5..27ae101 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp | |||
@@ -216,25 +216,25 @@ void KRFBDecoder::gotDesktopName() | |||
216 | disconnect( con, SIGNAL( gotEnoughData() ), | 216 | disconnect( con, SIGNAL( gotEnoughData() ), |
217 | this, SLOT( gotDesktopName() ) ); | 217 | this, SLOT( gotDesktopName() ) ); |
218 | 218 | ||
219 | char *buf = new char[ info->nameLength + 1 ]; | 219 | char *buf = new char[ info->nameLength + 1 ]; |
220 | CHECK_PTR( buf ); | 220 | CHECK_PTR( buf ); |
221 | 221 | ||
222 | con->read( buf, info->nameLength ); | 222 | con->read( buf, info->nameLength ); |
223 | buf[ info->nameLength ] = '\0'; | 223 | buf[ info->nameLength ] = '\0'; |
224 | info->name = buf; | 224 | info->name = buf; |
225 | 225 | ||
226 | owarn << "Desktop: " << info->name.latin1() << "" << oendl; | 226 | owarn << "Desktop: " << info->name.latin1() << "" << oendl; |
227 | 227 | ||
228 | delete buf; | 228 | delete [] buf; |
229 | 229 | ||
230 | // Get the format we'll really use and tell the server | 230 | // Get the format we'll really use and tell the server |
231 | decidePixelFormat(); | 231 | decidePixelFormat(); |
232 | sendPixelFormat(); | 232 | sendPixelFormat(); |
233 | sendAllowedEncodings(); | 233 | sendAllowedEncodings(); |
234 | currentState = Idle; | 234 | currentState = Idle; |
235 | 235 | ||
236 | QString msg; | 236 | QString msg; |
237 | msg = tr( "Connected to %1" ); | 237 | msg = tr( "Connected to %1" ); |
238 | msg = msg.arg( info->name ); | 238 | msg = msg.arg( info->name ); |
239 | emit status( msg ); | 239 | emit status( msg ); |
240 | 240 | ||
@@ -526,25 +526,25 @@ void KRFBDecoder::gotRawRectChunk() | |||
526 | 526 | ||
527 | // owarn << "Got raw rect chunk" << oendl; | 527 | // owarn << "Got raw rect chunk" << oendl; |
528 | 528 | ||
529 | // | 529 | // |
530 | // Read the rect data and copy it to the buffer. | 530 | // Read the rect data and copy it to the buffer. |
531 | // | 531 | // |
532 | 532 | ||
533 | // TODO: Replace this! | 533 | // TODO: Replace this! |
534 | int count = lines * w * format->bpp / 8; | 534 | int count = lines * w * format->bpp / 8; |
535 | char *hack = new char[ count ]; | 535 | char *hack = new char[ count ]; |
536 | con->read( hack, count ); | 536 | con->read( hack, count ); |
537 | buf->drawRawRectChunk( hack, x, y, w, lines ); | 537 | buf->drawRawRectChunk( hack, x, y, w, lines ); |
538 | delete hack; | 538 | delete [] hack; |
539 | // /TODO: | 539 | // /TODO: |
540 | 540 | ||
541 | h = h - lines; | 541 | h = h - lines; |
542 | y = y + lines; | 542 | y = y + lines; |
543 | 543 | ||
544 | if ( h > 0 ) { | 544 | if ( h > 0 ) { |
545 | handleRawRect(); | 545 | handleRawRect(); |
546 | } | 546 | } |
547 | else { | 547 | else { |
548 | noRects--; | 548 | noRects--; |
549 | 549 | ||
550 | // owarn << "There are " << noRects << " rects left" << oendl; | 550 | // owarn << "There are " << noRects << " rects left" << oendl; |
@@ -719,25 +719,25 @@ void KRFBDecoder::gotServerCutText() | |||
719 | 719 | ||
720 | con->read( cutbuf, serverCutTextLen ); | 720 | con->read( cutbuf, serverCutTextLen ); |
721 | cutbuf[ serverCutTextLen ] = '\0'; | 721 | cutbuf[ serverCutTextLen ] = '\0'; |
722 | 722 | ||
723 | /* For some reason QApplication::clipboard()->setText() segfaults when called | 723 | /* For some reason QApplication::clipboard()->setText() segfaults when called |
724 | * from within keypebble's mass of signals and slots | 724 | * from within keypebble's mass of signals and slots |
725 | owarn << "Server cut: " << cutbuf << "" << oendl; | 725 | owarn << "Server cut: " << cutbuf << "" << oendl; |
726 | 726 | ||
727 | QString cutText( cutbuf ); // DANGER!! | 727 | QString cutText( cutbuf ); // DANGER!! |
728 | qApp->clipboard()->setText( cutText ); | 728 | qApp->clipboard()->setText( cutText ); |
729 | */ | 729 | */ |
730 | 730 | ||
731 | delete cutbuf; | 731 | delete [] cutbuf; |
732 | // Now wait for the update (again) | 732 | // Now wait for the update (again) |
733 | if ( oldState == AwaitingUpdate ) { | 733 | if ( oldState == AwaitingUpdate ) { |
734 | currentState = AwaitingUpdate; | 734 | currentState = AwaitingUpdate; |
735 | connect( con, SIGNAL( gotEnoughData() ), SLOT( gotUpdateHeader() ) ); | 735 | connect( con, SIGNAL( gotEnoughData() ), SLOT( gotUpdateHeader() ) ); |
736 | con->waitForData( UpdateHeaderLength ); | 736 | con->waitForData( UpdateHeaderLength ); |
737 | } | 737 | } |
738 | else if ( oldState == Idle ) { | 738 | else if ( oldState == Idle ) { |
739 | currentState = Idle; | 739 | currentState = Idle; |
740 | } | 740 | } |
741 | else { | 741 | else { |
742 | owarn << "Async handled in weird state" << oendl; | 742 | owarn << "Async handled in weird state" << oendl; |
743 | currentState = oldState; | 743 | currentState = oldState; |