diff options
author | David Schulz <david.schulz@qt.io> | 2022-11-09 15:38:22 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2022-11-14 13:02:51 +0000 |
commit | 09ee528c40de17401487974dae5ce708079ac8ad (patch) | |
tree | 6dae9a77cb60b6c3e16a1f0fbd99ad465b40b73b /src/plugins/glsleditor | |
parent | 33a33612c8ff92bb541d76cb338675f16beb4281 (diff) |
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>
Diffstat (limited to 'src/plugins/glsleditor')
-rw-r--r-- | src/plugins/glsleditor/glslcompletionassist.cpp | 2 | ||||
-rw-r--r-- | src/plugins/glsleditor/glslcompletionassist.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/glsleditor/glslcompletionassist.cpp b/src/plugins/glsleditor/glslcompletionassist.cpp index 52a7951a40..cc170b1b0e 100644 --- a/src/plugins/glsleditor/glslcompletionassist.cpp +++ b/src/plugins/glsleditor/glslcompletionassist.cpp @@ -290,7 +290,7 @@ static AssistProposalItem *createCompletionItem(const QString &text, const QIcon return item; } -IAssistProposal *GlslCompletionAssistProcessor::perform(const AssistInterface *interface) +IAssistProposal *GlslCompletionAssistProcessor::performAsync(AssistInterface *interface) { m_interface.reset(static_cast<const GlslCompletionAssistInterface *>(interface)); diff --git a/src/plugins/glsleditor/glslcompletionassist.h b/src/plugins/glsleditor/glslcompletionassist.h index 7791eb7833..ea7c4561d5 100644 --- a/src/plugins/glsleditor/glslcompletionassist.h +++ b/src/plugins/glsleditor/glslcompletionassist.h @@ -5,12 +5,12 @@ #include "glsleditor.h" +#include <texteditor/codeassist/assistinterface.h> +#include <texteditor/codeassist/asyncprocessor.h> #include <texteditor/codeassist/completionassistprovider.h> #include <texteditor/codeassist/iassistprocessor.h> -#include <texteditor/codeassist/assistinterface.h> #include <texteditor/codeassist/ifunctionhintproposalmodel.h> - #include <QScopedPointer> #include <QSharedPointer> @@ -67,12 +67,12 @@ public: bool isActivationCharSequence(const QString &sequence) const override; }; -class GlslCompletionAssistProcessor : public TextEditor::IAssistProcessor +class GlslCompletionAssistProcessor : public TextEditor::AsyncProcessor { public: ~GlslCompletionAssistProcessor() override; - TextEditor::IAssistProposal *perform(const TextEditor::AssistInterface *interface) override; + TextEditor::IAssistProposal *performAsync(TextEditor::AssistInterface *interface) override; private: TextEditor::IAssistProposal *createHintProposal(const QVector<GLSL::Function *> &symbols); |