Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qjsonvalue.cpp
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// Copyright (C) 2022 Intel Corporation.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#include <qjsonobject.h>
6#include <qjsonvalue.h>
7#include <qjsonarray.h>
8#include <qjsondocument.h>
9#include <qurl.h>
10#include <quuid.h>
11#include <qvariant.h>
12#include <qstringlist.h>
13#include <qmap.h>
14#include <qhash.h>
15#include <qdebug.h>
16#include "qdatastream.h"
17
18#include <private/qnumeric_p.h>
19#include <private/qcborvalue_p.h>
20
21#include <qcborarray.h>
22#include <qcbormap.h>
23
24#include "qjson_p.h"
25
27
29{
30 switch (type) {
32 return QJsonValue::Null;
35 return QJsonValue::Bool;
38 return QJsonValue::Double;
40 return QJsonValue::String;
42 return QJsonValue::Array;
43 case QCborValue::Map:
44 return QJsonValue::Object;
46 default:
48 }
49}
50
108{
109 switch (type) {
110 case Null:
112 break;
113 case Bool:
115 break;
116 case Double:
118 break;
119 case String:
121 break;
122 case Array:
124 break;
125 case Object:
127 break;
128 case Undefined:
129 break;
130 }
131}
132
137 : value(b)
138{
139}
140
141static inline QCborValue doubleValueHelper(double v)
142{
143 qint64 n = 0;
144 // Convert to integer if the number is an integer and changing wouldn't
145 // introduce additional digit precision not present in the double.
146 if (convertDoubleTo<qint64>(v, &n, false /* allow_precision_upgrade */))
147 return n;
148 else
149 return v;
150}
151
157{
158}
159
165 : value(v)
166{
167}
168
176 : value(v)
177{
178}
179
184 : value(s)
185{
186}
187
204 : value(s)
205{
206}
207
212 : value(QCborArray::fromJsonArray(a))
213{
214}
215
221 : value(QCborArray::fromJsonArray(std::move(a)))
222{
223}
224
229 : value(QCborMap::fromJsonObject(o))
230{
231}
232
238 : value(QCborMap::fromJsonObject(std::move(o)))
239{
240}
241
242
246QJsonValue::~QJsonValue() = default;
247
251QJsonValue::QJsonValue(const QJsonValue &other) noexcept = default;
252
257{
259 swap(copy);
260 return *this;
261}
262
264 : value(std::move(other.value))
265{
266 other.value = QCborValue(nullptr);
267}
268
270{
271 value.swap(other.value);
272}
273
471{
472 switch (variant.metaType().id()) {
473 case QMetaType::Nullptr:
474 return QJsonValue(Null);
475 case QMetaType::Bool:
476 return QJsonValue(variant.toBool());
477 case QMetaType::Short:
478 case QMetaType::UShort:
479 case QMetaType::Int:
480 case QMetaType::UInt:
481 case QMetaType::LongLong:
482 return QJsonValue(variant.toLongLong());
483 case QMetaType::ULongLong:
484 if (variant.toULongLong() <= static_cast<uint64_t>(std::numeric_limits<qint64>::max()))
485 return QJsonValue(variant.toLongLong());
487 case QMetaType::Float:
488 case QMetaType::Double: {
489 double v = variant.toDouble();
490 return qt_is_finite(v) ? QJsonValue(v) : QJsonValue();
491 }
492 case QMetaType::QString:
493 return QJsonValue(variant.toString());
494 case QMetaType::QStringList:
496 case QMetaType::QVariantList:
498 case QMetaType::QVariantMap:
500 case QMetaType::QVariantHash:
502#ifndef QT_BOOTSTRAPPED
503 case QMetaType::QUrl:
505 case QMetaType::QUuid:
507 case QMetaType::QJsonValue:
508 return variant.toJsonValue();
509 case QMetaType::QJsonObject:
510 return variant.toJsonObject();
511 case QMetaType::QJsonArray:
512 return variant.toJsonArray();
513 case QMetaType::QJsonDocument: {
515 return doc.isArray() ? QJsonValue(doc.array()) : QJsonValue(doc.object());
516 }
517 case QMetaType::QCborValue:
518 return qvariant_cast<QCborValue>(variant).toJsonValue();
519 case QMetaType::QCborArray:
520 return qvariant_cast<QCborArray>(variant).toJsonArray();
521 case QMetaType::QCborMap:
522 return qvariant_cast<QCborMap>(variant).toJsonObject();
523#endif
524 default:
525 break;
526 }
527 QString string = variant.toString();
528 if (string.isEmpty())
529 return QJsonValue();
530 return QJsonValue(string);
531}
532
549{
550 switch (value.type()) {
551 case QCborValue::True:
552 return true;
554 return false;
556 return toInteger();
558 return toDouble();
560 return toString();
562 return toArray().toVariantList();
563 case QCborValue::Map:
564 return toObject().toVariantMap();
565 case QCborValue::Null:
566 return QVariant::fromValue(nullptr);
568 default:
569 break;
570 }
571 return QVariant();
572}
573
597{
598 return convertFromCborType(value.type());
599}
600
606bool QJsonValue::toBool(bool defaultValue) const
607{
608 switch (value.type()) {
609 case QCborValue::True:
610 return true;
612 return false;
613 default:
614 return defaultValue;
615 }
616}
617
625int QJsonValue::toInt(int defaultValue) const
626{
627 switch (value.type()) {
628 case QCborValue::Double: {
629 int dblInt;
630 if (convertDoubleTo<int>(toDouble(), &dblInt))
631 return dblInt;
632 break;
633 }
634 case QCborValue::Integer: {
635 const auto n = value.toInteger();
636 if (qint64(int(n)) == n)
637 return int(n);
638 break;
639 }
640 default:
641 break;
642 }
643 return defaultValue;
644}
645
654{
655 switch (value.type()) {
657 return value.toInteger();
658 case QCborValue::Double: {
659 qint64 dblInt;
660 if (convertDoubleTo<qint64>(toDouble(), &dblInt))
661 return dblInt;
662 break;
663 }
664 default:
665 break;
666 }
667 return defaultValue;
668}
669
675double QJsonValue::toDouble(double defaultValue) const
676{
677 return value.toDouble(defaultValue);
678}
679
685QString QJsonValue::toString(const QString &defaultValue) const
686{
687 return value.toString(defaultValue);
688}
689
698{
699 return value.toString();
700}
701
707QJsonArray QJsonValue::toArray(const QJsonArray &defaultValue) const
708{
709 if (!isArray())
710 return defaultValue;
711 QCborContainerPrivate *dd = nullptr;
713 const auto container = QJsonPrivate::Value::container(value);
714 Q_ASSERT(n == -1 || container == nullptr);
715 if (n < 0)
716 dd = container;
717 return QJsonArray(dd);
718}
719
728{
729 return toArray(QJsonArray());
730}
731
738{
739 if (!isObject())
740 return defaultValue;
741 QCborContainerPrivate *dd = nullptr;
742 const auto container = QJsonPrivate::Value::container(value);
744 Q_ASSERT(n == -1 || container == nullptr);
745 if (n < 0)
746 dd = container;
747 return QJsonObject(dd);
748}
749
758{
759 return toObject(QJsonObject());
760}
761
775{
776 return (*this)[QStringView(key)];
777}
778
784{
785 if (!isObject())
787
788 return toObject().value(key);
789}
790
796{
797 if (!isObject())
799
800 return toObject().value(key);
801}
802
816{
817 if (!isArray())
819
820 return toArray().at(i);
821}
822
827{
828 if (value.type() != other.value.type()) {
829 if (isDouble() && other.isDouble()) {
830 // One value Cbor integer, one Cbor double, should interact as doubles.
831 return toDouble() == other.toDouble();
832 }
833 return false;
834 }
835
836 switch (value.type()) {
838 case QCborValue::Null:
839 case QCborValue::True:
841 break;
843 return toDouble() == other.toDouble();
848 return toString() == other.toString();
850 return toArray() == other.toArray();
851 case QCborValue::Map:
852 return toObject() == other.toObject();
853 default:
854 return false;
855 }
856 return true;
857}
858
863{
864 return !(*this == other);
865}
866
890void QJsonValueRef::detach()
891{
892#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
894 d = QCborContainerPrivate::detach(d, d->elements.size());
895
896 if (is_object)
897 o->o.reset(d);
898 else
899 a->a.reset(d);
900#else
901 d = QCborContainerPrivate::detach(d, d->elements.size());
902#endif
903}
904
906{
909 if (is_object && value.isUndefined()) {
910 d->removeAt(index);
911 d->removeAt(index - 1);
912 } else {
913 d->replaceAt(index, value);
914 }
915
916 return ref;
917}
918
919QJsonValueRef &QJsonValueRef::operator =(const QJsonValue &val)
920{
921 detach();
922 return assignToRef(*this, QCborValue::fromJsonValue(val), is_object);
923}
924
925QJsonValueRef &QJsonValueRef::operator =(const QJsonValueRef &ref)
926{
927 // ### optimize more?
930
931 if (d == QJsonPrivate::Value::container(*this) &&
933 return *this; // self assignment
934
935 detach();
936 return assignToRef(*this, d->valueAt(index), is_object);
937}
938
940{
941 return concrete(*this).toVariant();
942}
943
945{
946 return concrete(*this).toArray();
947}
948
950{
951 return concrete(*this).toObject();
952}
953
955{
957}
958
959bool QJsonValueConstRef::concreteBool(QJsonValueConstRef self, bool defaultValue) noexcept
960{
962 if (e.type == QCborValue::False)
963 return false;
964 if (e.type == QCborValue::True)
965 return true;
966 return defaultValue;
967}
968
970{
972 qint64 v = defaultValue;
973 if (e.type == QCborValue::Double) {
974 // convertDoubleTo modifies the output even on returning false
975 if (!convertDoubleTo<qint64>(e.fpvalue(), &v))
976 v = defaultValue;
977 } else if (e.type == QCborValue::Integer) {
978 v = e.value;
979 }
980 if (clamp && qint64(int(v)) != v)
981 return defaultValue;
982 return v;
983}
984
985double QJsonValueConstRef::concreteDouble(QJsonValueConstRef self, double defaultValue) noexcept
986{
988 if (e.type == QCborValue::Double)
989 return e.fpvalue();
990 if (e.type == QCborValue::Integer)
991 return e.value;
992 return defaultValue;
993}
994
996{
1000 return defaultValue;
1001 return d->stringAt(index);
1002}
1003
1005{
1009}
1010
1012{
1013 Q_ASSERT(self.is_object);
1014 Q_ASSUME(self.is_object);
1017
1018 Q_ASSERT(d);
1019 Q_ASSERT(index < d->elements.size());
1020 return d->stringAt(index - 1);
1021}
1022
1023#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
1024QVariant QJsonValueRef::toVariant() const
1025{
1027}
1028
1029QJsonArray QJsonValueRef::toArray() const
1030{
1032}
1033
1034QJsonObject QJsonValueRef::toObject() const
1035{
1037}
1038
1039QJsonValue QJsonValueRef::toValue() const
1040{
1041 return concrete(*this);
1042}
1043#else
1044QJsonValueRef QJsonValueRef::operator[](qsizetype key)
1045{
1046 if (d->elements.at(index).type != QCborValue::Array)
1047 d->replaceAt(index, QCborValue::Array);
1048
1049 auto &e = d->elements[index];
1050 e.container = QCborContainerPrivate::grow(e.container, key); // detaches
1052
1053 return QJsonValueRef(e.container, key, false);
1054}
1055
1056QJsonValueRef QJsonValueRef::operator[](QAnyStringView key)
1057{
1058 // must go through QJsonObject because some of the machinery is non-static
1059 // member or file-static in qjsonobject.cpp
1061 QJsonValueRef ret = key.visit([&](auto v) {
1062 if constexpr (std::is_same_v<decltype(v), QUtf8StringView>)
1063 return o[QString::fromUtf8(v)];
1064 else
1065 return o[v];
1066 });
1067
1068 // ### did the QJsonObject::operator[] above detach?
1069 QCborContainerPrivate *x = o.o.take();
1070 Q_ASSERT(x->ref.loadRelaxed() == 1);
1071
1072 auto &e = d->elements[index];
1073 if (e.flags & QtCbor::Element::IsContainer && e.container != x)
1074 o.o.reset(e.container); // might not an object!
1075
1077 e.container = x;
1078
1079 return ret;
1080}
1081#endif
1082
1083size_t qHash(const QJsonValue &value, size_t seed)
1084{
1085 switch (value.type()) {
1086 case QJsonValue::Null:
1087 return qHash(nullptr, seed);
1088 case QJsonValue::Bool:
1089 return qHash(value.toBool(), seed);
1090 case QJsonValue::Double:
1091 return qHash(value.toDouble(), seed);
1092 case QJsonValue::String:
1093 return qHash(value.toString(), seed);
1094 case QJsonValue::Array:
1095 return qHash(value.toArray(), seed);
1096 case QJsonValue::Object:
1097 return qHash(value.toObject(), seed);
1099 return seed;
1100 }
1101 Q_UNREACHABLE_RETURN(0);
1102}
1103
1104#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)
1106{
1107 QDebugStateSaver saver(dbg);
1108 switch (o.value.type()) {
1110 dbg << "QJsonValue(undefined)";
1111 break;
1112 case QCborValue::Null:
1113 dbg << "QJsonValue(null)";
1114 break;
1115 case QCborValue::True:
1116 case QCborValue::False:
1117 dbg.nospace() << "QJsonValue(bool, " << o.toBool() << ')';
1118 break;
1120 dbg.nospace() << "QJsonValue(double, " << o.toInteger() << ')';
1121 break;
1122 case QCborValue::Double:
1123 dbg.nospace() << "QJsonValue(double, " << o.toDouble() << ')';
1124 break;
1125 case QCborValue::String:
1126 dbg.nospace() << "QJsonValue(string, " << o.toString() << ')';
1127 break;
1128 case QCborValue::Array:
1129 dbg.nospace() << "QJsonValue(array, ";
1130 dbg << o.toArray();
1131 dbg << ')';
1132 break;
1133 case QCborValue::Map:
1134 dbg.nospace() << "QJsonValue(object, ";
1135 dbg << o.toObject();
1136 dbg << ')';
1137 break;
1138 default:
1139 Q_UNREACHABLE();
1140 }
1141 return dbg;
1142}
1143#endif
1144
1145#ifndef QT_NO_DATASTREAM
1147{
1148 quint8 type = v.type();
1149 stream << type;
1150 switch (type) {
1152 case QJsonValue::Null:
1153 break;
1154 case QJsonValue::Bool:
1155 stream << v.toBool();
1156 break;
1157 case QJsonValue::Double:
1158 stream << v.toDouble();
1159 break;
1160 case QJsonValue::String:
1161 stream << v.toString();
1162 break;
1163 case QJsonValue::Array:
1164 stream << v.toArray();
1165 break;
1166 case QJsonValue::Object:
1167 stream << v.toObject();
1168 break;
1169 }
1170 return stream;
1171}
1172
1174{
1175 quint8 type;
1176 stream >> type;
1177 switch (type) {
1179 case QJsonValue::Null:
1181 break;
1182 case QJsonValue::Bool: {
1183 bool b;
1184 stream >> b;
1185 v = QJsonValue(b);
1186 break;
1187 } case QJsonValue::Double: {
1188 double d;
1189 stream >> d;
1190 v = QJsonValue{d};
1191 break;
1192 } case QJsonValue::String: {
1193 QString s;
1194 stream >> s;
1195 v = QJsonValue{s};
1196 break;
1197 }
1198 case QJsonValue::Array: {
1199 QJsonArray a;
1200 stream >> a;
1201 v = QJsonValue{a};
1202 break;
1203 }
1204 case QJsonValue::Object: {
1205 QJsonObject o;
1206 stream >> o;
1207 v = QJsonValue{o};
1208 break;
1209 }
1210 default: {
1213 }
1214 }
1215 return stream;
1216}
1217#endif
1218
\inmodule QtCore
\inmodule QtCore\reentrant
Definition qcborarray.h:20
static QCborArray fromJsonArray(const QJsonArray &array)
Converts all JSON items found in the array array to CBOR using QCborValue::fromJson(),...
QString stringAt(qsizetype idx) const
static QCborContainerPrivate * grow(QCborContainerPrivate *d, qsizetype index)
Prepare for an insertion at position index.
static QCborContainerPrivate * detach(QCborContainerPrivate *d, qsizetype reserved)
QList< QtCbor::Element > elements
\inmodule QtCore\reentrant
Definition qcbormap.h:21
static QCborMap fromJsonObject(const QJsonObject &o)
Converts all JSON items found in the obj object to CBOR using QCborValue::fromJson(),...
\inmodule QtCore\reentrant
Definition qcborvalue.h:50
Type
This enum represents the QCborValue type.
Definition qcborvalue.h:73
static QCborValue fromJsonValue(const QJsonValue &v)
Converts the JSON value contained in v into its corresponding CBOR value and returns it.
\inmodule QtCore\reentrant
Definition qdatastream.h:30
\inmodule QtCore
\inmodule QtCore
\inmodule QtCore\reentrant
Definition qjsonarray.h:18
static QJsonArray fromStringList(const QStringList &list)
Converts the string list list to a QJsonArray.
static QJsonArray fromVariantList(const QVariantList &list)
Converts the variant list list to a QJsonArray.
QJsonValue at(qsizetype i) const
Returns a QJsonValue representing the value for index i.
QVariantList toVariantList() const
Converts this object to a QVariantList.
\inmodule QtCore\reentrant
bool isArray() const
Returns true if the document contains an array.
QJsonArray array() const
Returns the QJsonArray contained in the document.
QJsonObject object() const
Returns the QJsonObject contained in the document.
\inmodule QtCore\reentrant
Definition qjsonobject.h:20
QVariantMap toVariantMap() const
Converts this object to a QVariantMap.
static QJsonObject fromVariantMap(const QVariantMap &map)
Converts the variant map map to a QJsonObject.
QJsonValue value(const QString &key) const
Returns a QJsonValue representing the value for the key key.
static QJsonObject fromVariantHash(const QVariantHash &map)
Converts the variant hash hash to a QJsonObject.
static QJsonValue fromTrustedCbor(const QCborValue &v)
Definition qjson_p.h:200
static qsizetype indexHelper(QJsonValueConstRef r) noexcept
Definition qjson_p.h:188
static const QtCbor::Element & elementHelper(QJsonValueConstRef r) noexcept
Definition qjson_p.h:195
static qint64 valueHelper(const QCborValue &v)
Definition qjson_p.h:174
static QCborContainerPrivate * container(const QCborValue &v)
Definition qjson_p.h:175
static Q_CORE_EXPORT qint64 concreteInt(QJsonValueConstRef self, qint64 defaultValue, bool clamp) noexcept Q_DECL_PURE_FUNCTION
static Q_CORE_EXPORT bool concreteBool(QJsonValueConstRef self, bool defaultValue) noexcept Q_DECL_PURE_FUNCTION
static Q_CORE_EXPORT QJsonValue::Type concreteType(QJsonValueConstRef self) noexcept Q_DECL_PURE_FUNCTION
static Q_CORE_EXPORT QJsonValue concrete(QJsonValueConstRef self) noexcept
static Q_CORE_EXPORT double concreteDouble(QJsonValueConstRef self, double defaultValue) noexcept Q_DECL_PURE_FUNCTION
Q_CORE_EXPORT QJsonArray toArray() const
QString objectKey() const
Definition qjsonvalue.h:168
Q_CORE_EXPORT QVariant toVariant() const
static Q_CORE_EXPORT QString concreteString(QJsonValueConstRef self, const QString &defaultValue)
QCborContainerPrivate * d
Definition qjsonvalue.h:208
Q_CORE_EXPORT QJsonObject toObject() const
\inmodule QtCore \reentrant
\inmodule QtCore\reentrant
Definition qjsonvalue.h:24
bool isDouble() const
Returns true if the value contains a double.
Definition qjsonvalue.h:73
void swap(QJsonValue &other) noexcept
QJsonValue(Type=Null)
Creates a QJsonValue of type type.
friend class QJsonObject
Definition qjsonvalue.h:103
QJsonValue & operator=(const QJsonValue &other) noexcept
Assigns the value stored in other to this object.
int toInt(int defaultValue=0) const
friend class QJsonArray
Definition qjsonvalue.h:102
QJsonObject toObject() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QJsonArray toArray() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
~QJsonValue()
Destroys the value.
double toDouble(double defaultValue=0) const
Converts the value to a double and returns it.
bool operator==(const QJsonValue &other) const
Returns true if the value is equal to other.
bool toBool(bool defaultValue=false) const
Converts the value to a bool and returns it.
static QJsonValue fromVariant(const QVariant &variant)
Converts variant to a QJsonValue and returns it.
bool isArray() const
Returns true if the value contains an array.
Definition qjsonvalue.h:75
Type type() const
Returns the type of the value.
QString toString() const
Converts the value to a QString and returns it.
bool isObject() const
Returns true if the value contains an object.
Definition qjsonvalue.h:76
const QJsonValue operator[](const QString &key) const
Returns a QJsonValue representing the value for the key key.
QVariant toVariant() const
Converts the value to a \l {QVariant::}{QVariant()}.
bool operator!=(const QJsonValue &other) const
Returns true if the value is not equal to other.
Type
This enum describes the type of the JSON value.
Definition qjsonvalue.h:26
qint64 toInteger(qint64 defaultValue=0) const
const_reference at(qsizetype i) const noexcept
Definition qlist.h:429
int id(int=0) const
Definition qmetatype.h:454
\inmodule QtCore
Definition qstringview.h:76
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:5857
@ FullyEncoded
Definition qurl.h:129
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
Definition qurl.cpp:2828
@ WithoutBraces
Definition quuid.h:54
QString toString(StringFormat mode=WithBraces) const
Definition quuid.cpp:602
\inmodule QtCore
Definition qvariant.h:64
QJsonValue toJsonValue() const
double toDouble(bool *ok=nullptr) const
Returns the variant as a double if the variant has userType() \l QMetaType::Double,...
QList< QVariant > toList() const
Returns the variant as a QVariantList if the variant has userType() \l QMetaType::QVariantList.
QMap< QString, QVariant > toMap() const
Returns the variant as a QVariantMap if the variant has type() \l QMetaType::QVariantMap.
qlonglong toLongLong(bool *ok=nullptr) const
Returns the variant as a long long int if the variant has userType() \l QMetaType::LongLong,...
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
bool toBool() const
Returns the variant as a bool if the variant has userType() Bool.
QJsonArray toJsonArray() const
QHash< QString, QVariant > toHash() const
Returns the variant as a QHash<QString, QVariant> if the variant has type() \l QMetaType::QVariantHas...
QJsonDocument toJsonDocument() const
QJsonObject toJsonObject() const
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Definition qvariant.h:531
QUuid toUuid() const
QMetaType metaType() const
qulonglong toULongLong(bool *ok=nullptr) const
Returns the variant as an unsigned long long int if the variant has type() \l QMetaType::ULongLong,...
QStringList toStringList() const
Returns the variant as a QStringList if the variant has userType() \l QMetaType::QStringList,...
QUrl toUrl() const
Returns the variant as a QUrl if the variant has userType() \l QMetaType::QUrl; otherwise returns an ...
double e
Combined button and popup list for selecting options.
static jboolean copy(JNIEnv *, jobject)
#define Q_FALLTHROUGH()
EGLStreamKHR stream
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
QDataStream & operator>>(QDataStream &stream, QJsonValue &v)
static QJsonValueRef & assignToRef(QJsonValueRef &ref, const QCborValue &value, bool is_object)
QDebug operator<<(QDebug dbg, const QJsonValue &o)
static QCborValue doubleValueHelper(double v)
static QT_BEGIN_NAMESPACE QJsonValue::Type convertFromCborType(QCborValue::Type type) noexcept
size_t qHash(const QJsonValue &value, size_t seed)
return ret
static Q_DECL_CONST_FUNCTION bool qt_is_finite(double d)
Definition qnumeric_p.h:111
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLuint64 key
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint index
[2]
GLenum type
GLfloat GLfloat clamp
GLint ref
GLfloat n
GLuint GLfloat * val
GLdouble s
[6]
Definition qopenglext.h:235
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Definition qrandom.cpp:196
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
static const QTextHtmlElement elements[Html_NumElements]
ptrdiff_t qsizetype
Definition qtypes.h:70
long long qint64
Definition qtypes.h:55
unsigned char quint8
Definition qtypes.h:41
QVariant variant
[1]
QSharedPointer< T > other(t)
[5]
this swap(other)
QCborValue::Type type
Definition moc.h:24