summaryrefslogtreecommitdiffstats
path: root/src/corelib/json/qjsonarray.cpp
diff options
context:
space:
mode:
authorMatt Broadstone <mbroadstone@devonit.com>2013-12-29 16:19:13 -0500
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-16 21:49:18 +0100
commit13806e6787502f55754660c6241b31d41e6d9ac7 (patch)
tree2d0beb00ae0ad1010a326d2752c4440fc0f7fade /src/corelib/json/qjsonarray.cpp
parent45673221aebcbe548d9d4d1fa9266094d4216101 (diff)
Added convenience methods to QJsonArray for appending QJsonValues
operators for +, +=, and << were added to QJsonArray to make it easier to work with, and more closely resemble the Qt container classes [ChangeLog][QtCore][QJsonArray] Added convenience methods to QJsonArray for appending QJsonValues Change-Id: I96e0a43015f7c0f980cbbef7f20bd2085ee04795 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/json/qjsonarray.cpp')
-rw-r--r--src/corelib/json/qjsonarray.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/corelib/json/qjsonarray.cpp b/src/corelib/json/qjsonarray.cpp
index d81de89628..61bb158ff5 100644
--- a/src/corelib/json/qjsonarray.cpp
+++ b/src/corelib/json/qjsonarray.cpp
@@ -188,6 +188,31 @@ QJsonArray &QJsonArray::operator =(const QJsonArray &other)
return *this;
}
+/*! \fn QJsonArray &QJsonArray::operator+=(const QJsonValue &value)
+
+ Appends \a value to the array, and returns a reference to the array itself.
+
+ \since 5.3
+ \sa append(), operator<<()
+*/
+
+/*! \fn QJsonArray QJsonArray::operator+(const QJsonValue &value) const
+
+ Returns an array that contains all the items in this array followed
+ by the provided \a value.
+
+ \since 5.3
+ \sa operator+=()
+*/
+
+/*! \fn QJsonArray &QJsonArray::operator<<(const QJsonValue &value)
+
+ Appends \a value to the array, and returns a reference to the array itself.
+
+ \since 5.3
+ \sa operator+=(), append()
+*/
+
/*!
Converts the string list \a list to a QJsonArray.