forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/13.0'
Conflicts: doc/qtcreator/src/overview/creator-only/creator-keyboard-shortcuts.qdoc Change-Id: I2db85da9f4a0593217951313020d71d430986961
This commit is contained in:
@@ -291,12 +291,17 @@ void ClangdFindReferences::Private::handleFindUsagesResult(const QList<Location>
|
||||
|
||||
for (const Location &loc : locations)
|
||||
fileData[loc.uri()].rangesAndLineText.push_back({loc.range(), {}});
|
||||
QSet<FilePath> canonicalFilePaths;
|
||||
for (auto it = fileData.begin(); it != fileData.end();) {
|
||||
const Utils::FilePath filePath = client()->serverUriToHostPath(it.key());
|
||||
if (!filePath.exists()) { // https://github.com/clangd/clangd/issues/935
|
||||
it = fileData.erase(it);
|
||||
continue;
|
||||
}
|
||||
if (!Utils::insert(canonicalFilePaths, filePath.canonicalPath())) { // QTCREATORBUG-30546
|
||||
it = fileData.erase(it);
|
||||
continue;
|
||||
}
|
||||
const QStringList lines = SymbolSupport::getFileContents(filePath);
|
||||
it->fileContent = lines.join('\n');
|
||||
for (auto &rangeWithText : it.value().rangesAndLineText) {
|
||||
|
||||
Reference in New Issue
Block a user