# HG changeset patch # User Torsten # Date 1424010699 -3600 # Node ID 7a57d85760765fbaa7574ea685dcac393f2f6c99 # Parent 788d1b951eb39bc23da3c54856d2157aa10b78c8 remove event filter catching Alt+... from unix terminal (bug_#44254) * TerminalView.cc (event): removed event filter * TerminalView.h (event): removed event filter diff -r 788d1b951eb3 -r 7a57d8576076 libgui/qterminal/libqterminal/unix/TerminalView.cpp --- a/libgui/qterminal/libqterminal/unix/TerminalView.cpp Sun Feb 15 15:01:05 2015 +0100 +++ b/libgui/qterminal/libqterminal/unix/TerminalView.cpp Sun Feb 15 15:31:39 2015 +0100 @@ -2439,45 +2439,6 @@ return QVariant(); } -bool TerminalView::event( QEvent *e ) -{ - if ( e->type() == QEvent::ShortcutOverride ) - { - QKeyEvent* keyEvent = static_cast( e ); - - // a check to see if keyEvent->text() is empty is used - // to avoid intercepting the press of the modifier key on its own. - // - // this is important as it allows a press and release of the Alt key - // on its own to focus the menu bar, making it possible to - // work with the menu without using the mouse - if ( (keyEvent->modifiers() == Qt::AltModifier) && - !keyEvent->text().isEmpty() ) - { - keyEvent->accept(); - return true; - } - - // Override any of the following shortcuts because - // they are needed by the terminal - int keyCode = keyEvent->key() | keyEvent->modifiers(); - switch ( keyCode ) - { - // list is taken from the QLineEdit::event() code - case Qt::Key_Tab: - case Qt::Key_Delete: - case Qt::Key_Home: - case Qt::Key_End: - case Qt::Key_Backspace: - case Qt::Key_Left: - case Qt::Key_Right: - keyEvent->accept(); - return true; - } - } - return QWidget::event( e ); -} - void TerminalView::setBellMode(int mode) { _bellMode=mode; diff -r 788d1b951eb3 -r 7a57d8576076 libgui/qterminal/libqterminal/unix/TerminalView.h --- a/libgui/qterminal/libqterminal/unix/TerminalView.h Sun Feb 15 15:01:05 2015 +0100 +++ b/libgui/qterminal/libqterminal/unix/TerminalView.h Sun Feb 15 15:31:39 2015 +0100 @@ -490,8 +490,6 @@ protected: - virtual bool event( QEvent * ); - virtual void paintEvent( QPaintEvent * ); void focusInEvent(QFocusEvent *focusEvent);