forked from qt-creator/qt-creator
Editor: unify assist processor handling
Define the run type of the processor by its implementation instead of a enum value of the provider. The execution of a processor inside the assist now follows a unified procedure. Change-Id: Ibe9fab324c6072e77702c2663946d7a9f562a085 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -48,7 +48,6 @@ class LANGUAGECLIENT_EXPORT LanguageClientQuickFixProvider : public TextEditor::
|
||||
{
|
||||
public:
|
||||
explicit LanguageClientQuickFixProvider(Client *client);
|
||||
IAssistProvider::RunType runType() const override;
|
||||
TextEditor::IAssistProcessor *createProcessor(const TextEditor::AssistInterface *) const override;
|
||||
|
||||
protected:
|
||||
@@ -64,7 +63,7 @@ class LANGUAGECLIENT_EXPORT LanguageClientQuickFixAssistProcessor
|
||||
public:
|
||||
explicit LanguageClientQuickFixAssistProcessor(Client *client) : m_client(client) {}
|
||||
bool running() override { return m_currentRequest.has_value(); }
|
||||
TextEditor::IAssistProposal *perform(const TextEditor::AssistInterface *interface) override;
|
||||
TextEditor::IAssistProposal *perform(TextEditor::AssistInterface *interface) override;
|
||||
void cancel() override;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user