forked from qt-creator/qt-creator
TextEditor: Add a convenience overload for RefactoringFile::apply()
... and make use of it. In most contexts, apply() immediately follows setChangeSet(), so combining the two can save a lot of code on the call site. Change-Id: I421001bd47000cb64678a57b19760becf59a4863 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -897,10 +897,8 @@ void QmlOutlineModel::reparentNodes(QmlOutlineItem *targetItem, int row, QList<Q
|
||||
changedRanges << range;
|
||||
}
|
||||
|
||||
QmlJSRefactoringChanges refactoring(ModelManagerInterface::instance(), m_semanticInfo.snapshot);
|
||||
TextEditor::RefactoringFilePtr file = refactoring.file(m_semanticInfo.document->fileName());
|
||||
file->setChangeSet(changeSet);
|
||||
file->apply();
|
||||
QmlJSRefactoringChanges(ModelManagerInterface::instance(), m_semanticInfo.snapshot)
|
||||
.file(m_semanticInfo.document->fileName())->apply(changeSet);
|
||||
}
|
||||
|
||||
void QmlOutlineModel::moveObjectMember(AST::Node *toMove,
|
||||
|
||||
Reference in New Issue
Block a user