Skip to content
Snippets Groups Projects
Commit 588bc1f7 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

CPPEditor: Fixed invalid location in refactoring action.

Reviewed-by: Roberto Raggi
parent 87250689
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,9 @@ public:
void performChanges(CppRefactoringFile *, CppRefactoringChanges *refactoring)
{
InsertionPointLocator locator(state().snapshot());
Snapshot snapshot = state().snapshot();
snapshot.insert(refactoring->file(m_targetFileName).cppDocument());
InsertionPointLocator locator(snapshot);
const InsertionLocation loc = locator.methodDeclarationInClass(
m_targetFileName, m_targetSymbol, m_xsSpec);
Q_ASSERT(loc.isValid());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment