Add QJsonValueRef::toVariant()
to better mirror the API of QJsonValue Task-number: QTBUG-43686 Change-Id: I83edecf5226d44980a8a442a512a13ab9b2ac6a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
7c77013c7f
commit
75cb6f59f1
@ -704,6 +704,11 @@ QJsonValueRef &QJsonValueRef::operator =(const QJsonValueRef &ref)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QVariant QJsonValueRef::toVariant() const
|
||||||
|
{
|
||||||
|
return toValue().toVariant();
|
||||||
|
}
|
||||||
|
|
||||||
QJsonArray QJsonValueRef::toArray() const
|
QJsonArray QJsonValueRef::toArray() const
|
||||||
{
|
{
|
||||||
return toValue().toArray();
|
return toValue().toArray();
|
||||||
|
@ -146,6 +146,7 @@ public:
|
|||||||
QJsonValueRef &operator = (const QJsonValue &val);
|
QJsonValueRef &operator = (const QJsonValue &val);
|
||||||
QJsonValueRef &operator = (const QJsonValueRef &val);
|
QJsonValueRef &operator = (const QJsonValueRef &val);
|
||||||
|
|
||||||
|
QVariant toVariant() const;
|
||||||
inline QJsonValue::Type type() const { return toValue().type(); }
|
inline QJsonValue::Type type() const { return toValue().type(); }
|
||||||
inline bool isNull() const { return type() == QJsonValue::Null; }
|
inline bool isNull() const { return type() == QJsonValue::Null; }
|
||||||
inline bool isBool() const { return type() == QJsonValue::Bool; }
|
inline bool isBool() const { return type() == QJsonValue::Bool; }
|
||||||
|
Loading…
Reference in New Issue
Block a user