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
......@@ -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());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment