forked from qt-creator/qt-creator
LanguageClient: pass id as a const ref when handling client messages
Change-Id: I7ab6a7517d4dd0fe66f601661e7b3f6a7afb338b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -938,10 +938,10 @@ void Client::handleMessage(const BaseMessage &message)
|
||||
if (auto handler = m_contentHandler[message.mimeType]) {
|
||||
QString parseError;
|
||||
handler(message.content, message.codec, parseError,
|
||||
[this](MessageId id, const QByteArray &content, QTextCodec *codec){
|
||||
[this](const MessageId &id, const QByteArray &content, QTextCodec *codec){
|
||||
this->handleResponse(id, content, codec);
|
||||
},
|
||||
[this](const QString &method, MessageId id, const IContent *content){
|
||||
[this](const QString &method, const MessageId &id, const IContent *content){
|
||||
this->handleMethod(method, id, content);
|
||||
});
|
||||
if (!parseError.isEmpty())
|
||||
@@ -1072,7 +1072,7 @@ void Client::handleResponse(const MessageId &id, const QByteArray &content, QTex
|
||||
handler(content, codec);
|
||||
}
|
||||
|
||||
void Client::handleMethod(const QString &method, MessageId id, const IContent *content)
|
||||
void Client::handleMethod(const QString &method, const MessageId &id, const IContent *content)
|
||||
{
|
||||
ErrorHierarchy error;
|
||||
auto logError = [&](const JsonObject &content) {
|
||||
|
||||
Reference in New Issue
Block a user