Helpers: improve {to,from}{String,Json}Value() methods
For overloads taking QMap as an input:
- use asKeyValueRange() to iterate through the items instead of
generating a temporary list of keys and then doing lookup via
QMap::value(). The operation is available since Qt 6.4, so
should be fine to use.
For overloads that populate QList:
- use an rvalue overload of push_back() to avoid unnecessary
copies.
Use size() instead of count() everywhere for consistency.
Drop the curly braces when the body of the loop/condition contains
only one line.
Change-Id: Ib5abd80242e537c98d3eae89d12af78f7fa6459e
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>