forked from qt-creator/qt-creator
Utils: add convenience function to ChangeSet
Creating a QTextCursor just for the ChangeSet gives no benefit for the calling code, but reduces the readability. Change-Id: I34acb6083b6f7ab54fce042e29cd6e80498338ef Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -318,8 +318,7 @@ void QuickToolBar::removeProperty(const QString &propertyName)
|
||||
Utils::ChangeSet changeSet;
|
||||
Rewriter rewriter(m_doc->source(), &changeSet, m_propertyOrder);
|
||||
rewriter.removeBindingByName(initializer, propertyName);
|
||||
QTextCursor tc(m_editorWidget->document());
|
||||
changeSet.apply(&tc);
|
||||
changeSet.apply(m_editorWidget->document());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user