7#include <QtCore/qjsonvalue.h>
8#include <QtCore/qiterator.h>
9#include <QtCore/qpair.h>
10#include <QtCore/qshareddata.h>
11#include <initializer_list>
24 QJsonObject(std::initializer_list<std::pair<QString, QJsonValue> >
args);
75#if QT_CORE_REMOVED_SINCE(6, 8)
110#if QT_CORE_REMOVED_SINCE(6, 8)
132#if QT_CORE_REMOVED_SINCE(6, 8)
145 static bool comparesEqual_helper(
const iterator &lhs,
const iterator &rhs)
noexcept
147 return lhs.item.d == rhs.item.d && lhs.item.index == rhs.item.index;
149 static bool comparesEqual_helper(
const iterator &lhs,
const const_iterator &rhs)
noexcept
151 return lhs.item.d == rhs.item.d && lhs.item.index == rhs.item.index;
155 const iterator &rhs)
noexcept
161 const const_iterator &rhs)
noexcept
170 return comparesEqual_helper(lhs, rhs);
175 return compareThreeWay_helper(lhs, rhs);
181 return comparesEqual_helper(lhs, rhs);
186 return compareThreeWay_helper(lhs, rhs);
222#if QT_CORE_REMOVED_SINCE(6, 8)
242#if QT_CORE_REMOVED_SINCE(6, 8)
256 static bool comparesEqual_helper(
const const_iterator &lhs,
257 const const_iterator &rhs)
noexcept
259 return lhs.item.d == rhs.item.d && lhs.item.index == rhs.item.index;
262 const const_iterator &rhs)
noexcept
271 return comparesEqual_helper(lhs, rhs);
276 return compareThreeWay_helper(lhs, rhs);
296 const_iterator constFind(
const QString &
key)
const;
312 inline bool empty()
const {
return isEmpty(); }
343 template <typename T>
void removeImpl(T
key);
345 template <typename T>
bool containsImpl(T
key) const;
350#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
358 QExplicitlySharedDataPointer<QCborContainerPrivate>
o;
363#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED)
371#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)
375#ifndef QT_NO_DATASTREAM
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
const QJsonValueConstRef * pointer
const_iterator & operator-=(qsizetype j)
Makes the iterator go back by j items.
const QJsonValueConstRef reference
const_iterator & operator--()
The prefix {–} operator, {–i}, makes the preceding item current and returns an iterator pointing to t...
const QJsonValueConstRef operator*() const
Returns the current item's value.
const_iterator(const QJsonObject *obj, qsizetype index)
constexpr const_iterator(const const_iterator &other)=default
const_iterator operator--(int)
This is an overloaded member function, provided for convenience. It differs from the above function o...
const_iterator(const iterator &other)
Constructs a copy of other.
std::random_access_iterator_tag iterator_category
A synonym for {std::random_access_iterator_tag} indicating this iterator is a random-access iterator.
qsizetype difference_type
QJsonValueConstRef value() const
Returns the current item's value.
const_iterator operator-(qsizetype j) const
Returns an iterator to the item at j positions backward from this iterator.
const_iterator & operator++()
The prefix {++} operator, {++i}, advances the iterator to the next item in the object and returns an ...
QString key() const
Returns the current item's key.
QJsonValueConstRef operator[](qsizetype j) const
Returns the item at offset j from the item pointed to by this iterator (the item at position {*this +...
friend Qt::strong_ordering compareThreeWay(const const_iterator &lhs, const const_iterator &rhs) noexcept
const_iterator operator+(qsizetype j) const
Returns an iterator to the item at j positions forward from this iterator.
const_iterator operator++(int)
This is an overloaded member function, provided for convenience. It differs from the above function o...
friend bool comparesEqual(const const_iterator &lhs, const const_iterator &rhs) noexcept
const_iterator & operator=(const const_iterator &other)
const_iterator & operator+=(qsizetype j)
Advances the iterator by j items.
const_iterator()
Constructs an uninitialized iterator.
const QJsonValueConstRef * operator->() const
Returns a pointer to the current item.
qsizetype operator-(const_iterator j) const
Returns the number of items between the item pointed to by other and the item pointed to by this iter...
\inmodule QtCore\reentrant
iterator operator--(int)
This is an overloaded member function, provided for convenience. It differs from the above function o...
iterator()
Constructs an uninitialized iterator.
QJsonValueRef operator[](qsizetype j) const
Returns a modifiable reference to the item at offset j from the item pointed to by this iterator (the...
iterator operator-(qsizetype j) const
Returns an iterator to the item at j positions backward from this iterator.
qsizetype operator-(iterator j) const
Returns the number of items between the item pointed to by other and the item pointed to by this iter...
iterator & operator++()
The prefix {++} operator, {++i}, advances the iterator to the next item in the object and returns an ...
QJsonValueRef value() const
Returns a modifiable reference to the current item's value.
iterator operator++(int)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QJsonValueRef * operator->()
Returns a pointer to a modifiable reference to the current item.
iterator & operator-=(qsizetype j)
Makes the iterator go back by j items.
QString key() const
Returns the current item's key.
friend bool comparesEqual(const iterator &lhs, const iterator &rhs) noexcept
qsizetype difference_type
iterator & operator--()
The prefix {–} operator, {–i}, makes the preceding item current and returns an iterator pointing to t...
friend Qt::strong_ordering compareThreeWay(const iterator &lhs, const const_iterator &rhs) noexcept
iterator & operator=(const iterator &other)
friend Qt::strong_ordering compareThreeWay(const iterator &lhs, const iterator &rhs) noexcept
iterator operator+(qsizetype j) const
Returns an iterator to the item at j positions forward from this iterator.
iterator & operator+=(qsizetype j)
Advances the iterator by j items.
std::random_access_iterator_tag iterator_category
A synonym for {std::random_access_iterator_tag} indicating this iterator is a random-access iterator.
const QJsonValueConstRef * operator->() const
Returns a pointer to a constant reference to the current item.
constexpr iterator(const iterator &other)=default
QJsonValueRef operator*() const
Returns a modifiable reference to the current item's value.
iterator(QJsonObject *obj, qsizetype index)
\inmodule QtCore\reentrant
const_iterator find(QStringView key) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
iterator Iterator
Qt-style synonym for QJsonObject::iterator.
~QJsonObject()
Destroys the object.
const_iterator constBegin() const
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the object.
iterator end()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
QJsonValue mapped_type
Typedef for QJsonValue.
const_iterator end() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool empty() const
This function is provided for STL compatibility.
void swap(QJsonObject &other) noexcept
QJsonObject(const QJsonObject &other) noexcept
Creates a copy of other.
QString key_type
Typedef for QString.
qsizetype size_type
Typedef for qsizetype.
const_iterator constEnd() const
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the ...
const_iterator find(const QString &key) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
const_iterator find(QLatin1StringView key) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype count() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QJsonObject()
Constructs an empty JSON object.
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the object.
friend bool comparesEqual(const QJsonObject &lhs, const QJsonValueConstRef &rhs) noexcept
qsizetype length() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
const_iterator begin() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
friend bool comparesEqual(const QJsonObject &lhs, const QJsonValue &rhs) noexcept
const_iterator ConstIterator
Qt-style synonym for QJsonObject::const_iterator.
QJsonValueConstRef(const QJsonValueConstRef &)=default
\inmodule QtCore \reentrant
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
\inmodule QtCore \title Classes and helpers for defining comparison operators \keyword qtcompare
QMap< QString, QString > map
[6]
cache insert(employee->id(), employee)
QSet< QString >::iterator it
Combined button and popup list for selecting options.
constexpr Qt::strong_ordering compareThreeWay(LeftInt lhs, RightInt rhs) noexcept
qsizetype erase(QByteArray &ba, const T &t)
#define Q_DECLARE_EQUALITY_COMPARABLE(...)
#define Q_DECLARE_STRONGLY_ORDERED(...)
constexpr bool operator!=(const timespec &t1, const timespec &t2)
constexpr timespec operator+(const timespec &t1, const timespec &t2)
bool comparesEqual(const QDir &lhs, const QDir &rhs)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QJsonObject &)
Q_CORE_EXPORT size_t qHash(const QJsonObject &object, size_t seed=0)
Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonObject &)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
bool operator>(const QPoint &a, const QPoint &b)
static qreal valueAt(const QQuickRangeSlider *slider, qreal position)
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
unsigned long long quint64
bool operator<=(const QUuid &lhs, const QUuid &rhs) noexcept
bool operator>=(const QUuid &lhs, const QUuid &rhs) noexcept
settings remove("monkey")