forked from qt-creator/qt-creator
Fix changing "#include" lines after file renaming
Didn't work if there was any folded text before the #include. Change-Id: I8f16205f06bfaa8b8541401a9ebd5995c15b2227 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
5eb8fe0306
commit
307061032c
@@ -1113,7 +1113,7 @@ void CppModelManager::renameIncludes(const QString &oldFileName, const QString &
|
||||
|
||||
foreach (Snapshot::IncludeLocation loc, snapshot().includeLocationsOfDocument(oldFileName)) {
|
||||
TextEditor::RefactoringFilePtr file = changes.file(loc.first->fileName());
|
||||
const QTextBlock &block = file->document()->findBlockByLineNumber(loc.second - 1);
|
||||
const QTextBlock &block = file->document()->findBlockByNumber(loc.second - 1);
|
||||
const int replaceStart = block.text().indexOf(oldFileInfo.fileName());
|
||||
if (replaceStart > -1) {
|
||||
Utils::ChangeSet changeSet;
|
||||
|
Reference in New Issue
Block a user