Utils: Add formatting information to ChangeSet::EditOp

... and make use of that in TextEditor::RefactoringFile.
This allows calling code to have fine-grained control over which parts of
a refactoring should get re-formatted, while also providing sensible
default values that are "almost always" right, so things typically work
as expected out of the box.

Change-Id: I9200c2135b7477c33bc5a61c5d410b34853e4b61
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2023-11-22 16:21:56 +01:00
parent 0e04f40fa7
commit 3b7d29d2a1
9 changed files with 113 additions and 80 deletions

View File

@@ -294,7 +294,7 @@ void QuickToolBar::setProperty(const QString &propertyName, const QVariant &valu
int column;
int changeSetPos = changeSet.operationList().constLast().pos1;
int changeSetLength = changeSet.operationList().constLast().text.length();
int changeSetLength = changeSet.operationList().constLast().text().length();
QTextCursor tc = m_editorWidget->textCursor();
tc.beginEditBlock();
changeSet.apply(&tc);