diff options
author | David Schulz <david.schulz@qt.io> | 2020-02-26 08:50:43 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2020-02-26 08:18:58 +0000 |
commit | 1f37eaa26585263f528d40aeaa6589f17ebe263d (patch) | |
tree | 27d4f4ab6fb278e462bbc784f6c4ed4794221955 /src/plugins/clangcodemodel | |
parent | 4cd4316a16c15cb0344ddd2bc84f43483913340c (diff) | |
download | qt-creator-1f37eaa26585263f528d40aeaa6589f17ebe263d.tar.gz |
Editor: Fix crash in codeassist
We have to report back to the code assistant even if we have no results.
Otherwise the processors aren't correctly reset and may be called after
deletion.
Change-Id: Id7af2e0ee9f631efc00beb2a84bfe1824e138d24
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/clangcodemodel')
-rw-r--r-- | src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp index 09f5ee9507..592f7c8795 100644 --- a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp +++ b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp @@ -215,8 +215,11 @@ void ClangCompletionAssistProcessor::handleAvailableCompletions(const CodeComple return; } - if (!m_fallbackToNormalCompletion) + if (!m_fallbackToNormalCompletion) { + // We must report back to the code assistant under all circumstances + setAsyncProposalAvailable(nullptr); return; + } // else: Proceed with a normal completion in case: // 1) it was not a function call, but e.g. a function declaration like "void f(" // 2) '{' meant not a constructor call. |