summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2019-01-10 11:17:52 +0100
committerDavid Schulz <david.schulz@qt.io>2019-01-17 06:38:53 +0000
commitfb73d1764cbdfb0ec91c7a6fd90416a765c6f831 (patch)
tree97904a97f30b86612e2fdd28f56d7386def3dc26
parent128a33548badc3cdc1b5658e31115d4a4db95135 (diff)
downloadqt-creator-fb73d1764cbdfb0ec91c7a6fd90416a765c6f831.tar.gz
LSP: Fix setting null parameter in notifications
Even though it doesn't contain anything it still need to be set, because some of the server require the parameter:Null value inside the notification. Change-Id: I94b0a178b451e4bd78bbe2857faeeeab3c4e00e8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/libs/languageserverprotocol/jsonrpcmessages.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/languageserverprotocol/jsonrpcmessages.h b/src/libs/languageserverprotocol/jsonrpcmessages.h
index 3ce5547443..66c28bea4b 100644
--- a/src/libs/languageserverprotocol/jsonrpcmessages.h
+++ b/src/libs/languageserverprotocol/jsonrpcmessages.h
@@ -136,7 +136,10 @@ class Notification<std::nullptr_t> : public JsonRpcMessage
public:
Notification() : Notification(QString()) {}
Notification(const QString &methodName, const std::nullptr_t &/*params*/ = nullptr)
- { setMethod(methodName); }
+ {
+ setMethod(methodName);
+ setParams(nullptr);
+ }
using JsonRpcMessage::JsonRpcMessage;
QString method() const