diff options
author | David Schulz <[email protected]> | 2021-02-26 08:29:15 +0100 |
---|---|---|
committer | David Schulz <[email protected]> | 2021-03-02 12:51:47 +0000 |
commit | d17277b5466ced5c39e615efcc7820be47d770f4 (patch) | |
tree | facc44eac9e00c61145a89c5b37fbb78b9053042 /src/plugins/languageclient/languageclientutils.cpp | |
parent | 687597152e67bd662805bf01ae1202db3ca2db2e (diff) |
LSP: reduce error handling complexity
Instead of checking recursively every possible object just check the
required keys for an object and validate it on construction or
assignment from json.
This will reduce the implementation effort for protocol extensions and
also reduce the false positives we might get if the protocol gets
updated.
Change-Id: I3df24e62430d2c7575d26c1581e6a9606e7da4c1
Reviewed-by: hjk <[email protected]>
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/languageclient/languageclientutils.cpp')
-rw-r--r-- | src/plugins/languageclient/languageclientutils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/languageclient/languageclientutils.cpp b/src/plugins/languageclient/languageclientutils.cpp index 7f1f396d1f0..b94a9fc1c9e 100644 --- a/src/plugins/languageclient/languageclientutils.cpp +++ b/src/plugins/languageclient/languageclientutils.cpp @@ -152,7 +152,7 @@ void updateCodeActionRefactoringMarker(Client *client, RefactorMarkers markers; RefactorMarker marker; marker.type = client->id(); - if (action.isValid(nullptr)) + if (action.isValid()) marker.tooltip = action.title(); if (action.edit().has_value()) { WorkspaceEdit edit = action.edit().value(); |