diff options
Diffstat (limited to 'src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp')
-rw-r--r-- | src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp index 84bcaa8357..e0023976c0 100644 --- a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp +++ b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp @@ -190,12 +190,16 @@ bool FunctionHintProposalWidget::eventFilter(QObject *obj, QEvent *e) { switch (e->type()) { case QEvent::ShortcutOverride: - if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape) + if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape) { d->m_escapePressed = true; + e->accept(); + } break; case QEvent::KeyPress: - if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape) + if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape) { d->m_escapePressed = true; + e->accept(); + } if (d->m_model->size() > 1) { QKeyEvent *ke = static_cast<QKeyEvent*>(e); if (ke->key() == Qt::Key_Up) { @@ -211,6 +215,7 @@ bool FunctionHintProposalWidget::eventFilter(QObject *obj, QEvent *e) case QEvent::KeyRelease: if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape && d->m_escapePressed) { abort(); + emit explicitlyAborted(); return false; } d->m_assistant->notifyChange(); |