forked from qt-creator/qt-creator
ClangCodeModel: Request clangd quickfix for -Wswitch warning
This way, a warning about missing switch cases will be accompanied by a matching code action, which allows the user to fix it right away by clicking on the lightbulb. Requires clangd >= 15; see https://reviews.llvm.org/D118976. Change-Id: I11e82264c41e4154f979d28a5e44e72c8158595b Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -168,6 +168,8 @@ public:
|
||||
void updateConfiguration(const QJsonValue &configuration);
|
||||
|
||||
// commands
|
||||
void requestCodeActions(const LanguageServerProtocol::DocumentUri &uri,
|
||||
const LanguageServerProtocol::Diagnostic &diagnostic);
|
||||
void requestCodeActions(const LanguageServerProtocol::DocumentUri &uri,
|
||||
const QList<LanguageServerProtocol::Diagnostic> &diagnostics);
|
||||
void requestCodeActions(const LanguageServerProtocol::CodeActionRequest &request);
|
||||
@@ -253,6 +255,9 @@ private:
|
||||
void requestDocumentHighlightsNow(TextEditor::TextEditorWidget *widget);
|
||||
LanguageServerProtocol::SemanticRequestTypes supportedSemanticRequests(TextEditor::TextDocument *document) const;
|
||||
void handleSemanticTokens(const LanguageServerProtocol::SemanticTokens &tokens);
|
||||
void requestCodeActions(const LanguageServerProtocol::DocumentUri &uri,
|
||||
const LanguageServerProtocol::Range &range,
|
||||
const QList<LanguageServerProtocol::Diagnostic> &diagnostics);
|
||||
void documentClosed(Core::IDocument *document);
|
||||
|
||||
virtual void handleDocumentClosed(TextEditor::TextDocument *) {}
|
||||
|
||||
Reference in New Issue
Block a user