forked from qt-creator/qt-creator
ClangRefactoring: use sourceUsagesAt instead of locationsAt
Change-Id: I085b243b6e0ea4b786ce5c5f5a6894345f9d87eb Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -98,15 +98,7 @@ CppTools::Usages RefactoringEngine::locationsAt(const CppTools::CursorInEditor &
|
||||
|
||||
const QByteArray filePath = data.filePath().toString().toLatin1();
|
||||
const ClangBackEnd::FilePathId filePathId = m_filePathCache.filePathId(filePath.constData());
|
||||
ClangRefactoring::SourceLocations usages = m_symbolQuery.locationsAt(filePathId, line,
|
||||
column + 1);
|
||||
CppTools::Usages result;
|
||||
result.reserve(usages.size());
|
||||
for (const auto &location : usages) {
|
||||
const Utils::SmallStringView path = m_filePathCache.filePath(location.filePathId).path();
|
||||
result.push_back({path, location.line, location.column});
|
||||
}
|
||||
return result;
|
||||
return m_symbolQuery.sourceUsagesAt(filePathId, line, column + 1);
|
||||
}
|
||||
|
||||
void RefactoringEngine::globalRename(const CppTools::CursorInEditor &data,
|
||||
|
||||
Reference in New Issue
Block a user