diff options
author | David Schulz <david.schulz@qt.io> | 2020-06-10 11:00:40 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2020-06-10 10:50:21 +0000 |
commit | bd432c2c8a319b61e7fb1b51785103db6128cd65 (patch) | |
tree | cc997f38e304ad871832000d58280c4707145334 | |
parent | 443f2bae50514124c444603418c6d8738e8b88ef (diff) | |
download | qt-creator-bd432c2c8a319b61e7fb1b51785103db6128cd65.tar.gz |
TextEditor: fix updating completions after cursor navigation
Notify the assistant that something has changed after cursor movement
shortcuts.
Task-number: QTCREATORBUG-24077
Fixes: QTCREATORBUG-24071
Change-Id: Ic956c08140c47a8edc9603227008062a7ab95fa0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r-- | src/plugins/texteditor/codeassist/genericproposalwidget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp index 241a98951d..a8b770b815 100644 --- a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp +++ b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp @@ -641,7 +641,10 @@ bool GenericProposalWidget::eventFilter(QObject *o, QEvent *e) case Qt::Key_End: case Qt::Key_Backspace: // We want these navigation keys to work in the editor. - break; + QApplication::sendEvent(const_cast<QWidget *>(d->m_underlyingWidget), e); + if (isVisible()) + d->m_assistant->notifyChange(); + return true; default: // Only forward keys that insert text and refine the completion. |