From 17d7f11b16b650f6ee2b5c440506167ea41fbfe5 Mon Sep 17 00:00:00 2001 From: treke Date: Sun, 22 Dec 2002 00:58:46 +0000 Subject: 1) Fixed a bug where double clicking a blank spot on the bookmark list caused a segfault. 2) Removed support for copying from the server. Trying to setText in the clipboard would segfault everytime from within the KRFBDecoder. Doesnt seem to like being called from within a slot. --- (limited to 'noncore/comm') diff --git a/noncore/comm/keypebble/krfbcanvas.cpp b/noncore/comm/keypebble/krfbcanvas.cpp index 049bbd4..bc71c90 100644 --- a/noncore/comm/keypebble/krfbcanvas.cpp +++ b/noncore/comm/keypebble/krfbcanvas.cpp @@ -143,8 +143,6 @@ void KRFBCanvas::contentsMousePressEvent( QMouseEvent *e ) } else if ( loggedIn_ ) connection_->buffer()->mouseEvent( e ); - qDebug("Press"); - qDebug(QString::number(e->type()==QEvent::MouseButtonPress)); } void KRFBCanvas::contentsMouseReleaseEvent( QMouseEvent *e ) @@ -155,8 +153,6 @@ void KRFBCanvas::contentsMouseReleaseEvent( QMouseEvent *e ) nextRightClick=0; nextDoubleClick=0; - qDebug("Release"); - qDebug(QString::number(e->button())); } void KRFBCanvas::contentsMouseMoveEvent( QMouseEvent *e ) diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index 94e3b79..33418ae 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp @@ -707,6 +707,7 @@ void KRFBDecoder::gotServerCutText() disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotServerCutText() ) ); + // // Warning: There is a bug in the RFB protocol because there is no way to find // out the codepage in use on the remote machine. This could be fixed by requiring @@ -721,13 +722,15 @@ void KRFBDecoder::gotServerCutText() con->read( cutbuf, serverCutTextLen ); cutbuf[ serverCutTextLen ] = '\0'; + /* For some reason QApplication::clipboard()->setText() segfaults when called + * from within keypebble's mass of signals and slots qWarning( "Server cut: %s", cutbuf ); QString cutText( cutbuf ); // DANGER!! qApp->clipboard()->setText( cutText ); + */ delete cutbuf; - // Now wait for the update (again) if ( oldState == AwaitingUpdate ) { currentState = AwaitingUpdate; diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp index 5b1dc9f..48a442c 100644 --- a/noncore/comm/keypebble/kvnc.cpp +++ b/noncore/comm/keypebble/kvnc.cpp @@ -159,7 +159,8 @@ void KVNC::openConnection( void ) void KVNC::openConnection( QListBoxItem * item) { - openConnection(item->text()); + if (item) + openConnection(item->text()); } void KVNC::setupActions() -- cgit v0.9.0.2