forked from qt-creator/qt-creator
LanguageClient: Use Utils::FilePath to get file content
Change-Id: Iddb2eb5c02f3e6674f1f71bb61fb1f13dec22794 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -489,8 +489,7 @@ void ClangdClient::Private::handleFindUsagesResult(quint64 key, const QList<Loca
|
||||
for (const Location &loc : locations) // TODO: Can contain duplicates. Rather fix in clang than work around it here.
|
||||
refData->fileData[loc.uri()].rangesAndLineText << qMakePair(loc.range(), QString()); // TODO: Can we assume that locations for the same file are grouped?
|
||||
for (auto it = refData->fileData.begin(); it != refData->fileData.end(); ++it) {
|
||||
const QStringList lines = SymbolSupport::getFileContents(
|
||||
it.key().toFilePath().toString());
|
||||
const QStringList lines = SymbolSupport::getFileContents(it.key().toFilePath());
|
||||
it->fileContent = lines.join('\n');
|
||||
for (auto &rangeWithText : it.value().rangesAndLineText) {
|
||||
const int lineNo = rangeWithText.first.start().line();
|
||||
|
||||
Reference in New Issue
Block a user