forked from qt-creator/qt-creator
QmlJSEditor: Create QuickFixes directly
So far there have been factories instantiated and maintained to get a list of 'matching' operation by iterating over the factories' match() functions. The same effect can be achieved more directly by calling stand-alone functions. Change-Id: I868489d36f9d8339e0d8855d832df8400501026c Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
@@ -34,8 +34,6 @@
|
||||
|
||||
#include <QSharedPointer>
|
||||
|
||||
namespace QmlJS { class ModelManagerInterface; }
|
||||
|
||||
namespace QmlJSEditor {
|
||||
|
||||
namespace Internal { class QmlJSQuickFixAssistInterface; }
|
||||
@@ -76,19 +74,6 @@ private:
|
||||
QmlJSQuickFixInterface m_interface;
|
||||
};
|
||||
|
||||
class QmlJSQuickFixFactory: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QmlJSQuickFixFactory();
|
||||
~QmlJSQuickFixFactory();
|
||||
|
||||
/*!
|
||||
Implement this function to match and create the appropriate
|
||||
QmlJSQuickFixOperation objects.
|
||||
*/
|
||||
virtual void match(const QmlJSQuickFixInterface &interface, TextEditor::QuickFixOperations &result) = 0;
|
||||
};
|
||||
TextEditor::QuickFixOperations findQmlJSQuickFixes(const TextEditor::AssistInterface *interface);
|
||||
|
||||
} // namespace QmlJSEditor
|
||||
|
||||
Reference in New Issue
Block a user