Commit 4f1e892f authored by Lorenz Haas's avatar Lorenz Haas Committed by hjk
Browse files

Fix insert position for refactoring getter and setter functions

If the cpp file had unsaved changes (newlines at top or in the middle)
the inserted getter and setter functions were misplaced.

Change-Id: I15129df2c0bdb91e6fb5e22213e7b4f52733c6ae
Reviewed-by: default avatarhjk <>
parent adc7d65c
......@@ -567,7 +567,7 @@ public:
CppRefactoringChanges implRefactoring(snapshot());
CppRefactoringFilePtr implFile = implRefactoring.file(implFileName);
ChangeSet implChanges;
const int implInsertPos = QFileInfo(implFileName).size();
const int implInsertPos = implFile->document()->characterCount() - 1;
implChanges.insert(implInsertPos, implementation);
Supports Markdown
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