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 <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-02-26 08:29:15 +01:00
parent 687597152e
commit d17277b546
35 changed files with 215 additions and 1104 deletions

View File

@@ -184,7 +184,7 @@ bool LanguageClientCompletionItem::isSnippet() const
bool LanguageClientCompletionItem::isValid() const
{
return m_item.isValid(nullptr);
return m_item.isValid();
}
quint64 LanguageClientCompletionItem::hash() const