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:
David Schulz
2018-11-20 07:45:22 +01:00
parent f73ed6bb54
commit e52ea7771f
8 changed files with 17 additions and 22 deletions

View File

@@ -273,7 +273,7 @@ public:
bool needsRestart() const override { return true; }
private:
void handleCompletionResponse(const Response<CompletionResult, LanguageClientNull> &response);
void handleCompletionResponse(const CompletionRequest::Response &response);
QPointer<QTextDocument> m_document;
QPointer<BaseClient> m_client;
@@ -343,7 +343,7 @@ bool LanguageClientCompletionAssistProcessor::running()
}
void LanguageClientCompletionAssistProcessor::handleCompletionResponse(
const Response<CompletionResult, LanguageClientNull> &response)
const CompletionRequest::Response &response)
{
using namespace TextEditor;
qCDebug(LOGLSPCOMPLETION) << QTime::currentTime() << " : got completions";