From 912318e213947c270d517c9c8741ad3d2476ac3c Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 28 Jul 2000 13:09:02 +0000 Subject: [PATCH] Well, this works quite well in fact. Fixed #6843 and #6845. Tab doesn't go out of the konsole part anymore, but it goes into it, and Shift+Tab goes in and out. I hope this doesn't affect konsole itself - I can't see how it would. svn path=/trunk/kdebase/konsole/; revision=59064 --- include/TEWidget.h | 1 + src/TEWidget.C | 8 ++++++++ src/konsole_part.C | 1 - 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/TEWidget.h b/include/TEWidget.h index 5bc430ef..80629177 100644 --- a/include/TEWidget.h +++ b/include/TEWidget.h @@ -107,6 +107,7 @@ protected: void focusInEvent( QFocusEvent * ); void focusOutEvent( QFocusEvent * ); + bool focusNextPrevChild( bool next ); // Dnd void dragEnterEvent(QDragEnterEvent* event); void dropEvent(QDropEvent* event); diff --git a/src/TEWidget.C b/src/TEWidget.C index d312702a..bb287821 100644 --- a/src/TEWidget.C +++ b/src/TEWidget.C @@ -824,6 +824,14 @@ void TEWidget::focusOutEvent( QFocusEvent * ) // do nothing, to prevent repainting } +bool TEWidget::focusNextPrevChild( bool next ) +{ + if (next) + return false; // This disables changing the active part in konqueror + // when pressing Tab + return QFrame::focusNextPrevChild( next ); +} + int TEWidget::charClass(char ch) const { diff --git a/src/konsole_part.C b/src/konsole_part.C index 39e08190..bfd88266 100644 --- a/src/konsole_part.C +++ b/src/konsole_part.C @@ -110,7 +110,6 @@ konsolePart::konsolePart(QWidget *parentWidget, const char *widgetName, QObject if (shell == NULL || *shell == '\0') shell = "/bin/sh"; eargs.append(shell); te = new TEWidget(parentWidget,widgetName); - te->setFocusPolicy(QWidget::ClickFocus); te->setMinimumSize(150,70); // allow resizing, cause resize in TEWidget te->setScrollbarLocation(TEWidget::SCRRIGHT); setWidget(te);