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)
#else
d->m_contentsChanged = false;
#endif
switch (e->type()) {
case QEvent::ShortcutOverride:
if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape && d->m_snippetOverlay->isVisible()) {
e->accept();
return true;
}
e->ignore(); // we are a really nice citizen
if (e->type() == QEvent::ShortcutOverride
&& static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape
&& d->m_snippetOverlay->isVisible()) {
e->accept();
return true;
break;
default:
break;
}
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