Simplify the WorkspaceEdit struct


One of the member types of the WorkspaceEdit struct is unnecesarily
complicated and ambiguous:
for two types A, B with
A = QList<TextDocumentEdit>
B = QList<std::variant<TextDocumentEdit, ...>>
it uses std::variant<A, B> which does not really make sense: B can
represent an A so there is no need to have to deal with an extra
wrapper.

Add a way to patch types in the generate.ts script, and add an extry for
the WorkspaceEdit: instead of std::variant<A, B>, it now uses B.

Add a test to show that B can indeed be deserialized from a Json from A,
and that B can also be serialized into the same Json as A (or an A
inside a std::variant<A, B>), to show that
this change does not change anything from the client side (that only
gets information via Json).

This is needed by the renaming task as renaming operations require the
use of WorkspaceEdits.

Task-number: QTBUG-114993
Change-Id: Ib40198f373227811ac8f78c370dbad61dd087a3a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
commit0eff90cdf2fea9c4420b9a979c1f0ca6b8ffcd72
parente408713529f8b6e1d25d402ec8cec394de83f49a
authorSami Shalayel <sami.shalayel@qt.io>
committerSami Shalayel <sami.shalayel@qt.io>
commit timeWed, 24 Apr 2024 08:53:03 +0200