QJsonRPC: Force IdType construction from QJsonValue
Make IdType a class with a QJsonValue constructor, so that users of that
type don't have to parse QJsonValue into an id by themselves.
Forbid the manual creation of IdType from an int or a string by making
the constructor taking a std::variant private.
Move the toString() method into that class, and adapt all usages.
Pick-to: 6.12
Fixes: QTBUG-148487
Change-Id: Ibefc5db7c9f97c8d1c85735d76ddb6caa60909ca
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>