forked from qt-creator/qt-creator
ClangCodeModel: Implement following a symbol to its type
Making use of LSP's "Go To Type Definition". Just the backend for now, UI to follow. Change-Id: Id73b2cf701eab03913477f6d4d3093e257e80dbd Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -822,6 +822,7 @@ void ClangdClient::followSymbol(TextDocument *document,
|
||||
CppEditor::CppEditorWidget *editorWidget,
|
||||
const Utils::LinkHandler &callback,
|
||||
bool resolveTarget,
|
||||
FollowTo followTo,
|
||||
bool openInSplit
|
||||
)
|
||||
{
|
||||
@@ -839,7 +840,7 @@ void ClangdClient::followSymbol(TextDocument *document,
|
||||
qCDebug(clangdLog) << "follow symbol requested" << document->filePath()
|
||||
<< adjustedCursor.blockNumber() << adjustedCursor.positionInBlock();
|
||||
d->followSymbol = new ClangdFollowSymbol(this, adjustedCursor, editorWidget, document, callback,
|
||||
openInSplit);
|
||||
followTo, openInSplit);
|
||||
connect(d->followSymbol, &ClangdFollowSymbol::done, this, [this] {
|
||||
d->followSymbol->deleteLater();
|
||||
d->followSymbol = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user