13#include <private/qcborvalue_p.h>
14#include <private/qjson_p.h>
245 return a ?
a->elements.size() : 0;
263 return a ==
nullptr ||
a->elements.isEmpty();
274 if (!
a || i < 0 || i >=
a->elements.size())
301 return at(
a ? (
a->elements.size() - 1) : 0);
334 if (!
a || i < 0 || i >=
a->elements.size())
370 if (!
a || i < 0 || i >=
a->elements.size())
389 detach(
a->elements.size() + 1);
481 return !
other.a->elements.size();
483 return !
a->elements.size();
484 if (
a->elements.size() !=
other.a->elements.size())
488 if (
a->valueAt(
i) !=
other.a->valueAt(
i))
499 return !(*
this ==
other);
1059#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)
1064 dbg <<
"QJsonArray()";
1069 dbg.nospace() <<
"QJsonArray("
1076#ifndef QT_NO_DATASTREAM
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
QVariantList toVariantList() const
Recursively converts each \l QCborValue in this array using QCborValue::toVariant() and returns the Q...
static QCborArray fromJsonArray(const QJsonArray &array)
Converts all JSON items found in the array array to CBOR using QCborValue::fromJson(),...
\inmodule QtCore\reentrant
static QCborValue fromJsonValue(const QJsonValue &v)
Converts the JSON value contained in v into its corresponding CBOR value and returns it.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
void insert(qsizetype i, const QJsonValue &value)
Inserts value at index position i in the array.
static QJsonArray fromStringList(const QStringList &list)
Converts the string list list to a QJsonArray.
~QJsonArray()
Deletes the array.
bool contains(const QJsonValue &element) const
Returns true if the array contains an occurrence of value, otherwise false.
static QJsonArray fromVariantList(const QVariantList &list)
Converts the variant list list to a QJsonArray.
QJsonValueRef operator[](qsizetype i)
Returns the value at index position i as a modifiable reference.
bool isEmpty() const
Returns true if the object is empty.
bool operator!=(const QJsonArray &other) const
Returns true if this array is not equal to other.
QJsonArray()
Creates an empty array.
friend class QJsonValueRef
QJsonValue takeAt(qsizetype i)
Removes the item at index position i and returns it.
QJsonValue first() const
Returns the first value stored in the array.
qsizetype size() const
Returns the number of values stored in the array.
bool operator==(const QJsonArray &other) const
Returns true if this array is equal to other.
void removeAt(qsizetype i)
Removes the value at index position i.
void replace(qsizetype i, const QJsonValue &value)
Replaces the item at index position i with value.
QJsonArray & operator=(const QJsonArray &other) noexcept
Assigns other to this array.
void append(const QJsonValue &value)
Inserts value at the end of the array.
QJsonValue at(qsizetype i) const
Returns a QJsonValue representing the value for index i.
QVariantList toVariantList() const
Converts this object to a QVariantList.
QJsonValue last() const
Returns the last value stored in the array.
void prepend(const QJsonValue &value)
Inserts value at the beginning of the array.
\inmodule QtCore\reentrant
QByteArray toJson(JsonFormat format=Indented) const
QJsonArray array() const
Returns the QJsonArray contained in the document.
static QJsonValue fromTrustedCbor(const QCborValue &v)
static QJsonArray toJsonArray(const QVariantList &list)
static void arrayToJson(const QCborContainerPrivate *a, QByteArray &json, int indent, bool compact=false)
\inmodule QtCore \reentrant
\inmodule QtCore\reentrant
const_iterator constBegin() const noexcept
const_iterator constEnd() const noexcept
QSet< QString >::iterator it
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
size_t qHashRange(InputIterator first, InputIterator last, size_t seed=0) noexcept(noexcept(qHash(*first)))
QDebug operator<<(QDebug dbg, const QJsonArray &a)
QDataStream & operator>>(QDataStream &stream, QJsonArray &array)
size_t qHash(const QJsonArray &array, size_t seed)
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
static const QTextHtmlElement elements[Html_NumElements]