forked from qt-creator/qt-creator
Revert "CodeAssist: Avoid pointless completion request after accepting item"
is replaced by23d63dcc8b
This reverts commit44b71f7a16
. Change-Id: Ib5adaab4a962a54495b48e6b88ab164046526c37 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -105,7 +105,6 @@ private:
|
||||
IAssistProposalWidget *m_proposalWidget = nullptr;
|
||||
QScopedPointer<IAssistProposal> m_proposal;
|
||||
bool m_receivedContentWhileWaiting = false;
|
||||
bool m_proposalItemProcessed = false;
|
||||
QTimer m_automaticProposalTimer;
|
||||
CompletionSettings m_settings;
|
||||
int m_abortedBasePosition = -1;
|
||||
@@ -194,13 +193,6 @@ void CodeAssistantPrivate::requestProposal(AssistReason reason,
|
||||
if (m_editorWidget->hasBlockSelection())
|
||||
return; // TODO
|
||||
|
||||
if (m_proposalItemProcessed
|
||||
&& reason == IdleEditor
|
||||
&& m_assistKind == TextEditor::Completion
|
||||
&& !identifyActivationSequence()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!provider) {
|
||||
if (kind == Completion)
|
||||
provider = m_editorWidget->textDocument()->completionAssistProvider();
|
||||
@@ -373,15 +365,6 @@ void CodeAssistantPrivate::processProposalItem(AssistProposalItemInterface *prop
|
||||
proposalItem->apply(manipulator, m_proposal->basePosition());
|
||||
destroyContext();
|
||||
m_editorWidget->encourageApply();
|
||||
m_proposalItemProcessed = true;
|
||||
|
||||
auto connection = std::make_shared<QMetaObject::Connection>();
|
||||
*connection = connect(m_editorWidget->textDocument(),
|
||||
&Core::IDocument::contentsChanged,
|
||||
this, [this, connection] {
|
||||
m_proposalItemProcessed = false;
|
||||
disconnect(*connection);
|
||||
});
|
||||
}
|
||||
|
||||
void CodeAssistantPrivate::handlePrefixExpansion(const QString &newPrefix)
|
||||
|
Reference in New Issue
Block a user