forked from qt-creator/qt-creator
LSP: simplify request response type
Instead of always defining the templates of the response type by hand add a using construct in the Request where all the template types are known. Change-Id: I0dc00bd9aef9c37c9454e35aca200a30fcf2ebda Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -324,7 +324,7 @@ void LanguageClientManager::findLinkAt(const Utils::FileName &filePath,
|
||||
const Position pos(cursor);
|
||||
TextDocumentPositionParams params(document, pos);
|
||||
GotoDefinitionRequest request(params);
|
||||
request.setResponseCallback([callback](const Response<GotoResult, LanguageClientNull> &response){
|
||||
request.setResponseCallback([callback](const GotoDefinitionRequest::Response &response){
|
||||
if (Utils::optional<GotoResult> _result = response.result()) {
|
||||
const GotoResult result = _result.value();
|
||||
if (Utils::holds_alternative<std::nullptr_t>(result))
|
||||
|
||||
Reference in New Issue
Block a user