summaryrefslogtreecommitdiffstats
path: root/src/corelib/json/qjsonvalue.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-07-19 13:53:50 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-20 02:18:18 +0200
commit122fa138f3c01b7c4f745aaafa526d1bcdc38bbb (patch)
tree289da1338b98cc9ecfab846e43e0f13baf911955 /src/corelib/json/qjsonvalue.cpp
parent917ef5787444403ce0f7f035e27b1740c7672e34 (diff)
Fixed most qdoc errors for the json classes.
Change-Id: Ibbbdd7212f6c5e25422bbaa9ccaf4822db52222a Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/corelib/json/qjsonvalue.cpp')
-rw-r--r--src/corelib/json/qjsonvalue.cpp64
1 files changed, 59 insertions, 5 deletions
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index bde3323fa0..91318a4ba9 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -255,6 +255,60 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
}
/*!
+ \fn bool QJsonValue::isNull() const
+
+ Returns true if the value is null.
+*/
+
+/*!
+ \fn bool QJsonValue::isBool() const
+
+ Returns true if the value contains a boolean.
+
+ \sa toBool()
+ */
+
+/*!
+ \fn bool QJsonValue::isDouble() const
+
+ Returns true if the value contains a double.
+
+ \sa toDouble()
+ */
+
+/*!
+ \fn bool QJsonValue::isString() const
+
+ Returns true if the value contains a string.
+
+ \sa toString()
+ */
+
+/*!
+ \fn bool QJsonValue::isArray() const
+
+ Returns true if the value contains an array.
+
+ \sa toArray()
+ */
+
+/*!
+ \fn bool QJsonValue::isObject() const
+
+ Returns true if the value contains an object.
+
+ \sa toObject()
+ */
+
+/*!
+ \fn bool QJsonValue::isUndefined() const
+
+ Returns true if the value is undefined. This can happen in certain
+ error cases as e.g. accessing a non existing key in a QJsonObject.
+ */
+
+
+/*!
Converts \a variant to a QJsonValue and returns it.
The conversion will convert QVariant types as follows:
@@ -369,7 +423,7 @@ QJsonValue::Type QJsonValue::type() const
/*!
Converts the value to a bool and returns it.
- If type() is not bool, the defaultValue will be returned.
+ If type() is not bool, the \a defaultValue will be returned.
*/
bool QJsonValue::toBool(bool defaultValue) const
{
@@ -381,7 +435,7 @@ bool QJsonValue::toBool(bool defaultValue) const
/*!
Converts the value to a double and returns it.
- If type() is not Double, the defaultValue will be returned.
+ If type() is not Double, the \a defaultValue will be returned.
*/
double QJsonValue::toDouble(double defaultValue) const
{
@@ -393,7 +447,7 @@ double QJsonValue::toDouble(double defaultValue) const
/*!
Converts the value to a QString and returns it.
- If type() is not String, the defaultValue will be returned.
+ If type() is not String, the \a defaultValue will be returned.
*/
QString QJsonValue::toString(const QString &defaultValue) const
{
@@ -407,7 +461,7 @@ QString QJsonValue::toString(const QString &defaultValue) const
/*!
Converts the value to an array and returns it.
- If type() is not Array, the defaultValue will be returned.
+ If type() is not Array, the \a defaultValue will be returned.
*/
QJsonArray QJsonValue::toArray(const QJsonArray &defaultValue) const
{
@@ -432,7 +486,7 @@ QJsonArray QJsonValue::toArray() const
/*!
Converts the value to an object and returns it.
- If type() is not Object, the defaultValue will be returned.
+ If type() is not Object, the \a defaultValue will be returned.
*/
QJsonObject QJsonValue::toObject(const QJsonObject &defaultValue) const
{