diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2023-11-30 17:21:44 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2023-12-01 13:43:33 +0000 |
commit | 73f8854263d382efc5ec30b13bd152b6bdcb102c (patch) | |
tree | 1a64a642b934d90a04c254e93970a89ce96fc9ef /src/plugins/clangcodemodel | |
parent | 5d14e580ea7bea3782247ea438e9660d2b9c99eb (diff) |
ClangCodeModel: Fix following virtual functions
Don't indirectly trigger the regular callback once the proposal widget
was shown.
Amends 09e495f01a6ef1592b51dde08f459fadafaa9e05.
Change-Id: I9d2411f88c69488d63462318f48cef4a0eeeaed1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/clangcodemodel')
-rw-r--r-- | src/plugins/clangcodemodel/clangdfollowsymbol.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp index aa3f2e69ab..701b72d58b 100644 --- a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp +++ b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp @@ -39,11 +39,11 @@ public: VirtualFunctionAssistProcessor(ClangdFollowSymbol *followSymbol) : m_followSymbol(followSymbol) {} - void cancel() override { resetData(true); } + void cancel() override { resetData(); } bool running() override { return m_followSymbol && m_running; } void update(); void finalize(); - void resetData(bool resetFollowSymbolData); + void resetData(); private: IAssistProposal *perform() override @@ -228,7 +228,7 @@ void ClangdFollowSymbol::Private::cancel() { closeTempDocuments(); if (virtualFuncAssistProcessor) - virtualFuncAssistProcessor->resetData(false); + virtualFuncAssistProcessor->resetData(); for (const MessageId &id : std::as_const(pendingSymbolInfoRequests)) client->cancelRequest(id); for (const MessageId &id : std::as_const(pendingGotoImplRequests)) @@ -301,16 +301,14 @@ void ClangdFollowSymbol::VirtualFunctionAssistProcessor::finalize() } else { setAsyncProposalAvailable(proposal); } - resetData(true); + resetData(); } -void ClangdFollowSymbol::VirtualFunctionAssistProcessor::resetData(bool resetFollowSymbolData) +void ClangdFollowSymbol::VirtualFunctionAssistProcessor::resetData() { if (!m_followSymbol) return; m_followSymbol->d->virtualFuncAssistProcessor = nullptr; - if (resetFollowSymbolData) - m_followSymbol->emitDone(); m_followSymbol = nullptr; } |