CppEditor: add startGlobalRenaming

Existing built-in functionality is moved there.
Clang part is to be implemented later

Change-Id: I7595898495213c087243cd534b4ba1617b4c27e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2017-08-04 10:18:41 +02:00
parent c3c9fbfc44
commit 32b1244b2a
6 changed files with 20 additions and 2 deletions

View File

@@ -546,8 +546,10 @@ void CppEditorWidget::renameSymbolUnderCursor()
setExtraSelections(TextEditor::TextEditorWidget::CodeSemanticsSelection, selections);
d->m_localRenaming.updateSelectionsForVariableUnderCursor(selections);
}
if (!d->m_localRenaming.start()) // Rename local symbol
renameUsages(); // Rename non-local symbol or macro
if (!d->m_localRenaming.start()) {
refactoringEngine()->startGlobalRenaming(
CppTools::CursorInEditor{textCursor(), textDocument()->filePath(), this});
}
}
};