forked from qt-creator/qt-creator
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:
@@ -1122,7 +1122,8 @@ static void addRefactoringActions(QMenu *menu, AssistInterface *iface)
|
||||
using Processor = QScopedPointer<IAssistProcessor>;
|
||||
using Proposal = QScopedPointer<IAssistProposal>;
|
||||
|
||||
const Processor processor(CppEditorPlugin::instance()->quickFixProvider()->createProcessor());
|
||||
const Processor processor(
|
||||
CppEditorPlugin::instance()->quickFixProvider()->createProcessor(iface));
|
||||
const Proposal proposal(processor->perform(iface)); // OK, perform() takes ownership of iface.
|
||||
if (proposal) {
|
||||
auto model = proposal->model().staticCast<GenericProposalModel>();
|
||||
|
||||
Reference in New Issue
Block a user