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:
@@ -19,12 +19,12 @@ using namespace ProjectExplorer;
|
||||
|
||||
namespace CMakeProjectManager::Internal {
|
||||
|
||||
class CMakeFileCompletionAssist : public TextEditor::KeywordsCompletionAssistProcessor
|
||||
class CMakeFileCompletionAssist : public KeywordsCompletionAssistProcessor
|
||||
{
|
||||
public:
|
||||
CMakeFileCompletionAssist();
|
||||
|
||||
TextEditor::IAssistProposal *perform(const TextEditor::AssistInterface *interface) final;
|
||||
IAssistProposal *performAsync(AssistInterface *interface) final;
|
||||
};
|
||||
|
||||
CMakeFileCompletionAssist::CMakeFileCompletionAssist() :
|
||||
@@ -34,7 +34,7 @@ CMakeFileCompletionAssist::CMakeFileCompletionAssist() :
|
||||
setDynamicCompletionFunction(&TextEditor::pathComplete);
|
||||
}
|
||||
|
||||
IAssistProposal *CMakeFileCompletionAssist::perform(const AssistInterface *interface)
|
||||
IAssistProposal *CMakeFileCompletionAssist::performAsync(AssistInterface *interface)
|
||||
{
|
||||
Keywords kw;
|
||||
const Utils::FilePath &filePath = interface->filePath();
|
||||
@@ -48,7 +48,7 @@ IAssistProposal *CMakeFileCompletionAssist::perform(const AssistInterface *inter
|
||||
}
|
||||
|
||||
setKeywords(kw);
|
||||
return KeywordsCompletionAssistProcessor::perform(interface);
|
||||
return KeywordsCompletionAssistProcessor::performAsync(interface);
|
||||
}
|
||||
|
||||
IAssistProcessor *CMakeFileCompletionAssistProvider::createProcessor(const AssistInterface *) const
|
||||
|
||||
Reference in New Issue
Block a user