diff options
Diffstat (limited to 'src/corelib/json/qjsonarray.cpp')
-rw-r--r-- | src/corelib/json/qjsonarray.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/corelib/json/qjsonarray.cpp b/src/corelib/json/qjsonarray.cpp index 61bb158ff5..6f3a960f05 100644 --- a/src/corelib/json/qjsonarray.cpp +++ b/src/corelib/json/qjsonarray.cpp @@ -138,6 +138,18 @@ QJsonArray::QJsonArray() } /*! + \fn QJsonArray::QJsonArray(std::initializer_list<QJsonValue> args) + \since 5.4 + Creates an array initialized from \a args initialization list. + + QJsonArray can be constructed in a way similar to JSON notation, + for example: + \code + QJsonArray array = { 1, 2.2, QString() }; + \endcode + */ + +/*! \internal */ QJsonArray::QJsonArray(QJsonPrivate::Data *data, QJsonPrivate::Array *array) @@ -149,6 +161,19 @@ QJsonArray::QJsonArray(QJsonPrivate::Data *data, QJsonPrivate::Array *array) } /*! + This method replaces part of QJsonArray(std::initializer_list<QJsonValue> args) . + The constructor needs to be inline, but we do not want to leak implementation details + of this class. + \note this method is called for an uninitialized object + \internal + */ +void QJsonArray::initialize() +{ + d = 0; + a = 0; +} + +/*! Deletes the array. */ QJsonArray::~QJsonArray() @@ -721,6 +746,11 @@ bool QJsonArray::operator!=(const QJsonArray &other) const from which you got the reference. */ +/*! \fn QJsonValueRef *QJsonArray::iterator::operator->() const + + Returns a pointer to a modifiable reference to the current item. +*/ + /*! \fn QJsonValueRef QJsonArray::iterator::operator[](int j) const Returns a modifiable reference to the item at offset \a j from the @@ -946,6 +976,11 @@ bool QJsonArray::operator!=(const QJsonArray &other) const Returns the current item. */ +/*! \fn QJsonValue *QJsonArray::const_iterator::operator->() const + + Returns a pointer to the current item. +*/ + /*! \fn QJsonValue QJsonArray::const_iterator::operator[](int j) const Returns the item at offset \a j from the item pointed to by this iterator (the item at |