Mercurial > octave-nkf
changeset 19750:7a57d8576076
remove event filter catching Alt+... from unix terminal (bug_#44254)
* TerminalView.cc (event): removed event filter
* TerminalView.h (event): removed event filter
author | Torsten <ttl@justmail.de> |
---|---|
date | Sun, 15 Feb 2015 15:31:39 +0100 |
parents | 788d1b951eb3 |
children | 606b05352351 |
files | libgui/qterminal/libqterminal/unix/TerminalView.cpp libgui/qterminal/libqterminal/unix/TerminalView.h |
diffstat | 2 files changed, 0 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- 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<QKeyEvent *>( 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;
--- 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);