diff options
author | David Schulz <david.schulz@qt.io> | 2022-11-15 14:19:06 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2022-11-17 13:23:55 +0000 |
commit | 0e4b0a26d34c523463ea68b27caf69cbb89083f2 (patch) | |
tree | 51a8efe27b419a613a88b6f2497e7a701526b47a /src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp | |
parent | aa6633ca2157b686d5398e8a09f538c15089fd36 (diff) | |
download | qt-creator-0e4b0a26d34c523463ea68b27caf69cbb89083f2.tar.gz |
Editor: move ownership of assist interface to processor
This way the base class can manage the lifetime of the interface object
and it doesn't need to be done in each implementation of perform.
Change-Id: Ie1ce742e31b688a337533ee6c57d376146e25ace
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp b/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp index 485694688d..8b47f7fe5b 100644 --- a/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp +++ b/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp @@ -87,7 +87,7 @@ public: : m_params(params) {} - IAssistProposal *immediateProposal(AssistInterface *) override + IAssistProposal *immediateProposal() override { QTC_ASSERT(m_params.function, return nullptr); @@ -102,10 +102,8 @@ public: return new VirtualFunctionProposal(m_params.cursorPosition, items, m_params.openInNextSplit); } - IAssistProposal *performAsync(AssistInterface *assistInterface) override + IAssistProposal *performAsync() override { - delete assistInterface; - QTC_ASSERT(m_params.function, return nullptr); QTC_ASSERT(m_params.staticClass, return nullptr); QTC_ASSERT(!m_params.snapshot.isEmpty(), return nullptr); |