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:
@@ -233,7 +233,7 @@ public:
|
||||
} // end of anonymous namespace
|
||||
|
||||
|
||||
void ComponentFromObjectDef::match(const QmlJSQuickFixInterface &interface, QuickFixOperations &result)
|
||||
void matchComponentFromObjectDefQuickFix(const QmlJSQuickFixInterface &interface, QuickFixOperations &result)
|
||||
{
|
||||
const int pos = interface->currentFile()->cursor().position();
|
||||
|
||||
@@ -258,7 +258,7 @@ void ComponentFromObjectDef::match(const QmlJSQuickFixInterface &interface, Quic
|
||||
}
|
||||
}
|
||||
|
||||
void ComponentFromObjectDef::perform(const QString &fileName, QmlJS::AST::UiObjectDefinition *objDef)
|
||||
void performComponentFromObjectDef(const QString &fileName, QmlJS::AST::UiObjectDefinition *objDef)
|
||||
{
|
||||
QmlJSRefactoringChanges refactoring(QmlJS::ModelManagerInterface::instance(),
|
||||
QmlJS::ModelManagerInterface::instance()->snapshot());
|
||||
|
||||
Reference in New Issue
Block a user