QJsonValueRef: add missing operator[]
Change-Id: Iae165cd7bb2a7ea02d819fa25e0618d81f9a54f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
d1fcc5d94a
commit
50e857a9cb
|
|
@ -180,6 +180,10 @@ public:
|
|||
QJsonArray toArray() const;
|
||||
QJsonObject toObject() const;
|
||||
|
||||
const QJsonValue operator[](QStringView key) const { return toValue()[key]; }
|
||||
const QJsonValue operator[](QLatin1String key) const { return toValue()[key]; }
|
||||
const QJsonValue operator[](qsizetype i) const { return toValue()[i]; }
|
||||
|
||||
inline bool operator==(const QJsonValue &other) const { return toValue() == other; }
|
||||
inline bool operator!=(const QJsonValue &other) const { return toValue() != other; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue