diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-04-28 09:40:49 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-05-10 21:18:46 +0000 |
commit | a5159cc50aa0f8a57b6f736621b359a3bcecbf7e (patch) | |
tree | b563d6cc510c93e62f099e93922e7133c3959758 /src/corelib/global | |
parent | 5e51b15066eab5fd58f3975e5b7d47d9605ca725 (diff) |
QJsonObject: add some overloads taking QLatin1String
QXmlStreamReader also has QLatin1String overloads, which
greatly benefits parsers, since the vast majority of keys
in both JSON and XML are US-ASCII. This patch adds such an
overload to the JSON parser.
The value() function is all typical parsers need, so even
though many more QJsonObject functions taking QString could
benefit from the same treatment, value() is the single most
important one for read-only JSON access.
Add some more overloads, too, for functions that don't need
more internal scaffolding than value(). Requires adding a
dummy op[](QL1S) (forwarding to the QString overload) so as
not to make
QJsonObject json;
json[QLatin1String("key")]; // mutable
ambiguous between const op[](QL1S) and mutable op[](QString).
[ChangeLog][QtCore][QJsonObject] Added value(), op[] const,
find(), constFind(), contains() overloads taking QLatin1String.
Change-Id: I00883028956ad949ba5ba2b18dd8a6a25ad5085b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/corelib/global')
0 files changed, 0 insertions, 0 deletions