CppEditor: Make more use of CppQuickFixInterface::currentFile()

As in 5cc44b8cab, this time with the non-
trivial cases.

Change-Id: I48c3f27c83903457473afa6175c8522d2ff23f96
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2024-05-28 13:29:31 +02:00
parent 0e301004b8
commit 0fffe1058d
6 changed files with 31 additions and 35 deletions

View File

@@ -767,8 +767,7 @@ public:
printer.showTemplateParameters = true;
Utils::ChangeSet headerChangeSet;
const CppRefactoringChanges refactoring(snapshot());
const Utils::FilePath filePath = currentFile()->filePath();
const CppRefactoringFilePtr headerFile = refactoring.cppFile(filePath);
const CppRefactoringFilePtr headerFile = currentFile();
const LookupContext targetContext(headerFile->cppDocument(), snapshot());
const Class *targetClass = m_classAST->symbol;