Commit 36552d17 authored by David Schulz's avatar David Schulz

Pass ShortcutOverride events to base class in BaseTextEditorWidget.

Task-number: QTCREATORBUG-9820
Change-Id: I34493bf655cc2c5bc21d6dadbe2cf668093cfa0a
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 523276bb
...@@ -2061,19 +2061,12 @@ bool BaseTextEditorWidget::event(QEvent *e) ...@@ -2061,19 +2061,12 @@ bool BaseTextEditorWidget::event(QEvent *e)
#else #else
d->m_contentsChanged = false; d->m_contentsChanged = false;
#endif #endif
switch (e->type()) { if (e->type() == QEvent::ShortcutOverride
case QEvent::ShortcutOverride: && static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape
if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape && d->m_snippetOverlay->isVisible()) { && d->m_snippetOverlay->isVisible()) {
e->accept(); e->accept();
return true;
}
e->ignore(); // we are a really nice citizen
return true; return true;
break;
default:
break;
} }
return QPlainTextEdit::event(e); return QPlainTextEdit::event(e);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment