Skip to content

Commit

Permalink
ClangCodeModel: Adapt to updated clangd tooltip format
Browse files Browse the repository at this point in the history
The header file path is not the last line anymore;
see https://reviews.llvm.org/D146244.

Change-Id: Ifbc2b55c0a82c661454d487c287fe4fb5a950d38
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
  • Loading branch information
ckandeler committed Apr 4, 2023
1 parent 0319542 commit 3c0c26f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/plugins/clangcodemodel/clangdclient.cpp
Expand Up @@ -1069,9 +1069,8 @@ void ClangdClient::gatherHelpItemForTooltip(const HoverRequest::Response &hoverR
QString cleanString = markupString;
cleanString.remove('`');
const QStringList lines = cleanString.trimmed().split('\n');
if (!lines.isEmpty()) {
const auto markupFilePath = Utils::FilePath::fromUserInput(
lines.last().simplified());
for (const QString &line : lines) {
const auto markupFilePath = Utils::FilePath::fromUserInput(line.simplified());
if (markupFilePath.exists()) {
d->setHelpItemForTooltip(hoverResponse.id(),
filePath,
Expand Down

0 comments on commit 3c0c26f

Please sign in to comment.