1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4// this file was generated by the generate.ts script
5
6#include <QtLanguageServer/private/qlspnotifysignals_p.h>
7
8QT_BEGIN_NAMESPACE
9
10using namespace QLspSpecification;
11
12void QLspNotifySignals::registerHandlers(QLanguageServerProtocol *protocol)
13{
14
15 protocol->registerCancelNotificationHandler(
16 handler: [this, protocol](const QByteArray &method,
17 const QLspSpecification::Notifications::CancelParamsType &params) {
18 static const QMetaMethod notificationSignal =
19 QMetaMethod::fromSignal(signal: &QLspNotifySignals::receivedCancelNotification);
20 if (isSignalConnected(signal: notificationSignal))
21 emit receivedCancelNotification(params);
22 else
23 protocol->handleUndispatchedNotification(method, params);
24 });
25
26 protocol->registerInitializedNotificationHandler(
27 handler: [this,
28 protocol](const QByteArray &method,
29 const QLspSpecification::Notifications::InitializedParamsType &params) {
30 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
31 signal: &QLspNotifySignals::receivedInitializedNotification);
32 if (isSignalConnected(signal: notificationSignal))
33 emit receivedInitializedNotification(params);
34 else
35 protocol->handleUndispatchedNotification(method, params);
36 });
37
38 protocol->registerExitNotificationHandler(
39 handler: [this, protocol](const QByteArray &method,
40 const QLspSpecification::Notifications::ExitParamsType &params) {
41 static const QMetaMethod notificationSignal =
42 QMetaMethod::fromSignal(signal: &QLspNotifySignals::receivedExitNotification);
43 if (isSignalConnected(signal: notificationSignal))
44 emit receivedExitNotification(params);
45 else
46 protocol->handleUndispatchedNotification(method, params);
47 });
48
49 protocol->registerLogTraceNotificationHandler(
50 handler: [this, protocol](const QByteArray &method,
51 const QLspSpecification::Notifications::LogTraceParamsType &params) {
52 static const QMetaMethod notificationSignal =
53 QMetaMethod::fromSignal(signal: &QLspNotifySignals::receivedLogTraceNotification);
54 if (isSignalConnected(signal: notificationSignal))
55 emit receivedLogTraceNotification(params);
56 else
57 protocol->handleUndispatchedNotification(method, params);
58 });
59
60 protocol->registerSetTraceNotificationHandler(
61 handler: [this, protocol](const QByteArray &method,
62 const QLspSpecification::Notifications::SetTraceParamsType &params) {
63 static const QMetaMethod notificationSignal =
64 QMetaMethod::fromSignal(signal: &QLspNotifySignals::receivedSetTraceNotification);
65 if (isSignalConnected(signal: notificationSignal))
66 emit receivedSetTraceNotification(params);
67 else
68 protocol->handleUndispatchedNotification(method, params);
69 });
70
71 protocol->registerShowMessageNotificationHandler(
72 handler: [this,
73 protocol](const QByteArray &method,
74 const QLspSpecification::Notifications::ShowMessageParamsType &params) {
75 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
76 signal: &QLspNotifySignals::receivedShowMessageNotification);
77 if (isSignalConnected(signal: notificationSignal))
78 emit receivedShowMessageNotification(params);
79 else
80 protocol->handleUndispatchedNotification(method, params);
81 });
82
83 protocol->registerLogMessageNotificationHandler(
84 handler: [this, protocol](const QByteArray &method,
85 const QLspSpecification::Notifications::LogMessageParamsType &params) {
86 static const QMetaMethod notificationSignal =
87 QMetaMethod::fromSignal(signal: &QLspNotifySignals::receivedLogMessageNotification);
88 if (isSignalConnected(signal: notificationSignal))
89 emit receivedLogMessageNotification(params);
90 else
91 protocol->handleUndispatchedNotification(method, params);
92 });
93
94 protocol->registerWorkDoneProgressCancelNotificationHandler(
95 handler: [this,
96 protocol](const QByteArray &method,
97 const QLspSpecification::Notifications::WorkDoneProgressCancelParamsType
98 &params) {
99 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
100 signal: &QLspNotifySignals::receivedWorkDoneProgressCancelNotification);
101 if (isSignalConnected(signal: notificationSignal))
102 emit receivedWorkDoneProgressCancelNotification(params);
103 else
104 protocol->handleUndispatchedNotification(method, params);
105 });
106
107 protocol->registerTelemetryEventNotificationHandler(
108 handler: [this,
109 protocol](const QByteArray &method,
110 const QLspSpecification::Notifications::TelemetryEventParamsType &params) {
111 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
112 signal: &QLspNotifySignals::receivedTelemetryEventNotification);
113 if (isSignalConnected(signal: notificationSignal))
114 emit receivedTelemetryEventNotification(params);
115 else
116 protocol->handleUndispatchedNotification(method, params);
117 });
118
119 protocol->registerDidChangeWorkspaceFoldersNotificationHandler(
120 handler: [this,
121 protocol](const QByteArray &method,
122 const QLspSpecification::Notifications::DidChangeWorkspaceFoldersParamsType
123 &params) {
124 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
125 signal: &QLspNotifySignals::receivedDidChangeWorkspaceFoldersNotification);
126 if (isSignalConnected(signal: notificationSignal))
127 emit receivedDidChangeWorkspaceFoldersNotification(params);
128 else
129 protocol->handleUndispatchedNotification(method, params);
130 });
131
132 protocol->registerDidChangeConfigurationNotificationHandler(
133 handler: [this,
134 protocol](const QByteArray &method,
135 const QLspSpecification::Notifications::DidChangeConfigurationParamsType
136 &params) {
137 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
138 signal: &QLspNotifySignals::receivedDidChangeConfigurationNotification);
139 if (isSignalConnected(signal: notificationSignal))
140 emit receivedDidChangeConfigurationNotification(params);
141 else
142 protocol->handleUndispatchedNotification(method, params);
143 });
144
145 protocol->registerDidChangeWatchedFilesNotificationHandler(
146 handler: [this, protocol](const QByteArray &method,
147 const QLspSpecification::Notifications::DidChangeWatchedFilesParamsType
148 &params) {
149 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
150 signal: &QLspNotifySignals::receivedDidChangeWatchedFilesNotification);
151 if (isSignalConnected(signal: notificationSignal))
152 emit receivedDidChangeWatchedFilesNotification(params);
153 else
154 protocol->handleUndispatchedNotification(method, params);
155 });
156
157 protocol->registerCreateFilesNotificationHandler(
158 handler: [this,
159 protocol](const QByteArray &method,
160 const QLspSpecification::Notifications::CreateFilesParamsType &params) {
161 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
162 signal: &QLspNotifySignals::receivedCreateFilesNotification);
163 if (isSignalConnected(signal: notificationSignal))
164 emit receivedCreateFilesNotification(params);
165 else
166 protocol->handleUndispatchedNotification(method, params);
167 });
168
169 protocol->registerRenameFilesNotificationHandler(
170 handler: [this,
171 protocol](const QByteArray &method,
172 const QLspSpecification::Notifications::RenameFilesParamsType &params) {
173 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
174 signal: &QLspNotifySignals::receivedRenameFilesNotification);
175 if (isSignalConnected(signal: notificationSignal))
176 emit receivedRenameFilesNotification(params);
177 else
178 protocol->handleUndispatchedNotification(method, params);
179 });
180
181 protocol->registerDeleteFilesNotificationHandler(
182 handler: [this,
183 protocol](const QByteArray &method,
184 const QLspSpecification::Notifications::DeleteFilesParamsType &params) {
185 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
186 signal: &QLspNotifySignals::receivedDeleteFilesNotification);
187 if (isSignalConnected(signal: notificationSignal))
188 emit receivedDeleteFilesNotification(params);
189 else
190 protocol->handleUndispatchedNotification(method, params);
191 });
192
193 protocol->registerDidOpenTextDocumentNotificationHandler(
194 handler: [this, protocol](
195 const QByteArray &method,
196 const QLspSpecification::Notifications::DidOpenTextDocumentParamsType &params) {
197 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
198 signal: &QLspNotifySignals::receivedDidOpenTextDocumentNotification);
199 if (isSignalConnected(signal: notificationSignal))
200 emit receivedDidOpenTextDocumentNotification(params);
201 else
202 protocol->handleUndispatchedNotification(method, params);
203 });
204
205 protocol->registerDidChangeTextDocumentNotificationHandler(
206 handler: [this, protocol](const QByteArray &method,
207 const QLspSpecification::Notifications::DidChangeTextDocumentParamsType
208 &params) {
209 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
210 signal: &QLspNotifySignals::receivedDidChangeTextDocumentNotification);
211 if (isSignalConnected(signal: notificationSignal))
212 emit receivedDidChangeTextDocumentNotification(params);
213 else
214 protocol->handleUndispatchedNotification(method, params);
215 });
216
217 protocol->registerWillSaveTextDocumentNotificationHandler(
218 handler: [this, protocol](const QByteArray &method,
219 const QLspSpecification::Notifications::WillSaveTextDocumentParamsType
220 &params) {
221 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
222 signal: &QLspNotifySignals::receivedWillSaveTextDocumentNotification);
223 if (isSignalConnected(signal: notificationSignal))
224 emit receivedWillSaveTextDocumentNotification(params);
225 else
226 protocol->handleUndispatchedNotification(method, params);
227 });
228
229 protocol->registerDidSaveTextDocumentNotificationHandler(
230 handler: [this, protocol](
231 const QByteArray &method,
232 const QLspSpecification::Notifications::DidSaveTextDocumentParamsType &params) {
233 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
234 signal: &QLspNotifySignals::receivedDidSaveTextDocumentNotification);
235 if (isSignalConnected(signal: notificationSignal))
236 emit receivedDidSaveTextDocumentNotification(params);
237 else
238 protocol->handleUndispatchedNotification(method, params);
239 });
240
241 protocol->registerDidCloseTextDocumentNotificationHandler(
242 handler: [this, protocol](const QByteArray &method,
243 const QLspSpecification::Notifications::DidCloseTextDocumentParamsType
244 &params) {
245 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
246 signal: &QLspNotifySignals::receivedDidCloseTextDocumentNotification);
247 if (isSignalConnected(signal: notificationSignal))
248 emit receivedDidCloseTextDocumentNotification(params);
249 else
250 protocol->handleUndispatchedNotification(method, params);
251 });
252
253 protocol->registerPublishDiagnosticsNotificationHandler(
254 handler: [this, protocol](
255 const QByteArray &method,
256 const QLspSpecification::Notifications::PublishDiagnosticsParamsType &params) {
257 static const QMetaMethod notificationSignal = QMetaMethod::fromSignal(
258 signal: &QLspNotifySignals::receivedPublishDiagnosticsNotification);
259 if (isSignalConnected(signal: notificationSignal))
260 emit receivedPublishDiagnosticsNotification(params);
261 else
262 protocol->handleUndispatchedNotification(method, params);
263 });
264}
265
266QT_END_NAMESPACE
267

source code of qtlanguageserver/src/languageserver/qlspnotifysignals.cpp