forked from qt-creator/qt-creator
LSP: move templated register function to JsonRpcMessageHandler
Change-Id: Iaabc994c610842b39e61b249d9ca34b029895aae Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -71,19 +71,10 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
void registerMessageProvider()
|
||||
{
|
||||
JsonRpcMessageHandler::registerMessageProvider(T::methodName,
|
||||
[](const QJsonObject &object){
|
||||
return new T(object);
|
||||
});
|
||||
}
|
||||
|
||||
LanguageClientManager::LanguageClientManager()
|
||||
{
|
||||
registerMessageProvider<PublishDiagnosticsNotification>();
|
||||
registerMessageProvider<LogMessageNotification>();
|
||||
JsonRpcMessageHandler::registerMessageProvider<PublishDiagnosticsNotification>();
|
||||
JsonRpcMessageHandler::registerMessageProvider<LogMessageNotification>();
|
||||
managerInstance = this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user