TextEditor: Split the global QuickFixFactory list

It's only ever used in the filtered Cpp/QmlJs variants. Splitting
the class simplifies the code and avoids re-doing filtering over
and over again.

Also inline QuickFixFactory::matchingOperations() into callers

Change-Id: I730756315f2e0321649259ef229631233b12fbdd
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2017-12-15 15:46:37 +01:00
parent 4ed12d95f8
commit 479ab4ef22
10 changed files with 88 additions and 102 deletions

View File

@@ -76,14 +76,13 @@ private:
QmlJSQuickFixInterface m_interface;
};
class QmlJSQuickFixFactory: public TextEditor::QuickFixFactory
class QmlJSQuickFixFactory: public QObject
{
Q_OBJECT
protected:
QmlJSQuickFixFactory() {}
void matchingOperations(const QuickFixInterface &interface, QuickFixOperations &result);
public:
QmlJSQuickFixFactory();
~QmlJSQuickFixFactory();
/*!
Implement this function to match and create the appropriate