7#include <QtCore/qcborvalue.h>
8#include <QtCore/qcompare.h>
9#include <QtCore/qglobal.h>
10#include <QtCore/qstring.h>
11#include <QtCore/qshareddata.h>
44#ifndef QT_NO_CAST_FROM_ASCII
80 bool toBool(
bool defaultValue =
false)
const;
81 int toInt(
int defaultValue = 0)
const;
83 double toDouble(
double defaultValue = 0)
const;
96#if QT_CORE_REMOVED_SINCE(6, 8)
118 static_assert(
sizeof(QExplicitlySharedDataPointer<QCborContainerPrivate>) ==
sizeof(
void *));
129 inline operator QJsonValue()
const {
return concrete(*
this); }
141 bool toBool(
bool defaultValue =
false)
const
142 {
return concreteBool(*
this, defaultValue); }
143 int toInt(
int defaultValue = 0)
const
144 {
return int(concreteInt(*
this, defaultValue,
true)); }
146 {
return concreteInt(*
this, defaultValue,
false); }
148 {
return concreteDouble(*
this, defaultValue); }
150 {
return concreteString(*
this, defaultValue); }
174 Q_CORE_EXPORT
static bool
176 Q_CORE_EXPORT
static qint64
178 Q_CORE_EXPORT
static double
187#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
227 size_t index : std::numeric_limits<size_t>::digits - 1;
244#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
253 operator QJsonValue()
const {
return toValue(); }
277#if QT_CORE_REMOVED_SINCE(6, 8)
298 using QJsonValueConstRef::operator[];
306 QT7_ONLY(Q_CORE_EXPORT)
void detach();
319#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)
323#ifndef QT_NO_DATASTREAM
QCborValue concrete() const noexcept
QJsonValue toJsonValue() const
\inmodule QtCore\reentrant
QCborArray toArray() const
QJsonValue toJsonValue() const
Converts this QCborValue object to an equivalent representation in JSON and returns it as a QJsonValu...
Type
This enum represents the QCborValue type.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QJsonValueConstRef(QCborContainerPrivate *d, size_t index, bool is_object)
const QJsonValue operator[](QLatin1StringView key) const
void rebind(QJsonValueConstRef other)
friend bool comparesEqual(const QJsonValueConstRef &lhs, const QJsonValue &rhs) noexcept
QString objectKey() const
QJsonValueConstRef(const QJsonValueConstRef &)=default
qint64 toInteger(qint64 defaultValue=0) const
bool toBool(bool defaultValue=false) const
friend bool comparesEqual(const QJsonValueConstRef &lhs, const QJsonValueConstRef &rhs) noexcept
QJsonValueConstRef & operator=(const QJsonValueConstRef &)=delete
QString toString(const QString &defaultValue={}) const
QJsonValue::Type type() const
const QJsonValue operator[](qsizetype i) const
double toDouble(double defaultValue=0) const
int toInt(int defaultValue=0) const
const QJsonValue operator[](QStringView key) const
\inmodule QtCore \reentrant
\inmodule QtCore\reentrant
QT_ASCII_CAST_WARN QJsonValue(const char *s)
Creates a value of type String with value s, assuming UTF-8 encoding of the input.
bool isBool() const
Returns true if the value contains a boolean.
bool isString() const
Returns true if the value contains a string.
bool isDouble() const
Returns true if the value contains a double.
bool isNull() const
Returns true if the value is null.
~QJsonValue()
Destroys the value.
QJsonValue(const QJsonValue &other) noexcept
Creates a copy of other.
bool isArray() const
Returns true if the value contains an array.
bool isObject() const
Returns true if the value contains an object.
bool isUndefined() const
Returns true if the value is undefined.
Type
This enum describes the type of the JSON value.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
class QT6_ONLY(Q_CORE_EXPORT) QChar
#define Q_DECLARE_EQUALITY_COMPARABLE(...)
#define Q_DECL_PURE_FUNCTION
#define QT_WARNING_DISABLE_MSVC(number)
constexpr bool operator!=(const timespec &t1, const timespec &t2)
bool comparesEqual(const QDir &lhs, const QDir &rhs)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonValue &)
Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QJsonValue &)
Q_CORE_EXPORT size_t qHash(const QJsonValue &value, size_t seed=0)
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
#define QT_ASCII_CAST_WARN
unsigned long long quint64
static QVariant toVariant(const QV4::Value &value, QMetaType typeHint, JSToQVariantConversionBehavior conversionBehavior, V4ObjectSet *visitedObjects)
static int toInt(const QChar &qc, int R)
static double toDouble(Value v)
char * toString(const MyType &t)
[31]
QT_BEGIN_NAMESPACE bool toBool(const QString &str)