TextEditor: Dissolve QuickFixAssistProcessor

... into QuickFixAssistProcessor and QmlJSQuickFixAssistProcessor,
by essentially duplicating the class, but moving the actual work to
a new a GenericProposal::createProposal(...QuickFixOperations...)

Less indirection, and less code in total.

Change-Id: I2f8cba970bf587c9cbf04321269a60ed51bfae2a
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2017-12-15 10:36:16 +01:00
parent d47fdb934d
commit 6c537b35d5
14 changed files with 73 additions and 148 deletions

View File

@@ -27,6 +27,7 @@
#include "iassistproposal.h"
#include <texteditor/quickfix.h>
namespace TextEditor {
@@ -38,8 +39,12 @@ class TEXTEDITOR_EXPORT GenericProposal : public IAssistProposal
public:
GenericProposal(int cursorPos, GenericProposalModel *model);
GenericProposal(int cursorPos, const QList<AssistProposalItemInterface *> &items);
~GenericProposal();
static GenericProposal *createProposal(const AssistInterface *interface,
const QuickFixOperations &quickFixes);
bool hasItemsToPropose(const QString &prefix, AssistReason reason) const override;
IAssistProposalModel *model() const override;
IAssistProposalWidget *createWidget() const override;