CppEditor: Format code inserted by quickfixes

Task-number: QTCREATORBUG-10807
Task-number: QTCREATORBUG-19158
Change-Id: Ieac52e1a1a10afad91fea56290e7dcfd1d302e7f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2023-06-26 16:01:57 +02:00
parent 4a51f57aa2
commit 9f6878ddab
4 changed files with 112 additions and 7 deletions

View File

@@ -75,15 +75,20 @@ CppRefactoringFile::CppRefactoringFile(const FilePath &filePath, const QSharedPo
{
const Snapshot &snapshot = this->data()->m_snapshot;
m_cppDocument = snapshot.document(filePath);
m_formattingEnabled = true;
}
CppRefactoringFile::CppRefactoringFile(QTextDocument *document, const FilePath &filePath)
: RefactoringFile(document, filePath)
{ }
{
m_formattingEnabled = true;
}
CppRefactoringFile::CppRefactoringFile(TextEditor::TextEditorWidget *editor)
: RefactoringFile(editor)
{ }
{
m_formattingEnabled = true;
}
Document::Ptr CppRefactoringFile::cppDocument() const
{