Editor: pass AssistInterface to createProcessor

The interface can be used for checking the context of a codeassist
request to determine
the correct processor that has to be created.

Change-Id: I47ddb05c46399566e27bae21711f11a3a4132c3f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2021-09-15 07:04:12 +02:00
parent 897d3349fa
commit 4324f3e8c1
38 changed files with 48 additions and 42 deletions

View File

@@ -880,7 +880,7 @@ void QmlJSEditorWidget::contextMenuEvent(QContextMenuEvent *e)
AssistInterface *interface = createAssistInterface(QuickFix, ExplicitlyInvoked);
if (interface) {
QScopedPointer<IAssistProcessor> processor(
Internal::QmlJSEditorPlugin::quickFixAssistProvider()->createProcessor());
Internal::QmlJSEditorPlugin::quickFixAssistProvider()->createProcessor(interface));
QScopedPointer<IAssistProposal> proposal(processor->perform(interface));
if (!proposal.isNull()) {
GenericProposalModelPtr model = proposal->model().staticCast<GenericProposalModel>();