forked from qt-creator/qt-creator
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: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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);
|
||||
implFile->setChangeSet(implChanges);
|
||||
implFile->appendIndentRange(
|
||||
|
Reference in New Issue
Block a user