forked from qt-creator/qt-creator
Editor: fix completion character completions
Cleanup the proposal after an item is activated even if the proposal widget is not visible anymore. Otherwise we might wrongly cleanup a proposal that was triggered by a completion character while a completion list was already open. Change-Id: Ie95247de09313c5816cffd9a865b05183db02354 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -485,9 +485,10 @@ void CodeAssistantPrivate::destroyContext()
|
|||||||
|
|
||||||
if (isWaitingForProposal()) {
|
if (isWaitingForProposal()) {
|
||||||
cancelCurrentRequest();
|
cancelCurrentRequest();
|
||||||
} else if (isDisplayingProposal()) {
|
} else if (m_proposalWidget) {
|
||||||
m_editorWidget->keepAutoCompletionHighlight(false);
|
m_editorWidget->keepAutoCompletionHighlight(false);
|
||||||
m_proposalWidget->closeProposal();
|
if (m_proposalWidget->isVisible())
|
||||||
|
m_proposalWidget->closeProposal();
|
||||||
disconnect(m_proposalWidget, &QObject::destroyed,
|
disconnect(m_proposalWidget, &QObject::destroyed,
|
||||||
this, &CodeAssistantPrivate::finalizeProposal);
|
this, &CodeAssistantPrivate::finalizeProposal);
|
||||||
finalizeProposal();
|
finalizeProposal();
|
||||||
|
Reference in New Issue
Block a user